qeSorted.putAll(qeDistances);
// edges creation
int i = 0;
for (QuadEdge qe : qeSorted.keySet()) {
LineSegment s = qe.toLineSegment();
s.normalize();
Integer idS = this.coordinates.get(s.p0);
Integer idD = this.coordinates.get(s.p1);
Vertex oV = this.vertices.get(idS);
Vertex eV = this.vertices.get(idD);
Edge edge;
if (qeBorder.contains(qe)) {
oV.setBorder(true);
eV.setBorder(true);
edge = new Edge(i, s, oV, eV, true);
if (s.getLength() < this.threshold) {
this.shortLengths.put(i, edge);
} else {
this.lengths.put(i, edge);
}
} else {
edge = new Edge(i, s, oV, eV, false);
}
this.edges.put(i, edge);
this.segments.put(s, i);
i++;
}
// hm of linesegment and hm of edges // with id as key
// hm of triangles using hm of ls and connection with hm of edges
i = 0;
for (QuadEdgeTriangle qet : qeTriangles) {
LineSegment sA = qet.getEdge(0).toLineSegment();
LineSegment sB = qet.getEdge(1).toLineSegment();
LineSegment sC = qet.getEdge(2).toLineSegment();
sA.normalize();
sB.normalize();
sC.normalize();
Edge edgeA = this.edges.get(this.segments.get(sA));
Edge edgeB = this.edges.get(this.segments.get(sB));
Edge edgeC = this.edges.get(this.segments.get(sC));
if (edgeA == null || edgeB == null || edgeC == null)