Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/modellor
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv389/src/net/sourceforge/bprocessor/model/modellor
Modified Files:
LayerModellor.java
Log Message:
LayerModellor and space deletion
Index: LayerModellor.java
===================================================================
RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/modellor/LayerModellor.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** LayerModellor.java 14 Oct 2006 23:37:54 -0000 1.8
--- LayerModellor.java 30 Oct 2006 06:49:25 -0000 1.9
***************
*** 8,11 ****
--- 8,12 ----
package net.sourceforge.bprocessor.model.modellor;
+ import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
***************
*** 58,61 ****
--- 59,75 ----
/**
+ * Insert extrusion into space
+ * @param space Space
+ * @param extrusion Collection of surfaces
+ */
+ public void insert(Space space, Collection extrusion) {
+ Iterator surfaces = extrusion.iterator();
+ while (surfaces.hasNext()) {
+ Surface surface = (Surface) surfaces.next();
+ space.insert(surface);
+ }
+ }
+
+ /**
* Update the geometry.
* @param entity The changed entity
***************
*** 64,70 ****
space.clear();
parameters.clear();
! Surface bottom = surface.copy(space);
if (surface.getBackDomain() == space) {
! bottom.flip();
}
--- 78,84 ----
space.clear();
parameters.clear();
! Surface bottom = surface.copyall(space);
if (surface.getBackDomain() == space) {
! bottom.flipall();
}
***************
*** 76,81 ****
bottom.setFrontDomain(layer);
Set sides = new HashSet();
! bottom = bottom.extrude(distance, sides);
! bottom.flip();
bottom.setBackDomain(layer);
} catch (Exception ex) {
--- 90,100 ----
bottom.setFrontDomain(layer);
Set sides = new HashSet();
! Set tops = new HashSet();
! Set extrusion = new HashSet();
! bottom = bottom.extrusionall(distance, sides, tops);
! extrusion.addAll(sides);
! extrusion.addAll(tops);
! insert(space, extrusion);
! bottom.flipall();
bottom.setBackDomain(layer);
} catch (Exception ex) {
|