[Bprocessor-commit] facade/src/net/sourceforge/bprocessor/facade/modellor FacadeModellor.java, 1.2
Status: Pre-Alpha
Brought to you by:
henryml
From: Nordholt <nor...@us...> - 2006-11-04 12:26:41
|
Update of /cvsroot/bprocessor/facade/src/net/sourceforge/bprocessor/facade/modellor In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv16509/src/net/sourceforge/bprocessor/facade/modellor Modified Files: FacadeModellor.java Log Message: now uses facade-modellor instead of window modellor for the windows Index: FacadeModellor.java =================================================================== RCS file: /cvsroot/bprocessor/facade/src/net/sourceforge/bprocessor/facade/modellor/FacadeModellor.java,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** FacadeModellor.java 17 Oct 2006 09:11:11 -0000 1.25 --- FacadeModellor.java 4 Nov 2006 12:26:31 -0000 1.26 *************** *** 73,90 **** /** Thickness of the frame */ ! private double frameThickness = 0; /** Facade depth */ private double depth = 0; - /** The frame space */ - private Space frame; - - /** Set of surfaces that forms the holes for windows*/ - private Set windows = new HashSet(); - - /** The surfaces of the frame */ - private Set frameSurfaces = new HashSet(); - /** edge marking leftmost boundry of the facade */ private Line leftBound; --- 73,81 ---- /** Thickness of the frame */ ! private double frameWidth = 0; /** Facade depth */ private double depth = 0; /** edge marking leftmost boundry of the facade */ private Line leftBound; *************** *** 99,108 **** private Line bottomBound; - /** Set of window elements */ - private Set windowElements = new HashSet(); - - /** Set of window modellors */ - private Set windowModellors = new HashSet(); - /** Type of facade */ private int type; --- 90,93 ---- *************** *** 124,141 **** } /** The constructor for the modellor * @param s the space this modellor models for. */ ! public FacadeModellor(Space s) { ! type = SINGLE_BAR; Project.getInstance().addObserver(this); this.space = s; this.name = "Facade Modellor"; ! Iterator it = space.getEnvelope().iterator(); ! if (it.hasNext()) { ! front = (Surface)it.next(); ! } } ! /** * Create a new instance of the modellor, based on a space --- 109,148 ---- } + /** + * Constructor with no front surface. + * @param s the space + */ + public FacadeModellor(Space s) { + this(s, null); + } + /** The constructor for the modellor * @param s the space this modellor models for. */ ! public FacadeModellor(Space s, Surface front) { ! if (front == null) { ! front = null; ! if (!s.getEnvelope().isEmpty()) { ! front = (Surface)s.getEnvelope().iterator().next(); ! } ! } Project.getInstance().addObserver(this); this.space = s; + //Setting default values this.name = "Facade Modellor"; ! type = SINGLE_BAR; ! this.front = front; ! vertPosts = 1; ! horPosts = 1; ! vertPostWidth = 0.1; ! horPostWidth = 0.1; ! frameWidth = 0.1; ! depth = 0.2; ! createPostConstructors(); ! createFacade(); } ! ! ! /** * Create a new instance of the modellor, based on a space *************** *** 153,156 **** --- 160,164 ---- public void update(Object entity) { if (entity == front) { + createPostConstructors(); createFacade(); } *************** *** 165,172 **** private void createFacade() { removeFacade(); if (type == SINGLE_BAR) { createFrame(); } - createPostConstructors(); createWindows(); } --- 173,199 ---- private void createFacade() { removeFacade(); + if (!vertCons.isEmpty() || !horCons.isEmpty()) { + Iterator it = vertCons.iterator(); + while (it.hasNext()) { + space.add((Line)it.next()); + } + it = horCons.iterator(); + while (it.hasNext()) { + space.add((Line)it.next()); + } + for (int i = 0; i < vertSegs.length - 1; i++) { + for (int j = 0; j < vertSegs[0].length - 1; j++) { + if (0 < i) { + space.add(vertSegs[i][j]); + } + if (0 < j) { + space.add(horSegs[i][j]); + } + } + } + } if (type == SINGLE_BAR) { createFrame(); } createWindows(); } *************** *** 196,200 **** public void setAttributes(List attributes) { Iterator it = attributes.iterator(); ! boolean changed = false; while (it.hasNext()) { Attribute a = (Attribute)it.next(); --- 223,228 ---- public void setAttributes(List attributes) { Iterator it = attributes.iterator(); ! boolean changeFacade = false; ! boolean changeCons = false; while (it.hasNext()) { Attribute a = (Attribute)it.next(); *************** *** 208,212 **** if (front != s) { front = s; ! changed = true; } } --- 236,241 ---- if (front != s) { front = s; ! changeFacade = true; ! changeCons = true; } } *************** *** 215,219 **** int n = ((Double)a.getValue()).intValue(); if (n != vertPosts) { ! changed = true; vertPosts = n; } --- 244,249 ---- int n = ((Double)a.getValue()).intValue(); if (n != vertPosts) { ! changeFacade = true; ! changeCons = true; vertPosts = n; } *************** *** 221,225 **** int n = ((Double)a.getValue()).intValue(); if (n != horPosts) { ! changed = true; horPosts = n; } --- 251,256 ---- int n = ((Double)a.getValue()).intValue(); if (n != horPosts) { ! changeFacade = true; ! changeCons = true; horPosts = n; } *************** *** 227,240 **** double d = ((Double)a.getValue()).doubleValue(); setVertPostWidth(d); ! changed = true; } else if (a.getName().equals("H-postwidth")) { double d = ((Double)a.getValue()).doubleValue(); setHorPostWidth(d); ! changed = true; } else if (a.getName().equals("Frame thickness")) { double n = ((Double)a.getValue()).doubleValue(); ! if (n != frameThickness) { ! frameThickness = n; ! changed = true; } } else if (a.getName().equals("Depth")) { --- 258,271 ---- double d = ((Double)a.getValue()).doubleValue(); setVertPostWidth(d); ! changeFacade = true; } else if (a.getName().equals("H-postwidth")) { double d = ((Double)a.getValue()).doubleValue(); setHorPostWidth(d); ! changeFacade = true; } else if (a.getName().equals("Frame thickness")) { double n = ((Double)a.getValue()).doubleValue(); ! if (n != frameWidth) { ! frameWidth = n; ! changeFacade = true; } } else if (a.getName().equals("Depth")) { *************** *** 242,246 **** if (n != depth) { depth = n; ! changed = true; } } else if (a.getName().equals("Single posted")) { --- 273,277 ---- if (n != depth) { depth = n; ! changeFacade = true; } } else if (a.getName().equals("Single posted")) { *************** *** 248,263 **** if (b && type != SINGLE_BAR) { type = SINGLE_BAR; ! changed = true; } if (!b && type == SINGLE_BAR) { type = DOUBLE_BAR; ! vertPostWidth = 0; ! horPostWidth = 0; ! frameThickness = 0; ! changed = true; } } } ! if (changed) { createFacade(); Project.getInstance().changed(this); --- 279,296 ---- if (b && type != SINGLE_BAR) { type = SINGLE_BAR; ! changeFacade = true; ! changeCons = true; } if (!b && type == SINGLE_BAR) { type = DOUBLE_BAR; ! changeFacade = true; ! changeCons = true; } } } ! if (changeCons || (horCons.isEmpty() && vertCons.isEmpty())) { ! createPostConstructors(); ! } ! if (changeFacade) { createFacade(); Project.getInstance().changed(this); *************** *** 279,287 **** attributes.add(new Attribute("V-postwidth", new Double(vertPostWidth), bars)); attributes.add(new Attribute("H-postwidth", new Double(horPostWidth), bars)); ! attributes.add(new Attribute("Frame thickness", new Double(frameThickness), bars)); ! } else { ! attributes.add(new Attribute("V-postwidth", new Double(0), bars)); ! attributes.add(new Attribute("H-postwidth", new Double(0), bars)); ! attributes.add(new Attribute("Frame thickness", new Double(0), bars)); } attributes.add(new Attribute("Depth", new Double(depth))); --- 312,316 ---- attributes.add(new Attribute("V-postwidth", new Double(vertPostWidth), bars)); attributes.add(new Attribute("H-postwidth", new Double(horPostWidth), bars)); ! attributes.add(new Attribute("Frame thickness", new Double(frameWidth), bars)); } attributes.add(new Attribute("Depth", new Double(depth))); *************** *** 302,306 **** return "Facade Modellor"; } ! /** Delete */ public void delete() { space.setModellor(null); --- 331,335 ---- return "Facade Modellor"; } ! /** Delete */ public void delete() { space.setModellor(null); *************** *** 312,320 **** if (front != null && depth > 0) { ! removeFacade(); ! frame = new Space("Frame", Space.CONSTRUCTION, Space.ELEMENT_LEVEL, true); space.add(frame); Surface eFront = front.copy(space); - frameSurfaces.add(eFront); if (front.getBackDomain() == space) { eFront.setBackDomain(frame); --- 341,347 ---- if (front != null && depth > 0) { ! Space frame = new Space("Frame", Space.CONSTRUCTION, Space.ELEMENT_LEVEL, true); space.add(frame); Surface eFront = front.copy(space); if (front.getBackDomain() == space) { eFront.setBackDomain(frame); *************** *** 323,328 **** } Set sides = new HashSet(); ! frameSurfaces.add(extrudeIntoSpace(eFront, depth, sides)); ! frameSurfaces.addAll(sides); Iterator sidesIt = sides.iterator(); while (sidesIt.hasNext()) { --- 350,354 ---- } Set sides = new HashSet(); ! extrudeIntoSpace(eFront, depth, sides); Iterator sidesIt = sides.iterator(); while (sidesIt.hasNext()) { *************** *** 335,351 **** */ private void removeFacade() { - Iterator it = frameSurfaces.iterator(); - while (it.hasNext()) { - ((Surface)it.next()).delete(); - } - frameSurfaces = new HashSet(); - if (frame != null) { - frame.clear(); - frame.delete(); - } - frame = null; - removeWindows(); - removeConstructors(); - removeSegmentLines(); space.clear(); } --- 361,364 ---- *************** *** 374,386 **** } } Vertex cross = null; if (horEdge != null && vertEdge != null) { ! ! if (horEdge.contains(vertEdge.getFrom())) { ! cross = vertEdge.getFrom(); ! } else { ! cross = vertEdge.getTo(); ! } } if (cross != null) { horSegs = new Line[vertPosts][horPosts]; --- 387,396 ---- } } + //If horizontal and vertical edge were found continue Vertex cross = null; if (horEdge != null && vertEdge != null) { ! cross = Edge.commonVertex(horEdge, vertEdge); } + //if cross was found continue if (cross != null) { horSegs = new Line[vertPosts][horPosts]; *************** *** 388,404 **** Vertex horDir = horEdge.otherVertex(cross).minus(cross); Vertex vertDir = vertEdge.otherVertex(cross).minus(cross); ! double intervalV = ((horEdge.getLength() - frameThickness * 2) - ! vertPostWidth * vertPosts) / (vertPosts + 1); ! double intervalH = ((vertEdge.getLength() - frameThickness * 2) - ! horPostWidth * horPosts) / (horPosts + 1); Vertex offset; //vertical constructors { ! offset = horDir.copy(); ! double lengthV = intervalV + frameThickness + (vertPostWidth / 2); for (int i = 0; i < vertPosts; i++) { offset.scale(lengthV / offset.length()); Constructor l = new Line(cross.add(offset), vertDir.copy(), horEdge, true, true); ! lengthV += (intervalV + vertPostWidth); space.add(l); vertCons.add(l); --- 398,421 ---- Vertex horDir = horEdge.otherVertex(cross).minus(cross); Vertex vertDir = vertEdge.otherVertex(cross).minus(cross); ! double intervalV = horEdge.getLength() / (vertPosts + 1); ! double intervalH = vertEdge.getLength() / (horPosts + 1); ! double lengthV = intervalV; ! double lengthH = intervalH; ! if (type == SINGLE_BAR) { ! intervalV = intervalV - ((frameWidth * 2) + vertPosts * vertPostWidth)/ (vertPosts + 1); ! intervalH = intervalH - ((frameWidth * 2) + horPosts * horPostWidth)/ (horPosts + 1); ! intervalV += vertPostWidth; ! intervalH += horPostWidth; ! lengthV = intervalV - (vertPostWidth / 2) + frameWidth; ! lengthH = intervalH - (horPostWidth / 2) + frameWidth; ! } Vertex offset; //vertical constructors { ! offset = horDir.copy(); for (int i = 0; i < vertPosts; i++) { offset.scale(lengthV / offset.length()); Constructor l = new Line(cross.add(offset), vertDir.copy(), horEdge, true, true); ! lengthV += intervalV; space.add(l); vertCons.add(l); *************** *** 407,416 **** //horizontal constructors { ! offset = vertDir.copy(); ! double lengthH = intervalH + frameThickness + (horPostWidth / 2); for (int i = 0; i < horPosts; i++) { offset.scale(lengthH / offset.length()); Line l = new Line(cross.add(offset), horDir.copy(), vertEdge, true, true); ! lengthH += (intervalH + horPostWidth); horCons.add(l); space.add(l); --- 424,432 ---- //horizontal constructors { ! offset = vertDir.copy(); for (int i = 0; i < horPosts; i++) { offset.scale(lengthH / offset.length()); Line l = new Line(cross.add(offset), horDir.copy(), vertEdge, true, true); ! lengthH += (intervalH); horCons.add(l); space.add(l); *************** *** 419,433 **** //boundries { ! Vertex topOffset = vertDir.copy(); ! topOffset.scale(frameThickness / topOffset.length()); topBound = new Line(cross.add(topOffset), horDir); - Vertex bottomOffset = vertDir.copy(); - bottomOffset.scale((vertEdge.getLength() - frameThickness) / bottomOffset.length()); - bottomBound = new Line(cross.add(bottomOffset), horDir); - Vertex leftOffset = horDir.copy(); - leftOffset.scale(frameThickness / leftOffset.length()); leftBound = new Line(cross.add(leftOffset), vertDir); ! Vertex rightOffset = horDir.copy(); ! rightOffset.scale((horEdge.getLength() - frameThickness) / rightOffset.length()); rightBound = new Line(cross.add(rightOffset), vertDir); } --- 435,449 ---- //boundries { ! double frame = 0; ! if (type == SINGLE_BAR) { ! frame = frameWidth; ! } ! Vertex topOffset = vertDir.copy(frame / vertDir.length()); ! Vertex leftOffset = horDir.copy(frame / horDir.length()); ! Vertex bottomOffset = vertDir.copy((vertEdge.getLength() - frame) / vertDir.length()); ! Vertex rightOffset = horDir.copy((horEdge.getLength() - frame) / horDir.length()); topBound = new Line(cross.add(topOffset), horDir); leftBound = new Line(cross.add(leftOffset), vertDir); ! bottomBound = new Line(cross.add(bottomOffset), horDir); rightBound = new Line(cross.add(rightOffset), vertDir); } *************** *** 466,477 **** horSegs[i][j] = hSeg; vertSegs[i][j] = vSeg; - /* - if (j > 0 && i < vertPosts + 1 && j < horPosts + 1 && - i % 2 == 0) { - drawSeg.put(hSeg, Boolean.FALSE); - } else { - drawSeg.put(hSeg, Boolean.TRUE); - } - */ drawSeg.put(hSeg, Boolean.TRUE); drawSeg.put(vSeg, Boolean.TRUE); --- 482,485 ---- *************** *** 517,526 **** private void createWindows() { if (front != null && depth > 0) { ! Space oldActive = Project.getInstance().getActiveSpace(); ! Project.getInstance().setActiveSpace(space); ! Vertex vDir = vertSegs[0][0].getDirection(); ! vDir = vDir.copy((vertPostWidth / 2) / vDir.length()); ! Vertex hDir = horSegs[0][0].getDirection(); ! hDir = hDir.copy((horPostWidth / 2) / hDir.length()); List slist = new LinkedList(); Map connectMap = new HashMap(); --- 525,536 ---- private void createWindows() { if (front != null && depth > 0) { ! Vertex vDir = new Vertex(0, 0, 0); ! Vertex hDir = new Vertex(0, 0, 0); ! if (type == SINGLE_BAR) { ! vDir = vertSegs[0][0].getDirection(); ! vDir = vDir.copy((vertPostWidth / 2) / vDir.length()); ! hDir = horSegs[0][0].getDirection(); ! hDir = hDir.copy((horPostWidth / 2) / hDir.length()); ! } List slist = new LinkedList(); Map connectMap = new HashMap(); *************** *** 538,546 **** int stepJ = 0; Vertex start = h.intersection(v); ! start = start.add(vDir).add(hDir); ! Vertex last = start; //= Geometry.insertVertex(start, false); space.add(start); Vertex next = vertSegs[i + di][j].intersection(h); ! next = next.add(vDir); //make edges till we are back at the start-vertex while (di != 0 || dj != 0) { --- 548,564 ---- int stepJ = 0; Vertex start = h.intersection(v); ! if (j != 0) { ! start = start.add(vDir); ! } ! if (i != 0) { ! start = start.add(hDir); ! } space.add(start); + + Vertex last = start; Vertex next = vertSegs[i + di][j].intersection(h); ! if (j != 0) { ! next = next.add(vDir); ! } //make edges till we are back at the start-vertex while (di != 0 || dj != 0) { *************** *** 557,565 **** stepI = 0; dirChanged = true; ! } else if (((Boolean)drawSeg.get(horSegs[i + di][j + dj])).booleanValue()) { ! //step right ! stepJ = 0; ! stepI = 1; ! } connectMap.put(e, horSegs[i + di - 1][j + dj]); } else if (stepJ == 1) { --- 575,579 ---- stepI = 0; dirChanged = true; ! } connectMap.put(e, horSegs[i + di - 1][j + dj]); } else if (stepJ == 1) { *************** *** 570,578 **** stepI = -1; dirChanged = true; ! } else if (((Boolean)drawSeg.get(vertSegs[i + di][j + dj])).booleanValue()) { ! //step down ! stepJ = 1; ! stepI = 0; ! } connectMap.put(e, vertSegs[i + di][j + dj - 1]); } else if (stepI == -1) { --- 584,588 ---- stepI = -1; dirChanged = true; ! } connectMap.put(e, vertSegs[i + di][j + dj - 1]); } else if (stepI == -1) { *************** *** 583,591 **** stepI = 0; dirChanged = true; ! } else if (((Boolean)drawSeg.get(horSegs[i + di - 1][j + dj])).booleanValue()) { ! //step left ! stepJ = 0; ! stepI = -1; ! } connectMap.put(e, horSegs[i + di][j + dj]); } else if (stepJ == -1) { --- 593,597 ---- stepI = 0; dirChanged = true; ! } connectMap.put(e, horSegs[i + di][j + dj]); } else if (stepJ == -1) { *************** *** 601,607 **** } if (dirChanged) { ! next.move((hDir.copy(-stepJ)).add(vDir.copy(stepI)).getX(), ! (hDir.copy(-stepJ)).add(vDir.copy(stepI)).getY(), ! (hDir.copy(-stepJ)).add(vDir.copy(stepI)).getZ()); } last = next; --- 607,620 ---- } if (dirChanged) { ! if (j + dj > 0 && j + dj < horPosts + 1) { ! next.move(vDir.copy(stepI).getX(), ! vDir.copy(stepI).getY(), ! vDir.copy(stepI).getZ()); ! } ! if (i + di > 0 && i + di < vertPosts + 1) { ! next.move(hDir.copy(-stepJ).getX(), ! hDir.copy(-stepJ).getY(), ! hDir.copy(-stepJ).getZ()); ! } } last = next; *************** *** 609,613 **** dj += stepJ; next = vertSegs[i + di][j + dj].intersection(horSegs[i + di][j + dj]); ! next = next.add(hDir.copy(-stepJ)).add(vDir.copy(stepI)); } Edge e = new Edge(last, start); --- 622,631 ---- dj += stepJ; next = vertSegs[i + di][j + dj].intersection(horSegs[i + di][j + dj]); ! if (j + dj > 0 && j + dj < horPosts + 1) { ! next = next.add(vDir.copy(stepI)); ! } ! if (i + di > 0 && i + di < vertPosts + 1) { ! next = next.add(hDir.copy(-stepJ)); ! } } Edge e = new Edge(last, start); *************** *** 623,627 **** } extrudeWindows(slist, connectMap); - Project.getInstance().setActiveSpace(oldActive); } } --- 641,644 ---- *************** *** 639,658 **** Surface s = (Surface)it.next(); Set sides = new HashSet(); ! if (type == SINGLE_BAR) { ! Geometry.holeAnalysis(extrudeIntoSpace(s, depth, sides)); ! } else if (type == DOUBLE_BAR) { ! Space w = new Space("Window", Space.CONSTRUCTION, Space.ELEMENT_LEVEL, true); ! double u = s.normal().dot(front.normal()); ! if ((u > 0 && front.getBackDomain() == space) || ! u < 0 && front.getFrontDomain() == space) { ! s.setBackDomain(w); ! } else { ! s.setFrontDomain(w); ! } ! space.add(w); ! Modellor wm = new WindowModellor(w, s); w.setModellor(wm); ! sides.addAll(w.getEnvelope()); ! sides.remove(s); } Iterator sideIt = sides.iterator(); --- 656,680 ---- Surface s = (Surface)it.next(); Set sides = new HashSet(); ! Space w = new Space("Window", Space.CONSTRUCTION, Space.ELEMENT_LEVEL, true); ! double u = s.normal().dot(front.normal()); ! if ((u > 0 && front.getBackDomain() == space) || ! u < 0 && front.getFrontDomain() == space) { ! s.setBackDomain(w); ! } else { ! s.setFrontDomain(w); ! } ! w.setTransparent(true); ! space.add(w); ! Geometry.holeAnalysis(extrudeIntoSpace(s, depth, sides)); ! if (type == DOUBLE_BAR) { ! FacadeModellor wm = new FacadeModellor(w, s); w.setModellor(wm); ! //wm.setFront(s); ! wm.setFrameWidth(0.1); ! wm.setDepth(0.2); ! wm.setHorPosts(0); ! wm.setVertPosts(0); ! wm.createPostConstructors(); ! wm.createFacade(); } Iterator sideIt = sides.iterator(); *************** *** 669,694 **** } } ! /** ! * Removes the windows of the facade. ! */ ! private void removeWindows() { ! Iterator it = windows.iterator(); ! while (it.hasNext()) { ! ((Surface)it.next()).delete(); ! } ! it = windowModellors.iterator(); ! while (it.hasNext()) { ! ((Modellor)it.next()).delete(); ! } ! it = windowElements.iterator(); ! while (it.hasNext()) { ! Space sp = (Space)it.next(); ! sp.clear(); ! sp.delete(); ! } ! windowModellors = new HashSet(); ! windowElements = new HashSet(); ! windows = new HashSet(); ! } /** * Makes sure to extrude the a surface to the right side --- 691,695 ---- } } ! /** * Makes sure to extrude the a surface to the right side *************** *** 723,729 **** if (this.vertPostWidth != vertPostWidth) { this.vertPostWidth = vertPostWidth; - //removeWindows(); - //createWindows(); - createFacade(); } } --- 724,727 ---- *************** *** 742,750 **** if (this.horPostWidth != horPostWidth) { this.horPostWidth = horPostWidth; - //removeWindows(); - //createWindows(); - createFacade(); } ! } /** @see net.sourceforge.bprocessor.model.modellor.Modellor#setContent(Map) */ --- 740,761 ---- if (this.horPostWidth != horPostWidth) { this.horPostWidth = horPostWidth; } ! } ! ! /** ! * Set the width of the frame ! * @param frameWidth the new frame width ! */ ! public void setFrameWidth(double frameWidth) { ! this.frameWidth = frameWidth; ! } ! ! /** ! * Set the depth ! * @param depth the new horizontal postwidth ! */ ! public void setDepth(double depth) { ! this.depth = depth; ! } /** @see net.sourceforge.bprocessor.model.modellor.Modellor#setContent(Map) */ *************** *** 755,761 **** topBound = (Line)m.get("topBound"); depth = ((Double)m.get("depth")).doubleValue(); - frame = (Space)m.get("frame"); front = (Surface)m.get("front"); ! frameThickness = ((Double)m.get("frameThickness")).doubleValue(); horPosts = ((Integer)m.get("horPosts")).intValue(); horPostWidth = ((Double)m.get("horPostWidth")).doubleValue(); --- 766,771 ---- topBound = (Line)m.get("topBound"); depth = ((Double)m.get("depth")).doubleValue(); front = (Surface)m.get("front"); ! frameWidth = ((Double)m.get("frameThickness")).doubleValue(); horPosts = ((Integer)m.get("horPosts")).intValue(); horPostWidth = ((Double)m.get("horPostWidth")).doubleValue(); *************** *** 775,781 **** m.put("topBound", topBound); m.put("depth", new Double(depth)); - m.put("frame", frame); m.put("front", front); ! m.put("frameThickness", new Double(frameThickness)); m.put("horPosts", new Integer(horPosts)); m.put("horPostWidth", new Double(horPostWidth)); --- 785,790 ---- m.put("topBound", topBound); m.put("depth", new Double(depth)); m.put("front", front); ! m.put("frameThickness", new Double(frameWidth)); m.put("horPosts", new Integer(horPosts)); m.put("horPostWidth", new Double(horPostWidth)); *************** *** 787,789 **** --- 796,820 ---- return m; } + + /** + * Set the front surface + * @param front new front surface + */ + public void setFront(Surface front) { + this.front = front; + } + /** + * Set the number of vertical posts + * @param vertPosts number of posts + */ + public void setVertPosts(int vertPosts) { + this.vertPosts = vertPosts; + } + /** + * Set the number of horizontal posts + * @param horPosts number of posts + */ + public void setHorPosts(int horPosts) { + this.horPosts = horPosts; + } } |