ListIterator li = sg.getVertices()
.listIterator();
while (li.hasNext()) {
SimpleVertex element = (SimpleVertex) li.next();
SimpleEdge e1 = null;
SimpleEdge e2 = null;
if ((!element.equals(gd.getSource())) && (!element.equals(gd.getTarget()))) {
if (element.getEdgesIncoming()
.size() == 2) {
e1 = getEdgeForFace(element.getLeft(),
element.getEdgesIncoming());
e2 = getEdgeForFace(element.getRight(),
element.getEdgesOutgoing());
} else {
e1 = GraphHelper.getInstance()
.getMedianEdge13(element,
element.getEdgesIncoming());
e2 = GraphHelper.getInstance()
.getMedianEdge13(element,
element.getEdgesOutgoing());
}
Path p = new Path(sg);
p.addVertex(element);
p.addVertex(e1.getAnother(element));
p.addVertex(e2.getAnother(element));
p.addEdge(e1);
p.addEdge(e2);
element.setProperty(VisibilityFactory.PATH_KEY, p);
// property to be removed