[Bprocessor-commit] facade/src/net/sourceforge/bprocessor/facade/modellor NetFacadeModellor.java,
Status: Pre-Alpha
Brought to you by:
henryml
From: Michael L. <he...@us...> - 2009-06-25 22:17:30
|
Update of /cvsroot/bprocessor/facade/src/net/sourceforge/bprocessor/facade/modellor In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv17415/src/net/sourceforge/bprocessor/facade/modellor Modified Files: NetFacadeModellor.java FacadeModellor.java Log Message: Renamed Space to Item and Container to Space Index: NetFacadeModellor.java =================================================================== RCS file: /cvsroot/bprocessor/facade/src/net/sourceforge/bprocessor/facade/modellor/NetFacadeModellor.java,v retrieving revision 1.47 retrieving revision 1.48 diff -C2 -d -r1.47 -r1.48 *** NetFacadeModellor.java 3 Nov 2008 13:14:15 -0000 1.47 --- NetFacadeModellor.java 25 Jun 2009 22:17:23 -0000 1.48 *************** *** 27,32 **** import net.sourceforge.bprocessor.model.Project; import net.sourceforge.bprocessor.model.Selector; - import net.sourceforge.bprocessor.model.Container; import net.sourceforge.bprocessor.model.Space; import net.sourceforge.bprocessor.model.Surface; import net.sourceforge.bprocessor.model.Vertex; --- 27,32 ---- import net.sourceforge.bprocessor.model.Project; import net.sourceforge.bprocessor.model.Selector; import net.sourceforge.bprocessor.model.Space; + import net.sourceforge.bprocessor.model.Item; import net.sourceforge.bprocessor.model.Surface; import net.sourceforge.bprocessor.model.Vertex; *************** *** 65,75 **** /** The space of the facade */ ! private Container space; /** The frame space */ ! private Container frame; /** The net for this facade */ ! private Container net; /** The framewidth of the facade */ --- 65,75 ---- /** The space of the facade */ ! private Space space; /** The frame space */ ! private Space frame; /** The net for this facade */ ! private Space net; /** The framewidth of the facade */ *************** *** 113,123 **** */ public void setSubContent(Map<String, Object> m) { ! space = (Container)m.get("space"); ! net = (Container)m.get("net"); depth = ((Double)m.get("depth")).doubleValue(); frameWidth = ((Double)m.get("frameWidth")).doubleValue(); front = (Surface)m.get("front"); single = ((Boolean)m.get("single")).booleanValue(); ! frame = (Container)m.get("frame"); Project.getInstance().addObserver(this); } --- 113,123 ---- */ public void setSubContent(Map<String, Object> m) { ! space = (Space)m.get("space"); ! net = (Space)m.get("net"); depth = ((Double)m.get("depth")).doubleValue(); frameWidth = ((Double)m.get("frameWidth")).doubleValue(); front = (Surface)m.get("front"); single = ((Boolean)m.get("single")).booleanValue(); ! frame = (Space)m.get("frame"); Project.getInstance().addObserver(this); } *************** *** 128,137 **** * @return a new modellor */ ! public Modellor newInstance(Container s) { NetFacadeModellor mod = new NetFacadeModellor(); mod.setSpace(s); Project.getInstance().scheduleObserver(mod); s.setModellor(mod); ! frame = Space.createConstructionSpace("Frame"); Classification frameClass = Project.getInstance().getClassification(FRAME, 0); frame.setClassification(frameClass); --- 128,137 ---- * @return a new modellor */ ! public Modellor newInstance(Space s) { NetFacadeModellor mod = new NetFacadeModellor(); mod.setSpace(s); Project.getInstance().scheduleObserver(mod); s.setModellor(mod); ! frame = Item.createConstructionSpace("Frame"); Classification frameClass = Project.getInstance().getClassification(FRAME, 0); frame.setClassification(frameClass); *************** *** 148,152 **** * @return a suitable surface from the s' envelope */ ! private Surface findFront(Container s) { Surface frontCandidate = null; if (!s.getEnvelope().isEmpty()) { --- 148,152 ---- * @return a suitable surface from the s' envelope */ ! private Surface findFront(Space s) { Surface frontCandidate = null; if (!s.getEnvelope().isEmpty()) { *************** *** 226,230 **** Attribute a = attributes.get("Net"); if (a != null) { ! setNet((Container)a.getValue()); } a = attributes.get("Framewidth"); --- 226,230 ---- Attribute a = attributes.get("Net"); if (a != null) { ! setNet((Space)a.getValue()); } a = attributes.get("Framewidth"); *************** *** 268,272 **** *@return the space */ ! public Container getSpace() { return space; } --- 268,272 ---- *@return the space */ ! public Space getSpace() { return space; } *************** *** 276,280 **** * @param space the space */ ! public void setSpace(Container space) { this.space = space; } --- 276,280 ---- * @param space the space */ ! public void setSpace(Space space) { this.space = space; } *************** *** 284,288 **** * @return the net of this modellor */ ! public Container getNet() { return this.net; } --- 284,288 ---- * @return the net of this modellor */ ! public Space getNet() { return this.net; } *************** *** 292,296 **** * @param net the net */ ! public void setNet(Container net) { if (net.isNet()) { if (this.net != null) { --- 292,296 ---- * @param net the net */ ! public void setNet(Space net) { if (net.isNet()) { if (this.net != null) { *************** *** 343,347 **** * @param n the net */ ! private void prepareNet(Container n) { Collection<Edge> edges = n.getEdges(); for (Edge e : edges) { --- 343,347 ---- * @param n the net */ ! private void prepareNet(Space n) { Collection<Edge> edges = n.getEdges(); for (Edge e : edges) { *************** *** 387,393 **** * @param net the net */ ! private void createDoubleFacade(Container net) { if (frame == null) { ! frame = Space.createConstructionSpace("Frame"); Classification frameClass = Project.getInstance().getClassification(FRAME, 0); frame.setClassification(frameClass); --- 387,393 ---- * @param net the net */ ! private void createDoubleFacade(Space net) { if (frame == null) { ! frame = Item.createConstructionSpace("Frame"); Classification frameClass = Project.getInstance().getClassification(FRAME, 0); frame.setClassification(frameClass); *************** *** 434,440 **** * @param net the net */ ! private void createSingleFacade(Container net) { if (frame == null) { ! frame = Space.createConstructionSpace("Frame"); space.add(frame); } --- 434,440 ---- * @param net the net */ ! private void createSingleFacade(Space net) { if (frame == null) { ! frame = Item.createConstructionSpace("Frame"); space.add(frame); } *************** *** 469,473 **** Surface hole = new Surface(Edge.placeOffset(field.getEdges(), field, offsetMap)); hole = space.insert(hole); ! Container holeSpace = Space.createFunctionalSpace("Facade Hole"); space.add(holeSpace); Geometry.assignSame(front, hole, space, holeSpace); --- 469,473 ---- Surface hole = new Surface(Edge.placeOffset(field.getEdges(), field, offsetMap)); hole = space.insert(hole); ! Space holeSpace = Item.createFunctionalSpace("Facade Hole"); space.add(holeSpace); Geometry.assignSame(front, hole, space, holeSpace); *************** *** 490,494 **** * @param holeSpace the space of the hole in the facade */ ! private void detailField(Map envF, Surface hole, Container holeSpace) { double frameSize = 0.0; String type = ""; --- 490,494 ---- * @param holeSpace the space of the hole in the facade */ ! private void detailField(Map envF, Surface hole, Space holeSpace) { double frameSize = 0.0; String type = ""; *************** *** 512,519 **** Surface in = new Surface(Edge.placeOffset(hole.getEdges(), hole, offmap1)); Surface out = new Surface(Edge.placeOffset(hole.getEdges(), hole, offmap2)); ! Container f = Space.createConstructionSpace(type + " Frame"); Classification frameClass = Project.getInstance().getClassification(FRAME, 0); f.setClassification(frameClass); ! Container g = Space.createConstructionSpace("Glass"); Classification glassClass = Project.getInstance().getClassification(GLASS, 0); g.setClassification(glassClass); --- 512,519 ---- Surface in = new Surface(Edge.placeOffset(hole.getEdges(), hole, offmap1)); Surface out = new Surface(Edge.placeOffset(hole.getEdges(), hole, offmap2)); ! Space f = Item.createConstructionSpace(type + " Frame"); Classification frameClass = Project.getInstance().getClassification(FRAME, 0); f.setClassification(frameClass); ! Space g = Item.createConstructionSpace("Glass"); Classification glassClass = Project.getInstance().getClassification(GLASS, 0); g.setClassification(glassClass); *************** *** 553,557 **** * @return a list of connected edges making up the net outline */ ! private List<Edge> netOutline(Container net) { /*Find outer edges*/ Set<Edge> outer = new HashSet<Edge>(); --- 553,557 ---- * @return a list of connected edges making up the net outline */ ! private List<Edge> netOutline(Space net) { /*Find outer edges*/ Set<Edge> outer = new HashSet<Edge>(); *************** *** 605,610 **** * @return a new net */ ! private Container createNet(Surface front) { ! Container n = Container.createNet("Facade net"); if (front != null) { front.copy(n); --- 605,610 ---- * @return a new net */ ! private Space createNet(Surface front) { ! Space n = Space.createNet("Facade net"); if (front != null) { front.copy(n); *************** *** 685,691 **** * @param sp2 second space */ ! private void assignOpposite(Surface s1, Surface s2, Container sp1, Container sp2) { ! Container back = s2.getBackDomain(); ! Container front = s2.getFrontDomain(); Geometry.assignSame(s1, s2, sp1, sp2); if (s2.getBackDomain() == sp2) { --- 685,691 ---- * @param sp2 second space */ ! private void assignOpposite(Surface s1, Surface s2, Space sp1, Space sp2) { ! Space back = s2.getBackDomain(); ! Space front = s2.getFrontDomain(); Geometry.assignSame(s1, s2, sp1, sp2); if (s2.getBackDomain() == sp2) { *************** *** 738,747 **** @Override public int getUseableLevel() { ! return Container.SPACE_LEVEL; } private Set<Surface> generateFrame2(Surface cut, Surface contourSurf, ! Container frameSpace, Vertex out) { Set<Surface> generatedSurfaces = new HashSet<Surface>(); --- 738,747 ---- @Override public int getUseableLevel() { ! return Space.SPACE_LEVEL; } private Set<Surface> generateFrame2(Surface cut, Surface contourSurf, ! Space frameSpace, Vertex out) { Set<Surface> generatedSurfaces = new HashSet<Surface>(); Index: FacadeModellor.java =================================================================== RCS file: /cvsroot/bprocessor/facade/src/net/sourceforge/bprocessor/facade/modellor/FacadeModellor.java,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** FacadeModellor.java 3 Nov 2008 13:14:15 -0000 1.42 --- FacadeModellor.java 25 Jun 2009 22:17:23 -0000 1.43 *************** *** 18,24 **** import net.sourceforge.bprocessor.gui.GUI; import net.sourceforge.bprocessor.model.modellor.Modellor; - import net.sourceforge.bprocessor.model.Container; - import net.sourceforge.bprocessor.model.Attribute; import net.sourceforge.bprocessor.model.Space; import net.sourceforge.bprocessor.model.Surface; import net.sourceforge.bprocessor.model.Project; --- 18,24 ---- import net.sourceforge.bprocessor.gui.GUI; import net.sourceforge.bprocessor.model.modellor.Modellor; import net.sourceforge.bprocessor.model.Space; + import net.sourceforge.bprocessor.model.Attribute; + import net.sourceforge.bprocessor.model.Item; import net.sourceforge.bprocessor.model.Surface; import net.sourceforge.bprocessor.model.Project; *************** *** 63,67 **** /** The space this modellor is connected to */ ! private Container space; /** The front surface of the facade */ --- 63,67 ---- /** The space this modellor is connected to */ ! private Space space; /** The front surface of the facade */ *************** *** 115,119 **** * @param s the space */ ! public FacadeModellor(Container s) { this(s, null); } --- 115,119 ---- * @param s the space */ ! public FacadeModellor(Space s) { this(s, null); } *************** *** 123,127 **** * @param front Front */ ! public FacadeModellor(Container s, Surface front) { if (front == null) { front = null; --- 123,127 ---- * @param front Front */ ! public FacadeModellor(Space s, Surface front) { if (front == null) { front = null; *************** *** 154,158 **** * @return The created modellor object for the given space */ ! public Modellor newInstance(Container s) { return new FacadeModellor(s); } --- 154,158 ---- * @return The created modellor object for the given space */ ! public Modellor newInstance(Space s) { return new FacadeModellor(s); } *************** *** 366,370 **** if (front != null && depth > 0) { ! Container frame = Space.createConstructionSpace("Frame"); space.add(frame); Surface eFront = front.copy(space); --- 366,370 ---- if (front != null && depth > 0) { ! Space frame = Item.createConstructionSpace("Frame"); space.add(frame); Surface eFront = front.copy(space); *************** *** 691,695 **** Surface s = (Surface)it.next(); Set sides = new HashSet(); ! Container w = Space.createConstructionSpace("Window"); double u = s.normal().dot(front.normal()); if ((u > 0 && front.getBackDomain() == space) || --- 691,695 ---- Surface s = (Surface)it.next(); Set sides = new HashSet(); ! Space w = Item.createConstructionSpace("Window"); double u = s.normal().dot(front.normal()); if ((u > 0 && front.getBackDomain() == space) || *************** *** 808,812 **** type = ((Integer)m.get("type")).intValue(); name = (String)m.get("name"); ! space = (Container)m.get("Space"); } --- 808,812 ---- type = ((Integer)m.get("type")).intValue(); name = (String)m.get("name"); ! space = (Space)m.get("Space"); } *************** *** 854,858 **** @Override public int getUseableLevel() { ! return Container.SPACE_LEVEL; } } --- 854,858 ---- @Override public int getUseableLevel() { ! return Space.SPACE_LEVEL; } } |