Update of /cvsroot/bprocessor/facade/src/net/sourceforge/bprocessor/facade/modellor
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv26555/src/net/sourceforge/bprocessor/facade/modellor
Modified Files:
NetFacadeModellor.java
Log Message:
added some extra holeanalysis to battle the "missing hole" problem
Index: NetFacadeModellor.java
===================================================================
RCS file: /cvsroot/bprocessor/facade/src/net/sourceforge/bprocessor/facade/modellor/NetFacadeModellor.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** NetFacadeModellor.java 30 Jan 2007 19:51:53 -0000 1.12
--- NetFacadeModellor.java 31 Jan 2007 21:03:34 -0000 1.13
***************
*** 101,104 ****
--- 101,105 ----
single = ((Boolean)m.get("single")).booleanValue();
frame = (Space)m.get("frame");
+ Project.getInstance().addObserver(this);
}
***************
*** 127,131 ****
*/
public void update(Object entity) {
! regenerate();
}
--- 128,140 ----
*/
public void update(Object entity) {
! if (space.getModellor() == this) { //sanity check
! regenerate();
! } else {
! Project.getInstance().removeObserver(this);
! space = null;
! frame = null;
! front = null;
! windows = null;
! }
}
***************
*** 134,137 ****
--- 143,147 ----
*/
public void delete() {
+ Project.getInstance().removeObserver(this);
space.setModellor(null);
}
***************
*** 335,341 ****
}
if (net != null) {
- List outlineCopies = new LinkedList();
List outline = netOutline(net);
Iterator it = outline.iterator();
while (it.hasNext()) {
outlineCopies.add(((Edge)it.next()).copy());
--- 345,351 ----
}
if (net != null) {
List outline = netOutline(net);
Iterator it = outline.iterator();
+ List outlineCopies = new LinkedList();
while (it.hasNext()) {
outlineCopies.add(((Edge)it.next()).copy());
***************
*** 347,351 ****
assignSame(front, frameSurface, space, frame);
Set sides1 = new HashSet();
! extrudeIntoSpace(frameSurface, depth, sides1);
/* Put holes into the shell */
Iterator fields = net.getSurfaces().iterator();
--- 357,362 ----
assignSame(front, frameSurface, space, frame);
Set sides1 = new HashSet();
! Surface frameSurfEx = extrudeIntoSpace(frameSurface, depth, sides1);
! Geometry.holeAnalysis(frameSurfEx);
/* Put holes into the shell */
Iterator fields = net.getSurfaces().iterator();
***************
*** 370,374 ****
Geometry.holeAnalysis(hole);
Set sides2 = new HashSet();
! Geometry.holeAnalysis(space.insert(extrudeIntoSpace(hole, depth, sides2)));
Double extraFrame = 0.0;
if (envF.get("type") instanceof Selector) {
--- 381,386 ----
Geometry.holeAnalysis(hole);
Set sides2 = new HashSet();
! Surface holeEx = space.insert(extrudeIntoSpace(hole, depth, sides2));
! Geometry.holeAnalysis(holeEx);
Double extraFrame = 0.0;
if (envF.get("type") instanceof Selector) {
***************
*** 399,402 ****
--- 411,416 ----
in = space.insert(in);
out = space.insert(out);
+ Geometry.holeAnalysis(in);
+ Geometry.holeAnalysis(out);
Space wf = new Space("Window Frame",
***************
*** 426,430 ****
assignOpposite(front, hole, space, wf);
Geometry.holeAnalysis(outEx);
! Geometry.holeAnalysis(hole);
}
}
--- 440,444 ----
assignOpposite(front, hole, space, wf);
Geometry.holeAnalysis(outEx);
! Geometry.holeAnalysis(hole);
}
}
|