[Bprocessor-commit] model/src/net/sourceforge/bprocessor/model Surface.java, 1.217, 1.218 Geometry.
Status: Pre-Alpha
Brought to you by:
henryml
From: Michael L. <he...@us...> - 2008-01-24 10:35:31
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv27007/src/net/sourceforge/bprocessor/model Modified Files: Surface.java Geometry.java Log Message: make union is more intelligent wrt selection geometry, constraints and globals removed from D-View Index: Surface.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Surface.java,v retrieving revision 1.217 retrieving revision 1.218 diff -C2 -d -r1.217 -r1.218 *** Surface.java 21 Jan 2008 13:37:25 -0000 1.217 --- Surface.java 24 Jan 2008 10:35:35 -0000 1.218 *************** *** 199,203 **** * @return Collection of edges */ ! public static Collection<Edge> edges(Collection<Surface> surfaces) { Set<Edge> edges = new HashSet<Edge>(); for (Surface current : surfaces) { --- 199,203 ---- * @return Collection of edges */ ! public static Set<Edge> edges(Collection<Surface> surfaces) { Set<Edge> edges = new HashSet<Edge>(); for (Surface current : surfaces) { *************** *** 208,211 **** --- 208,240 ---- /** + * Returns set of spaces that are entirely defined by the surfaces + * in collection. + * @param surfaces Collection of surfaces + * @return set of spaces + */ + public static Set<Space> spaces(Collection<Surface> surfaces) { + Set<Space> spaces = new HashSet(); + for (Surface surface : surfaces) { + List<Space> incident = new LinkedList(); + Space front = surface.getFrontDomain(); + Space back = surface.getBackDomain(); + if (!front.isVoid()) { + incident.add(front); + } + if (!(back.isVoid() || (front == back))) { + incident.add(back); + } + + for (Space space : incident) { + if (surfaces.containsAll(space.getEnvelope())) { + spaces.add(space); + } + } + } + return spaces; + } + + + /** * Get the name * @return The name Index: Geometry.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Geometry.java,v retrieving revision 1.69 retrieving revision 1.70 diff -C2 -d -r1.69 -r1.70 *** Geometry.java 13 Dec 2007 12:00:30 -0000 1.69 --- Geometry.java 24 Jan 2008 10:35:35 -0000 1.70 *************** *** 892,896 **** Set<Surface> surfaces = first.getSurfaces(); for (Surface s : surfaces) { - int size = s.getEdges().size(); s.replace(extendable, extendedEdge); Container owner = s.getOwner(); --- 892,895 ---- |