Commit cc50b655 authored by Beuster's avatar Beuster
Browse files

Add package CityDoctorHealing

Start working on cpp conversion
parent 2d57794b
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="test" value="true"/>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
<attributes>
<attribute name="test" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="optional" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry combineaccessrules="false" kind="src" path="/CityDoctorEdge"/>
<classpathentry combineaccessrules="false" kind="src" path="/CityDoctorCheckResult"/>
<classpathentry combineaccessrules="false" kind="src" path="/CityDoctorGUI"/>
<classpathentry combineaccessrules="false" kind="src" path="/CityDoctorModel"/>
<classpathentry combineaccessrules="false" kind="src" path="/CityDoctorValidation"/>
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
<attribute name="optional" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>CityDoctorHealing</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
</projectDescription>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=1.8
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>CityDoctor</groupId>
<artifactId>CityDoctorHealing</artifactId>
<version>0.0.1-SNAPSHOT</version>
</project>
\ No newline at end of file
package de.hft.stuttgart.citydoctor2.healing;
import java.util.ArrayList;
//import de.hft.stuttgart.citydoctor2.edge;
public class HealingClass
{
// public void initClass()
// {
// Settings.initClass();
// BuildingToHeal.initClass();
// TrackChanges.initClass();
//
// EDGE_INIT_CLASS(HealingClass, "HealingClass", Base);
// }
// public HealingClass()
// {
// this.mHealingMethod = undefined;
//
// this.mSettings = new Settings();
// EDGE_CONSTRUCTOR(HealingClass);
//
// this.mpValidate = new BRepObject_Validate();
// this.mpHealResult = new HealResult();
//
// this.mPolygonsToHeal = new LinkedList<Integer>();
// }
// public void close()
// {
// }
// public CITY_MODEL_ERROR_CODE startHealingMethod()
// {
// // ------------------------------------------------
// // ---- CHECK IF FEATURES ARE VALID --------------
// // ------------------------------------------------
//
// QSCity3DFeature pFeature = this.getFeature();
// if (null == pFeature)
// {
// System.out.print("CD_FEATURE_POINTER_IS_NULL !!!!!!!!!!");
// System.out.println();
// return CD_FEATURE_POINTER_IS_NULL;
// }
//
// // ------------------------------------------------
// // ---- CREATE ORIGINAL BUILDINGS ----------------
// // ------------------------------------------------
//
// TrackChanges pTrackChanges = new TrackChanges(pFeature);
//
// Body pBody = createBRepModel(pFeature, pTrackChanges);
// this.setOriginalBuilding(pBody);
// this.setBuildingToHeal(new BuildingToHeal(pFeature, pBody, pTrackChanges));
//
// BuildingToHeal pBuilding = this.getBuildingToHeal();
//
// // ------------------------------------------------
// // ---- CHECK INTEGRITY OF ORIGINAL BODIES -------
// // ------------------------------------------------
//
// System.out.println();
// System.out.print("CHECK INTEGRITY OF ORIGINAL BODY FOR BUILDING ");
// System.out.print(pBuilding.getGMLName());
//
// mpValidate.setOutputAll(this.mSettings.getSettings_General().isPrintBuildingInfo());
// mpValidate.setGMLName(pBuilding.getGMLName());
// mpValidate.checkBRepModelIntegrity(pBuilding.getOptimizedBody());
//
// // ------------------------------------------------
// // ---- Create WriteBRepToInventor Class ----------
// // ---- ...and exporting intermediate stages ------
// // ------------------------------------------------
//
// WriteBRepToInventor pWriteBRepToInventor = new WriteBRepToInventor();
//
// // ------------------------------------------------
// // ---- USE HEALING METHODS ----------------------
// // ------------------------------------------------
//
// switch (this.mHealingMethod)
// {
// case undefined:
// {
// System.out.println();
// System.out.print(" UNKNOWN HEALINGMETHOD !! ");
// System.out.println();
// break;
// }
// case fixHole:
// {
// System.out.println();
// System.out.print("USE HEALING METHOD FIXHOLE FOR BUILDING ");
// System.out.print(pBuilding.getGMLName());
// System.out.println();
//
// HealingMethod_FixHole pHealingMethod_FixHole = new HealingMethod_FixHole(this, this.mSettings, pWriteBRepToInventor);
// pHealingMethod_FixHole.apply(pBuilding);
// break;
// }
// case healPlanarity:
// {
// System.out.println();
// System.out.print("USE HEALING METHOD HEAL PLANARITY FOR BUILDING ");
// System.out.print(pBuilding.getGMLName());
// System.out.println();
//
// HealingMethod_Planarity pHealingMethod_Planarity = new HealingMethod_Planarity(this, this.mSettings, pWriteBRepToInventor);
// pHealingMethod_Planarity.apply(pBuilding);
// break;
// }
// //// new: extended cases
// //case fixPartiallyNullFaces:
// //{
// // cout << endl << "USE HEALING METHOD FIX PARTIALLY NULL FACES FOR BUILDING " << pBuilding->getGMLName() << endl;
//
// // HealingMethod_FixPartiallyNullFaces * pHealingMethod_FixPartiallyNullFaces = new HealingMethod_FixPartiallyNullFaces(this, this->mSettings, pWriteBRepToInventor);
// // pHealingMethod_FixPartiallyNullFaces->apply(pBuilding);
// // break;
// //}
// //case healLoopSelfIntersection:
// //{
// // cout << endl << "USE HEALING METHOD HEAL LOOP SELFINTERSECTION FOR BUILDING " << pBuilding->getGMLName() << endl;
//
// // HealingMethod_LoopSelfIntersection * pHealingMethod_LoopSelfIntersection = new HealingMethod_LoopSelfIntersection(this, this->mSettings, pWriteBRepToInventor);
// // pHealingMethod_LoopSelfIntersection->apply(pBuilding);
// // break;
// //}
// //case healRepeatingVertex:
// //{
// // cout << endl << "USE HEALING METHOD HEAL REPEATING VERTEX FOR BUILDING " << pBuilding->getGMLName() << endl;
//
// // HealingMethod_RepeatingVertex * pHealingMethod_RepeatingVertex = new HealingMethod_RepeatingVertex(this, this->mSettings, pWriteBRepToInventor);
// // pHealingMethod_RepeatingVertex->apply(pBuilding);
// // break;
// //}
// }
//
// // ------------------------------------------------
// // ---- CHECK INTEGRITY OF FINAL BODIES -----------
// // ------------------------------------------------
//
// System.out.println();
// System.out.print("CHECK INTEGRITY OF FINAL BODY FOR BUILDING ");
// System.out.print(pBuilding.getGMLName());
//
// mpValidate.setOutputAll(this.mSettings.getSettings_General().isPrintBuildingInfo());
// mpValidate.setGMLName(pBuilding.getGMLName());
// mpValidate.checkBRepModelIntegrity(pBuilding.getOptimizedBody());
//
// // ------------------------------------------------
// // ---- EXPORT BUILDINGS -------------------------
// // ------------------------------------------------
//
// if (this.mSettings.getSettings_Export().isExportIV())
// {
// System.out.println();
// System.out.print("WRITE IV START");
// System.out.println();
// pWriteBRepToInventor.writeCompleteBRepStart(this);
// pWriteBRepToInventor.writeCompleteBRepEnd(this);
// System.out.print("WRITE IV END");
// System.out.println();
// }
//
// //#if HAVE_OCC_LIB
// {
// if (true)
// {
// boolean onlyValidBodies = false;
//
// System.out.print("WRITE STEP START");
// System.out.println();
// writeCompleteSTEPStart(this, onlyValidBodies);
// writeCompleteSTEPEnd(this, onlyValidBodies);
// System.out.print("WRITE STEP END");
// System.out.println();
// }
// }
// //#endif
//
// // ------------------------------------------------
// // ---- SET HEAL RESULT AND RETURN ----------------
// // ------------------------------------------------
//
// setHealResult();
//
//
// boolean noErrors = true;
//
// return (noErrors ? CD_OK : CD_ERROR);
//
//
// }
// public void setHealResult()
// {
// System.out.println();
// System.out.print("--------------------------- ");
// System.out.println();
// System.out.print("--- HEAL RESULT ----------- ");
// System.out.println();
// System.out.print("--------------------------- ");
// System.out.println();
//
// HealResult pHealResult = this.mpHealResult;
//
// BuildingToHeal pBuilding = this.getBuildingToHeal();
// TrackChanges pTrackChanges = pBuilding.getTrackChanges();
//
// // New Vertices
// for (Vertex cpVertex : pTrackChanges.getNewVertices())
// {
// System.out.print(" new Vertex : ");
// System.out.println();
// System.out.print(" ");
// System.out.print(pTrackChanges.getJAVAPointIDForVertex(cpVertex));
// System.out.print(" ");
// System.out.print(cpVertex.getPositionOnGeometry());
// System.out.println();
//
// int vertexID = pTrackChanges.getJAVAPointIDForVertex(cpVertex);
// double x = cpVertex.getPositionOnGeometry().getX();
// double y = cpVertex.getPositionOnGeometry().getY();
// double z = cpVertex.getPositionOnGeometry().getZ();
// pHealResult.addChangedVertex(vertexID, x, y, z);
// }
//
// // New Polygons
// for (Face cpFace : pTrackChanges.getNewFaces())
// {
// int id = -1;
// ArrayList<Integer> vertexIds = new ArrayList<Integer>();
//
// System.out.print(" new Polygon : ");
// System.out.println();
// System.out.print(" Polygon ID : ");
// System.out.print(pTrackChanges.getJAVAPolygonIDForFace(cpFace));
// System.out.println();
// System.out.print(" Vertex IDs : ");
// System.out.println();
//
// ArrayList<Integer> vertices = new ArrayList<Integer>();
// Loop cpTempLoop = cpFace.getLoop();
// while (cpTempLoop != null)
// {
// if (cpTempLoop == cpFace.getLoop())
// {
// vertices.add(-1); // first Vertex. "-1" to indicate outer Loop
// }
// else
// {
// System.out.print(" innerLoop ");
// System.out.println();
// vertices.add(-2); // "-2" to indicate inner Loop
// }
// for (Vertex cpVertex : getAllVerticesForLoop(cpTempLoop))
// {
// System.out.print(" ");
// System.out.print(pTrackChanges.getJAVAPointIDForVertex(cpVertex));
// System.out.print(" ");
// System.out.print(cpVertex.getPositionOnGeometry());
// System.out.println();
// vertices.add(pTrackChanges.getJAVAPointIDForVertex(cpVertex));
// }
//
// cpTempLoop = cpTempLoop.getNext();
// }
//
// int polygonID = pTrackChanges.getJAVAPolygonIDForFace(cpFace);
// pHealResult.addChangedPolygon(polygonID, vertices);
//
// }
//
// // Changed Vertices
// for (Vertex cpVertex : pTrackChanges.getChangedVertices())
// {
// System.out.print(" changed Vertex : ");
// System.out.println();
// System.out.print(" ");
// System.out.print(pTrackChanges.getJAVAPointIDForVertex(cpVertex));
// System.out.print(" ");
// System.out.print(cpVertex.getPositionOnGeometry());
// System.out.println();
//
// int vertexID = pTrackChanges.getJAVAPointIDForVertex(cpVertex);
// double x = cpVertex.getPositionOnGeometry().getX();
// double y = cpVertex.getPositionOnGeometry().getY();
// double z = cpVertex.getPositionOnGeometry().getZ();
// pHealResult.addChangedVertex(vertexID, x, y, z);
// }
//
// // Changed Polygons
// for (Face cpFace : pTrackChanges.getChangedFaces())
// {
// int id = -1;
// ArrayList<Integer> vertexIds = new ArrayList<Integer>();
//
// System.out.print(" changed Polygon : ");
// System.out.println();
// System.out.print(" Polygon ID : ");
// System.out.print(pTrackChanges.getJAVAPolygonIDForFace(cpFace));
// System.out.println();
// System.out.print(" Vertex IDs : ");
// System.out.println();
//
// ArrayList<Integer> vertices = new ArrayList<Integer>();
// Loop cpTempLoop = cpFace.getLoop();
// while (cpTempLoop != null)
// {
// if (cpTempLoop == cpFace.getLoop())
// {
// vertices.add(-1); // first Vertex. "-1" to indicate outer Loop
// }
// else
// {
// System.out.print(" innerLoop ");
// System.out.println();
// vertices.add(-2); // "-2" to indicate inner Loop
// }
// for (Vertex cpVertex : getAllVerticesForLoop(cpTempLoop))
// {
// System.out.print(" ");
// System.out.print(pTrackChanges.getJAVAPointIDForVertex(cpVertex));
// System.out.print(" ");
// System.out.print(cpVertex.getPositionOnGeometry());
// System.out.println();
// vertices.add(pTrackChanges.getJAVAPointIDForVertex(cpVertex));
// }
//
// cpTempLoop = cpTempLoop.getNext();
// }
//
// int polygonID = pTrackChanges.getJAVAPolygonIDForFace(cpFace);
// pHealResult.addChangedPolygon(polygonID, vertices);
//
// }
//
//
// System.out.print("--------------------------- ");
// System.out.println();
// System.out.print("--------------------------- ");
// System.out.println();
// }
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment