Update of /cvsroot/bprocessor/facade/src/net/sourceforge/bprocessor/facade/modellor
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv24184/src/net/sourceforge/bprocessor/facade/modellor
Modified Files:
NetFacadeModellor.java
Log Message:
Using the new offset methods to get nice even widths on facades frame.
Index: NetFacadeModellor.java
===================================================================
RCS file: /cvsroot/bprocessor/facade/src/net/sourceforge/bprocessor/facade/modellor/NetFacadeModellor.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** NetFacadeModellor.java 5 Dec 2006 15:28:05 -0000 1.5
--- NetFacadeModellor.java 18 Dec 2006 18:20:19 -0000 1.6
***************
*** 249,254 ****
Surface field = (Surface)fields.next();
Surface fcopy = field.copyall(space);
! Surface h = new Surface(Edge.offset(fcopy.getEdges(), fcopy, -frameWidth));
! h = space.insert(h);
Geometry.holeAnalysis(h);
assignSame(front, fcopy, space, frame);
--- 249,260 ----
Surface field = (Surface)fields.next();
Surface fcopy = field.copyall(space);
! Iterator fEdges = fcopy.getEdges().iterator();
! Map offsetMap = new HashMap();
! while (fEdges.hasNext()) {
! Edge e = (Edge)fEdges.next();
! offsetMap.put(e, Double.valueOf(-frameWidth));
! }
! Surface h = new Surface(Edge.placeOffset(fcopy.getEdges(), fcopy, offsetMap));
! h = space.insert(h);
Geometry.holeAnalysis(h);
assignSame(front, fcopy, space, frame);
***************
*** 273,279 ****
if (net != null) {
List outlineCopies = new LinkedList();
! Iterator outline = netOutline(net).iterator();
! while (outline.hasNext()) {
! outlineCopies.add(((Edge)outline.next()).copy());
}
if (!outlineCopies.isEmpty()) {
--- 279,286 ----
if (net != null) {
List outlineCopies = new LinkedList();
! List outline = netOutline(net);
! Iterator it = outline.iterator();
! while (it.hasNext()) {
! outlineCopies.add(((Edge)it.next()).copy());
}
if (!outlineCopies.isEmpty()) {
***************
*** 284,294 ****
Set sides1 = new HashSet();
extrudeIntoSpace(frameSurface, depth, sides1);
! /* Put holes int the shell */
Iterator fields = net.getSurfaces().iterator();
while (fields.hasNext()) {
Surface field = (Surface)fields.next();
! Surface fcopy = field.copyall(space);
! fcopy.delete();
! Surface hole = new Surface(Edge.offset(fcopy.getEdges(), fcopy, -frameWidth));
hole = space.insert(hole);
Geometry.holeAnalysis(hole);
--- 291,309 ----
Set sides1 = new HashSet();
extrudeIntoSpace(frameSurface, depth, sides1);
! /* Put holes into the shell */
Iterator fields = net.getSurfaces().iterator();
while (fields.hasNext()) {
Surface field = (Surface)fields.next();
! Map offsetMap = new HashMap();
! Iterator fieldEdges = field.getEdges().iterator();
! while (fieldEdges.hasNext()) {
! Edge e = (Edge)fieldEdges.next();
! if (outline.contains(e)) {
! offsetMap.put(e, Double.valueOf(-frameWidth));
! } else {
! offsetMap.put(e, Double.valueOf(-frameWidth / 2));
! }
! }
! Surface hole = new Surface(Edge.placeOffset(field.getEdges(), field, offsetMap));
hole = space.insert(hole);
Geometry.holeAnalysis(hole);
|