[Bprocessor-commit] model/src/net/sourceforge/bprocessor/model Space.java, 1.78, 1.79
Status: Pre-Alpha
Brought to you by:
henryml
From: Michael L. <he...@us...> - 2006-10-13 12:54:30
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv3913/src/net/sourceforge/bprocessor/model Modified Files: Space.java Log Message: Change to the Space.insert(surface) function: Attempt to see if a surface is already existing containing same edges Index: Space.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Space.java,v retrieving revision 1.78 retrieving revision 1.79 diff -C2 -d -r1.78 -r1.79 *** Space.java 13 Oct 2006 07:54:58 -0000 1.78 --- Space.java 13 Oct 2006 12:54:21 -0000 1.79 *************** *** 879,891 **** List edges = surface.getEdges(); List actual = new LinkedList(); ! Iterator iter = edges.iterator(); ! while (iter.hasNext()) { ! Edge current = (Edge) iter.next(); ! actual.add(insert(current, split)); } ! surface.setEdges(actual); ! add(surface); ! Geometry.holeAnalysis(surface); ! return surface; } --- 879,907 ---- List edges = surface.getEdges(); List actual = new LinkedList(); ! { ! Iterator iter = edges.iterator(); ! while (iter.hasNext()) { ! Edge current = (Edge) iter.next(); ! actual.add(insert(current, split)); ! } } ! Surface shadow = surface; ! { ! Collection surfaces = getSurfaces(); ! Iterator iter = surfaces.iterator(); ! while (iter.hasNext()) { ! Surface current = (Surface) iter.next(); ! Set others = new HashSet(current.getEdges()); ! if (others.containsAll(actual)) { ! shadow = current; ! } ! } ! } ! if (shadow == surface) { ! surface.setEdges(actual); ! add(surface); ! Geometry.holeAnalysis(surface); ! } ! return shadow; } |