[Bprocessor-commit] model/src/net/sourceforge/bprocessor/model Geometric.java, 1.17, 1.18
Status: Pre-Alpha
Brought to you by:
henryml
|
From: Michael L. <he...@us...> - 2007-06-14 09:36:19
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv21445/src/net/sourceforge/bprocessor/model Modified Files: Geometric.java Log Message: All connected also selects spaces interior to the selection Keyboard delete now also deletes selected spaces Index: Geometric.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Geometric.java,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** Geometric.java 4 Jun 2007 20:38:32 -0000 1.17 --- Geometric.java 14 Jun 2007 09:36:13 -0000 1.18 *************** *** 35,38 **** --- 35,39 ---- LinkedList<Edge> edges = new LinkedList(); LinkedList<Vertex> vertices = new LinkedList(); + Set<Surface> env = new HashSet(surfaces); for (Geometric current : geometrics) { if (current instanceof Surface) { *************** *** 49,52 **** --- 50,54 ---- Surface surface = surfaces.remove(); mark.add(surface); + env.add(surface); for (Edge current : surface.getEdges()) { if (!mark.contains(current)) { *************** *** 85,88 **** --- 87,103 ---- } } + + Set<Space> spaces = new HashSet(); + for (Surface current : env) { + spaces.add(current.getFrontDomain()); + spaces.add(current.getBackDomain()); + } + for (Space current : spaces) { + if (current != current.getOwner().empty) { + if (env.containsAll(current.getEnvelope())) { + mark.add(current); + } + } + } return new LinkedList(mark); } |