ListIterator lif = gd.getFaces()
.listIterator();
while (lif.hasNext()) {
Face element = (Face) lif.next();
SimpleVertex sv = new SimpleVertex();
associated.addVertex(sv);
element.setProperty(this, sv);
}
ListIterator lip = paths.listIterator();
while (lip.hasNext()) {
Path path = (Path) lip.next();
SimpleVertex sv = new SimpleVertex();
associated.addVertex(sv);
path.setProperty(this, sv);
}
lip = paths.listIterator();
while (lip.hasNext()) {
Path path = (Path) lip.next();
ListIterator lic = path.getEdges()
.listIterator();
List lfaces = new ArrayList();
List rfaces = new ArrayList();
while (lic.hasNext()) {
SimpleEdge edge = (SimpleEdge) lic.next();
if (lfaces.indexOf(edge.getLeft()) == -1) {
lfaces.add(edge.getLeft());
}
if (rfaces.indexOf(edge.getRight()) == -1) {
rfaces.add(edge.getRight());
}
}
Iterator itl = lfaces.iterator();
while (itl.hasNext()) {
Face lface = (Face) itl.next();
SimpleVertex src = lface.getVertexProperty(this);
SimpleVertex dst = path.getVertexProperty(this);
SimpleEdge se = new SimpleEdge(src, dst);
associated.addEdge(se);
}
Iterator itr = rfaces.iterator();
while (itr.hasNext()) {
Face rface = (Face) itr.next();
SimpleVertex src = path.getVertexProperty(this);
SimpleVertex dst = rface.getVertexProperty(this);
SimpleEdge se = new SimpleEdge(src, dst);
associated.addEdge(se);
}
}
}