bprocessor-commit Mailing List for B-processor (Page 104)
Status: Pre-Alpha
Brought to you by:
henryml
You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(12) |
Jul
(117) |
Aug
(151) |
Sep
(157) |
Oct
(81) |
Nov
(117) |
Dec
(119) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(183) |
Feb
(130) |
Mar
(117) |
Apr
(61) |
May
(82) |
Jun
(45) |
Jul
(149) |
Aug
(173) |
Sep
(199) |
Oct
(165) |
Nov
(107) |
Dec
(137) |
2007 |
Jan
(124) |
Feb
(58) |
Mar
(123) |
Apr
(80) |
May
(130) |
Jun
(64) |
Jul
(31) |
Aug
(42) |
Sep
(114) |
Oct
(167) |
Nov
(239) |
Dec
(200) |
2008 |
Jan
(43) |
Feb
(43) |
Mar
(4) |
Apr
(9) |
May
(5) |
Jun
(1) |
Jul
(3) |
Aug
(3) |
Sep
(13) |
Oct
(9) |
Nov
(12) |
Dec
|
2009 |
Jan
|
Feb
(20) |
Mar
(7) |
Apr
(12) |
May
(34) |
Jun
(72) |
Jul
|
Aug
(3) |
Sep
(31) |
Oct
(2) |
Nov
(8) |
Dec
(4) |
2010 |
Jan
(5) |
Feb
(32) |
Mar
(8) |
Apr
(7) |
May
(36) |
Jun
|
Jul
(11) |
Aug
(15) |
Sep
(7) |
Oct
(2) |
Nov
(13) |
Dec
(80) |
2011 |
Jan
|
Feb
|
Mar
(8) |
Apr
(12) |
May
(32) |
Jun
(9) |
Jul
(5) |
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
(8) |
2012 |
Jan
|
Feb
|
Mar
(3) |
Apr
(5) |
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(22) |
Jun
(5) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Michael L. <he...@us...> - 2006-09-11 13:25:10
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv23742/src/net/sourceforge/bprocessor/gl/tool Modified Files: AbstractPencil.java Log Message: fixed style-check error Index: AbstractPencil.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/AbstractPencil.java,v retrieving revision 1.65 retrieving revision 1.66 diff -C2 -d -r1.65 -r1.66 *** AbstractPencil.java 11 Sep 2006 13:13:53 -0000 1.65 --- AbstractPencil.java 11 Sep 2006 13:25:05 -0000 1.66 *************** *** 814,816 **** log.info(info); } ! } \ No newline at end of file --- 814,816 ---- log.info(info); } ! } |
From: Nordholt <nor...@us...> - 2006-09-11 13:13:55
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv18351/src/net/sourceforge/bprocessor/gl/tool Modified Files: AbstractPencil.java Log Message: Making sure the vertices that we use to generate constructors will not be moved around Index: AbstractPencil.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/AbstractPencil.java,v retrieving revision 1.64 retrieving revision 1.65 diff -C2 -d -r1.64 -r1.65 *** AbstractPencil.java 11 Sep 2006 12:47:32 -0000 1.64 --- AbstractPencil.java 11 Sep 2006 13:13:53 -0000 1.65 *************** *** 377,385 **** List constructors = new LinkedList(); if (start != null) { ! constructors.add(new CoordinateSystem(start.vertex())); } if (incident != null) { if (start == null || (!start.equalEps(incident))) { ! constructors.add(new CoordinateSystem(incident.vertex())); } } --- 377,385 ---- List constructors = new LinkedList(); if (start != null) { ! constructors.add(new CoordinateSystem(start.vertex().copy())); } if (incident != null) { if (start == null || (!start.equalEps(incident))) { ! constructors.add(new CoordinateSystem(incident.vertex().copy())); } } *************** *** 541,545 **** switch (current.type()) { case Intersection.VERTEX: ! incident = current; break; case Intersection.EDGE: --- 541,545 ---- switch (current.type()) { case Intersection.VERTEX: ! incident = current.copy(); break; case Intersection.EDGE: *************** *** 548,558 **** break; case Intersection.EDGE_MIDPOINT: ! incident = current; break; case Intersection.EDGE_INTERSECTION: ! incident = current; break; case Intersection.SURFACE_INTERSECTION: ! incident = current; break; case Intersection.PLANE_INTERSECTION: --- 548,558 ---- break; case Intersection.EDGE_MIDPOINT: ! incident = current.copy(); break; case Intersection.EDGE_INTERSECTION: ! incident = current.copy(); break; case Intersection.SURFACE_INTERSECTION: ! incident = current.copy(); break; case Intersection.PLANE_INTERSECTION: *************** *** 814,816 **** log.info(info); } ! } --- 814,816 ---- log.info(info); } ! } \ No newline at end of file |
From: Nordholt <nor...@us...> - 2006-09-11 13:13:21
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv18244/src/net/sourceforge/bprocessor/gl/tool Modified Files: MoveTool.java Log Message: Changed so the vertex of the start inersection is a copy of the original and therefor will not be moved causing the start-coordinatesystem-constructors to be moved aswell. Index: MoveTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/MoveTool.java,v retrieving revision 1.69 retrieving revision 1.70 diff -C2 -d -r1.69 -r1.70 *** MoveTool.java 7 Sep 2006 15:54:47 -0000 1.69 --- MoveTool.java 11 Sep 2006 13:13:07 -0000 1.70 *************** *** 191,195 **** } if (!entities.isEmpty()) { ! start = current; to = last; updateFeedback(); --- 191,195 ---- } if (!entities.isEmpty()) { ! start = current.copy(); to = last; updateFeedback(); |
From: Michael L. <he...@us...> - 2006-09-11 12:47:43
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv5694/src/net/sourceforge/bprocessor/gl Modified Files: GLView.java Log Message: Refactoring of length-field Index: GLView.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/GLView.java,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** GLView.java 11 Sep 2006 06:33:01 -0000 1.40 --- GLView.java 11 Sep 2006 12:47:32 -0000 1.41 *************** *** 198,210 **** lengthField.setText(value); } - - /** - * Set the lengthField display to two parameters - * @param x The first parameter - * @param y The second parameter - */ - public void setLength(double x, double y) { - lengthField.setText(x, y); - } /** --- 198,201 ---- |
From: Michael L. <he...@us...> - 2006-09-11 12:47:34
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv5694/src/net/sourceforge/bprocessor/gl/tool Modified Files: AbstractTool.java OffsetTool.java ExtrudeTool.java TapeMeasureTool.java SpaceTool.java ArcTool.java MultiExtrudeTool.java RectTool.java AbstractPencil.java Log Message: Refactoring of length-field Index: ExtrudeTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/ExtrudeTool.java,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** ExtrudeTool.java 3 Jul 2006 14:25:02 -0000 1.21 --- ExtrudeTool.java 11 Sep 2006 12:47:32 -0000 1.22 *************** *** 155,159 **** move(delta); t = to; ! glv.setLength(Math.abs(t)); } --- 155,159 ---- move(delta); t = to; ! setLength(Math.abs(t)); } *************** *** 514,517 **** --- 514,535 ---- /** + * Delete + */ + public void delete() { + int length = number.length(); + if (length > 1) { + number = number.substring(0, length - 1); + } else { + number = String.valueOf(0); + } + try { + double d = Double.parseDouble(number); + glv.setLength(d / 1000); + } catch (NumberFormatException exp) { + Project.info(exp); + } + } + + /** * Called when a key is released * @param e The KeyEvent object Index: OffsetTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/OffsetTool.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** OffsetTool.java 7 Sep 2006 15:54:47 -0000 1.5 --- OffsetTool.java 11 Sep 2006 12:47:32 -0000 1.6 *************** *** 280,284 **** Vertex projection = outNormal.copy(); projection.scale((lastOffsetPoint.minus(start.vertex())).dot(projection)); ! glv.setLength(projection.length()); } else { super.updateLength(); --- 280,284 ---- Vertex projection = outNormal.copy(); projection.scale((lastOffsetPoint.minus(start.vertex())).dot(projection)); ! setLength(projection.length()); } else { super.updateLength(); Index: ArcTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/ArcTool.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** ArcTool.java 7 Sep 2006 11:38:41 -0000 1.12 --- ArcTool.java 11 Sep 2006 12:47:32 -0000 1.13 *************** *** 234,238 **** super.updateLength(); } else { ! glv.setLength(radius); } } --- 234,238 ---- super.updateLength(); } else { ! setLength(radius); } } Index: AbstractPencil.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/AbstractPencil.java,v retrieving revision 1.63 retrieving revision 1.64 diff -C2 -d -r1.63 -r1.64 *** AbstractPencil.java 11 Sep 2006 06:33:01 -0000 1.63 --- AbstractPencil.java 11 Sep 2006 12:47:32 -0000 1.64 *************** *** 458,464 **** } if (edge != null) { ! glv.setLength(edge.getLength()); } else { ! glv.setLength(0); } } --- 458,464 ---- } if (edge != null) { ! setLength(edge.getLength()); } else { ! setLength(0); } } Index: AbstractTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/AbstractTool.java,v retrieving revision 1.98 retrieving revision 1.99 diff -C2 -d -r1.98 -r1.99 *** AbstractTool.java 11 Sep 2006 06:33:01 -0000 1.98 --- AbstractTool.java 11 Sep 2006 12:47:32 -0000 1.99 *************** *** 93,96 **** --- 93,99 ---- protected boolean showConstructors; + /** Are user typing in length-field */ + protected boolean typing; + /** The cursor for drag */ private Cursor dragCursor; *************** *** 99,102 **** --- 102,107 ---- private Cursor orbitCursor; + + /** *************** *** 172,175 **** --- 177,190 ---- return center; } + + /** + * Set the length-field + * @param value Douelb + */ + public void setLength(double value) { + int mm = (int) (value * 1000.0); + glv.setLengthValue(Integer.toString(mm)); + typing = false; + } /** *************** *** 507,511 **** */ public void cleanUp() { ! Project.info("cleanup " + this.getClass().getName()); } } --- 522,527 ---- */ public void cleanUp() { ! glv.setLengthValue(""); ! typing = false; } } Index: SpaceTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/SpaceTool.java,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** SpaceTool.java 8 Sep 2006 13:08:20 -0000 1.29 --- SpaceTool.java 11 Sep 2006 12:47:32 -0000 1.30 *************** *** 61,64 **** --- 61,67 ---- */ protected void pressed(MouseEvent e) { + glv.setLengthValue(""); + typing = false; + findTarget(e); boolean done = false; *************** *** 534,544 **** /** * @param event KeyEvent */ public void key(KeyEvent event) { { ! String value = glv.getLengthValue(); ! value = value + event.getKeyChar(); ! glv.setLengthValue(value); } } --- 537,570 ---- /** + * Evaluate the string + * @param value String + * @return Result + */ + public Object evaluate(String value) { + Project.info("evaluate '" + value + "'"); + return null; + } + + /** * @param event KeyEvent */ public void key(KeyEvent event) { { ! String value; ! if (typing) { ! value = glv.getLengthValue(); ! } else { ! value = ""; ! } ! char ch = event.getKeyChar(); ! if (ch > 32 && ch < 128) { ! value = value + ch; ! glv.setLengthValue(value); ! typing = true; ! } else { ! if (event.getKeyCode() == KeyEvent.VK_ENTER) { ! evaluate(value); ! } ! } } } *************** *** 548,551 **** --- 574,587 ---- */ public void delete() { + if (typing) { + String value = glv.getLengthValue(); + int length = value.length(); + if (length > 0) { + value = value.substring(0, length - 1); + glv.setLengthValue(value); + } + return; + } + Iterator it = Selection.primary().iterator(); List edges = new ArrayList(); Index: TapeMeasureTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/TapeMeasureTool.java,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** TapeMeasureTool.java 7 Sep 2006 11:38:41 -0000 1.19 --- TapeMeasureTool.java 11 Sep 2006 12:47:32 -0000 1.20 *************** *** 124,128 **** Edge edge = new Edge(start.vertex(), constructionPoint); edge.setStrippled(true); ! glv.setLength(edge.getLength()); consts.add(edge); constructors(consts); --- 124,128 ---- Edge edge = new Edge(start.vertex(), constructionPoint); edge.setStrippled(true); ! setLength(edge.getLength()); consts.add(edge); constructors(consts); Index: RectTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/RectTool.java,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** RectTool.java 7 Sep 2006 11:38:41 -0000 1.15 --- RectTool.java 11 Sep 2006 12:47:32 -0000 1.16 *************** *** 129,133 **** super.updateLength(); } else { ! glv.setLength(baseEdge.getFrom().minus(movingEdge.getTo()).length()); } } --- 129,133 ---- super.updateLength(); } else { ! setLength(baseEdge.getFrom().minus(movingEdge.getTo()).length()); } } Index: MultiExtrudeTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/MultiExtrudeTool.java,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** MultiExtrudeTool.java 7 Sep 2006 13:35:19 -0000 1.22 --- MultiExtrudeTool.java 11 Sep 2006 12:47:32 -0000 1.23 *************** *** 226,230 **** d.getVertex().move(v.getX(), v.getY(), v.getZ()); } ! glv.setLength(t); } --- 226,230 ---- d.getVertex().move(v.getX(), v.getY(), v.getZ()); } ! setLength(t); } *************** *** 244,248 **** v.scale(delta); which.getVertex().move(v.getX(), v.getY(), v.getZ()); ! glv.setLength(t); } --- 244,248 ---- v.scale(delta); which.getVertex().move(v.getX(), v.getY(), v.getZ()); ! setLength(t); } |
From: rimestad <rim...@us...> - 2006-09-11 12:10:11
|
Update of /cvsroot/bprocessor/facade/src/net/sourceforge/bprocessor/facade/modellor In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv20775/src/net/sourceforge/bprocessor/facade/modellor Modified Files: WindowModellor.java Log Message: made some small comment and update changes Index: WindowModellor.java =================================================================== RCS file: /cvsroot/bprocessor/facade/src/net/sourceforge/bprocessor/facade/modellor/WindowModellor.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** WindowModellor.java 6 Sep 2006 10:45:26 -0000 1.6 --- WindowModellor.java 11 Sep 2006 12:10:02 -0000 1.7 *************** *** 81,85 **** if (s.getEnvelope().size() == 1) { - System.out.println("was here"); Surface ext = sur.getExterior(); double minDist = Double.NaN; --- 81,84 ---- *************** *** 91,95 **** tryout = front.getEnvelope(); } - System.out.println("frontdomain " + ext.getFrontDomain()); } else { Space back = ext.getBackDomain(); --- 90,93 ---- *************** *** 97,101 **** tryout = back.getEnvelope(); } - System.out.println("backdomain " + ext.getBackDomain()); } Iterator iter = tryout.iterator(); --- 95,98 ---- *************** *** 108,116 **** if (inter != null) { double dist = center.distance(inter); - System.out.println("Were here and internersection " + inter - + " with dist " + dist); if (Double.isNaN(minDist) || (dist < minDist && dist > 0.00001)) { minDist = dist; - System.out.println("Found a surface with dist " + dist); } } --- 105,110 ---- *************** *** 136,142 **** */ public void update(Object entity) { ! System.out.println("Should update"); ! if (entity == space || entity == this || entity == surface) { ! System.out.println("did a update on the surface"); cleanUp(); drawWindow(); --- 130,134 ---- */ public void update(Object entity) { ! if (entity == space || entity == surface) { cleanUp(); drawWindow(); |
From: Nikolaj B. <nbr...@us...> - 2006-09-11 09:24:54
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv11384/src/net/sourceforge/bprocessor/model Modified Files: Space.java Log Message: Fixed a small bug that would result in two classification fields in some cases Index: Space.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Space.java,v retrieving revision 1.58 retrieving revision 1.59 diff -C2 -d -r1.58 -r1.59 *** Space.java 7 Sep 2006 11:34:34 -0000 1.58 --- Space.java 11 Sep 2006 09:24:52 -0000 1.59 *************** *** 1111,1131 **** res.add(new Attribute("Classification", functionalOptions, getClassification())); } - } - - if (getOwner().getOwner() == Project.getInstance().world()) { - if (isConstructionSpace()) { - res.add(new Attribute("Classification", elementConstructionOptions, getClassification())); - } else { - res.add(new Attribute("Classification", elementFunctionalOptions, getClassification())); - } } else { ! if (isConstructionSpace()) { ! res.add(new Attribute("Classification", partConstructionOptions, getClassification())); } else { ! res.add(new Attribute("Classification", partFunctionalOptions, getClassification())); } - } ! if (isConstructionSpace()) { if (isTransparent()) { --- 1111,1131 ---- res.add(new Attribute("Classification", functionalOptions, getClassification())); } } else { ! ! if (getOwner().getOwner() == Project.getInstance().world()) { ! if (isConstructionSpace()) { ! res.add(new Attribute("Classification", elementConstructionOptions, getClassification())); ! } else { ! res.add(new Attribute("Classification", elementFunctionalOptions, getClassification())); ! } } else { ! if (isConstructionSpace()) { ! res.add(new Attribute("Classification", partConstructionOptions, getClassification())); ! } else { ! res.add(new Attribute("Classification", partFunctionalOptions, getClassification())); ! } } ! } if (isConstructionSpace()) { if (isTransparent()) { |
From: Nikolaj B. <nbr...@us...> - 2006-09-11 09:23:23
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv10973/src/net/sourceforge/bprocessor/model Added Files: EnergyCalc.java Log Message: Contains the different methods used in energycalculations --- NEW FILE: EnergyCalc.java --- //--------------------------------------------------------------------------------- // $Id: EnergyCalc.java,v 1.1 2006/09/11 09:23:20 nbramsen Exp $ // // Copyright (c) 2005 The BProcessor Team (http://bprocessor.sourceforge.net) // Released under the Lesser GNU Public License v2.1 //--------------------------------------------------------------------------------- package net.sourceforge.bprocessor.model; import java.util.Iterator; /** * This class handles calculations about energy transmission loss */ public class EnergyCalc { /** * energyLoss calculates the total energy transmission loss * @return the total loss */ public static double energyLoss() { Iterator it = Project.getInstance().getSurfaces().iterator(); double totalloss = 0; while (it.hasNext()) { Surface current = (Surface) it.next(); if (current.getFrontDomain().getClassification().equalsIgnoreCase("Exteriør")) { totalloss = totalloss + calcloss(current.getBackDomain(), current); } if (current.getFrontDomain().getClassification().equalsIgnoreCase("Uopvarmet rum")) { totalloss = totalloss + calcloss(current.getBackDomain(), current); } if (current.getBackDomain().getClassification().equalsIgnoreCase("Exteriør")) { totalloss = totalloss + calcloss(current.getFrontDomain(), current); } if (current.getBackDomain().getClassification().equalsIgnoreCase("Uopvarmet rum")) { totalloss = totalloss + calcloss(current.getFrontDomain(), current); } } return totalloss; } /** * Calculates energyloss of a surface * @param classification The classifaction of the surface * @param current The current Surface * @return the loss */ private static double calcloss(Space classification, Surface current) { double loss = 0; boolean first = true; if (isrelevant(classification, current)) { Iterator it = classification.getElements().iterator(); while (it.hasNext()) { Space elemcheck = (Space) it.next(); if (elemcheck.getName().equalsIgnoreCase("Void") && first) { if (classification.getClassification().equalsIgnoreCase("Terrandæk")) { loss = 0.15 * current.getArea(); return loss; } if (classification.getClassification().equalsIgnoreCase("Tagkonstruktion")) { loss = 0.15 * current.getArea(); return loss; } if (classification.getClassification().equalsIgnoreCase("Loft")) { loss = 0.15 * current.getArea(); return loss; } if (classification.getClassification().equalsIgnoreCase("Ydervæg")) { loss = 0.25 * current.getArea(); return loss; } if (classification.getClassification().equalsIgnoreCase("Ældre termovindue")) { loss = 2.5 * current.getArea(); return loss; } if (classification.getClassification().equalsIgnoreCase("2-lags lavenergivindue")) { loss = 1.5 * current.getArea(); return loss; } if (classification.getClassification().equalsIgnoreCase("3-lags lavenergivindue")) { loss = 0.8 * current.getArea(); return loss; } if (classification.getClassification().equalsIgnoreCase("Dør")) { loss = 1.5 * current.getArea(); return loss; } System.out.println("void - no more element spaces"); } if (!elemcheck.getName().equalsIgnoreCase("Void")) { System.out.println(elemcheck.getName()); } first = false; } } return loss; } /** * Test if the surface is relevant for thermiccalculation * @param classification The classifaction of the surface * @param current The current Surface * @return true if the surface is relevant */ private static boolean isrelevant(Space classification, Surface current) { boolean relevant = false; Vertex normal = current.normal(); if (current.getBackDomain().isConstructionSpace()) { normal.scale(-1); } Vertex origin = current.center(); double distance = 0; Surface closest = null; Space spa = null; Iterator it = Project.getInstance().getSurfaces().iterator(); while (it.hasNext()) { Surface sur = (Surface) it.next(); Vertex interpoint = sur.plane().intersection(origin, normal, true); if (interpoint != null) { if (sur.surrounds(interpoint)) { if (sur.getFrontDomain().isFunctionalSpace() || sur.getBackDomain().isFunctionalSpace()) { if (origin.distance(interpoint) != 0 && (distance == 0 || distance > origin.distance(interpoint))) { distance = origin.distance(interpoint); closest = sur; } } } } } if (closest != null && closest.getFrontDomain().isFunctionalSpace()) { spa = closest.getFrontDomain(); } if (closest != null && closest.getBackDomain().isFunctionalSpace()) { spa = closest.getBackDomain(); } if (spa != null && (spa.getClassification().equalsIgnoreCase("Stue") || spa.getClassification().equalsIgnoreCase("Badeværelse") || spa.getClassification().equalsIgnoreCase("Opvarmet rum"))) { relevant = true; } return relevant; } /** * heatedArea calculates the total area that is heated in the building * @return the total heated area */ public static double heatedArea() { double tha = 0; Iterator it = Project.getInstance().getSurfaces().iterator(); while (it.hasNext()) { Surface current = (Surface) it.next(); Space spa = null; if (current.normal().getZ() >= 0.99) { spa = current.getFrontDomain(); if (spa.getClassification() != null && (spa.getClassification().equalsIgnoreCase("Stue") || spa.getClassification().equalsIgnoreCase("Badeværelse") || spa.getClassification().equalsIgnoreCase("Opvarmet rum"))) { tha = tha + current.getArea(); } } if (current.normal().getZ() <= -0.99) { spa = current.getBackDomain(); if (spa.getClassification() != null && (spa.getClassification().equalsIgnoreCase("Stue") || spa.getClassification().equalsIgnoreCase("Badeværelse") || spa.getClassification().equalsIgnoreCase("Opvarmet rum"))) { tha = tha + current.getArea(); } } } return tha; } } |
From: Nikolaj B. <nbr...@us...> - 2006-09-11 09:22:56
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv10172/src/net/sourceforge/bprocessor/model Modified Files: Project.java Log Message: Project is now parametric and has a name and gives info about energy etc Index: Project.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Project.java,v retrieving revision 1.70 retrieving revision 1.71 diff -C2 -d -r1.70 -r1.71 *** Project.java 23 Aug 2006 13:43:19 -0000 1.70 --- Project.java 11 Sep 2006 09:22:46 -0000 1.71 *************** *** 9,12 **** --- 9,13 ---- import java.io.File; + import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; *************** *** 30,34 **** * */ ! public class Project { /** The logger */ private static Logger log = Logger.getLogger(Project.class); --- 31,35 ---- * */ ! public class Project implements Parametric { /** The logger */ private static Logger log = Logger.getLogger(Project.class); *************** *** 85,88 **** --- 86,92 ---- private CoordinateSystem activeCoordinateSystem; + /** The name of the project */ + private String name; + /** * Get the instance *************** *** 101,104 **** --- 105,109 ---- public Project() { super(); + name = "new project"; undoStack = new Stack(); redoStack = new Stack(); *************** *** 901,903 **** --- 906,963 ---- return res; } + + /** + * Set the attributes of the object to the values in the list + * @param attributes The attributes to set + */ + public void setAttributes(List attributes) { + Iterator iter = attributes.iterator(); + while (iter.hasNext()) { + Attribute a = (Attribute)iter.next(); + if (a.getName().equals("Name")) { + setName((String)a.getValue()); + } + } + } + + /** + * Return a list of the attributes in the object + * @return the list of attributes for the object + */ + public List getAttributes() { + ArrayList res = new ArrayList(); + res.add(new Attribute("Name", getName())); + res.add(new Attribute("Energyloss", new Double(EnergyCalc.energyLoss()), false)); + res.add(new Attribute("Heated area", new Double(EnergyCalc.heatedArea()), false)); + if (EnergyCalc.heatedArea() != 0) { + res.add(new Attribute("loss per m2", + new Double(EnergyCalc.energyLoss() / EnergyCalc.heatedArea()), false)); + } + return res; + } + + + /** + * @see net.sourceforge.bprocessor.model.Parametric#getGeneralName() + */ + public String getGeneralName() { + return "Project"; + } + + /** + * Get the name + * @return The name + * @hibernate.property + */ + public String getName() { + return name; + } + + /** + * Set the name + * @param name The name + */ + public void setName(String name) { + this.name = name; + } } |
From: Nikolaj B. <nbr...@us...> - 2006-09-11 09:22:16
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv10007/src/net/sourceforge/bprocessor/model Modified Files: Persistence.java Log Message: Added classifications to the xml format so they now also get saved and loaded. Index: Persistence.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Persistence.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Persistence.java 18 Aug 2006 07:01:24 -0000 1.6 --- Persistence.java 11 Sep 2006 09:22:07 -0000 1.7 *************** *** 134,137 **** --- 134,138 ---- space.setId(new Long(xml.getProgid())); space.setDescription(xml.getDescription()); + space.setClassification(xml.getClassification()); mapper.put(new Long(xml.getId()), space); xmls.add(xml); *************** *** 537,540 **** --- 538,542 ---- xml.setType(space.getType()); xml.setDescription(space.getDescription().toString()); + xml.setClassification(space.getClassification().toString()); map.put(space, xml); |
From: Nikolaj B. <nbr...@us...> - 2006-09-11 09:22:02
|
Update of /cvsroot/bprocessor/model/src/etc In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv9725/src/etc Modified Files: bprocessor.xsd Log Message: Added classifications to the xml format so they now also get saved and loaded. Index: bprocessor.xsd =================================================================== RCS file: /cvsroot/bprocessor/model/src/etc/bprocessor.xsd,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** bprocessor.xsd 18 Aug 2006 07:01:25 -0000 1.14 --- bprocessor.xsd 11 Sep 2006 09:21:52 -0000 1.15 *************** *** 34,37 **** --- 34,38 ---- <xsd:element name="type" type="xsd:int" maxOccurs="1" minOccurs="0"/> <xsd:element name="description" type="xsd:string" maxOccurs="1" minOccurs="0"/> + <xsd:element name="Classification" type="xsd:string" maxOccurs="1" minOccurs="0"/> <xsd:element name="boundary" type="xsd:long" maxOccurs="unbounded" minOccurs="0"/> <xsd:element name="voidref" type="xsd:long" maxOccurs="1" minOccurs="0"/> |
From: Nikolaj B. <nbr...@us...> - 2006-09-11 09:21:13
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv8848/src/net/sourceforge/bprocessor/gui/treeview Modified Files: GenericTreeView.java SpaceTreeView.java Log Message: Made some adjustments to the tree view, where there is now a root node called project. Project contains the spaces, and also its parametric so selecting the node gives various info. Index: GenericTreeView.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview/GenericTreeView.java,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** GenericTreeView.java 31 Aug 2006 13:01:49 -0000 1.39 --- GenericTreeView.java 11 Sep 2006 09:21:03 -0000 1.40 *************** *** 698,716 **** /** ! * SpaceContainer */ ! public class SpaceContainer extends ContainerNode { /** * */ private static final long serialVersionUID = 1L; ! /** ! * Constructor for SpaceContainer * @param name Display name ! * @param spaces The spaces */ ! public SpaceContainer(String name, Collection spaces) { ! super(name); final Comparator alpha = new Comparator() { --- 698,721 ---- /** ! * ProjectContainer */ ! public class ProjectContainer extends ContainerNode { /** * */ private static final long serialVersionUID = 1L; ! ! /** name */ ! private String name; ! /** ! * Constructor for ProjectContainer * @param name Display name ! * @param object The project */ ! public ProjectContainer(String name, Project object) { ! super(object); ! Collection spaces = object.getSpaces(); ! this.name = name; final Comparator alpha = new Comparator() { *************** *** 739,742 **** --- 744,755 ---- /** + * Name + * @return String + */ + public String toString() { + return name; + } + + /** * Return icon * @return Icon Index: SpaceTreeView.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview/SpaceTreeView.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** SpaceTreeView.java 21 Jul 2006 14:58:58 -0000 1.12 --- SpaceTreeView.java 11 Sep 2006 09:21:03 -0000 1.13 *************** *** 40,45 **** Object[] paths = findPaths(e); root.removeAllChildren(); ! root.add(new SpaceContainer("Construction", Project.getInstance().getConstructionSpaces())); ! root.add(new SpaceContainer("Functional", Project.getInstance().getFunctionalSpaces())); root.add(new ConstraintContainer("Constraints", Project.getInstance().getConstraints())); root.add(new ParameterBlockNode("Globals", Project.getInstance().getGlobals())); --- 40,44 ---- Object[] paths = findPaths(e); root.removeAllChildren(); ! root.add(new ProjectContainer("Project", Project.getInstance())); root.add(new ConstraintContainer("Constraints", Project.getInstance().getConstraints())); root.add(new ParameterBlockNode("Globals", Project.getInstance().getGlobals())); |
From: Nikolaj B. <nbr...@us...> - 2006-09-11 09:20:39
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv7586/src/net/sourceforge/bprocessor/gui/actions Modified Files: ToolsEnergyActionListener.java Log Message: moved the energycalculations to the model Index: ToolsEnergyActionListener.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions/ToolsEnergyActionListener.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ToolsEnergyActionListener.java 5 Sep 2006 07:28:39 -0000 1.5 --- ToolsEnergyActionListener.java 11 Sep 2006 09:19:54 -0000 1.6 *************** *** 7,18 **** package net.sourceforge.bprocessor.gui.actions; ! import net.sourceforge.bprocessor.model.Project; ! import net.sourceforge.bprocessor.model.Space; ! import net.sourceforge.bprocessor.model.Surface; ! import net.sourceforge.bprocessor.model.Vertex; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; ! import java.util.Iterator; import javax.swing.JOptionPane; --- 7,15 ---- package net.sourceforge.bprocessor.gui.actions; ! import net.sourceforge.bprocessor.model.EnergyCalc; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; ! import javax.swing.JOptionPane; *************** *** 39,180 **** public void actionPerformed(ActionEvent e) { ! Iterator it = Project.getInstance().getSurfaces().iterator(); ! double totalloss = 0; ! ! while (it.hasNext()) { ! Surface current = (Surface) it.next(); ! if (current.getFrontDomain().getClassification().equalsIgnoreCase("Exteriør")) { ! totalloss = totalloss + calcloss(current.getBackDomain(), current); ! } ! if (current.getFrontDomain().getClassification().equalsIgnoreCase("Uopvarmet rum")) { ! totalloss = totalloss + calcloss(current.getBackDomain(), current); ! } ! if (current.getBackDomain().getClassification().equalsIgnoreCase("Exteriør")) { ! totalloss = totalloss + calcloss(current.getFrontDomain(), current); ! } ! if (current.getBackDomain().getClassification().equalsIgnoreCase("Uopvarmet rum")) { ! totalloss = totalloss + calcloss(current.getFrontDomain(), current); ! } ! } ! ! JOptionPane.showMessageDialog(null, "The total energytransmission loss is: " + totalloss); ! ! ! } ! ! /** ! * Calculates energyloss of a surface ! * @param classification The classifaction of the surface ! * @param current The current Surface ! * @return the loss ! */ ! private double calcloss(Space classification, Surface current) { ! double loss = 0; ! boolean first = true; ! if (isrelevant(classification, current)) { ! Iterator it = classification.getElements().iterator(); ! ! ! while (it.hasNext()) { ! Space elemcheck = (Space) it.next(); ! if (elemcheck.getName().equalsIgnoreCase("Void") && first) { ! ! if (classification.getClassification().equalsIgnoreCase("Terrandæk")) { ! loss = 0.15 * current.getArea(); ! return loss; ! } ! if (classification.getClassification().equalsIgnoreCase("Tagkonstruktion")) { ! loss = 0.15 * current.getArea(); ! return loss; ! } ! if (classification.getClassification().equalsIgnoreCase("Loft")) { ! loss = 0.15 * current.getArea(); ! return loss; ! } ! if (classification.getClassification().equalsIgnoreCase("Ydervæg")) { ! loss = 0.25 * current.getArea(); ! return loss; ! } ! if (classification.getClassification().equalsIgnoreCase("Ældre termovindue")) { ! loss = 2.5 * current.getArea(); ! return loss; ! } ! if (classification.getClassification().equalsIgnoreCase("2-lags lavenergivindue")) { ! loss = 1.5 * current.getArea(); ! return loss; ! } ! ! if (classification.getClassification().equalsIgnoreCase("3-lags lavenergivindue")) { ! loss = 0.8 * current.getArea(); ! return loss; ! } ! ! if (classification.getClassification().equalsIgnoreCase("Dør")) { ! loss = 1.5 * current.getArea(); ! return loss; ! } ! System.out.println("void - no more element spaces"); ! } ! if (!elemcheck.getName().equalsIgnoreCase("Void")) { ! System.out.println(elemcheck.getName()); ! } ! first = false; ! } ! ! } ! return loss; ! } ! ! /** ! * Test if the surface is relevant for thermiccalculation ! * @param classification The classifaction of the surface ! * @param current The current Surface ! * @return true if the surface is relevant ! */ ! private boolean isrelevant(Space classification, Surface current) { ! boolean relevant = false; ! Vertex normal = current.normal(); ! if (current.getBackDomain().isConstructionSpace()) { ! normal.scale(-1); ! } ! Vertex origin = current.center(); ! double distance = 0; ! Surface closest = null; ! Space spa = null; ! ! Iterator it = Project.getInstance().getSurfaces().iterator(); ! ! while (it.hasNext()) { ! Surface sur = (Surface) it.next(); ! Vertex interpoint = sur.plane().intersection(origin, normal, true); ! if (interpoint != null) { ! if (sur.surrounds(interpoint)) { ! if (sur.getFrontDomain().isFunctionalSpace() || sur.getBackDomain().isFunctionalSpace()) { ! if (origin.distance(interpoint) != 0 && ! (distance == 0 || distance > origin.distance(interpoint))) { ! distance = origin.distance(interpoint); ! closest = sur; ! } ! } ! } ! } ! } ! if (closest != null && closest.getFrontDomain().isFunctionalSpace()) { ! spa = closest.getFrontDomain(); ! } ! if (closest != null && closest.getBackDomain().isFunctionalSpace()) { ! spa = closest.getBackDomain(); ! } ! ! if (spa != null && ! (spa.getClassification().equalsIgnoreCase("Stue") || ! spa.getClassification().equalsIgnoreCase("Badeværelse") || ! spa.getClassification().equalsIgnoreCase("Opvarmet rum"))) { ! relevant = true; - } - - - return relevant; } } --- 36,42 ---- public void actionPerformed(ActionEvent e) { ! JOptionPane.showMessageDialog(null, ! "The total energytransmission loss is: " + EnergyCalc.energyLoss()); } } |
From: Michael L. <he...@us...> - 2006-09-11 06:33:12
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv19366/src/net/sourceforge/bprocessor/gl Modified Files: GLView.java Log Message: LengthField Index: GLView.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/GLView.java,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** GLView.java 8 Sep 2006 13:08:20 -0000 1.39 --- GLView.java 11 Sep 2006 06:33:01 -0000 1.40 *************** *** 10,14 **** import net.sourceforge.bprocessor.gl.tool.ToolFactory; import net.sourceforge.bprocessor.gl.view.View; - import net.sourceforge.bprocessor.model.Edge; import net.sourceforge.bprocessor.model.Observer; import net.sourceforge.bprocessor.model.Project; --- 10,13 ---- *************** *** 29,33 **** import java.awt.event.MouseListener; import java.awt.event.ActionListener; - import java.util.Collection; import javax.swing.JTextField; --- 28,31 ---- *************** *** 263,267 **** * The length field class */ ! class LengthField extends JTextField implements Observer { /** The logger */ private Logger log = Logger.getLogger(LengthField.class); --- 261,265 ---- * The length field class */ ! class LengthField extends JTextField { /** The logger */ private Logger log = Logger.getLogger(LengthField.class); *************** *** 272,276 **** public LengthField() { super(15); - Selection.primary().addObserver(this); } --- 270,273 ---- *************** *** 309,332 **** return 0; } - - /** - * @param object The changed object (Selection) - */ - public void update(Object object) { - Collection selection = Selection.primary(); - if (selection == object) { - if (selection.size() == 1) { - Object entity = selection.iterator().next(); - if (entity instanceof Edge) { - Edge edge = (Edge) entity; - setText(edge.getLength()); - } else { - setText(0); - } - } else { - setText(0); - } - } - } } --- 306,309 ---- |
From: Michael L. <he...@us...> - 2006-09-11 06:33:12
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv19366/src/net/sourceforge/bprocessor/gl/tool Modified Files: AbstractTool.java AbstractPencil.java Log Message: LengthField Index: AbstractPencil.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/AbstractPencil.java,v retrieving revision 1.62 retrieving revision 1.63 diff -C2 -d -r1.62 -r1.63 *** AbstractPencil.java 7 Sep 2006 15:54:47 -0000 1.62 --- AbstractPencil.java 11 Sep 2006 06:33:01 -0000 1.63 *************** *** 774,777 **** --- 774,778 ---- glv.repaint(); timer.stop(); + super.cleanUp(); } Index: AbstractTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/AbstractTool.java,v retrieving revision 1.97 retrieving revision 1.98 diff -C2 -d -r1.97 -r1.98 *** AbstractTool.java 8 Sep 2006 13:08:20 -0000 1.97 --- AbstractTool.java 11 Sep 2006 06:33:01 -0000 1.98 *************** *** 507,511 **** */ public void cleanUp() { ! return; } } --- 507,511 ---- */ public void cleanUp() { ! Project.info("cleanup " + this.getClass().getName()); } } |
From: Nordholt <nor...@us...> - 2006-09-08 14:10:35
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv11176/src/net/sourceforge/bprocessor/model Modified Files: Constructor.java Log Message: removed log writeout Index: Constructor.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Constructor.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Constructor.java 8 Sep 2006 13:25:59 -0000 1.11 --- Constructor.java 8 Sep 2006 14:10:32 -0000 1.12 *************** *** 161,165 **** */ public void connect(Geometric g) { - log.info("connected: " + g + " to: " + this); connectedGeometry.add(g); } --- 161,164 ---- |
From: Nordholt <nor...@us...> - 2006-09-08 14:08:42
|
Update of /cvsroot/bprocessor/facade/src/net/sourceforge/bprocessor/facade/modellor In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv10309/src/net/sourceforge/bprocessor/facade/modellor Modified Files: FacadeModellor.java Log Message: added getter and setter methods for postwidths. Posts now maintain their position when widths are changed. Index: FacadeModellor.java =================================================================== RCS file: /cvsroot/bprocessor/facade/src/net/sourceforge/bprocessor/facade/modellor/FacadeModellor.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** FacadeModellor.java 8 Sep 2006 13:32:57 -0000 1.12 --- FacadeModellor.java 8 Sep 2006 14:08:40 -0000 1.13 *************** *** 199,206 **** Surface s = (Surface)sit.next(); if (s.getName().equals(a.getValue())) { ! front = s; } ! } ! createFacade(); } else if (a.getName().equals("V-posts")) { int n = ((Double)a.getValue()).intValue(); --- 199,208 ---- Surface s = (Surface)sit.next(); if (s.getName().equals(a.getValue())) { ! if (front != s) { ! front = s; ! createFacade(); ! } } ! } } else if (a.getName().equals("V-posts")) { int n = ((Double)a.getValue()).intValue(); *************** *** 219,234 **** } else if (a.getName().equals("V-postwidth")) { double d = ((Double)a.getValue()).doubleValue(); ! if (d != vertPostWidth) { ! Project.getInstance().checkpoint(); ! vertPostWidth = d; ! createFacade(); ! } } else if (a.getName().equals("H-postwidth")) { double d = ((Double)a.getValue()).doubleValue(); ! if (d != horPostWidth) { ! Project.getInstance().checkpoint(); ! horPostWidth = d; ! createFacade(); ! } } else if (a.getName().equals("Frame thickness")) { double n = ((Double)a.getValue()).doubleValue(); --- 221,230 ---- } else if (a.getName().equals("V-postwidth")) { double d = ((Double)a.getValue()).doubleValue(); ! Project.getInstance().checkpoint(); ! setVertPostWidth(d); } else if (a.getName().equals("H-postwidth")) { double d = ((Double)a.getValue()).doubleValue(); ! Project.getInstance().checkpoint(); ! setHorPostWidth(d); } else if (a.getName().equals("Frame thickness")) { double n = ((Double)a.getValue()).doubleValue(); *************** *** 358,361 **** --- 354,358 ---- */ private void createPostConstructors() { + log.info("created new posts"); if (front != null && depth > 0) { List edges = front.getEdges(); *************** *** 598,600 **** --- 595,633 ---- return s.extrude(delta * deltaCorrection, sides); } + /** + * Get the vertical postwidth + * @return vertical postwidth + */ + public double getVertPostWidth() { + return vertPostWidth; + } + /** + * Set the postwidth + * @param vertPostWidth new vertical postwidth + */ + public void setVertPostWidth(double vertPostWidth) { + if (this.vertPostWidth != vertPostWidth) { + this.vertPostWidth = vertPostWidth; + removeWindows(); + createWindows(); + } + } + /** + * Get the horizontal postwidth + * @return the horizontal postwidth + */ + public double getHorPostWidth() { + return horPostWidth; + } + /** + * Set the horizontal postwidth + * @param horPostWidth the new horizontal postwidth + */ + public void setHorPostWidth(double horPostWidth) { + if (this.horPostWidth != horPostWidth) { + this.horPostWidth = horPostWidth; + removeWindows(); + createWindows(); + } + } } |
From: Nordholt <nor...@us...> - 2006-09-08 13:32:59
|
Update of /cvsroot/bprocessor/facade/src/net/sourceforge/bprocessor/facade/modellor In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv28147/src/net/sourceforge/bprocessor/facade/modellor Modified Files: FacadeModellor.java Log Message: connects surfaces to constructors. This means the posts will be moved when the constructors are moved. Index: FacadeModellor.java =================================================================== RCS file: /cvsroot/bprocessor/facade/src/net/sourceforge/bprocessor/facade/modellor/FacadeModellor.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** FacadeModellor.java 8 Sep 2006 06:42:32 -0000 1.11 --- FacadeModellor.java 8 Sep 2006 13:32:57 -0000 1.12 *************** *** 394,398 **** lengthV += (vertPostWidth / 2); offset.scale(lengthV / offset.length()); ! Line l = new Line(cross.add(offset), vertDir.copy(), horEdge, true, true); lengthV += (intervalV + (vertPostWidth / 2)); vertCons.add(l); --- 394,398 ---- lengthV += (vertPostWidth / 2); offset.scale(lengthV / offset.length()); ! Constructor l = new Line(cross.add(offset), vertDir.copy(), horEdge, true, true); lengthV += (intervalV + (vertPostWidth / 2)); vertCons.add(l); *************** *** 406,410 **** lengthH += (horPostWidth / 2); offset.scale(lengthH / offset.length()); ! Line l = new Line(cross.add(offset), horDir.copy(), vertEdge, true, true); lengthH += (intervalH + (horPostWidth / 2)); horCons.add(l); --- 406,410 ---- lengthH += (horPostWidth / 2); offset.scale(lengthH / offset.length()); ! Constructor l = new Line(cross.add(offset), horDir.copy(), vertEdge, true, true); lengthH += (intervalH + (horPostWidth / 2)); horCons.add(l); *************** *** 447,450 **** --- 447,452 ---- horizontalRun(oldV, currentV); oldV = new Line(vL.getOrigin().add(horDir), vL.getDirection()); + vL.connect(currentV); + vL.connect(oldV); } horizontalRun(oldV, rightBound); *************** *** 468,471 **** --- 470,475 ---- createHole(oldV, currentV, oldH, currentH); oldH = new Line(hL.getOrigin().add(vertDir), hL.getDirection()); + hL.connect(currentH); + hL.connect(oldH); } createHole(oldV, currentV, oldH, bottomBound); *************** *** 531,578 **** wf.setModellor(wm); windowModellors.add(wm); - /* - Vertex sn = s.normal(); - Vertex fn = front.normal(); - Space wf = new Space("Windowframe", Space.CONSTRUCTION, true); - space.add(wf); - windowElements.add(wf); - if (sn.dot(fn) > 0) { - if (front.getFrontDomain() == space) { - s.setFrontDomain(wf); - } else { - s.setBackDomain(wf); - } - } else { - if (front.getBackDomain() == space) { - s.setFrontDomain(wf); - } else { - s.setBackDomain(wf); - } - } - //TODO Change magic number -0.1 - List l = e1.offset(edges, s, -0.1); - Iterator it = l.iterator(); - while (it.hasNext()) { - Edge e = (Edge)it.next(); - space.add(e); - } - Surface offset = new Surface(l); - space.add(offset); - windows.add(offset); - Geometry.holeAnalysis(offset); - Set sidesOff = new HashSet(); - Surface exOff = extrudeIntoSpace(offset, depth, sidesOff); - - windows.add(exOff); - space.add(exOff); - Iterator sidesIt = sidesOff.iterator(); - while (sidesIt.hasNext()) { - Surface surf = (Surface)sidesIt.next(); - windows.add(surf); - space.add(surf); - } - - Geometry.holeAnalysis(exOff); - */ } Set sides = new HashSet(); --- 535,538 ---- *************** *** 582,590 **** Iterator it = sides.iterator(); while (it.hasNext()) { ! space.add((Surface)it.next()); } Geometry.holeAnalysis(t); } /** * Removes the windows of the facade. --- 542,562 ---- Iterator it = sides.iterator(); while (it.hasNext()) { ! Surface side = (Surface)it.next(); ! if (side.contains(e1)) { ! top.connect(side); ! } else if (side.contains(e2)) { ! right.connect(side); ! } else if (side.contains(e3)) { ! bottom.connect(side); ! } else if (side.contains(e4)) { ! left.connect(side); ! } ! space.add(side); } Geometry.holeAnalysis(t); } + + /** * Removes the windows of the facade. |
From: Nordholt <nor...@us...> - 2006-09-08 13:26:12
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv25311/src/net/sourceforge/bprocessor/model Modified Files: Line.java Point.java CoordinateSystem.java Constructor.java Log Message: Added the ability to connect geometric objects to a constructor and thus making them move with the constructor. Index: Point.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Point.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Point.java 5 Sep 2006 11:01:37 -0000 1.8 --- Point.java 8 Sep 2006 13:25:59 -0000 1.9 *************** *** 9,15 **** import java.util.ArrayList; import java.util.Collection; - import java.util.HashSet; import java.util.List; - import java.util.Set; /** --- 9,13 ---- *************** *** 33,43 **** } - /** - * @see net.sourceforge.bprocessor.model.Constructor#move(double, double, double) - */ - public void move(double x, double y, double z) { - getOrigin().move(x, y, z); - } - /** @see net.sourceforge.bprocessor.model.Geometric#move(double, double, double) */ public Vertex canMove(double x, double y, double z, Collection entities) { --- 31,34 ---- *************** *** 47,60 **** /** - * Collects the set of vertices in this geometric - * @return the set of vertices - */ - public Set collect() { - Set res = new HashSet(); - res.add(getOrigin()); - return res; - } - - /** * Return the center for the entity * @return The center as a vertex --- 38,41 ---- Index: Constructor.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Constructor.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Constructor.java 5 Sep 2006 11:01:37 -0000 1.10 --- Constructor.java 8 Sep 2006 13:25:59 -0000 1.11 *************** *** 8,15 **** --- 8,19 ---- import java.util.Collection; + import java.util.HashSet; + import java.util.Iterator; import java.util.LinkedList; import java.util.List; import java.util.Set; + import org.apache.log4j.Logger; + /** * The superclass for constructors *************** *** 17,20 **** --- 21,28 ---- */ public abstract class Constructor extends Geometric implements Parametric { + + /** The logger */ + private static Logger log = Logger.getLogger(Constructor.class); + /** The origin of the constructor */ private Vertex origin; *************** *** 25,29 **** /** Specify wether the constructor is changable */ private boolean editable; ! /** * Do not use, for persistence use only --- 33,39 ---- /** Specify wether the constructor is changable */ private boolean editable; ! ! /** Set of geometrics connected to this constructor */ ! private Set connectedGeometry = new HashSet(); /** * Do not use, for persistence use only *************** *** 96,100 **** * @see net.sourceforge.bprocessor.model.Geometric#collect() */ ! public abstract Set collect(); /** --- 106,118 ---- * @see net.sourceforge.bprocessor.model.Geometric#collect() */ ! public Set collect() { ! Set res = new HashSet(); ! res.add(getOrigin()); ! Iterator it = connectedGeometry.iterator(); ! while (it.hasNext()) { ! res.addAll(((Geometric)it.next()).collect()); ! } ! return res; ! } /** *************** *** 123,134 **** /** - * Move the constructor - * @param x the movement in x - * @param y the movement in y - * @param z the movement in z - */ - public abstract void move(double x, double y, double z); - - /** * @param dist dist * @return list of handles --- 141,144 ---- *************** *** 139,142 **** --- 149,195 ---- /** + * Connects pieces of geometry to this constructor + * @param s a set of geometrics + */ + public void connect(Set s) { + connectedGeometry.addAll(s); + } + + /** + * Connects a piece of geometry to this constructor + * @param g a geometric + */ + public void connect(Geometric g) { + log.info("connected: " + g + " to: " + this); + connectedGeometry.add(g); + } + + + + /** + * disconnects a pieces of geometry to this constructor + * @param s a set of geometrics + */ + public void disconnect(Set s) { + connectedGeometry.removeAll(s); + } + + /** + * Gets the connected geometry + * @return all connected geometry + */ + public Set getConnectedGeometry() { + return connectedGeometry; + } + + /** @see net.sourceforge.bprocessor.model.Geometric#move(double, double, double) */ + public void move(double x, double y, double z) { + Iterator it = collect().iterator(); + while (it.hasNext()) { + ((Geometric)it.next()).move(x, y, z); + } + } + + /** * Handle */ Index: CoordinateSystem.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/CoordinateSystem.java,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** CoordinateSystem.java 5 Sep 2006 11:01:37 -0000 1.26 --- CoordinateSystem.java 8 Sep 2006 13:25:59 -0000 1.27 *************** *** 10,18 **** import java.util.ArrayList; import java.util.Collection; - import java.util.HashSet; import java.util.Iterator; import java.util.LinkedList; import java.util.List; - import java.util.Set; /** --- 10,16 ---- *************** *** 27,30 **** --- 25,33 ---- public class CoordinateSystem extends Constructor { + /** + * + */ + private static final long serialVersionUID = 1L; + /** The i unit vector (x-direction) */ protected Vertex i; *************** *** 77,87 **** } - /** - * @see net.sourceforge.bprocessor.model.Constructor#move(double, double, double) - */ - public void move(double x, double y, double z) { - getOrigin().move(x, y, z); - } - /** @see net.sourceforge.bprocessor.model.Geometric#move(double, double, double) */ public Vertex canMove(double x, double y, double z, Collection entities) { --- 80,83 ---- *************** *** 303,316 **** } ! /** ! * @see net.sourceforge.bprocessor.model.Geometric#collect() ! */ ! public Set collect() { ! HashSet res = new HashSet(); ! res.add(getOrigin()); ! return res; ! } ! ! /** * @see net.sourceforge.bprocessor.model.Entity#center() */ --- 299,303 ---- } ! /** * @see net.sourceforge.bprocessor.model.Entity#center() */ Index: Line.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Line.java,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** Line.java 5 Sep 2006 13:52:46 -0000 1.23 --- Line.java 8 Sep 2006 13:25:59 -0000 1.24 *************** *** 9,16 **** import java.util.ArrayList; import java.util.Collection; - import java.util.HashSet; import java.util.LinkedList; import java.util.List; - import java.util.Set; import org.apache.log4j.Logger; --- 9,14 ---- *************** *** 106,119 **** /** - * Collects the set of vertices in this geometric - * @return the set of vertices - */ - public Set collect() { - HashSet res = new HashSet(); - res.add(getOrigin()); - return res; - } - - /** * Return the center for the entity * @return The center as a vertex --- 104,107 ---- *************** *** 401,409 **** /** @see net.sourceforge.bprocessor.model.Geometric#move(double, double, double) */ - public void move(double x, double y, double z) { - getOrigin().move(x, y, z); - } - - /** @see net.sourceforge.bprocessor.model.Geometric#move(double, double, double) */ public Vertex canMove(double x, double y, double z, Collection entities) { // TODO Think it through --- 389,392 ---- |
From: Nordholt <nor...@us...> - 2006-09-08 13:22:40
|
Update of /cvsroot/bprocessor/bprocessor/src/net/sourceforge/bprocessor In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv24090/src/net/sourceforge/bprocessor Modified Files: Application.java Log Message: added starting up the facade module to the application Index: Application.java =================================================================== RCS file: /cvsroot/bprocessor/bprocessor/src/net/sourceforge/bprocessor/Application.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Application.java 5 Sep 2006 09:52:08 -0000 1.2 --- Application.java 8 Sep 2006 13:22:38 -0000 1.3 *************** *** 1,4 **** --- 1,5 ---- package net.sourceforge.bprocessor; + import net.sourceforge.bprocessor.facade.FacadeMain; import net.sourceforge.bprocessor.gl.GLView; import net.sourceforge.bprocessor.gui.GUI; *************** *** 24,28 **** gui.start(); GLView gl = new GLView(); ! } } --- 25,29 ---- gui.start(); GLView gl = new GLView(); ! FacadeMain fm = new FacadeMain(); } } |
From: Michael L. <he...@us...> - 2006-09-08 13:08:22
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv18370/src/net/sourceforge/bprocessor/gl Modified Files: GLView.java Log Message: minor changes to tools Index: GLView.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/GLView.java,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** GLView.java 13 Jun 2006 09:42:40 -0000 1.38 --- GLView.java 8 Sep 2006 13:08:20 -0000 1.39 *************** *** 194,197 **** --- 194,205 ---- /** + * Set the value of the length-field + * @param value String + */ + public void setLengthValue(String value) { + lengthField.setText(value); + } + + /** * Set the lengthField display to two parameters * @param x The first parameter *************** *** 209,212 **** --- 217,228 ---- return lengthField.getDouble(); } + + /** + * + * @return String + */ + public String getLengthValue() { + return lengthField.getText(); + } /** |
From: Michael L. <he...@us...> - 2006-09-08 13:08:22
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv18370/src/net/sourceforge/bprocessor/gl/tool Modified Files: AbstractTool.java SpaceTool.java Log Message: minor changes to tools Index: SpaceTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/SpaceTool.java,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** SpaceTool.java 7 Sep 2006 11:38:41 -0000 1.28 --- SpaceTool.java 8 Sep 2006 13:08:20 -0000 1.29 *************** *** 11,14 **** --- 11,15 ---- import java.awt.event.ActionEvent; import java.awt.event.ActionListener; + import java.awt.event.KeyEvent; import java.awt.event.MouseEvent; import java.util.ArrayList; *************** *** 533,536 **** --- 534,548 ---- /** + * @param event KeyEvent + */ + public void key(KeyEvent event) { + { + String value = glv.getLengthValue(); + value = value + event.getKeyChar(); + glv.setLengthValue(value); + } + } + + /** * Delete */ Index: AbstractTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/AbstractTool.java,v retrieving revision 1.96 retrieving revision 1.97 diff -C2 -d -r1.96 -r1.97 *** AbstractTool.java 7 Sep 2006 15:54:47 -0000 1.96 --- AbstractTool.java 8 Sep 2006 13:08:20 -0000 1.97 *************** *** 213,218 **** return; } - - if (e.getKeyCode() == KeyEvent.VK_BACK_SPACE || e.getKeyCode() == KeyEvent.VK_DELETE) { delete(); --- 213,216 ---- |
From: Michael L. <he...@us...> - 2006-09-08 06:42:37
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv25891/src/net/sourceforge/bprocessor/gl/tool Modified Files: RotationTool.java Log Message: Fixed som stylecheck errors Index: RotationTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/RotationTool.java,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** RotationTool.java 7 Sep 2006 15:55:56 -0000 1.19 --- RotationTool.java 8 Sep 2006 06:42:28 -0000 1.20 *************** *** 362,364 **** protected void moved(MouseEvent e) { } ! } \ No newline at end of file --- 362,364 ---- protected void moved(MouseEvent e) { } ! } |
From: Michael L. <he...@us...> - 2006-09-08 06:42:34
|
Update of /cvsroot/bprocessor/facade/src/net/sourceforge/bprocessor/facade/modellor In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv25903/src/net/sourceforge/bprocessor/facade/modellor Modified Files: FacadeModellor.java Log Message: Fixed som stylecheck errors Index: FacadeModellor.java =================================================================== RCS file: /cvsroot/bprocessor/facade/src/net/sourceforge/bprocessor/facade/modellor/FacadeModellor.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** FacadeModellor.java 7 Sep 2006 15:57:36 -0000 1.10 --- FacadeModellor.java 8 Sep 2006 06:42:32 -0000 1.11 *************** *** 345,349 **** } frameSurfaces = new HashSet(); ! if(frame != null) { frame.delete(); } --- 345,349 ---- } frameSurfaces = new HashSet(); ! if (frame != null) { frame.delete(); } *************** *** 550,554 **** } } ! //TODO: Change magic number -0.1 List l = e1.offset(edges, s, -0.1); Iterator it = l.iterator(); --- 550,554 ---- } } ! //TODO Change magic number -0.1 List l = e1.offset(edges, s, -0.1); Iterator it = l.iterator(); |
From: Nordholt <nor...@us...> - 2006-09-07 15:57:39
|
Update of /cvsroot/bprocessor/facade/src/net/sourceforge/bprocessor/facade/modellor In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv24908/src/net/sourceforge/bprocessor/facade/modellor Modified Files: FacadeModellor.java Log Message: Facade can now be a double-bar type facade using the windowmodellor Index: FacadeModellor.java =================================================================== RCS file: /cvsroot/bprocessor/facade/src/net/sourceforge/bprocessor/facade/modellor/FacadeModellor.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** FacadeModellor.java 7 Sep 2006 11:41:26 -0000 1.9 --- FacadeModellor.java 7 Sep 2006 15:57:36 -0000 1.10 *************** *** 98,101 **** --- 98,107 ---- private Line bottomBound; + /** Set of window elements */ + private Set windowElements = new HashSet(); + + /** Set of window modellors */ + private Set windowModellors = new HashSet(); + /** Type facade */ private int type; *************** *** 188,194 **** name = (String)a.getValue(); } else if (a.getName().equals("Front")) { ! Iterator sit = Project.getInstance().getSurfaces().iterator(); ! while (sit.hasNext()) { ! Project.getInstance().checkpoint(); Surface s = (Surface)sit.next(); if (s.getName().equals(a.getValue())) { --- 194,200 ---- name = (String)a.getValue(); } else if (a.getName().equals("Front")) { ! Project.getInstance().checkpoint(); ! Iterator sit = Project.getInstance().getSurfaces().iterator(); ! while (sit.hasNext()) { Surface s = (Surface)sit.next(); if (s.getName().equals(a.getValue())) { *************** *** 196,199 **** --- 202,206 ---- } } + createFacade(); } else if (a.getName().equals("V-posts")) { int n = ((Double)a.getValue()).intValue(); *************** *** 201,206 **** Project.getInstance().checkpoint(); vertPosts = n; ! createPostConstructors(); ! createWindows(); } } else if (a.getName().equals("H-posts")) { --- 208,212 ---- Project.getInstance().checkpoint(); vertPosts = n; ! createFacade(); } } else if (a.getName().equals("H-posts")) { *************** *** 209,214 **** Project.getInstance().checkpoint(); horPosts = n; ! createPostConstructors(); ! createWindows(); } } else if (a.getName().equals("V-postwidth")) { --- 215,219 ---- Project.getInstance().checkpoint(); horPosts = n; ! createFacade(); } } else if (a.getName().equals("V-postwidth")) { *************** *** 217,222 **** Project.getInstance().checkpoint(); vertPostWidth = d; ! createPostConstructors(); ! createWindows(); } } else if (a.getName().equals("H-postwidth")) { --- 222,226 ---- Project.getInstance().checkpoint(); vertPostWidth = d; ! createFacade(); } } else if (a.getName().equals("H-postwidth")) { *************** *** 225,230 **** Project.getInstance().checkpoint(); horPostWidth = d; ! createPostConstructors(); ! createWindows(); } } else if (a.getName().equals("Frame thickness")) { --- 229,233 ---- Project.getInstance().checkpoint(); horPostWidth = d; ! createFacade(); } } else if (a.getName().equals("Frame thickness")) { *************** *** 233,241 **** Project.getInstance().checkpoint(); frameThickness = n; ! if (type == SINGLE_BAR) { ! createFrame(); ! } ! createPostConstructors(); ! createWindows(); } } else if (a.getName().equals("Depth")) { --- 236,240 ---- Project.getInstance().checkpoint(); frameThickness = n; ! createFacade(); } } else if (a.getName().equals("Depth")) { *************** *** 244,252 **** Project.getInstance().checkpoint(); depth = n; ! if (type == SINGLE_BAR) { ! createFrame(); ! } ! createPostConstructors(); ! createWindows(); } } else if (a.getName().equals("Single bars")) { --- 243,247 ---- Project.getInstance().checkpoint(); depth = n; ! createFacade(); } } else if (a.getName().equals("Single bars")) { *************** *** 254,261 **** if (b && type != SINGLE_BAR) { type = SINGLE_BAR; ! removeFacade(); ! createFrame(); ! createPostConstructors(); ! createWindows(); Project.getInstance().changed(this); } --- 249,253 ---- if (b && type != SINGLE_BAR) { type = SINGLE_BAR; ! createFacade(); Project.getInstance().changed(this); } *************** *** 265,272 **** horPostWidth = 0; frameThickness = 0; ! removeFacade(); ! createFrame(); ! createPostConstructors(); ! createWindows(); Project.getInstance().changed(this); } --- 257,261 ---- horPostWidth = 0; frameThickness = 0; ! createFacade(); Project.getInstance().changed(this); } *************** *** 351,366 **** */ private void removeFacade() { ! if (frame != null) { ! Iterator it = frameSurfaces.iterator(); ! while (it.hasNext()) { ! ((Surface)it.next()).delete(); ! } ! frameSurfaces = new HashSet(); frame.delete(); - removeWindows(); - removeConstructors(); } } /** * Creates the post constructors for this facade based on the number of posts. --- 340,357 ---- */ private void removeFacade() { ! Iterator it = frameSurfaces.iterator(); ! while (it.hasNext()) { ! ((Surface)it.next()).delete(); ! } ! frameSurfaces = new HashSet(); ! if(frame != null) { frame.delete(); } + frame = null; + removeWindows(); + removeConstructors(); } + /** * Creates the post constructors for this facade based on the number of posts. *************** *** 493,497 **** Vertex c3 = bottom.intersection(right); Vertex c4 = bottom.intersection(left); ! //log.info("c1: " + c1); // log.info("c2: " + c2); // log.info("c3: " + c3); --- 484,488 ---- Vertex c3 = bottom.intersection(right); Vertex c4 = bottom.intersection(left); ! // log.info("c1: " + c1); // log.info("c2: " + c2); // log.info("c3: " + c3); *************** *** 513,521 **** windows.add(s); space.add(s); ! //log.info("left: " + left); ! //log.info("right: " + right); ! //log.info("top: " + top); ! //log.info("bottom: " + bottom); Geometry.holeAnalysis(s); Set sides = new HashSet(); Surface t = extrudeIntoSpace(s, depth, sides); --- 504,579 ---- windows.add(s); space.add(s); ! // log.info("left: " + left); ! // log.info("right: " + right); ! // log.info("top: " + top); ! // log.info("bottom: " + bottom); Geometry.holeAnalysis(s); + if (type == DOUBLE_BAR) { + Vertex sn = s.normal(); + Vertex fn = front.normal(); + Space wf = new Space("Window", Space.CONSTRUCTION, true); + space.add(wf); + windowElements.add(wf); + if (sn.dot(fn) > 0) { + if (front.getFrontDomain() == space) { + s.setFrontDomain(wf); + } else { + s.setBackDomain(wf); + } + } else { + if (front.getBackDomain() == space) { + s.setFrontDomain(wf); + } else { + s.setBackDomain(wf); + } + } + Modellor wm = new WindowModellor(wf, s); + wf.setModellor(wm); + windowModellors.add(wm); + /* + Vertex sn = s.normal(); + Vertex fn = front.normal(); + Space wf = new Space("Windowframe", Space.CONSTRUCTION, true); + space.add(wf); + windowElements.add(wf); + if (sn.dot(fn) > 0) { + if (front.getFrontDomain() == space) { + s.setFrontDomain(wf); + } else { + s.setBackDomain(wf); + } + } else { + if (front.getBackDomain() == space) { + s.setFrontDomain(wf); + } else { + s.setBackDomain(wf); + } + } + //TODO: Change magic number -0.1 + List l = e1.offset(edges, s, -0.1); + Iterator it = l.iterator(); + while (it.hasNext()) { + Edge e = (Edge)it.next(); + space.add(e); + } + Surface offset = new Surface(l); + space.add(offset); + windows.add(offset); + Geometry.holeAnalysis(offset); + Set sidesOff = new HashSet(); + Surface exOff = extrudeIntoSpace(offset, depth, sidesOff); + + windows.add(exOff); + space.add(exOff); + Iterator sidesIt = sidesOff.iterator(); + while (sidesIt.hasNext()) { + Surface surf = (Surface)sidesIt.next(); + windows.add(surf); + space.add(surf); + } + + Geometry.holeAnalysis(exOff); + */ + } Set sides = new HashSet(); Surface t = extrudeIntoSpace(s, depth, sides); *************** *** 537,540 **** --- 595,608 ---- ((Surface)it.next()).delete(); } + it = windowModellors.iterator(); + while (it.hasNext()) { + ((Modellor)it.next()).delete(); + } + it = windowElements.iterator(); + while (it.hasNext()) { + ((Space)it.next()).delete(); + } + windowModellors = new HashSet(); + windowElements = new HashSet(); windows = new HashSet(); } |