[Bprocessor-commit] model/src/net/sourceforge/bprocessor/model/modellor TileModellor.java, 1.29, 1
Status: Pre-Alpha
Brought to you by:
henryml
From: Michael L. <he...@us...> - 2008-11-03 13:14:21
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/modellor In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv2332/src/net/sourceforge/bprocessor/model/modellor Modified Files: TileModellor.java WallPartingModellor.java InnerWallModellor.java ModelBathModellor2.java Log Message: Refactor Index: TileModellor.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/modellor/TileModellor.java,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** TileModellor.java 18 Dec 2007 10:36:59 -0000 1.29 --- TileModellor.java 3 Nov 2008 13:14:09 -0000 1.30 *************** *** 28,31 **** --- 28,32 ---- import net.sourceforge.bprocessor.model.Project; import net.sourceforge.bprocessor.model.Selector; + import net.sourceforge.bprocessor.model.Space; import net.sourceforge.bprocessor.model.Surface; import net.sourceforge.bprocessor.model.SurfaceAnalysis; *************** *** 178,182 **** outer.addHole(newS); space.addAll(newS); ! Container sp = new Container("Tile", Container.CONSTRUCTION, true); if (sign == -1) { newS.setBackDomain(sp); --- 179,183 ---- outer.addHole(newS); space.addAll(newS); ! Container sp = Space.createConstructionSpace("Tile"); if (sign == -1) { newS.setBackDomain(sp); *************** *** 190,194 **** } ! Container joint = new Container("Tile", Container.CONSTRUCTION, true); if (sign == -1) { outer.setBackDomain(joint); --- 191,195 ---- } ! Container joint = Space.createConstructionSpace("Tile"); if (sign == -1) { outer.setBackDomain(joint); Index: WallPartingModellor.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/modellor/WallPartingModellor.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** WallPartingModellor.java 13 Dec 2007 12:00:33 -0000 1.8 --- WallPartingModellor.java 3 Nov 2008 13:14:09 -0000 1.9 *************** *** 20,23 **** --- 20,24 ---- import net.sourceforge.bprocessor.model.Project; import net.sourceforge.bprocessor.model.Selector; + import net.sourceforge.bprocessor.model.Space; import net.sourceforge.bprocessor.model.Surface; import net.sourceforge.bprocessor.model.Vertex; *************** *** 162,166 **** Edge between2 = new Edge(inner.getTo(), outerCopy.getTo()); Surface s = new Surface(inner, between1, outerCopy, between2); ! Container concrete = new Container("Concrete", Container.CONSTRUCTION, true); space.add(concrete); if (s.normal().getZ() == 1.0) { --- 163,167 ---- Edge between2 = new Edge(inner.getTo(), outerCopy.getTo()); Surface s = new Surface(inner, between1, outerCopy, between2); ! Container concrete = Space.createConstructionSpace("Concrete"); space.add(concrete); if (s.normal().getZ() == 1.0) { *************** *** 181,185 **** between2 = new Edge(inner2.getTo(), tileCopy.getTo()); s = new Surface(inner2, between1, tileCopy, between2); ! Container tile = new Container("Tile", Container.CONSTRUCTION, true); space.add(tile); if (s.normal().getZ() == 1.0) { --- 182,186 ---- between2 = new Edge(inner2.getTo(), tileCopy.getTo()); s = new Surface(inner2, between1, tileCopy, between2); ! Container tile = Space.createConstructionSpace("Tile"); space.add(tile); if (s.normal().getZ() == 1.0) { Index: InnerWallModellor.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/modellor/InnerWallModellor.java,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** InnerWallModellor.java 17 Dec 2007 13:09:18 -0000 1.17 --- InnerWallModellor.java 3 Nov 2008 13:14:09 -0000 1.18 *************** *** 217,221 **** Surface base = joistBase(); space.add(base); ! Container joist = new Container("joist", Container.CONSTRUCTION, true); Classification c = Project.getInstance().getClassification("-1.-205.01.01", 0); joist.setClassificationType(c.getPossibleTypes().getChildren().get(0)); --- 217,221 ---- Surface base = joistBase(); space.add(base); ! Container joist = Space.createConstructionSpace("joist"); Classification c = Project.getInstance().getClassification("-1.-205.01.01", 0); joist.setClassificationType(c.getPossibleTypes().getChildren().get(0)); *************** *** 269,275 **** Surface sheet1 = new Surface(outlineCopy1); Surface sheet2 = new Surface(outlineCopy2); ! Container sheetSpace1 = new Container("sheet1", Container.CONSTRUCTION, true); sheetSpace1.setClassification(woodSheet()); ! Container sheetSpace2 = new Container("sheet2", Container.CONSTRUCTION, true); sheetSpace2.setClassification(woodSheet()); Vertex j = cs.getJ().copy(); --- 269,275 ---- Surface sheet1 = new Surface(outlineCopy1); Surface sheet2 = new Surface(outlineCopy2); ! Container sheetSpace1 = Space.createConstructionSpace("sheet1"); sheetSpace1.setClassification(woodSheet()); ! Container sheetSpace2 = Space.createConstructionSpace("sheet2"); sheetSpace2.setClassification(woodSheet()); Vertex j = cs.getJ().copy(); Index: ModelBathModellor2.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/modellor/ModelBathModellor2.java,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** ModelBathModellor2.java 17 Dec 2007 13:09:18 -0000 1.16 --- ModelBathModellor2.java 3 Nov 2008 13:14:09 -0000 1.17 *************** *** 157,167 **** */ private void generateBath() { ! floor = new Container("Floor", Container.CONSTRUCTION, true); space.add(floor); ! bath = new Container("Bath cabin", Container.FUNCTIONAL, true); space.add(bath); ! walls = new Container("Walls", Container.CONSTRUCTION, true); space.add(walls); ! ceiling = new Container("Ceiling", Container.CONSTRUCTION, true); space.add(ceiling); makeFloor(); --- 157,167 ---- */ private void generateBath() { ! floor = Space.createConstructionSpace("Floor"); space.add(floor); ! bath = Space.createFunctionalSpace("Bath cabin"); space.add(bath); ! walls = Space.createConstructionSpace("Walls"); space.add(walls); ! ceiling = Space.createConstructionSpace("Ceiling"); space.add(ceiling); makeFloor(); *************** *** 292,296 **** Edge between2 = new Edge(inner.getTo(), outerCopy.getTo()); Surface s = new Surface(inner, between1, outerCopy, between2); ! Container concrete = new Container("Concrete", Container.CONSTRUCTION, true); walls.add(concrete); if (s.normal().getZ() == 1.0) { --- 292,296 ---- Edge between2 = new Edge(inner.getTo(), outerCopy.getTo()); Surface s = new Surface(inner, between1, outerCopy, between2); ! Container concrete = Space.createConstructionSpace("Concrete"); walls.add(concrete); if (s.normal().getZ() == 1.0) { *************** *** 311,315 **** between2 = new Edge(inner2.getTo(), tileCopy.getTo()); s = new Surface(inner2, between1, tileCopy, between2); ! Container tile = new Container("Tile", Container.CONSTRUCTION, true); walls.add(tile); if (s.normal().getZ() == 1.0) { --- 311,315 ---- between2 = new Edge(inner2.getTo(), tileCopy.getTo()); s = new Surface(inner2, between1, tileCopy, between2); ! Container tile = Space.createConstructionSpace("Tile"); walls.add(tile); if (s.normal().getZ() == 1.0) { *************** *** 396,400 **** if (s.getCurrentValue().equals("Door")) { // make a door ! Container doorSpc = new Container("Door", Container.CONSTRUCTION, true); doorAndWindows.add(doorSpc); space.add(doorSpc); --- 396,400 ---- if (s.getCurrentValue().equals("Door")) { // make a door ! Container doorSpc = Space.createConstructionSpace("Door"); doorAndWindows.add(doorSpc); space.add(doorSpc); *************** *** 439,443 **** } else if (s.getCurrentValue().equals("Window")) { //make a window ! Container winSpc = new Container("Window", Container.CONSTRUCTION, true); doorAndWindows.add(winSpc); space.add(winSpc); --- 439,443 ---- } else if (s.getCurrentValue().equals("Window")) { //make a window ! Container winSpc = Space.createConstructionSpace("Window"); doorAndWindows.add(winSpc); space.add(winSpc); *************** *** 674,678 **** public Modellor newInstance(Container s) { if (s.getLevel() == Container.PROJECT_LEVEL) { ! Container bath = new Container("Bath-union", Container.CONSTRUCTION, true); bath.setUnion(true); s.add(bath); --- 674,678 ---- public Modellor newInstance(Container s) { if (s.getLevel() == Container.PROJECT_LEVEL) { ! Container bath = Space.createConstructionSpace("Bath-union"); bath.setUnion(true); s.add(bath); |