[Bprocessor-commit] model/src/net/sourceforge/bprocessor/model Command.java, 1.75, 1.76 Space.java,
Status: Pre-Alpha
Brought to you by:
henryml
From: Michael L. <he...@us...> - 2008-11-03 14:26:24
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv8031/src/net/sourceforge/bprocessor/model Modified Files: Command.java Space.java Project.java Plane.java Log Message: Refactor Index: Space.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Space.java,v retrieving revision 1.237 retrieving revision 1.238 diff -C2 -d -r1.237 -r1.238 *** Space.java 3 Nov 2008 13:14:09 -0000 1.237 --- Space.java 3 Nov 2008 14:26:18 -0000 1.238 *************** *** 153,160 **** */ public static Container createUnion(String name) { ! Container s = createConstructionSpace(name); ! s.add(new CoordinateSystem(new Vertex(0, 0, 0))); ! s.setUnion(true); ! return s; } --- 153,159 ---- */ public static Container createUnion(String name) { ! Container union = createConstructionSpace(name); ! union.setUnion(true); ! return union; } *************** *** 745,749 **** * @param isUnion The isUnion to set. */ ! public void setUnion(boolean isUnion) { this.isUnion = isUnion; } --- 744,748 ---- * @param isUnion The isUnion to set. */ ! protected void setUnion(boolean isUnion) { this.isUnion = isUnion; } Index: Command.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Command.java,v retrieving revision 1.75 retrieving revision 1.76 diff -C2 -d -r1.75 -r1.76 *** Command.java 21 Apr 2008 12:23:08 -0000 1.75 --- Command.java 3 Nov 2008 14:26:18 -0000 1.76 *************** *** 933,937 **** Surface bottom = new Surface(edges); Container space = Project.getInstance().getActiveSpace(); ! Container union = new Container("Cylinder", Container.CONSTRUCTION, true); Set<Surface> sides = new HashSet<Surface>(); Surface top = bottom.extrusion(h, sides); --- 933,937 ---- Surface bottom = new Surface(edges); Container space = Project.getInstance().getActiveSpace(); ! Container union = Space.createUnion("Cylinder"); Set<Surface> sides = new HashSet<Surface>(); Surface top = bottom.extrusion(h, sides); *************** *** 1115,1119 **** Surface side3 = new Surface(list(e3, l3, l0)); ! Container union = new Container("Pyramid", Container.CONSTRUCTION, true); addSurfacesTo(union, list(s0, side0, side1, side2, side3)); --- 1115,1119 ---- Surface side3 = new Surface(list(e3, l3, l0)); ! Container union = Space.createUnion("Pyramid"); addSurfacesTo(union, list(s0, side0, side1, side2, side3)); *************** *** 1194,1198 **** } } ! Container union = new Container("Sphere", Container.CONSTRUCTION, true); for (Vertex current : vertices) { union.add(current); --- 1194,1198 ---- } } ! Container union = Space.createConstructionSpace("Sphere"); for (Vertex current : vertices) { union.add(current); *************** *** 1244,1248 **** Surface top = s0.extrusion(d, sides); ! Container union = new Container("Cube", Container.CONSTRUCTION, true); Collection<Surface> surfaces = new LinkedList(); surfaces.add(s0); --- 1244,1248 ---- Surface top = s0.extrusion(d, sides); ! Container union = Space.createUnion("Cube"); Collection<Surface> surfaces = new LinkedList(); surfaces.add(s0); *************** *** 1752,1756 **** Offset.offsetIt(boundary, -inside + (delta / 2)); ! Container union = new Container("Frame", Container.CONSTRUCTION, true); Collection<Surface> inserted = new LinkedList(); --- 1752,1756 ---- Offset.offsetIt(boundary, -inside + (delta / 2)); ! Container union = Space.createUnion("Frame"); Collection<Surface> inserted = new LinkedList(); *************** *** 1786,1791 **** { ! Container ext = new Container(exteriorName, Container.FUNCTIONAL, true); ! Container frame = new Container(frameName, Container.CONSTRUCTION, true); if (depth > 0) { exterior.assignBack(ext, true); --- 1786,1791 ---- { ! Container ext = Space.createFunctionalSpace(exteriorName); ! Container frame = Space.createConstructionSpace(frameName); if (depth > 0) { exterior.assignBack(ext, true); *************** *** 1808,1812 **** sign = depth; } ! Container hole = new Container(holeName + " " + i, Container.FUNCTIONAL, true); if (sign > 0) { current.assignFront(hole, true); --- 1808,1812 ---- sign = depth; } ! Container hole = Space.createFunctionalSpace(holeName + " " + i); if (sign > 0) { current.assignFront(hole, true); *************** *** 1918,1922 **** } } ! Container union = new Container("Layer", Container.CONSTRUCTION, true); for (Prism current : prisms) { Shape.addSurfacesTo(union, current.surfaces()); --- 1918,1922 ---- } } ! Container union = Space.createUnion("Layer"); for (Prism current : prisms) { Shape.addSurfacesTo(union, current.surfaces()); *************** *** 2140,2145 **** Collection<Vertex> vertices = Edge.vertices(edges); ! Container union = new Container("Frame", Space.CONSTRUCTION, true); ! union.setUnion(true); for (Vertex current : vertices) { union.add(current); --- 2140,2144 ---- Collection<Vertex> vertices = Edge.vertices(edges); ! Container union = Space.createUnion("Frame"); for (Vertex current : vertices) { union.add(current); *************** *** 2212,2228 **** if (net != null) { element.add(net); ! Container fema1 = new Container("Femacell", Container.CONSTRUCTION, true); { Classification classification = Project.getInstance().getClassification(PLATE, 0); fema1.setClassification(classification); } ! Container fema2 = new Container("Femacell", Container.CONSTRUCTION, true); ! Container bitumen = new Container("Bitumen", Container.CONSTRUCTION, true); ! Container foot1 = new Container("Bundrem", Container.CONSTRUCTION, true); ! Container foot2 = new Container("Fodrem", Container.CONSTRUCTION, true); ! Container top1 = new Container("Toprem", Container.CONSTRUCTION, true); ! Container top2 = new Container("Toprem", Container.CONSTRUCTION, true); ! Container post1 = new Container("Stolpe", Container.CONSTRUCTION, true); ! Container post2 = new Container("Stolpe", Container.CONSTRUCTION, true); element.add(fema1); element.add(fema2); --- 2211,2227 ---- if (net != null) { element.add(net); ! Container fema1 = Space.createConstructionSpace("Femacell"); { Classification classification = Project.getInstance().getClassification(PLATE, 0); fema1.setClassification(classification); } ! Container fema2 = Space.createConstructionSpace("Femacell"); ! Container bitumen = Space.createConstructionSpace("Bitumen"); ! Container foot1 = Space.createConstructionSpace("Bundrem"); ! Container foot2 = Space.createConstructionSpace("Fodrem"); ! Container top1 = Space.createConstructionSpace("Toprem"); ! Container top2 = Space.createConstructionSpace("Toprem"); ! Container post1 = Space.createConstructionSpace("Stolpe"); ! Container post2 = Space.createConstructionSpace("Stolpe"); element.add(fema1); element.add(fema2); *************** *** 2244,2249 **** { Map map = new HashMap(); ! Container inside = new Container("Inside", Container.CONSTRUCTION, true); ! Container outside = new Container("Outside", Container.FUNCTIONAL, false); Surface base = (Surface) surface.copy(map); Collection<Surface> sides = new LinkedList(); --- 2243,2248 ---- { Map map = new HashMap(); ! Container inside = Space.createConstructionSpace("Inside"); ! Container outside = Space.createFunctionalSpace("Outside"); Surface base = (Surface) surface.copy(map); Collection<Surface> sides = new LinkedList(); *************** *** 2263,2268 **** { Map map = new HashMap(); ! Container inside = new Container("Inside", Container.CONSTRUCTION, true); ! Container outside = new Container("Outside", Container.FUNCTIONAL, false); Surface base = (Surface) surface.copy(map); Vertex normal = base.normal(); --- 2262,2267 ---- { Map map = new HashMap(); ! Container inside = Container.createConstructionSpace("Inside"); ! Container outside = Container.createFunctionalSpace("Outside"); Surface base = (Surface) surface.copy(map); Vertex normal = base.normal(); *************** *** 2287,2292 **** { Map map = new HashMap(); ! Container inside = new Container("Inside", Container.CONSTRUCTION, true); ! Container outside = new Container("Outside", Container.FUNCTIONAL, false); Surface base = (Surface) surface.copy(map); Vertex normal = base.normal(); --- 2286,2291 ---- { Map map = new HashMap(); ! Container inside = Space.createConstructionSpace("Inside"); ! Container outside = Space.createFunctionalSpace("Outside"); Surface base = (Surface) surface.copy(map); Vertex normal = base.normal(); *************** *** 2327,2332 **** Edge e3 = new Edge(c, d); Edge e4 = new Edge(d, a); ! Container inside = new Container("Inside", Container.CONSTRUCTION, true); ! Container outside = new Container("Outside", Container.FUNCTIONAL, false); Surface base = new Surface(Shape.list(e1, e2, e3, e4)); Collection<Surface> sides = new LinkedList(); --- 2326,2331 ---- Edge e3 = new Edge(c, d); Edge e4 = new Edge(d, a); ! Container inside = Space.createConstructionSpace("Inside"); ! Container outside = Space.createFunctionalSpace("Outside"); Surface base = new Surface(Shape.list(e1, e2, e3, e4)); Collection<Surface> sides = new LinkedList(); *************** *** 2336,2340 **** all.addAll(sides); all.add(top); ! Container post = new Container("Post", Container.CONSTRUCTION, true); post.add(inside); post.add(outside); --- 2335,2339 ---- all.addAll(sides); all.add(top); ! Container post = Space.createConstructionSpace("Post"); post.add(inside); post.add(outside); Index: Plane.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Plane.java,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** Plane.java 23 Oct 2008 04:52:13 -0000 1.40 --- Plane.java 3 Nov 2008 14:26:18 -0000 1.41 *************** *** 232,236 **** private boolean assign = true; ! private Container silhouette = new Container("Section", Space.CONSTRUCTION, true); private List<Surface> surfaces = new LinkedList(); private Map map = new HashMap(); --- 232,236 ---- private boolean assign = true; ! private Container silhouette = Space.createUnion("Section"); private List<Surface> surfaces = new LinkedList(); private Map map = new HashMap(); Index: Project.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Project.java,v retrieving revision 1.155 retrieving revision 1.156 diff -C2 -d -r1.155 -r1.156 *** Project.java 22 Sep 2008 15:58:10 -0000 1.155 --- Project.java 3 Nov 2008 14:26:18 -0000 1.156 *************** *** 261,265 **** staticObservers = new LinkedList(); scheduledObservers = new LinkedList(); ! world = new Container("World", Container.FUNCTIONAL, true); world.setId(new Long(0)); materials = new HashMap<Long, Material>(); --- 261,265 ---- staticObservers = new LinkedList(); scheduledObservers = new LinkedList(); ! world = Space.createFunctionalSpace("World"); world.setId(new Long(0)); materials = new HashMap<Long, Material>(); |