Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv3724/src/net/sourceforge/bprocessor/model
Modified Files:
ClippingPlane.java
Log Message:
Fixed clippingplane so it should work on element level, and also so that it does not crash when there is only one surface.
Index: ClippingPlane.java
===================================================================
RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/ClippingPlane.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** ClippingPlane.java 5 Sep 2006 11:01:36 -0000 1.8
--- ClippingPlane.java 11 Sep 2006 14:57:47 -0000 1.9
***************
*** 47,51 ****
this.cs = system;
this.isActive = true;
! plane = cs.plane();
update();
}
--- 47,53 ----
this.cs = system;
this.isActive = true;
! this.plane = cs.plane();
! this.silluet = new ArrayList();
! this.corners = new ArrayList();
update();
}
***************
*** 100,104 ****
*/
public Collection getCorners() {
! if (corners == null) {
update();
}
--- 102,106 ----
*/
public Collection getCorners() {
! if (corners.isEmpty()) {
update();
}
***************
*** 172,175 ****
--- 174,187 ----
res.add(v);
}
+ Vertex transTo = cs.translate(e.getTo());
+ Vertex transFrom = cs.translate(e.getFrom());
+ if (Math.abs(transTo.getZ()) < 0.01 &&
+ Math.abs(transFrom.getZ()) < 0.01) {
+ res.add(e.getTo().copy());
+ res.add(e.getFrom().copy());
+ Edge eCopy = e.copy();
+ eCopy.setStrippled(true);
+ silluet.add(eCopy);
+ }
}
Collection surfaces = Project.getInstance().getSurfaces();
|