Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29234/tool
Modified Files:
ExtrusionTool.java
Log Message:
minor changes
Index: ExtrusionTool.java
===================================================================
RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/ExtrusionTool.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** ExtrusionTool.java 20 Sep 2005 17:28:46 -0000 1.13
--- ExtrusionTool.java 21 Sep 2005 14:08:38 -0000 1.14
***************
*** 22,25 ****
--- 22,26 ----
import net.sourceforge.bprocessor.model.FunctionalSpace;
import net.sourceforge.bprocessor.model.Domain;
+ import net.sourceforge.bprocessor.model.DomainFacade;
import net.sourceforge.bprocessor.model.Plane;
***************
*** 128,153 ****
Vertex normal = s.normal();
List l = Util.traverse(s);
! for (int i = 0; i < l.size(); i++) {
! Vertex v = (Vertex)l.get(i);
! Set edges = v.getEdges();
! if (edges.size() >= 3) {
! Iterator it = edges.iterator();
! while (it.hasNext()) {
! Edge e = (Edge)it.next();
! if (!s.contains(e)) {
! extrusion = e;
! Vertex v1 = e.otherVertex(v);
! Vertex v2 = v1.minus(v);
! Vertex cross = v2.cross(normal);
! if (Math.abs(cross.length()) > 0.0001) {
! return false;
}
}
}
- } else {
- return false;
}
}
! return true;
}
--- 129,157 ----
Vertex normal = s.normal();
List l = Util.traverse(s);
! if (l != null) {
! for (int i = 0; i < l.size(); i++) {
! Vertex v = (Vertex)l.get(i);
! Set edges = v.getEdges();
! if (edges.size() >= 3) {
! Iterator it = edges.iterator();
! while (it.hasNext()) {
! Edge e = (Edge)it.next();
! if (!s.contains(e)) {
! extrusion = e;
! Vertex v1 = e.otherVertex(v);
! Vertex v2 = v1.minus(v);
! Vertex cross = v2.cross(normal);
! if (Math.abs(cross.length()) > 0.0001) {
! return false;
! }
}
}
+ } else {
+ return false;
}
}
+ return true;
}
! return false;
}
***************
*** 191,196 ****
*/
private Surface extendSurface(Surface extendSurf) {
! ConstructionSpace newCSpace = new ConstructionSpace("innerSpace");
! newCSpace = ConstructionSpaceFacade.getInstance().create(newCSpace);
Domain outer = extendSurf.getFrontDomain();
Edge previousEdge = null;
--- 195,203 ----
*/
private Surface extendSurface(Surface extendSurf) {
! // HAVE TO BE CHANGED IN FUTURE RELEASE
! Domain newCSpace = extendSurf.getBackDomain();
! if (newCSpace == null) {
! newCSpace = ConstructionSpaceFacade.getInstance().create(new ConstructionSpace("innerSpace"));
! }
Domain outer = extendSurf.getFrontDomain();
Edge previousEdge = null;
***************
*** 278,283 ****
}
//moving this line to the top
! //ConstructionSpaceFacade.getInstance().create(newCSpace);
! ConstructionSpaceFacade.getInstance().update(newCSpace);
Surface topSurf = createSurface(top);
if (outer != null) {
--- 285,289 ----
}
//moving this line to the top
! DomainFacade.getInstance().update(newCSpace);
Surface topSurf = createSurface(top);
if (outer != null) {
|