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();
// }
}
package de.hft.stuttgart.citydoctor2.healing;
import java.util.ArrayList;
import java.util.*;
//import de.hft.stuttgart.citydoctor2.edge;
public class HealingMethodPlanarity
{
public HealingMethodPlanarity()
{
}
// public HealingMethodPlanarity(HealingClass pHealingClass, Settings pSettings, WriteBRepToInventor pWriteBRepToInventor)
// {
// mpHealingClass = pHealingClass;
// mpBuilding = new BuildingToHeal();
// mpWriteBRepToInventor = pWriteBRepToInventor;
//
//
// mPrintInfo = false;
// mIgnoreMultiplePoints = true;
// mEps_PlanarityTolerance = 0.001;
//
// }
// public void close()
// {
// }
//
// public void apply(tangible.RefObject<BuildingToHeal> pBuilding)
// {
//
// mpBuilding = pBuilding.argValue;
// Body pOptimizedBody = mpBuilding.getOptimizedBody();
// LinkedList<Integer> polygonsToHeal = this.mpHealingClass.getPolygonsToHeal();
//
// /* TrackChanges * pTrackChanges = pBuilding.argValue.getTrackChanges();
// for (Vertex cpTempVertex : getAllVerticesForBody(pOptimizedBody))
// {
// System.out.print(" getJAVAPointIDForVertex ");
// System.out.print(pTrackChanges.getJAVAPointIDForVertex(cpTempVertex));
// System.out.print(" ");
// System.out.print(cpTempVertex.getPositionOnGeometry());
// System.out.println();
// }
// for (Face cpTempFace : getAllFaces(pOptimizedBody))
// {
// System.out.print(" getJAVAPolygonIDForFace ");
// System.out.print(pTrackChanges.getJAVAPolygonIDForFace(cpTempFace));
// System.out.print(" ( ");
// for (Vertex cpTempVertex : getAllVerticesForFace(cpTempFace))
// {
// System.out.print(" ");
// System.out.print(pTrackChanges.getJAVAPointIDForVertex(cpTempVertex));
// System.out.print(" ");
// }
// System.out.print(") ");
// System.out.println();
// }
// */
//
// Face * pTempFace = (Face)pOptimizedBody.getLump().getShell().getFace();
// while (null != pTempFace)
// {
// int faceID = pBuilding.argValue.getTrackChanges().getJAVAPolygonIDForFace(pTempFace);
// if (polygonsToHeal.contains(faceID))
// {
// if (mPrintInfo)
// {
// System.out.print(" Face ");
// System.out.print(pTempFace);
// System.out.print(" is not planar ");
// System.out.println();
// }
//
// GmPlane targetPlane = new GmPlane();
// boolean isTargetPlane = createTargetPlane_planarity(pTempFace, targetPlane);
// if (!isTargetPlane)
// {
// EDGE_ERROR << " No Target Plane !!! " << EDGE_ENDL;
// }
// else
// {
// // TODO : checkIfSweepIsPossible
// sweepFace(pTempFace, targetPlane);
// }
// }
// else if (mPrintInfo)
// {
// System.out.print(" Face ");
// System.out.print(pTempFace);
// System.out.print(" is already planar ");
// System.out.println();
// }
//
// pTempFace = (Face)pTempFace.getNext();
// } // while (NULL != pTempFace)
//
// }
//
// public void applyPlanarityToFace(Face pFace)
// {
//
// double tolerance = mEps_PlanarityTolerance;
//
// if (!isFacePlanar(pFace, tolerance)) // not necessary to sweep if all the points are already on the targetplane instead
// {
// GmPlane targetPlane = new GmPlane();
// boolean isTargetPlane = createTargetPlane_planarity(pFace, targetPlane);
// if (!isTargetPlane)
// {
// EDGE_ERROR << " No Target Plane !!! " << EDGE_ENDL;
// }
// else
// {
// // TODO : checkIfSweepIsPossible
// sweepFace(pFace, targetPlane);
// }
// }
// else if (mPrintInfo)
// {
// System.out.print(" Face ");
// System.out.print(pFace);
// System.out.print(" is already planar ");
// System.out.println();
// }
//
// }
//
// public boolean createTargetPlane_planarity(Face cpFace, tangible.RefObject<GmPlane> targetPlane)
// {
//
// Surface cpSurface = cpFace.getGeometry();
// if (cpSurface.isOfType(Plane.getClassTypeId()))
// {
// Plane pPlane = (Plane)cpSurface;
//
// boolean ignoreMultiblePoints = mIgnoreMultiplePoints;
//
//
// Point3dList multiplePoints = getComplexPoints(cpFace);
// if (multiplePoints.size() == 0 || ignoreMultiblePoints)
// {
// // simple case
// if (mPrintInfo)
// {
// System.out.print(" create simple plane with ");
// System.out.print(" plane normal : ");
// System.out.print(targetPlane.argValue.getNormal());
// System.out.print(" plane point: ");
// System.out.print(targetPlane.argValue.getPoint());
// System.out.println();
// }
// fitToPlaneOrthogonal(getAllPointsForFace(cpFace), targetPlane.argValue);
// }
//
// else if (multiplePoints.size() == 1)
// {
// // targetPlane has to go through the one vertex
// if (mPrintInfo)
// {
// System.out.print(" create plane with one fix point");
// System.out.println();
// }
// GmPlane tempPlane = pPlane.getEquation();
// Point3d multiblePoint = multiplePoints.front();
// UnitVector3d tempNormal = tempPlane.getNormal();
//
// targetPlane.argValue = GmPlane(multiblePoint, tempNormal);
// }
// else if (multiplePoints.size() == 2)
// {
// // targetPlane has to go through the two vertices
// if (mPrintInfo)
// {
// System.out.print(" create plane with two fix points");
// System.out.println();
// }
//
// GmPlane tempPlane = pPlane.getEquation();
// Point3d multiblePoint1 = multiplePoints.front();
// Point3d multiblePoint2 = multiplePoints.back();
// UnitVector3d tempNormal = tempPlane.getNormal();
// UnitVector3d tempFirst = new UnitVector3d(multiblePoint2 - multiblePoint1);
// UnitVector3d tempSecond = tempNormal * tempFirst;
//
// UnitVector3d newNormal = tempFirst * tempSecond;
// targetPlane.argValue = GmPlane(multiblePoint1, newNormal);
//
// }
// else if (multiplePoints.size() == 3)
// {
// // targetPlane has to go through the three vertices
// if (mPrintInfo)
// {
// System.out.print(" create plane with three fix points");
// System.out.println();
// }
//
// fitToPlaneOrthogonal(multiplePoints, targetPlane.argValue);
// }
// else
// {
// // targetPlane has to go through all those vertices -> if check fails return false
// fitToPlaneOrthogonal(multiplePoints, targetPlane.argValue);
//
// if (mPrintInfo)
// {
// System.out.println();
// System.out.print(" create plane with all points");
// System.out.println();
// }
//
// }
//
// return true;
// }
// else
// {
// EDGE_WARNING << " Face " << cpFace << " has no plane " << EDGE_ENDL;
// return false;
// }
// }
//
// public void sweepFace(Face pFaceToSweep, GmPlane targetPlane)
// {
//
//
// if (mPrintInfo)
// {
// System.out.print(" SWEEP PLANE OF FACE ");
// System.out.print(pFaceToSweep);
// System.out.print(" INTO PLANE WITH POINT: ");
// System.out.print(targetPlane.getPoint());
// System.out.print(" AND NORMAL ");
// System.out.print(targetPlane.getNormal());
// System.out.println();
// }
//
// double tolerance = mEps_PlanarityTolerance;
//
// VertexList vertices = getAllVerticesForFace(pFaceToSweep);
//
// for (Vertex pVertex : vertices)
// {
//
// Point3d tempPoint = pVertex.getPositionOnGeometry();
//
// if (isPointInPlane(targetPlane, tempPoint, tolerance))
// {
// continue;
// }
//
// LinkedList<Edge > otherEdges = getOtherEdges(pVertex, pFaceToSweep);
//
// if (otherEdges.size() == 0)
// {
// projectVertexOrthogonal(pVertex, targetPlane);
// }
//
// else if (otherEdges.size() != 1)
// {
//
// boolean isSplitCut;
// boolean isSplitPull;
// LinkedList<Face > newNeighborFaces = new LinkedList<Face >();
// LinkedList<Edge > edgesToElongateList = new LinkedList<Edge >();
// getVertexComplexity(pVertex, otherEdges, targetPlane, isSplitCut, isSplitPull, newNeighborFaces, edgesToElongateList);
//
// Vertex pVertexForSplit = pVertex;
//
// if (isSplitPull)
// {
// pVertexForSplit = splitVertexPull(pVertex, pFaceToSweep, newNeighborFaces, edgesToElongateList);
// //sweepVertexSimple(pNewVertex, pFaceToSweep, targetPlane);
// }
//
// if (isSplitCut)
// {
// LinkedList<Vertex > verticesForSplitCut = splitVertexCut(pVertexForSplit, pFaceToSweep);
// for (Vertex splitVertex : verticesForSplitCut)
// {
// sweepVertexSimple(splitVertex, pFaceToSweep, targetPlane);
// }
// }
// else
// {
// sweepVertexSimple(pVertexForSplit, pFaceToSweep, targetPlane);
// }
//
// }
// else
// {
// //cout << endl;
// sweepVertexSimple(pVertex, pFaceToSweep, targetPlane);
// }
// }
//
//
// // set new Geometry for Face
// Plane newPlane = new Plane(targetPlane);
// pFaceToSweep.setGeometry(newPlane);
//
// }
//
// public void projectVertexOrthogonal(Vertex pVertex, GmPlane targetPlane)
// {
//
//
// Point3d foot = targetPlane.project(pVertex.getPositionOnGeometry());
//
//
//
// if (mPrintInfo)
// {
// System.out.print(" PROJECT VERTEX ORTHOGONAL ");
// System.out.print(pVertex);
// System.out.print(" old location : ");
// System.out.print(pVertex.getPositionOnGeometry());
// System.out.print(" new location : ");
// System.out.print(foot);
// System.out.println();
// }
//
//
// // set pMovingVertex
// pVertex.getGeometry().setPoint(foot);
//
// // reset the curves of the edges of the swept vertex
// for (Edge pTempEdge : getAllEdgesForVertex(pVertex))
// {
// changeCurvePoints((Edge)pTempEdge);
// }
//
// }
//
// public void getVertexComplexity(Vertex cpTempVertex, LinkedList<Edge > otherEdges, final GmPlane targetPlane, tangible.RefObject<Boolean> isSplitCut, tangible.RefObject<Boolean> isSplitPull, final LinkedList<Face > neighbourFaces, LinkedList<Edge > edgesToElongateList)
// {
// final Point3d tempPoint = cpTempVertex.getPositionOnGeometry();
//
// int edgesToShorten = 0;
// int edgesToElongate = 0;
// //list<Edge *> edgesToElongateList;
//
// for (Edge cpOtherEdge : otherEdges)
// {
// Curve3d cpCurve = cpOtherEdge.getGeometry();
// if (!cpCurve.isOfType(Straight.getClassTypeId()))
// {
// EDGE_ERROR << " EDGE HAS NO STRAIGHT !!!!" << EDGE_ENDL;
// }
//
// Straight pStraight = (Straight)cpCurve;
// GmStraight gmStraight = pStraight.getEquation();
//
// Point3d targetPoint = new Point3d();
// boolean success = false;
// plane_str_int(targetPlane, gmStraight, targetPoint, success);
//
// if (success)
// {
// Vertex otherVertex = getOtherVertex(cpOtherEdge, cpTempVertex);
// final Point3d otherPoint = otherVertex.getPositionOnGeometry();
//
// double dist1 = (otherPoint - targetPoint).getLength();
// double dist2 = (otherPoint - tempPoint).getLength();
//
// if (dist1 < dist2) // targetPoint is probably between tempPoint and otherPoint -> edge will be shortened
// {
// edgesToShorten++;
// }
// else // edge would be elongated
// {
// edgesToElongate++;
// edgesToElongateList.addLast(cpOtherEdge);
// }
//
// }
// else
// {
// EDGE_ERROR << " FIXPOINT NOT HANDLED PROPERLY YET?" << EDGE_ENDL;
// }
// }
//
// (edgesToElongate >= 2) ? isSplitPull.argValue = true : isSplitPull.argValue = false;
// (edgesToShorten >= 1) ? isSplitCut.argValue = true : isSplitCut.argValue = false;
//
//
// for (Edge cpTempEdge : edgesToElongateList)
// {
// LinkedList<Face > faceList = getAllFacesForEdge(cpTempEdge);
// for (Face cpTempFace : faceList)
// {
// boolean listContainsFace = (neighbourFaces.contains(cpTempFace));
// if (listContainsFace)
// {
// neighbourFaces.remove(cpTempFace);
// }
// else
// {
// neighbourFaces.addLast(cpTempFace);
// }
// }
// }
//
// }
//
// public void sweepVertexSimple(Vertex pVertex, Face pFaceToSweep, GmPlane targetPlane)
// {
//
// LinkedList<Edge > otherEdges = getOtherEdges(pVertex, pFaceToSweep);
// if (otherEdges.size() != 1)
// {
// System.out.print("Vertex ");
// System.out.print(pVertex);
// System.out.print(" should be split first!!");
// System.out.println();
// EDGE_ERROR << "Vertex " << pVertex << " should be split first!!" << EDGE_ENDL;
// }
//
// Edge pOtherEdge = otherEdges.getFirst();
// Curve3d cpCurve = pOtherEdge.getGeometry();
// if (!cpCurve.isOfType(Straight.getClassTypeId()))
// {
// EDGE_ERROR << " EDGE " << pOtherEdge << "HAS NO STRAIGHT !!!!" << EDGE_ENDL;
// return;
// }
//
// Straight pStraight = (Straight)cpCurve;
// GmStraight gmStraight = pStraight.getEquation();
//
// Point3d intersectionPoint = new Point3d();
// boolean success = false;
// plane_str_int(targetPlane, gmStraight, intersectionPoint, success);
//
// if (success)
// {
// if (mPrintInfo)
// {
// System.out.print(" SWEEP VERTEX ");
// System.out.print(pVertex);
// System.out.print(" along Edge ");
// System.out.print(pOtherEdge);
// System.out.print(" old location : ");
// System.out.print(pVertex.getPositionOnGeometry());
// System.out.print(" new location : ");
// System.out.print(intersectionPoint);
// System.out.println();
// }
//
// // set pMovingVertex
// pVertex.getGeometry().setPoint(intersectionPoint);
//
// // reset the curves of the edges of the swept vertex
// for (Edge pTempEdge : getAllEdgesForVertex(pVertex))
// {
// changeCurvePoints((Edge)pTempEdge);
// }
//
// mpBuilding.getTrackChanges().changeVertex(pVertex);
// }
// else
// {
// EDGE_ERROR << " NO INTERSECTION " << EDGE_ENDL;
// }
// //std::cout << std::endl;
//
// }
//
// public boolean isPointInPlane(GmPlane plane, Point3d point, double tolerance)
// {
// Point3d foot = plane.project(point);
// double dist = (point - foot).getLength();
//
// if (dist > tolerance)
// {
// return false;
// }
//
// return true;
// }
// public Point3dList getComplexPoints(Face cpFace)
// {
//
// Point3dList multiplePoints = new Point3dList();
//
// VertexList vertices = getAllVerticesForFace(cpFace);
//
// for (Vertex pVertex : vertices)
// {
// Point3d point = pVertex.getPositionOnGeometry();
// LinkedList<Edge > otherEdges = getOtherEdges(pVertex, cpFace);
//
// if (otherEdges.size() >= 2)
// {
// multiplePoints.push_back(pVertex.getPositionOnGeometry());
// }
// }
//
// return new Point3dList(multiplePoints);
//
// }
//
// public LinkedList<Vertex > splitVertexCut(Vertex pVertexToSplit, Face pSweepFace)
// {
//
// LinkedList<Vertex > allSplitVertices = new LinkedList<Vertex >();
//
// LinkedList<Face > allFacesOfVertex = getFacesForVertex(pVertexToSplit);
// LinkedList<SplitCutTriple> unsortedTriple = new LinkedList<SplitCutTriple>();
// for (Face middleFace : allFacesOfVertex)
// {
//
// SplitCutTriple aTriple = new SplitCutTriple();
//
// aTriple.pFace_center = middleFace;
//
// LinkedList<Edge > faceEdges = getAllEdgesForFace(pVertexToSplit, middleFace);
// if (faceEdges.size() != 2)
// {
// EDGE_ERROR << "there should be two edges. faceEdges.size() = " << faceEdges.size() << EDGE_ENDL;
// System.out.print("there should be two edges. faceEdges.size() = ");
// System.out.print(faceEdges.size());
// System.out.println();
//
// for (Edge pTempEdge : faceEdges)
// {
// System.out.print(" ");
// System.out.print(pTempEdge);
// System.out.println();
// }
//
// return new LinkedList<Vertex>();
// }
//
// aTriple.pEdge_left = faceEdges.getFirst();
// aTriple.pEdge_rigth = faceEdges.getLast();
//
// aTriple.pFace_left = (Face)getFacePartner(faceEdges.getFirst(), middleFace);
// aTriple.pFace_rigth = (Face)getFacePartner(faceEdges.getLast(), middleFace);
//
// unsortedTriple.addLast(aTriple);
// }
//
// LinkedList<SplitCutTriple> sortedTriples = sortSplitCutTriples(unsortedTriple, pSweepFace);
//
//
// // only output
//
// /* cout << "main Face : " << pSweepFace << "\n";
// System.out.print("main vertex : ");
// System.out.print(pVertexToSplit);
// System.out.println();
// for (Face pFaceOfAll : allFacesOfVertex)
// {
// System.out.print(" one of the faces : ");
// System.out.print(pFaceOfAll);
// ystem.out.println();
// }
// for (SplitCutTriple aTriple : sortedTriples)
// {
// System.out.print(" Triple ");
// System.out.println();
// System.out.print(" right Face : ");
// System.out.print(aTriple.pFace_left);
// System.out.println();
// System.out.print(" middle Face : ");
// System.out.print(aTriple.pFace_center);
// System.out.println();
// System.out.print(" left Face : ");
// System.out.print(aTriple.pFace_rigth);
// System.out.println();
// System.out.print(" right Edge : ");
// System.out.print(aTriple.pEdge_left);
// System.out.println();
// System.out.print(" left Edge : ");
// System.out.print(aTriple.pFace_rigth);
// System.out.println();
//
// }*/
//
// // only output end
//
// LinkedList<Edge> allUnprocessedEdgesOfVertex;
// for (Base baseElement : pVertexToSplit.getEdges())
// {
// allUnprocessedEdgesOfVertex.push_back((Edge)baseElement);
// }
//
// Vertex pLastVertex = pVertexToSplit;
// Point3d pointCopy = pVertexToSplit.getPositionOnGeometry();
//
// CoEdge pNewCenterCoEdge = null;
// CoEdge pNewMainCoEdge = null;
//
// for (SplitCutTriple aTriple : sortedTriples)
// {
// if (aTriple.pFace_rigth == pSweepFace || aTriple.pFace_center == pSweepFace)
// {
// //cout << "don't have to process first and last triple" << endl;
// allUnprocessedEdgesOfVertex.remove(aTriple.pEdge_rigth);
// }
// else if (aTriple.pFace_left == pSweepFace)
// {
// //cout << "don't have to process second triple - just to push the first pair<Vertex *, Edge *>" << endl;
// allSplitVertices.addLast(pLastVertex);
// allUnprocessedEdgesOfVertex.remove(aTriple.pEdge_rigth);
// }
// else
// {
//
// // duplicate vertex
// Vertex pNewVertex = new Vertex(pointCopy);
// allSplitVertices.addLast(pNewVertex);
// //cout << "duplicated vertex " << pNewVertex << endl;
//
// // set some of the edgepoints to duplicated one
// for (Edge pEdgeToSet : allUnprocessedEdgesOfVertex)
// {
// //cout << "start : " << pEdgeToSet->getStartVertex() << " end : " << pEdgeToSet->getEndVertex() << endl;
// if (pEdgeToSet.getStartVertex() == pLastVertex)
// {
// pEdgeToSet.setStartVertex(pNewVertex);
// }
// else if (pEdgeToSet.getEndVertex() == pLastVertex)
// {
// pEdgeToSet.setEndVertex(pNewVertex);
// }
// else
// {
// EDGE_ERROR << "edge does not contain vertex" << EDGE_ENDL;
// }
// }
//
// // create Edge (between last and new vertex) and CoEdges
// GmStraight gmStraight = new GmStraight(pLastVertex.getPositionOnGeometry(), pNewVertex.getPositionOnGeometry());
// Straight straight = new Straight(gmStraight);
// Edge pNewEdge = new Edge(straight, Topology.FORWARD, pLastVertex, pNewVertex);
//
// // get the two loops
// Loop pLoopCenter = (Loop)aTriple.pFace_center.getLoop();
// Loop pLoopMain = (Loop)pSweepFace.getLoop();
//
// // get the corresponding coedges of the loops
// CoEdge pCoEdgeCenterRight = getCorrespondingCoEdge(aTriple.pEdge_rigth, aTriple.pFace_center);
// CoEdge pCoEdgeCenterLeft = getCorrespondingCoEdge(aTriple.pEdge_left, aTriple.pFace_center);
// CoEdge pCoEdgeMainRight = getCorrespondingCoEdge(sortedTriples.getFirst().pEdge_rigth, pSweepFace);
// CoEdge pCoEdgeMainLeft = getCorrespondingCoEdge(sortedTriples.getFirst().pEdge_left, pSweepFace);
// if (pNewMainCoEdge != null)
// {
// pCoEdgeMainRight = pNewMainCoEdge;
// }
//
// // get the previous and next coedge as well as the sense for the new center coEdge
// CoEdge pCoEdgeCenterNext = null;
// CoEdge pCoEdgeCenterPrev = null;
// Topology.Sense centerSense = Topology.UNKNOWN;
// Topology.Sense mainSense = Topology.UNKNOWN;
//
// if (pCoEdgeCenterRight.getPrevious() == pCoEdgeCenterLeft)
// {
// pCoEdgeCenterPrev = pCoEdgeCenterLeft;
// pCoEdgeCenterNext = pCoEdgeCenterRight;
// centerSense = Topology.FORWARD;
// mainSense = Topology.REVERSED;
// }
// else if (pCoEdgeCenterRight.getNext() == pCoEdgeCenterLeft)
// {
// pCoEdgeCenterNext = pCoEdgeCenterLeft;
// pCoEdgeCenterPrev = pCoEdgeCenterRight;
// centerSense = Topology.REVERSED;
// mainSense = Topology.FORWARD;
// }
// else
// {
// EDGE_ERROR << "prev and next not found for center" << EDGE_ENDL;
// }
//
// // ..same for the new main coEdge
// CoEdge pCoEdgeMainNext = null;
// CoEdge pCoEdgeMainPrev = null;
//
// if (pCoEdgeMainRight.getPrevious() == pCoEdgeMainLeft)
// {
// pCoEdgeMainPrev = pCoEdgeMainLeft;
// pCoEdgeMainNext = pCoEdgeMainRight;
// }
// else if (pCoEdgeMainRight.getNext() == pCoEdgeMainLeft)
// {
// pCoEdgeMainNext = pCoEdgeMainLeft;
// pCoEdgeMainPrev = pCoEdgeMainRight;
// }
// else
// {
// EDGE_ERROR << "prev and next not found for main" << EDGE_ENDL;
// }
//
// // create the new coedges and set relations to other coedges
// pNewCenterCoEdge = new CoEdge(pNewEdge, centerSense);
// pNewMainCoEdge = new CoEdge(pNewEdge, mainSense);
// setGeometryForCoEdge(pNewCenterCoEdge);
// setGeometryForCoEdge(pNewMainCoEdge);
//
// pNewCenterCoEdge.setPartner(pNewMainCoEdge);
// pNewMainCoEdge.setPartner(pNewCenterCoEdge);
//
// pNewCenterCoEdge.setNext(pCoEdgeCenterNext);
// pNewCenterCoEdge.setPrevious(pCoEdgeCenterPrev);
//
// pNewMainCoEdge.setNext(pCoEdgeMainNext);
// pNewMainCoEdge.setPrevious(pCoEdgeMainPrev);
//
// // add CoEdges to loop
// pLoopCenter.addCoEdge(pNewCenterCoEdge);
// pLoopMain.addCoEdge(pNewMainCoEdge);
//
//
// // output
// if (mPrintInfo)
// {
// System.out.print(" SPLIT VERTEX (CUT) ");
// System.out.print(pLastVertex);
// System.out.print(" NEW VERTEX : ");
// System.out.print(pNewVertex);
// System.out.print(" NEW EDGE : ");
// System.out.print(pNewEdge);
// System.out.println();
// }
//
//
// // set up for next iteration
// //cout << "allUnprocessedEdgesOfVertex.size before " << allUnprocessedEdgesOfVertex.size() << endl;
// allUnprocessedEdgesOfVertex.remove(aTriple.pEdge_rigth);
// //cout << "allUnprocessedEdgesOfVertex.size after " << allUnprocessedEdgesOfVertex.size() << endl;
// pLastVertex = pNewVertex;
//
// // save changes in Trackchanges
// mpBuilding.getTrackChanges().addNewVertex(pNewVertex);
// for (Face cpFace : getFacesForVertex(pNewVertex))
// {
// mpBuilding.getTrackChanges().changeFace((Face)cpFace);
// }
// }
//
// } // for(SplitCutTriple aTriple : sortedTriples)
//
//
// return new LinkedList<Vertex >(allSplitVertices);
//
//
// }
//
// public LinkedList<HealingMethod_Planarity.SplitCutTriple> sortSplitCutTriples(LinkedList<SplitCutTriple> unsortedTriples, Face pMainFace)
// {
//
// LinkedList<SplitCutTriple> sortedTriples = new LinkedList<SplitCutTriple>();
//
// for (SplitCutTriple aTriple : unsortedTriples)
// {
// if (aTriple.pFace_center == pMainFace)
// {
// sortedTriples.addLast(aTriple);
// unsortedTriples.remove(aTriple);
// break;
// }
// }
//
// Face pCurrFace = sortedTriples.getFirst().pFace_center;
// Face pNextFace = sortedTriples.getFirst().pFace_rigth;
//
// while (unsortedTriples.size() != 0)
// {
//
// for (SplitCutTriple aTriple : unsortedTriples)
// {
// if (aTriple.pFace_center == pNextFace)
// {
//
// if (aTriple.pFace_rigth == pCurrFace)
// {
// Edge pTempEdge = aTriple.pEdge_left;
// aTriple.pEdge_left = aTriple.pEdge_rigth;
// aTriple.pEdge_rigth = pTempEdge;
//
// Face pTempFace = aTriple.pFace_left;
// aTriple.pFace_left = aTriple.pFace_rigth;
// aTriple.pFace_rigth = pTempFace;
// }
//
// pNextFace = aTriple.pFace_rigth;
// pCurrFace = aTriple.pFace_center;
//
// sortedTriples.addLast(aTriple);
// unsortedTriples.remove(aTriple);
// break; // break for loop and try to find next Triple in line
// }
// }
// }
//
//
//
// return new LinkedList<SplitCutTriple>(sortedTriples);
//
// }
//
// public Vertex splitVertexPull(Vertex pVertexToSplit, Face pFaceToSweep, final LinkedList<Face> newNeighborFaces, LinkedList<Edge > edgesToElongateList)
// {
// // --------------------------------------------------------------------
// // check if there are 2 neighbor faces of pFaceToSweep that are connected to the vertex
// // --------------------------------------------------------------------
//
// if (newNeighborFaces.size() != 2)
// {
// EDGE_WARNING << " size of newNeighborFaces should be 2 - this case is not handled yet " << EDGE_ENDL;
// EDGE_WARNING << " this occures for face " << pFaceToSweep << " and vertex " << pVertexToSplit << "." << EDGE_ENDL;
// }
//
// // --------------------------------------------------------------------
// // get the two planes of the neighbor faces
// // --------------------------------------------------------------------
//
// Face cpNeighborFace1 = newNeighborFaces.getFirst();
// Face cpNeighborFace2 = newNeighborFaces.getLast();
// Surface cpSurface1 = cpNeighborFace1.getGeometry();
// Surface cpSurface2 = cpNeighborFace2.getGeometry();
// if (!cpSurface1.isOfType(Plane.getClassTypeId()))
// {
// EDGE_ERROR << " Face " << cpNeighborFace1 << " has no Plane" << EDGE_ENDL;
// }
// if (!cpSurface1.isOfType(Plane.getClassTypeId()))
// {
// EDGE_ERROR << " Face " << cpNeighborFace2 << " has no Plane" << EDGE_ENDL;
// }
//
// Plane pPlane1 = (Plane)cpSurface1;
// GmPlane gmPlane1 = pPlane1.getEquation();
// Plane pPlane2 = (Plane)cpSurface2;
// GmPlane gmPlane2 = pPlane2.getEquation();
//
//
// // --------------------------------------------------------------------
// // calc intersection straight of the two planes
// // --------------------------------------------------------------------
//
// boolean intesectionSuccess = false;
// GmStraight interesctionStraight = new GmStraight();
// boolean intersectionWorked = plane_plane_int(gmPlane1, gmPlane2, interesctionStraight, intesectionSuccess);
// if (!intesectionSuccess)
// {
// EDGE_WARNING << "Something went wrong in the plane_plane_intersection : intesectionSuccess = false" << EDGE_ENDL;
// }
// if (!intersectionWorked)
// {
// EDGE_WARNING << "Something went wrong in the plane_plane_intersection : intersectionWorked = false" << EDGE_ENDL;
// }
// UnitVector3d intersetionDirection = interesctionStraight.getDir();
//
// // --------------------------------------------------------------------
// // create new pNewVertex
// // --------------------------------------------------------------------
//
// Point3d pointCopy = pVertexToSplit.getPositionOnGeometry();
// Vertex pNewVertex = new Vertex(pointCopy);
//
// // --------------------------------------------------------------------
// // create new Edge and connect pVertex with pNewVertex ( use straight from above)
// // --------------------------------------------------------------------
//
// GmStraight gmStraight = new GmStraight(pVertexToSplit.getPositionOnGeometry(), intersetionDirection);
// Straight straight = new Straight(gmStraight); // TODO : simply use method getIntersectionStraight
// Edge pNewEdge = new Edge(straight, Topology.FORWARD, pVertexToSplit, pNewVertex);
//
//
// // --------------------------------------------------------------------
// / get the two neighbor loops
// // --------------------------------------------------------------------
//
// Loop pLoop1 = (Loop)cpNeighborFace1.getLoop();
// Loop pLoop2 = (Loop)cpNeighborFace2.getLoop();
//
// // --------------------------------------------------------------------
// // get the corresponding coEdges of the loops where the new Coedges should be placed
// // --------------------------------------------------------------------
//
// CoEdge pPrevCoEdge1;
// CoEdge pNextCoEdge1;
// CoEdge pPrevCoEdge2;
// CoEdge pNextCoEdge2;
// findPrevAndNextCoEdge(pVertexToSplit, pLoop1, pPrevCoEdge1, pNextCoEdge1);
// findPrevAndNextCoEdge(pVertexToSplit, pLoop2, pPrevCoEdge2, pNextCoEdge2);
//
//
// // --------------------------------------------------------------------
// // set new relationship between pNewVertex and edges
// // --------------------------------------------------------------------
// for (Edge pTempEdge : getAllEdgesForVertex(pVertexToSplit))
// {
// // the two edges of the sweepface will get the pNewVertex (all other edges with that vertex will keep it)
// if (pTempEdge == pNewEdge)
// {
// // pTempEdge is pNewEdge -> ignore
// continue;
// }
//
// if (edgesToElongateList.contains(pTempEdge))
// {
// // pTempEdge is elongated edge -> ignore
// continue;
// }
//
// if (pTempEdge.getStartVertex() == pVertexToSplit)
// {
//
// ((Edge)pTempEdge).setStartVertex(pNewVertex);
// }
// else if (pTempEdge.getEndVertex() == pVertexToSplit)
// {
// ((Edge)pTempEdge).setEndVertex(pNewVertex);
// }
// else
// {
// EDGE_ERROR << " edge does not contain Vertex" << EDGE_ENDL;
// }
// }
//
// // --------------------------------------------------------------------
// // create coEdges; the two faces are the corresponding faces to the coEdges
// // --------------------------------------------------------------------
//
// CoEdge pNewCoEdge1;
// if (pPrevCoEdge1.getEndVertex() == pNewEdge.getStartVertex() || pPrevCoEdge1.getStartVertex() == pNewEdge.getEndVertex())
// {
// pNewCoEdge1 = new CoEdge(pNewEdge, Topology.FORWARD);
// }
// else if (pPrevCoEdge1.getEndVertex() == pNewEdge.getEndVertex() || pPrevCoEdge1.getStartVertex() == pNewEdge.getStartVertex())
// {
// pNewCoEdge1 = new CoEdge(pNewEdge, Topology.REVERSED);
// }
// setGeometryForCoEdge(pNewCoEdge1);
//
// CoEdge pNewCoEdge2;
// if (pPrevCoEdge2.getEndVertex() == pNewEdge.getStartVertex() || pPrevCoEdge2.getStartVertex() == pNewEdge.getEndVertex())
// {
// pNewCoEdge2 = new CoEdge(pNewEdge, Topology.FORWARD);
// }
// else if (pPrevCoEdge2.getEndVertex() == pNewEdge.getEndVertex() || pPrevCoEdge2.getStartVertex() == pNewEdge.getStartVertex())
// {
// pNewCoEdge2 = new CoEdge(pNewEdge, Topology.REVERSED);
// }
// setGeometryForCoEdge(pNewCoEdge2);
//
// pNewCoEdge1.setPartner(pNewCoEdge2);
// pNewCoEdge2.setPartner(pNewCoEdge1);
// pNewCoEdge1.setPrevious(pPrevCoEdge1);
// pNewCoEdge1.setNext(pNextCoEdge1);
// pNewCoEdge2.setPrevious(pPrevCoEdge2);
// pNewCoEdge2.setNext(pNextCoEdge2);
//
// pLoop1.addCoEdge(pNewCoEdge1);
// pLoop2.addCoEdge(pNewCoEdge2);
//
// if (mPrintInfo)
// {
// System.out.print(" SPLIT VERTEX (PULL) ");
// System.out.print(pVertexToSplit);
// System.out.print(" NEW VERTEX : ");
// System.out.print(pNewVertex);
// System.out.print(" NEW EDGE : ");
// System.out.print(pNewEdge);
// System.out.println();
// }
//
// // save changes in Trackchanges
// mpBuilding.getTrackChanges().addNewVertex(pNewVertex);
// for (Face cpFace : getFacesForVertex(pNewVertex))
// {
// mpBuilding.getTrackChanges().changeFace((Face)cpFace);
// }
// return pNewVertex;
//
// }
}
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