bprocessor-commit Mailing List for B-processor (Page 12)
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...> - 2010-05-07 13:36:10
|
Update of /cvsroot/bprocessor/build In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv4797 Modified Files: build.xml Log Message: Index: build.xml =================================================================== RCS file: /cvsroot/bprocessor/build/build.xml,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** build.xml 29 Jun 2009 09:42:26 -0000 1.35 --- build.xml 7 May 2010 13:36:02 -0000 1.36 *************** *** 3,7 **** <target name="init"> <property name="project" value="bprocessor"/> ! <property name="version" value="M9"/> <property name="script.dir" value="${basedir}/bin"/> --- 3,7 ---- <target name="init"> <property name="project" value="bprocessor"/> ! <property name="version" value="M10"/> <property name="script.dir" value="${basedir}/bin"/> |
From: Michael L. <he...@us...> - 2010-05-07 13:36:10
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv4772/src/net/sourceforge/bprocessor/model Modified Files: Instance.java Space.java Project.java Log Message: Index: Instance.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Instance.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** Instance.java 12 Feb 2010 14:36:40 -0000 1.14 --- Instance.java 7 May 2010 13:35:58 -0000 1.15 *************** *** 28,31 **** --- 28,36 ---- /** + * Storage + */ + private Object storage; + + /** * */ *************** *** 71,74 **** --- 76,93 ---- /** + * @return Object + */ + public Object getStorage() { + return storage; + } + + /** + * @param value Object + */ + public void setStorage(Object value) { + storage = value; + } + + /** * @param system CoordinateSystem */ Index: Space.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Space.java,v retrieving revision 1.250 retrieving revision 1.251 diff -C2 -d -r1.250 -r1.251 *** Space.java 22 Apr 2010 08:13:47 -0000 1.250 --- Space.java 7 May 2010 13:35:58 -0000 1.251 *************** *** 87,92 **** --- 87,94 ---- } out.println(); + } } + out.println("#"); } Index: Project.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Project.java,v retrieving revision 1.189 retrieving revision 1.190 diff -C2 -d -r1.189 -r1.190 *** Project.java 26 Apr 2010 09:30:05 -0000 1.189 --- Project.java 7 May 2010 13:35:58 -0000 1.190 *************** *** 23,27 **** --- 23,30 ---- import java.net.URL; import java.net.URLConnection; + import java.text.DateFormat; import java.text.DecimalFormat; + import java.text.ParseException; + import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Collection; *************** *** 50,53 **** --- 53,57 ---- import net.sourceforge.bprocessor.model.brunata.io.DocumentParser; import net.sourceforge.bprocessor.model.sense.SensorItem; + import net.sourceforge.bprocessor.model.sense.SensorStorage; import net.sourceforge.bprocessor.model.xml.Bmodel; *************** *** 86,89 **** --- 90,96 ---- private static boolean brunata; + private static String initialDate = "2010.04.01 00:00:00"; + private static boolean initialized; + private static long stamp; private Tesselator tesselator; *************** *** 1156,1160 **** } else if (a.getName().equals("Brunata Server")) { brunata = ((Boolean) a.getValue()).booleanValue(); ! } } changed(this); --- 1163,1169 ---- } else if (a.getName().equals("Brunata Server")) { brunata = ((Boolean) a.getValue()).booleanValue(); ! } else if (a.getName().equals("Initial Date")) { ! setInitialDate((String)a.getValue()); ! } } changed(this); *************** *** 1175,1178 **** --- 1184,1188 ---- if (BRUN) { res.add(new Attribute("Brunata Server", Boolean.valueOf(brunata))); + res.add(new Attribute("Initial Date", initialDate)); } res.add(new Attribute("Script", script)); *************** *** 1815,1818 **** --- 1825,1839 ---- } + private static List<Instance> getSensors() { + List<Instance> result = new LinkedList(); + List<Instance> instances = Project.getInstance().world().collectInstances(); + for (Instance current : instances) { + Space space = current.getProto(); + if (space.getName().equals("Sensor")) { + result.add(current); + } + } + return result; + } private List<Space> constructs(Collection<Space> spaces) { *************** *** 1869,1875 **** --- 1890,1899 ---- File mtlfile = new File(file, "materials.mtl"); exportMtl(materials, new FileOutputStream(mtlfile)); + int count = 1; List<String> names = new LinkedList(); Set<String> mark = new HashSet(); + Map<String, Space> map = new HashMap(); + for (Space current : constructs) { *************** *** 1880,1891 **** --- 1904,1923 ---- } else if (mark.contains(name)) { name = "construct-" + count++; + } else { + name = "construct-" + count++; } mark.add(name); names.add(name); + map.put(name, current); File objfile = new File(file, name + ".obj"); OutputStream out = new FileOutputStream(objfile); PrintStream printer = new PrintStream(out); printer.println("mtllib materials.mtl"); + Material material = current.getMaterial(); + if (material == null) { + material = Defaults.getConstructionMaterial(); + } + printer.println("usemtl " + material.getName()); exportObj(current, out); } *************** *** 1895,1900 **** PrintStream printer = new PrintStream(new FileOutputStream(scnfile)); printer.println("<Scene>"); for (String current : names) { ! printer.println(" <ObjFile name=\"" + current + ".obj\"/>"); } printer.println("</Scene>"); --- 1927,1954 ---- PrintStream printer = new PrintStream(new FileOutputStream(scnfile)); printer.println("<Scene>"); + + for (Material current : getMaterials()) { + current.exportXml(printer); + } + + for (Camera current : getCameras()) { + current.exportXml(printer); + } + + for (String current : names) { ! Space construct = map.get(current); ! ! Material material = construct.getMaterial(); ! if (material == null) { ! material = Defaults.getConstructionMaterial(); ! } ! String header = "<Object" ! + " name=\"" + current + "\"" ! + " material=\"" + material.getName() + "\"" ! + " filename=\"" + current + ".obj" + "\"" ! + "/>"; ! ! printer.println(" " + header); } printer.println("</Scene>"); *************** *** 2095,2099 **** --- 2149,2200 ---- } + private void setInitialDate(String value) { + initialDate = value; + initialized = false; + if (brunata) { + fetch(); + } + } + private void fetch() { + System.out.println("fetching..."); + List<Instance> sensors = getSensors(); + if (initialized) { + // + } else { + for (Instance current : sensors) { + String value = (String) current.getParameters().get("Intern ID"); + System.out.println(value); + long id = Long.valueOf(value); + SensorStorage storage = new SensorStorage(id); + current.setStorage(storage); + } + DateFormat format = new SimpleDateFormat("yyyy.MM.dd HH:mm:ss"); + try { + Date date = format.parse(initialDate); + stamp = date.getTime(); + } catch (ParseException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + for (Instance current : sensors) { + SensorStorage storage = (SensorStorage) current.getStorage(); + if (storage != null) { + long id = storage.getId(); + try { + List<SensorItem> items = process(id, new Date(stamp)); + storage.update(items); + } catch (Exception e) { + e.printStackTrace(); + } + } + } + stamp = System.currentTimeMillis(); + initialized = true; + Project.getInstance().changed(Project.getInstance()); + } + } + + private void fetch1() { try { List<SensorItem> items1 = process(2501858); *************** *** 2134,2137 **** --- 2235,2240 ---- } + + /** * *************** *** 2158,2163 **** --- 2261,2286 ---- } + private static URL address(long id, Date from) throws Exception { + String www = "https://ext.brunata.com/ws-webmon/v1/da/"; + String login = "040985:b35c52662aee64d6b12faa2a2eb7013a/"; + String what = "meters/"; + String type = ":(DEWPOINT,HUMIDITY,TEMPERATURE).xml"; + String parameter = "?period=" + from.getTime(); + String address = www + login + what + id + type + parameter; + return new URL(address); + } + + private List<SensorItem> process(long id) throws Exception { URL url = address(id); + return process(id, url); + } + + private List<SensorItem> process(long id, Date from) throws Exception { + URL url = address(id, from); + return process(id, url); + } + + private List<SensorItem> process(long id, URL url) throws Exception { XMLDocument document = fetch(url); BPersistence persistence = new BPersistence(); |
From: Michael L. <he...@us...> - 2010-04-26 09:30:43
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv10674/src/net/sourceforge/bprocessor/gui/treeview Modified Files: SpaceTreeView.java Log Message: Index: SpaceTreeView.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview/SpaceTreeView.java,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** SpaceTreeView.java 4 Feb 2009 15:09:44 -0000 1.34 --- SpaceTreeView.java 26 Apr 2010 09:30:33 -0000 1.35 *************** *** 36,40 **** root.add(new ConstructorContainer("Constructors", p.getConstructors())); root.add(new ComponentContainer("Catalog", p.getCatalogObjects())); ! root.add(new SensorContainer(p.sensor())); model.nodeStructureChanged(root); } catch (Exception error) { --- 36,42 ---- root.add(new ConstructorContainer("Constructors", p.getConstructors())); root.add(new ComponentContainer("Catalog", p.getCatalogObjects())); ! if (Project.SENSE) { ! root.add(new SensorContainer(p.sensor())); ! } model.nodeStructureChanged(root); } catch (Exception error) { *************** *** 53,57 **** ((GenericNode)root.getChildAt(1)).update(p.getConstructors()); ((GenericNode)root.getChildAt(2)).update(p.getCatalogObjects()); ! ((GenericNode)root.getChildAt(3)).update(p.sensor()); } catch (ArrayIndexOutOfBoundsException e) { log.error("There were a inconsistent number of nodes attached to " + --- 55,61 ---- ((GenericNode)root.getChildAt(1)).update(p.getConstructors()); ((GenericNode)root.getChildAt(2)).update(p.getCatalogObjects()); ! if (Project.SENSE) { ! ((GenericNode)root.getChildAt(3)).update(p.sensor()); ! } } catch (ArrayIndexOutOfBoundsException e) { log.error("There were a inconsistent number of nodes attached to " + |
From: Michael L. <he...@us...> - 2010-04-26 09:30:43
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv10674/src/net/sourceforge/bprocessor/gui Modified Files: GUI.java Log Message: Index: GUI.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/GUI.java,v retrieving revision 1.117 retrieving revision 1.118 diff -C2 -d -r1.117 -r1.118 *** GUI.java 22 Apr 2010 08:13:42 -0000 1.117 --- GUI.java 26 Apr 2010 09:30:35 -0000 1.118 *************** *** 87,90 **** --- 87,92 ---- private static final long serialVersionUID = 1L; + private static final boolean IMPORT = false; + private boolean isMac; *************** *** 98,101 **** --- 100,104 ---- private boolean presented = false; + /** The main split pane */ private JSplitPane splitPaneLeftRight; *************** *** 641,644 **** --- 644,665 ---- fileImport.setEnabled(true); file.add(fileImport); + + if (IMPORT) { + JMenuItem item = new JMenuItem("Import Library..."); + item.addActionListener(new AbstractAction() { + public void actionPerformed(ActionEvent e) { + File file = chooseFile(""); + if (file != null) { + try { + Project.getInstance().importLibrary(file); + } catch (Exception e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } + } + } + }); + file.add(item); + } JMenuItem fileExport = new JMenuItem("Export"); |
From: Michael L. <he...@us...> - 2010-04-26 09:30:31
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv10538/src/net/sourceforge/bprocessor/model Modified Files: Project.java Log Message: Index: Project.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Project.java,v retrieving revision 1.188 retrieving revision 1.189 diff -C2 -d -r1.188 -r1.189 *** Project.java 22 Apr 2010 08:13:47 -0000 1.188 --- Project.java 26 Apr 2010 09:30:05 -0000 1.189 *************** *** 79,82 **** --- 79,85 ---- /** */ public static final boolean SENSE = false; + + /** */ + public static final boolean BRUN = false; private static final String HOST = "localhost"; private static final int PORT = 8800; *************** *** 114,118 **** private static boolean useDisplayLists; private static boolean doExport; - private static boolean doExportXml; private HashMap cameras = new HashMap(); --- 117,120 ---- *************** *** 468,472 **** public void initialize() { name = "New Project"; ! exportPath = "b-processor-export.obj"; script = new Description(""); --- 470,474 ---- public void initialize() { name = "New Project"; ! exportPath = "b-export"; script = new Description(""); *************** *** 1150,1155 **** } else if (a.getName().equals("Export")) { doExport = ((Boolean) a.getValue()).booleanValue(); - } else if (a.getName().equals("Export XML")) { - doExportXml = ((Boolean) a.getValue()).booleanValue(); } else if (a.getName().equals("Export Path")) { setExportPath((String)a.getValue()); --- 1152,1155 ---- *************** *** 1173,1178 **** res.add(new Attribute("Export", Boolean.valueOf(doExport))); res.add(new Attribute("Export Path", getExportPath())); ! res.add(new Attribute("Export XML", Boolean.valueOf(doExportXml))); ! res.add(new Attribute("Brunata Server", Boolean.valueOf(brunata))); res.add(new Attribute("Script", script)); return res; --- 1173,1179 ---- res.add(new Attribute("Export", Boolean.valueOf(doExport))); res.add(new Attribute("Export Path", getExportPath())); ! if (BRUN) { ! res.add(new Attribute("Brunata Server", Boolean.valueOf(brunata))); ! } res.add(new Attribute("Script", script)); return res; *************** *** 1870,1880 **** int count = 1; List<String> names = new LinkedList(); for (Space current : constructs) { - String name = current.getName(); - if (name.length() == 0) { - name = "construct-" + count++; - } if (visible(current)) { names.add(name); File objfile = new File(file, name + ".obj"); --- 1871,1886 ---- int count = 1; List<String> names = new LinkedList(); + Set<String> mark = new HashSet(); for (Space current : constructs) { if (visible(current)) { + String name = current.getName(); + if (name.length() == 0) { + name = "construct-" + count++; + } else if (mark.contains(name)) { + name = "construct-" + count++; + } + + mark.add(name); names.add(name); File objfile = new File(file, name + ".obj"); *************** *** 1957,1965 **** */ public void export(String path) throws Exception { ! if (doExportXml) { ! exportXmlAll(path); ! } else { ! exportObjAll(path); ! } } --- 1963,1967 ---- */ public void export(String path) throws Exception { ! exportXmlAll(path); } *************** *** 2187,2192 **** return items; } ! ! } --- 2189,2212 ---- return items; } ! ! /** ! * ! * @param file File ! * @throws Exception Exception ! */ ! public void importLibrary(File file) throws Exception { ! Document document = Persistence.load(file); ! Space union = Space.createUnion("Import"); ! document.getWorld().copyInterior(new HashMap(), union); ! Project.getInstance().world().add(union); ! for (Material current : document.getMaterials()) { ! Project.getInstance().add(current); ! } ! for (Component current : document.getComponents()) { ! Project.getInstance().addCalalogObject(current); ! } ! ! Project.getInstance().changed(Project.getInstance()); ! } } |
From: Michael L. <he...@us...> - 2010-04-22 08:13:56
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv14268/src/net/sourceforge/bprocessor/model Modified Files: Edge.java Surface.java Camera.java Space.java Project.java Log Message: Index: Surface.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Surface.java,v retrieving revision 1.227 retrieving revision 1.228 diff -C2 -d -r1.227 -r1.228 *** Surface.java 25 Jun 2009 23:28:42 -0000 1.227 --- Surface.java 22 Apr 2010 08:13:47 -0000 1.228 *************** *** 514,520 **** getEdges().toArray(edges); - // FIXME Generalize to - // replace one edge with list of edges. - for (int i = 0; i < edges.length; i++) { Edge current = edges[i]; --- 514,517 ---- *************** *** 1273,1292 **** */ public boolean surrounds(Surface hole, boolean boundary) { ! Iterator iter = hole.getVertices().iterator(); ! while (iter.hasNext()) { ! Vertex current = (Vertex) iter.next(); ! if (boundary) { ! if (!onBoundary(current)) { ! if (!surrounds(current)) { ! return false; } } } else { ! if (!surrounds(current)) { ! return false; ! } } } - return true; } --- 1270,1297 ---- */ public boolean surrounds(Surface hole, boolean boundary) { ! if (hole != null) { ! List<Vertex> vertices = hole.getVertices(); ! if (vertices != null) { ! for (Vertex current : vertices) { ! if (boundary) { ! if (!onBoundary(current)) { ! if (!surrounds(current)) { ! return false; ! } ! } ! } else { ! if (!surrounds(current)) { ! return false; ! } } } + return true; } else { ! throw new Error("vertices null"); } + } else { + System.out.println("hole " + hole); + return false; } } *************** *** 2084,2088 **** Collection<Vertex> vertices = this.getVertices(); if (vertices == null) { ! throw new Exception("surface inconsistent"); } return true; --- 2089,2093 ---- Collection<Vertex> vertices = this.getVertices(); if (vertices == null) { ! throw new Exception("surface " + this + " inconsistent"); } return true; Index: Edge.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Edge.java,v retrieving revision 1.112 retrieving revision 1.113 diff -C2 -d -r1.112 -r1.113 *** Edge.java 5 Feb 2010 13:32:50 -0000 1.112 --- Edge.java 22 Apr 2010 08:13:47 -0000 1.113 *************** *** 514,524 **** e2.setStrippled(this.getStrippled()); added.add(e2); if (getOwner() != null) { getOwner().add(e1); getOwner().add(e2); ! Set surfaces = getSurfaces(); ! Iterator iter = surfaces.iterator(); ! while (iter.hasNext()) { ! Surface current = (Surface) iter.next(); current.replace(this, e1, e2); } --- 514,523 ---- e2.setStrippled(this.getStrippled()); added.add(e2); + if (getOwner() != null) { getOwner().add(e1); getOwner().add(e2); ! Set<Surface> surfaces = getSurfaces(); ! for (Surface current : surfaces) { current.replace(this, e1, e2); } Index: Camera.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Camera.java,v retrieving revision 1.62 retrieving revision 1.63 diff -C2 -d -r1.62 -r1.63 *** Camera.java 5 Feb 2010 13:32:50 -0000 1.62 --- Camera.java 22 Apr 2010 08:13:47 -0000 1.63 *************** *** 789,792 **** --- 789,809 ---- printer.println(" </Camera>"); } + + /** + * Returns true of space is visible + * @param space Space + * @return true of space is visible + */ + public boolean visible(Space space) { + if (space == null) { + return true; + } else { + if (hiddenGeometrics.contains(space)) { + return false; + } else { + return visible(space.getOwner()); + } + } + } } Index: Project.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Project.java,v retrieving revision 1.187 retrieving revision 1.188 diff -C2 -d -r1.187 -r1.188 *** Project.java 9 Mar 2010 13:02:00 -0000 1.187 --- Project.java 22 Apr 2010 08:13:47 -0000 1.188 *************** *** 114,118 **** private static boolean useDisplayLists; private static boolean doExport; ! private HashMap cameras = new HashMap(); --- 114,118 ---- private static boolean useDisplayLists; private static boolean doExport; ! private static boolean doExportXml; private HashMap cameras = new HashMap(); *************** *** 1150,1153 **** --- 1150,1155 ---- } else if (a.getName().equals("Export")) { doExport = ((Boolean) a.getValue()).booleanValue(); + } else if (a.getName().equals("Export XML")) { + doExportXml = ((Boolean) a.getValue()).booleanValue(); } else if (a.getName().equals("Export Path")) { setExportPath((String)a.getValue()); *************** *** 1171,1174 **** --- 1173,1177 ---- res.add(new Attribute("Export", Boolean.valueOf(doExport))); res.add(new Attribute("Export Path", getExportPath())); + res.add(new Attribute("Export XML", Boolean.valueOf(doExportXml))); res.add(new Attribute("Brunata Server", Boolean.valueOf(brunata))); res.add(new Attribute("Script", script)); *************** *** 1785,1843 **** } - private void processBoundary1(Area location) { - if (location.getChildren().isEmpty()) { - // - } else { - double xmin = Double.POSITIVE_INFINITY; - double xmax = Double.NEGATIVE_INFINITY; - double ymin = Double.POSITIVE_INFINITY; - double ymax = Double.NEGATIVE_INFINITY; - - LinkedList<Boundary> internals = new LinkedList(); - for (Area current : location.getChildren()) { - processBoundary1(current); - Boundary external = current.getExternalBoundary(); - if (external != null) { - internals.add(current.getExternalBoundary()); - } else { - System.out.println("failed to create boundary on " + current); - } - } - LinkedList<Point2d> points = new LinkedList(); - for (Boundary boundary : internals) { - points.addAll(boundary.getPoints()); - } - for (Point2d current : points) { - if (current.getX() < xmin) { - xmin = current.getX(); - } - if (current.getX() > xmax) { - xmax = current.getX(); - } - if (current.getY() < ymin) { - ymin = current.getY(); - } - if (current.getY() > ymax) { - ymax = current.getY(); - } - } - Point2d p1 = new Point2d(xmin, ymin); - Point2d p2 = new Point2d(xmin, ymax); - Point2d p3 = new Point2d(xmax, ymax); - Point2d p4 = new Point2d(xmax, ymin); - Segment s1 = new Segment(p1, p2); - Segment s2 = new Segment(p2, p3); - Segment s3 = new Segment(p3, p4); - Segment s4 = new Segment(p4, p1); - Boundary external = new Boundary(); - external.add(s1); - external.add(s2); - external.add(s3); - external.add(s4); - location.setExternalBoundary(external); - - } - } - /** * --- 1788,1791 ---- *************** *** 1856,1867 **** } /** ! * ! * @param out OutputStream */ ! public void exportOBJ(OutputStream out) { ! PrintStream printer = new PrintStream(out); ! List<Space> spaces = world.collectSpaces(); ! List<Space> constructs = new LinkedList(); for (Space current : spaces) { --- 1804,1819 ---- } + /** ! * Returns true of space is visible ! * @param space Space ! * @return true of space is visible */ ! public boolean visible(Space space) { ! return getCurrentCamera().visible(space); ! } ! ! ! private List<Space> constructs(Collection<Space> spaces) { List<Space> constructs = new LinkedList(); for (Space current : spaces) { *************** *** 1870,1880 **** } } ! List<Space> containers = new LinkedList(); for (Space current : constructs) { Space tesselation = current.tesselate(); tesselation.setMaterial(current.getMaterial()); containers.add(tesselation); } ! Space.export(containers, printer); } --- 1822,1941 ---- } } ! return constructs; ! } ! ! private List<Material> materials(Collection<Space> constructs) { ! Set<Material> mark = new HashSet(); for (Space current : constructs) { + Material material = current.getMaterial(); + if (material != null) { + mark.add(material); + } + } + return new LinkedList(mark); + } + + private boolean mkdirs(File file) { + if (file.isDirectory()) { + return true; + } else { + if (!file.exists()) { + return file.mkdirs(); + } + } + return false; + } + + private void cleandir(File directory) { + for (File current : directory.listFiles()) { + if (current.isFile()) { + current.delete(); + } + } + } + + /** + * + * @param path String + * @throws Exception Exception + */ + public void exportXmlAll(String path) throws Exception { + File file = new File(path); + if (mkdirs(file)) { + cleandir(file); + List<Space> constructs = constructs(world.collectSpaces()); + List<Material> materials = materials(constructs); + File mtlfile = new File(file, "materials.mtl"); + exportMtl(materials, new FileOutputStream(mtlfile)); + int count = 1; + List<String> names = new LinkedList(); + for (Space current : constructs) { + + String name = current.getName(); + if (name.length() == 0) { + name = "construct-" + count++; + } + if (visible(current)) { + names.add(name); + File objfile = new File(file, name + ".obj"); + OutputStream out = new FileOutputStream(objfile); + PrintStream printer = new PrintStream(out); + printer.println("mtllib materials.mtl"); + exportObj(current, out); + } + } + { + File scnfile = new File(file, "scene.xml"); + PrintStream printer = new PrintStream(new FileOutputStream(scnfile)); + printer.println("<Scene>"); + for (String current : names) { + printer.println(" <ObjFile name=\"" + current + ".obj\"/>"); + } + printer.println("</Scene>"); + } + } + } + + /** + * + * @param path String + * @throws Exception Exception + */ + public void exportObjAll(String path) throws Exception { + List<Space> constructs = constructs(world.collectSpaces()); + List<Material> materials = materials(constructs); + exportObj(constructs, materials, path); + } + + private void exportObj(List<Space> spaces, + List<Material> materials, + String path) throws Exception { + exportMtl(materials, new FileOutputStream(path + ".mtl")); + OutputStream out = new FileOutputStream(path + ".obj"); + PrintStream printer = new PrintStream(out); + printer.println("mtllib " + path + ".mtl"); + exportObj(spaces, out); + } + + private void exportObj(List<Space> spaces, OutputStream out) { + List<Space> containers = new LinkedList(); + for (Space current : spaces) { Space tesselation = current.tesselate(); tesselation.setMaterial(current.getMaterial()); containers.add(tesselation); } ! Space.export(containers, new PrintStream(out)); ! } ! ! private void exportObj(Space construct, OutputStream out) { ! List<Space> spaces = new LinkedList(); ! spaces.add(construct); ! exportObj(spaces, out); ! } ! ! private void exportMtl(List<Material> materials, OutputStream out) { ! for (Material current : getMaterials()) { ! current.export(out); ! } } *************** *** 1885,1891 **** try { export(getExportPath()); ! } catch (IOException e) { ! // TODO Auto-generated catch block ! e.printStackTrace(); } } --- 1946,1951 ---- try { export(getExportPath()); ! } catch (Exception e) { ! // empty } } *************** *** 1894,1901 **** * Export to the given path * @param path String ! * @throws IOException Error */ ! public void export(String path) throws IOException { ! exportXml(path); } --- 1954,1965 ---- * Export to the given path * @param path String ! * @throws Exception Exception */ ! public void export(String path) throws Exception { ! if (doExportXml) { ! exportXmlAll(path); ! } else { ! exportObjAll(path); ! } } *************** *** 1928,1932 **** } } - List<Space> containers = new LinkedList(); for (Space current : constructs) { Space tesselation = current.tesselate(); --- 1992,1995 ---- *************** *** 1950,1957 **** Instance instance = (Instance) current; Space proto = instance.getProto(); ! if (proto.getName().equals("Light")) { ! String value = "<Light" + " id=\"" + instance.getId() + "\"" + " name=\"" + instance.getName() + "\"" + ">"; printer.println(value); --- 2013,2022 ---- Instance instance = (Instance) current; Space proto = instance.getProto(); ! if (proto.getName().equals("OmniLight")) { ! String luminance = (String) instance.getParameters().get("luminance"); ! String value = "<OmniLight" + " id=\"" + instance.getId() + "\"" + " name=\"" + instance.getName() + "\"" + + " luminance=\"" + luminance + "\"" + ">"; printer.println(value); *************** *** 1963,1968 **** + "/>"; printer.println(str); ! printer.println("</Light>"); } } } --- 2028,2049 ---- + "/>"; printer.println(str); ! printer.println("</OmniLight>"); ! } ! if (proto.getName().equals("SpotLight")) { ! String value = "<SpotLight" ! + " id=\"" + instance.getId() + "\"" ! + " name=\"" + instance.getName() + "\"" ! + ">"; ! printer.println(value); ! Vertex origin = instance.getAnchor().getOrigin(); ! String str = " <position" ! + " x=\"" + origin.getX() + "\"" ! + " y=\"" + origin.getY() + "\"" ! + " z=\"" + origin.getZ() + "\"" ! + "/>"; ! printer.println(str); ! printer.println("</SpotLight>"); } + } } *************** *** 1973,2002 **** /** - * Export object file to given path - * @param path String - * @throws IOException Exception - */ - public void exportObj(String path) throws IOException { - System.out.println("export to " + path + ".obj"); - String objname = path + ".obj"; - String mtlname = path + ".mtl"; - { - OutputStream out = new FileOutputStream(new File(mtlname)); - for (Material current : getMaterials()) { - current.export(out); - } - out.close(); - } - { - OutputStream out = new FileOutputStream(new File(objname)); - PrintStream printer = new PrintStream(out); - printer.println("mtllib " + mtlname); - exportOBJ(out); - out.close(); - } - } - - - /** * */ --- 2054,2057 ---- *************** *** 2133,2136 **** --- 2188,2192 ---- } + } Index: Space.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Space.java,v retrieving revision 1.249 retrieving revision 1.250 diff -C2 -d -r1.249 -r1.250 *** Space.java 26 Feb 2010 13:48:09 -0000 1.249 --- Space.java 22 Apr 2010 08:13:47 -0000 1.250 *************** *** 384,387 **** --- 384,411 ---- /** + * + * @param vertex Vertex + * @return Vertex + */ + public Vertex insertAll(Vertex vertex) { + Space space = (Space) this; + if (vertex.getOwner() != null) { + if (vertex.getOwner() == space) { + return vertex; + } else { + vertex = vertex.copy(); + } + } + + Vertex actual = space.findVertex(vertex); + + if (actual == null) { + actual = vertex; + space.add(actual); + } + return actual; + } + + /** * Insert a vertex * @param vertex The vertex *************** *** 403,413 **** actual = vertex; space.add(actual); ! Set es = space.findEdge(actual); ! if (es.size() > 0) { ! Iterator iter = es.iterator(); ! while (iter.hasNext()) { ! Edge current = (Edge) iter.next(); ! current.split(actual); ! } } } --- 427,434 ---- actual = vertex; space.add(actual); ! ! Set<Edge> es = space.findEdge(actual); ! for (Edge current : es) { ! current.split(actual); } } *************** *** 730,733 **** --- 751,796 ---- /** + * + * @param surface Surface + */ + public void insertAll(Surface surface) { + List<Edge> edges = surface.getEdges(); + List<Edge> lst = new LinkedList<Edge>(); + for (Edge current : edges) { + lst.add(insertAll(current)); + } + surface.setEdges(lst); + add(surface); + } + + /** + * @param edge Edge + * @return Edge + */ + public Edge insertAll(Edge edge) { + if (edge.getOwner() == this) { + return edge; + } + + Vertex from = insertAll(edge.getFrom()); + Vertex to = insertAll(edge.getTo()); + if (from == to) { + return null; + } + + edge.setFrom(from); + edge.setTo(to); + + Edge existing = findEdge(edge); + + if (existing != null) { + return existing; + } else { + add(edge); + return edge; + } + } + + /** * Insert a surface * @param surface The surface *************** *** 736,747 **** public Surface insert(Surface surface) { List<Edge> edges = surface.getEdges(); - edges = surface.getEdges(); List<Edge> lst = new LinkedList<Edge>(); ! { ! Iterator<Edge> iter = edges.iterator(); ! while (iter.hasNext()) { ! Edge current = (Edge) iter.next(); ! lst.add(insert(current)); ! } } surface.setEdges(lst); --- 799,805 ---- public Surface insert(Surface surface) { List<Edge> edges = surface.getEdges(); List<Edge> lst = new LinkedList<Edge>(); ! for (Edge current : edges) { ! lst.add(insert(current)); } surface.setEdges(lst); *************** *** 1659,1676 **** List<Surface> triangles = tesselator.tesselate(current); for (Surface triangle : triangles) { ! Surface inserted = holder.insert(triangle); ! Vertex n = inserted.normal(); if (n.dot(normal) > 0) { if (current.getFrontDomain() == this) { ! inserted.setFrontDomain(interior); } else { ! inserted.setBackDomain(interior); } } else { if (current.getFrontDomain() == this) { ! inserted.setBackDomain(interior); } else { ! inserted.setFrontDomain(interior); } } --- 1717,1735 ---- List<Surface> triangles = tesselator.tesselate(current); + for (Surface triangle : triangles) { ! holder.insertAll(triangle); ! Vertex n = triangle.normal(); if (n.dot(normal) > 0) { if (current.getFrontDomain() == this) { ! triangle.setFrontDomain(interior); } else { ! triangle.setBackDomain(interior); } } else { if (current.getFrontDomain() == this) { ! triangle.setBackDomain(interior); } else { ! triangle.setFrontDomain(interior); } } *************** *** 1688,1693 **** Space tesselation = tesselate(); tesselation.export(out); - //getOwner().add(holder); - //Project.getInstance().changed(Project.getInstance()); } --- 1747,1750 ---- |
From: Michael L. <he...@us...> - 2010-04-22 08:13:53
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv14257/src/net/sourceforge/bprocessor/gui Modified Files: GUI.java Log Message: Index: GUI.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/GUI.java,v retrieving revision 1.116 retrieving revision 1.117 diff -C2 -d -r1.116 -r1.117 *** GUI.java 12 Feb 2010 11:44:21 -0000 1.116 --- GUI.java 22 Apr 2010 08:13:42 -0000 1.117 *************** *** 679,703 **** file.add(ppExport); ! JMenuItem objExport = new JMenuItem("Export OBJ"); ! objExport.addActionListener(new ActionListener() { ! public void actionPerformed(ActionEvent e) { ! JFileChooser chooser = new JFileChooser(); ! int state = chooser.showSaveDialog(null); ! File file = chooser.getSelectedFile(); ! if (file != null && state == JFileChooser.APPROVE_OPTION) { ! try { ! OutputStream out = new FileOutputStream(file); ! Project.getInstance().exportOBJ(out); ! } catch (FileNotFoundException e1) { ! System.out.println("unable to write to " + file); } } ! ! } ! }); ! file.add(objExport); ! file.addSeparator(); --- 679,724 ---- file.add(ppExport); ! { ! JMenuItem item = new JMenuItem("Export OBJ"); ! item.addActionListener(new ActionListener() { ! public void actionPerformed(ActionEvent e) { ! JFileChooser chooser = new JFileChooser(); ! int state = chooser.showSaveDialog(null); ! File file = chooser.getSelectedFile(); ! if (file != null && state == JFileChooser.APPROVE_OPTION) { ! try { ! Project.getInstance().exportObjAll(file.getPath()); ! } catch (Exception error) { ! // TODO Auto-generated catch block ! error.printStackTrace(); ! } } } ! }); ! file.add(item); ! } ! { ! JMenuItem item = new JMenuItem("Export XML"); ! item.addActionListener(new ActionListener() { ! public void actionPerformed(ActionEvent e) { ! JFileChooser chooser = new JFileChooser(); ! int state = chooser.showSaveDialog(null); ! File file = chooser.getSelectedFile(); ! ! if (file != null && ! state == JFileChooser.APPROVE_OPTION) { ! try { ! Project.getInstance().exportXmlAll(file.getPath()); ! } catch (Exception error) { ! // TODO Auto-generated catch block ! error.printStackTrace(); ! } ! } ! } ! }); ! file.add(item); ! } file.addSeparator(); |
From: Michael L. <he...@us...> - 2010-04-22 08:13:47
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv14240/src/net/sourceforge/bprocessor/gl/view Modified Files: Display.java Log Message: Index: Display.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/Display.java,v retrieving revision 1.105 retrieving revision 1.106 diff -C2 -d -r1.105 -r1.106 *** Display.java 9 Mar 2010 14:04:23 -0000 1.105 --- Display.java 22 Apr 2010 08:13:39 -0000 1.106 *************** *** 1312,1318 **** Item space = (Item) current; Collection<Edge> edges = space.hiliteEdges(); ! gl.glDepthMask(false); ! paintEdges(edges, View.SELECTED_COLOR, 5.0f); ! gl.glDepthMask(true); } } --- 1312,1316 ---- Item space = (Item) current; Collection<Edge> edges = space.hiliteEdges(); ! paintEdges(edges, View.SELECTED_COLOR, 3.0f); } } *************** *** 1440,1444 **** geometrics.add(target); } - hiliteSpaces(geometrics); enableClipplanes(); } --- 1438,1441 ---- *************** *** 1447,1450 **** --- 1444,1448 ---- if (!selecting()) { + hiliteSpaces(geometrics); disableClipplanes(); hiliteVertices(geometrics); |
From: Michael L. <he...@us...> - 2010-04-22 08:13:43
|
Update of /cvsroot/bprocessor/bprocessor In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv14226 Modified Files: .cvsignore Log Message: Index: .cvsignore =================================================================== RCS file: /cvsroot/bprocessor/bprocessor/.cvsignore,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** .cvsignore 28 Nov 2006 20:50:33 -0000 1.3 --- .cvsignore 22 Apr 2010 08:13:34 -0000 1.4 *************** *** 6,7 **** --- 6,8 ---- bin .version.file + ruin |
From: Michael L. <he...@us...> - 2010-03-16 13:42:37
|
Update of /cvsroot/bprocessor/bprocessor In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv3911 Removed Files: hus-eksport.xml zanzibar.xml chuck.xml b-processor-export.mtl house.obj b-processor-export.obj.xml smallhouse.mtl b-processor-export.obj house.mtl smallhouse.obj Log Message: --- b-processor-export.mtl DELETED --- --- house.mtl DELETED --- --- hus-eksport.xml DELETED --- --- smallhouse.obj DELETED --- --- chuck.xml DELETED --- --- b-processor-export.obj.xml DELETED --- --- house.obj DELETED --- --- zanzibar.xml DELETED --- --- b-processor-export.obj DELETED --- --- smallhouse.mtl DELETED --- |
From: Michael L. <he...@us...> - 2010-03-09 14:04:35
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv18592/src/net/sourceforge/bprocessor/gl/view Modified Files: Display.java Log Message: Index: Display.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/Display.java,v retrieving revision 1.104 retrieving revision 1.105 diff -C2 -d -r1.104 -r1.105 *** Display.java 9 Mar 2010 13:24:25 -0000 1.104 --- Display.java 9 Mar 2010 14:04:23 -0000 1.105 *************** *** 1288,1292 **** } ! private static void hilite(Collection<Geometric> geometrics) { enable(GL.GL_DEPTH_TEST); --- 1288,1292 ---- } ! private static void hiliteSpaces(Collection<Geometric> geometrics) { enable(GL.GL_DEPTH_TEST); *************** *** 1329,1333 **** --- 1329,1335 ---- disable(GL.GL_POLYGON_STIPPLE); disable(GL.GL_DEPTH_TEST); + } + private static void hiliteVertices(Collection<Geometric> geometrics) { for (Geometric current : geometrics) { if (current instanceof Vertex) { *************** *** 1349,1353 **** } - private static void draw(Grid grid) { CoordinateSystem system = Project.getInstance().getActiveCoordinateSystem(); --- 1351,1354 ---- *************** *** 1430,1456 **** grid = world.getGrid(); if (!selecting()) { disableClipplanes(); ! Collection<Geometric> geometrics = new HashSet(); geometrics.addAll(Selection.primary()); if (target != null) { ! Collection<Geometric> hilite = new HashSet(); ! hilite.add(target); ! hilite(hilite); ! } ! if (active.isInstance()) { ! gl.glPushMatrix(); ! translateToCoordinatesystem((Instance) active); ! } ! ! hilite(geometrics); ! ! if (active.isInstance()) { ! gl.glPopMatrix(); } enableClipplanes(); } draw(world, world == active); { --- 1431,1454 ---- grid = world.getGrid(); + Collection<Geometric> geometrics = new HashSet(); + if (!selecting()) { disableClipplanes(); ! geometrics.addAll(Selection.primary()); if (target != null) { ! geometrics.add(target); } + hiliteSpaces(geometrics); enableClipplanes(); } draw(world, world == active); + + if (!selecting()) { + disableClipplanes(); + hiliteVertices(geometrics); + enableClipplanes(); + } { |
From: Michael L. <he...@us...> - 2010-03-09 13:24:33
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv10456/src/net/sourceforge/bprocessor/gl/view Modified Files: Display.java Log Message: Index: Display.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/Display.java,v retrieving revision 1.103 retrieving revision 1.104 diff -C2 -d -r1.103 -r1.104 *** Display.java 9 Mar 2010 13:01:53 -0000 1.103 --- Display.java 9 Mar 2010 13:24:25 -0000 1.104 *************** *** 927,938 **** } - private static void renderInstance(Instance space, boolean inside) { - if (Project.useDisplayLists()) { - drawInstanceFast(space, inside); - } else { - drawInstanceSlow(space, inside); - } - } - private static void drawInstanceFast(Instance space, boolean inside) { Map<Geometric, Integer> lists = null; --- 927,930 ---- *************** *** 968,978 **** } - private static void drawInstanceSlow(Instance space, boolean inside) { - gl.glPushMatrix(); - translateToCoordinatesystem(space); - drawSpace(space.getProto(), inside || space == active); - gl.glPopMatrix(); - } - private static void drawInstance(Instance space, boolean inside) { if (Project.useDisplayLists()) { --- 960,963 ---- *************** *** 985,993 **** } } else { ! drawInstanceOriginal(space, inside); } } ! private static void drawInstanceOriginal(Instance space, boolean inside) { gl.glPushMatrix(); translateToCoordinatesystem(space); --- 970,978 ---- } } else { ! drawInstanceSlow(space, inside); } } ! private static void drawInstanceSlow(Instance space, boolean inside) { gl.glPushMatrix(); translateToCoordinatesystem(space); |
From: Michael L. <he...@us...> - 2010-03-09 13:02:08
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv7535/src/net/sourceforge/bprocessor/model Modified Files: Item.java Component.java Project.java Persistence.java Log Message: Index: Item.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Item.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Item.java 12 Feb 2010 14:36:40 -0000 1.5 --- Item.java 9 Mar 2010 13:02:00 -0000 1.6 *************** *** 622,632 **** res.add(new Attribute("Modellor", getModellor())); } - if (getOwner() != null && getOwner().getModellor() != null) { - Parametric parameters = getOwner().getModellor().get((Space) this); - if (parameters != null) { - res.add(new Attribute(parameters.title(), parameters)); - } - } - return res; } --- 622,625 ---- Index: Persistence.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Persistence.java,v retrieving revision 1.87 retrieving revision 1.88 diff -C2 -d -r1.87 -r1.88 *** Persistence.java 12 Feb 2010 13:04:18 -0000 1.87 --- Persistence.java 9 Mar 2010 13:02:00 -0000 1.88 *************** *** 1888,1893 **** private static Component internalizeLibraryObj(LibObjType lot, Map map, Collection xmls) { Component lo = new Component(); - lo.setAuthor(lot.getAuthor()); - lo.setVersion(lot.getVersion()); lo.setName(lot.getName()); lo.setLocked(lot.isLocked()); --- 1888,1891 ---- *************** *** 1940,1948 **** libobj.setId(counter++); libobj.setLocked(libo.isLocked()); ! libobj.setAuthor(libo.getAuthor()); libobj.setName(libo.getName()); libobj.setSpace(externalizeSpace(libo.getSpace(), map)); ! libobj.setUseableLevels(libo.getUseLevel()); ! libobj.setVersion(libo.getVersion()); return libobj; } --- 1938,1946 ---- libobj.setId(counter++); libobj.setLocked(libo.isLocked()); ! libobj.setAuthor("bprocessor"); libobj.setName(libo.getName()); libobj.setSpace(externalizeSpace(libo.getSpace(), map)); ! libobj.setUseableLevels((byte) 0); ! libobj.setVersion("0"); return libobj; } Index: Component.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Component.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Component.java 12 Feb 2010 11:44:28 -0000 1.10 --- Component.java 9 Mar 2010 13:02:00 -0000 1.11 *************** *** 18,36 **** private File file; private Space space = null; - private byte useableLevels = 0; private boolean isLocked = false; private String name; - private String author; - private String version; /** * The default constructor - * @param usableLvls the levels where obj can be used incoded into a byte * @param f the file that represents this library object * @param s the space (union) this lib obj encapsulate */ ! public Component(byte usableLvls, File f, Space s) { file = f; - useableLevels = usableLvls; space = s; name = s.getName(); --- 18,31 ---- private File file; private Space space = null; private boolean isLocked = false; private String name; /** * The default constructor * @param f the file that represents this library object * @param s the space (union) this lib obj encapsulate */ ! public Component(File f, Space s) { file = f; space = s; name = s.getName(); *************** *** 69,80 **** /** - * Return a byte with the usable levelnumber bit set - * @return a byte with some set bits - */ - public byte getUseLevel() { - return useableLevels; - } - - /** * A getter for the space (union) this lib obj points to * @return The Space --- 64,67 ---- *************** *** 143,150 **** List<Attribute> att = new LinkedList<Attribute>(); att.add(new Attribute("name", getName())); - att.add(new Attribute("Project", worksAtLevel(Space.PROJECT_LEVEL))); - att.add(new Attribute("Space", worksAtLevel(Space.SPACE_LEVEL))); - att.add(new Attribute("Element", worksAtLevel(Space.ELEMENT_LEVEL))); - att.add(new Attribute("Part", worksAtLevel(Space.PART_LEVEL))); att.add(new Attribute("geometry", getSpace())); att.add(new Attribute("Locked", isLocked())); --- 130,133 ---- *************** *** 154,171 **** } att.add(new Attribute("File", fileStr)); - att.add(new Attribute("Author", getAuthor())); - att.add(new Attribute("Version", getVersion())); att.add(new Attribute("Preview", this)); return att; } - private boolean worksAtLevel(int spaceLevel) { - int lvl = 1 >> (spaceLevel - Space.PROJECT_LEVEL); - if ((getUseLevel() & lvl) == lvl) { - return true; - } - return false; - } - /** * {@inheritDoc} --- 137,144 ---- *************** *** 186,223 **** return name; } - - /** - * @return the author - */ - public String getAuthor() { - if (author == null) { - author = "n/a"; - } - return author; - } - - /** - * @param author the author to set - */ - public void setAuthor(String author) { - this.author = author; - } - - /** - * @return the version - */ - public String getVersion() { - if (version == null) { - version = "n/a"; - } - return version; - } - - /** - * @param version the version to set - */ - public void setVersion(String version) { - this.version = version; - } /** --- 159,162 ---- Index: Project.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Project.java,v retrieving revision 1.186 retrieving revision 1.187 diff -C2 -d -r1.186 -r1.187 *** Project.java 25 Feb 2010 14:43:48 -0000 1.186 --- Project.java 9 Mar 2010 13:02:00 -0000 1.187 *************** *** 112,116 **** private static boolean doDisplayGeometry; ! private static boolean doDebugGeometry; private static boolean doExport; --- 112,116 ---- private static boolean doDisplayGeometry; ! private static boolean useDisplayLists; private static boolean doExport; *************** *** 423,428 **** * @return boolean */ ! public static boolean doDebugGeometry() { ! return Project.doDebugGeometry; } --- 423,428 ---- * @return boolean */ ! public static boolean useDisplayLists() { ! return Project.useDisplayLists; } *************** *** 459,463 **** public Project() { super(); - System.out.println("-- construct --"); staticObservers = new LinkedList(); reset(); --- 459,462 ---- *************** *** 932,946 **** */ public void checkpoint() { - Bmodel state = Persistence.externalize(); - if (state != null) { redoStack.clear(); if (currentState != null) { undoStack.push(currentState); } currentState = state; } - log.debug("--------CheckPoint--------"); } --- 931,945 ---- */ public void checkpoint() { Bmodel state = Persistence.externalize(); if (state != null) { redoStack.clear(); if (currentState != null) { undoStack.push(currentState); + if (undoStack.size() > 5) { + undoStack.remove(0); + } } currentState = state; } } *************** *** 1147,1152 **** } else if (a.getName().equals("Display Geometry")) { doDisplayGeometry = ((Boolean) a.getValue()).booleanValue(); ! } else if (a.getName().equals("Debug Geometry")) { ! doDebugGeometry = ((Boolean) a.getValue()).booleanValue(); } else if (a.getName().equals("Export")) { doExport = ((Boolean) a.getValue()).booleanValue(); --- 1146,1151 ---- } else if (a.getName().equals("Display Geometry")) { doDisplayGeometry = ((Boolean) a.getValue()).booleanValue(); ! } else if (a.getName().equals("Use display lists")) { ! useDisplayLists = ((Boolean) a.getValue()).booleanValue(); } else if (a.getName().equals("Export")) { doExport = ((Boolean) a.getValue()).booleanValue(); *************** *** 1169,1173 **** res.add(new Attribute("Heated area", new Double(EnergyCalc.heatedArea()), false)); res.add(new Attribute("Display Geometry", Boolean.valueOf(doDisplayGeometry))); ! res.add(new Attribute("Debug Geometry", Boolean.valueOf(doDebugGeometry))); res.add(new Attribute("Export", Boolean.valueOf(doExport))); res.add(new Attribute("Export Path", getExportPath())); --- 1168,1172 ---- res.add(new Attribute("Heated area", new Double(EnergyCalc.heatedArea()), false)); res.add(new Attribute("Display Geometry", Boolean.valueOf(doDisplayGeometry))); ! res.add(new Attribute("Use display lists", Boolean.valueOf(useDisplayLists))); res.add(new Attribute("Export", Boolean.valueOf(doExport))); res.add(new Attribute("Export Path", getExportPath())); |
From: Michael L. <he...@us...> - 2010-03-09 13:02:05
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv7512/src/net/sourceforge/bprocessor/gui/actions Modified Files: FileImportActionListener.java Log Message: Index: FileImportActionListener.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions/FileImportActionListener.java,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** FileImportActionListener.java 17 Nov 2009 09:56:55 -0000 1.28 --- FileImportActionListener.java 9 Mar 2010 13:01:57 -0000 1.29 *************** *** 141,145 **** ImportFileReader.importObjFile(lfile, s, info.objPanel.getScale(), info.objPanel.getDirection(), info.objPanel.getCalcNormals()); ! Component lo = new Component(Byte.MAX_VALUE, lfile, s); Project.getInstance().addCalalogObject(lo); Project.getInstance().changed(s); --- 141,146 ---- ImportFileReader.importObjFile(lfile, s, info.objPanel.getScale(), info.objPanel.getDirection(), info.objPanel.getCalcNormals()); ! s.add(Project.getInstance().getActiveCoordinateSystem().copy()); ! Component lo = new Component(lfile, s); Project.getInstance().addCalalogObject(lo); Project.getInstance().changed(s); |
From: Michael L. <he...@us...> - 2010-03-09 13:02:04
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv7512/src/net/sourceforge/bprocessor/gui/treeview Modified Files: GenericTreeView.java Log Message: Index: GenericTreeView.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview/GenericTreeView.java,v retrieving revision 1.146 retrieving revision 1.147 diff -C2 -d -r1.146 -r1.147 *** GenericTreeView.java 13 Jan 2010 10:58:37 -0000 1.146 --- GenericTreeView.java 9 Mar 2010 13:01:56 -0000 1.147 *************** *** 610,618 **** */ public JPopupMenu menu() { - System.out.println("menu.."); JPopupMenu pm = GUI.getInstance().menuFactory().menuFor(Selection.primary()); if (pm == null) { Object object = this.getUserObject(); - System.out.println("menu: " + object); if (object instanceof Attribute) { pm = GUI.getInstance().menuFactory().menuFor((Attribute)object); --- 610,616 ---- *************** *** 678,684 **** Set surfaces = space.getEnvelope(); add(new SurfaceContainer("Envelope", surfaces, false)); ! SpaceNode proto = new ContainerNode(space.getProto()); ! add(proto); ! CoordinateSystem cs = space.getTransformation(); if (cs != null) { add(new ConstructorNode(cs)); --- 676,680 ---- Set surfaces = space.getEnvelope(); add(new SurfaceContainer("Envelope", surfaces, false)); ! CoordinateSystem cs = space.getAnchor(); if (cs != null) { add(new ConstructorNode(cs)); *************** *** 693,700 **** if (o instanceof Instance) { Instance instance = (Instance) o; ! if (this.getChildCount() == 3) { ((GenericNode)getChildAt(0)).update(instance.getEnvelope()); ! ((GenericNode)getChildAt(1)).update(instance.getProto()); ! ((GenericNode)getChildAt(2)).update(instance.getTransformation()); } else { removeAllChildren(); --- 689,695 ---- if (o instanceof Instance) { Instance instance = (Instance) o; ! if (this.getChildCount() == 2) { ((GenericNode)getChildAt(0)).update(instance.getEnvelope()); ! ((GenericNode)getChildAt(1)).update(instance.getTransformation()); } else { removeAllChildren(); |
From: Michael L. <he...@us...> - 2010-03-09 13:02:03
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv7495/src/net/sourceforge/bprocessor/gl/view Modified Files: Display.java PopupMenu.java Log Message: Index: Display.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/Display.java,v retrieving revision 1.102 retrieving revision 1.103 diff -C2 -d -r1.102 -r1.103 *** Display.java 26 Feb 2010 13:48:12 -0000 1.102 --- Display.java 9 Mar 2010 13:01:53 -0000 1.103 *************** *** 52,56 **** private static final boolean TRUE = true; - private static boolean initialized; private static boolean selecting; --- 52,55 ---- *************** *** 74,83 **** private static Collection<Geometric> excluded; - private static Project project; private static Camera camera; private static Item active; - private static float hilitesize = 9.0f; private static float normalsize = 7.0f; --- 73,80 ---- *************** *** 99,107 **** private static byte[] highlight = new byte[128]; ! ! private static Map<Geometric, Integer> displayLists = ! new HashMap<Geometric, Integer>(); ! ! private static final boolean USEDL = false; /** --- 96,103 ---- private static byte[] highlight = new byte[128]; ! private static Map<Geometric, Integer> shadedLines = new HashMap<Geometric, Integer>(); ! private static Map<Geometric, Integer> shaded = new HashMap<Geometric, Integer>(); ! private static Map<Geometric, Integer> solid = new HashMap<Geometric, Integer>(); ! private static Map<Geometric, Integer> wire = new HashMap<Geometric, Integer>(); /** *************** *** 930,955 **** } } ! ! private static void drawInstance(Instance space, boolean inside) { gl.glPushMatrix(); ! if (space == active) { ! paint(space.getAnchor()); } else { ! // paint(space.getAnchor()); } translateToCoordinatesystem(space); ! if (USEDL && inside) { ! Space work = space.getProto(); ! Integer index = displayLists.get(work); ! if (index != null) { ! gl.glCallList(index); ! gl.glPopMatrix(); ! return; ! } else { ! index = gl.glGenLists(1); ! displayLists.put(work, index); ! gl.glNewList(index, GL.GL_COMPILE_AND_EXECUTE); } } boolean activeSet = false; if (selecting()) { --- 926,995 ---- } } ! ! private static void renderInstance(Instance space, boolean inside) { ! if (Project.useDisplayLists()) { ! drawInstanceFast(space, inside); ! } else { ! drawInstanceSlow(space, inside); ! } ! } ! ! private static void drawInstanceFast(Instance space, boolean inside) { ! Map<Geometric, Integer> lists = null; ! ! if (mode == View.SOLID_MODE) { ! lists = solid; ! } else if (mode == View.LIGHTING_MODE) { ! if (edgesEnabled) { ! lists = shadedLines; ! } else { ! lists = shaded; ! } ! } else if (mode == View.WIREFRAME_MODE) { ! lists = wire; ! } ! gl.glPushMatrix(); ! translateToCoordinatesystem(space); ! Space work = space.getProto(); ! Integer index = lists.get(work); ! if (index != null) { ! gl.glCallList(index); ! gl.glPopMatrix(); ! return; } else { ! index = gl.glGenLists(1); ! lists.put(work, index); ! gl.glNewList(index, GL.GL_COMPILE_AND_EXECUTE); } + drawSpace(space.getProto(), inside || space == active); + gl.glEndList(); + gl.glPopMatrix(); + } + + private static void drawInstanceSlow(Instance space, boolean inside) { + gl.glPushMatrix(); translateToCoordinatesystem(space); ! drawSpace(space.getProto(), inside || space == active); ! gl.glPopMatrix(); ! } ! ! private static void drawInstance(Instance space, boolean inside) { ! if (Project.useDisplayLists()) { ! if (selecting()) { ! push(space); ! } ! drawInstanceFast(space, inside); ! if (selecting()) { ! pop(); } + } else { + drawInstanceOriginal(space, inside); } + } + + private static void drawInstanceOriginal(Instance space, boolean inside) { + gl.glPushMatrix(); + translateToCoordinatesystem(space); boolean activeSet = false; if (selecting()) { *************** *** 977,988 **** } } - - if (USEDL && inside) { - //will only reach here if a displaylist are being generated - gl.glEndList(); - } gl.glPopMatrix(); } ! private static void drawSpace(Space space, boolean inside) { Set<Geometric> hidden = new HashSet(); --- 1017,1023 ---- } } gl.glPopMatrix(); } ! private static void drawSpace(Space space, boolean inside) { Set<Geometric> hidden = new HashSet(); *************** *** 994,997 **** --- 1029,1038 ---- Collection<Vertex> vertices = new LinkedList(); Collection<Constructor> constructors = new LinkedList(); + + boolean displayEdges = true; + + if (mode == View.LIGHTING_MODE) { + displayEdges = edgesEnabled; + } boolean interior; *************** *** 1051,1055 **** } ! if (edgesEnabled) { Set<Edge> visible = new HashSet(); for (Surface current : surfaces) { --- 1092,1096 ---- } ! if (displayEdges) { Set<Edge> visible = new HashSet(); for (Surface current : surfaces) { *************** *** 1068,1074 **** } } - - // FIXME the set of edges not connected - // to a surface should be cashed. Set<Edge> mark = new HashSet(); for (Surface current : space.getSurfaces()) { --- 1109,1112 ---- *************** *** 1225,1229 **** long stime = ts1 - ts0; long etime = te1 - te0; ! if (overall > 1000) { System.out.println(space + " all: " + overall); System.out.println("c: " + ctime + " s: " + stime + " e: " + etime); --- 1263,1267 ---- long stime = ts1 - ts0; long etime = te1 - te0; ! if (overall > 100) { System.out.println(space + " all: " + overall); System.out.println("c: " + ctime + " s: " + stime + " e: " + etime); Index: PopupMenu.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/PopupMenu.java,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** PopupMenu.java 26 Feb 2010 13:48:12 -0000 1.41 --- PopupMenu.java 9 Mar 2010 13:01:53 -0000 1.42 *************** *** 1054,1058 **** /** {@inheritDoc} */ public JPopupMenu menuFor(Entity entity) { - System.out.println("get menu for " + entity); Collection<Entity> c = new LinkedList<Entity>(); c.add(entity); --- 1054,1057 ---- |
From: Michael L. <he...@us...> - 2010-03-05 10:43:42
|
Update of /cvsroot/bprocessor/facade/src/net/sourceforge/bprocessor/facade/modellor In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv29134/src/net/sourceforge/bprocessor/facade/modellor Modified Files: NetFacadeModellor.java Log Message: Index: NetFacadeModellor.java =================================================================== RCS file: /cvsroot/bprocessor/facade/src/net/sourceforge/bprocessor/facade/modellor/NetFacadeModellor.java,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** NetFacadeModellor.java 5 Feb 2010 13:32:46 -0000 1.50 --- NetFacadeModellor.java 5 Mar 2010 10:43:34 -0000 1.51 *************** *** 32,90 **** import net.sourceforge.bprocessor.model.modellor.Modellor; - import org.apache.log4j.Logger; - /** ! * The new facade modellor using nets. ! * */ public class NetFacadeModellor extends Modellor { - /** Thickness of a generic door frame */ private static final double DOOR_FRAME = 0.12; - - /** Thickness of a generic window frame */ private static final double WINDOW_FRAME = 0.05; - - /** identation of the window and door frames into the main frame*/ private static final double FRAME_IDENTATION = 0.02; - - /** The depth of window and door frames */ private static final double FRAME_DEPTH = 0.05; ! /** The classification id for exterior */ ! public static final String EXTERIOR = "-1.-80"; ! ! /** The classification id for window frames */ ! public static final String FRAME = "-1.-205.02.01.01"; ! ! /** The classification id for window glass */ ! public static final String GLASS = "-1.-205.02.01.02"; ! ! /** serial id */ private static final long serialVersionUID = 1L; - - /** The space of the facade */ private Space space; - - /** The frame space */ private Space frame; - - /** The net for this facade */ private Space net; - - /** The framewidth of the facade */ private double frameWidth = 0.045; - - /** The depth of the facade */ private double depth = 0.12; - - /** The front surface of the facade */ private Surface front; - - /** Is the facade single posted or not */ private boolean single = true; - /** The logger */ - private static Logger log = Logger.getLogger(NetFacadeModellor.class); - /** * Empty constructor for the net facade --- 32,56 ---- import net.sourceforge.bprocessor.model.modellor.Modellor; /** ! * Net Facade Modellor */ public class NetFacadeModellor extends Modellor { private static final double DOOR_FRAME = 0.12; private static final double WINDOW_FRAME = 0.05; private static final double FRAME_IDENTATION = 0.02; private static final double FRAME_DEPTH = 0.05; + private static final String EXTERIOR = "-1.-80"; ! private static final String FRAME = "-1.-205.02.01.01"; ! private static final String GLASS = "-1.-205.02.01.02"; private static final long serialVersionUID = 1L; private Space space; private Space frame; private Space net; private double frameWidth = 0.045; private double depth = 0.12; private Surface front; private boolean single = true; /** * Empty constructor for the net facade *************** *** 166,206 **** /** ! * Update when an entity changes ! * @param entity the changed entity */ public void update(Object entity) { ! if (this.isActive()) { ! boolean update = false; ! if (entity instanceof Geometric) { ! Geometric geo = (Geometric)entity; ! if (geo == net || geo.getOwner() == net) { ! update = true; ! } ! } ! if (!update && ! (entity == this || ! entity == Project.getInstance())) { ! update = true; ! } ! if (!space.getEnvelope().contains(front)) { ! update = false; ! } ! if (space.getModellor() != this) { //sanity check ! update = false; ! delete(); ! } ! if (update) { ! regenerate(); ! } ! } ! } ! ! /** ! * Delete this modellor ! */ ! public void delete() { ! Project.getInstance().removeObserver(this); ! if (space.getModellor() == this) { ! space.setModellor(null); } } --- 132,140 ---- /** ! * {@inheritDoc} */ public void update(Object entity) { ! if (isActive()) { ! regenerate(); } } *************** *** 209,220 **** * {@inheritDoc} */ ! public void getAttributes(List<Attribute> l) { ! l.add(new Attribute("Net", net, true)); ! l.add(new Attribute("Front", front, true)); if (single) { ! l.add(new Attribute("Framewidth", new Double(frameWidth), true)); ! l.add(new Attribute("Depth", new Double(depth), true)); } ! l.add(new Attribute("Single", Boolean.valueOf(single), true)); } --- 143,154 ---- * {@inheritDoc} */ ! public void getAttributes(List<Attribute> lst) { ! lst.add(new Attribute("Net", net, true)); ! lst.add(new Attribute("Front", front, true)); if (single) { ! lst.add(new Attribute("Framewidth", new Double(frameWidth), true)); ! lst.add(new Attribute("Depth", new Double(depth), true)); } ! lst.add(new Attribute("Single", Boolean.valueOf(single), true)); } *************** *** 231,241 **** setFrameWidth(((Double)a.getValue()).doubleValue()); } - a = attributes.get("Framewidth"); - if (a != null) { - setFrameWidth(((Double)a.getValue()).doubleValue()); - } a = attributes.get("Depth"); if (a != null) { ! setDepth(((Double)a.getValue()).doubleValue()); } a = attributes.get("Single"); --- 165,171 ---- setFrameWidth(((Double)a.getValue()).doubleValue()); } a = attributes.get("Depth"); if (a != null) { ! depth = ((Double)a.getValue()).doubleValue(); } a = attributes.get("Single"); *************** *** 264,287 **** } ! /** ! *@return the space ! */ ! public Space getSpace() { ! return space; ! } ! ! /** ! * Set the space of this modellor ! * @param space the space ! */ ! public void setSpace(Space space) { this.space = space; } ! /** ! * get the net of the modellor ! * @return the net of this modellor ! */ ! public Space getNet() { return this.net; } --- 194,202 ---- } ! private void setSpace(Space space) { this.space = space; } ! private Space getNet() { return this.net; } *************** *** 291,295 **** * @param net the net */ ! public void setNet(Space net) { if (net.isNet()) { if (this.net != null) { --- 206,210 ---- * @param net the net */ ! private void setNet(Space net) { if (net.isNet()) { if (this.net != null) { *************** *** 300,317 **** } } - - /** - * Gets the framewidth of the facade - * @return the frameWidth - */ - public double getFrameWidth() { - return frameWidth; - } ! /** ! * Sets the framewidth of the facade ! * @param frameWidth the framewidth ! */ ! public void setFrameWidth(double frameWidth) { this.frameWidth = frameWidth; for (Edge e : net.getEdges()) { --- 215,220 ---- } } ! private void setFrameWidth(double frameWidth) { this.frameWidth = frameWidth; for (Edge e : net.getEdges()) { *************** *** 590,597 **** first.getFrom().getEdges().contains(outline.getLast())) { return outline; - } else { - log.warn("Outline not well defined, " + - " outer edges left: " + outer.size() + - " outline connected: " + first.getFrom().getEdges().contains(outline.getLast())); } } --- 493,496 ---- *************** *** 616,620 **** * @return front surface */ ! public Surface getFront() { return front; } --- 515,519 ---- * @return front surface */ ! private Surface getFront() { return front; } *************** *** 624,628 **** * @param front the front surface */ ! public void setFront(Surface front) { this.front = front; setNet(createNet(front)); --- 523,527 ---- * @param front the front surface */ ! private void setFront(Surface front) { this.front = front; setNet(createNet(front)); *************** *** 695,714 **** s2.setBackDomain(sp2); } - } - - /** - * Gets the depth of the facade - * @return the depth of this facade - */ - public double getDepth() { - return depth; - } - - /** - * Set the facade depth - * @param depth the new depth - */ - public void setDepth(double depth) { - this.depth = depth; } --- 594,597 ---- *************** *** 725,729 **** * @param single if the facade should be single or not */ ! public void setSingle(boolean single) { this.single = single; } --- 608,612 ---- * @param single if the facade should be single or not */ ! private void setSingle(boolean single) { this.single = single; } *************** *** 740,851 **** } - private Set<Surface> generateFrame2(Surface cut, - Surface contourSurf, - Space frameSpace, - Vertex out) { - Set<Surface> generatedSurfaces = new HashSet<Surface>(); - if (contourSurf.getEdges().size() < 3) { - return generatedSurfaces; - } - if (!rightHand(contourSurf, out)) { - contourSurf.flip(); - } - List<Edge> contour = contourSurf.getEdges(); - - Edge first = contour.get(0); - Edge second = contour.get(1); - Vertex common = Edge.commonVertex(first, second); - Vertex unCommon = first.otherVertex(common); - Vertex firstDir = common.minus(unCommon); - if (cut.normal().dot(firstDir) > 0) { - cut.setFrontDomain(frameSpace); - } else { - cut.setBackDomain(frameSpace); - } - Vertex i = out.cross(firstDir); - firstDir.normalize(); - out.normalize(); - i.normalize(); - CoordinateSystem cs = new CoordinateSystem(i, out, firstDir, unCommon); - List<Edge> cutEdges = cut.getEdges(); - Geometry.unTranslateGeometry(Geometric.collect(cutEdges), cs); - - Edge current = first; - for (Edge next : contour) { - if (next == first) { - continue; - } - Collection<Surface> extrusion = makeExtrusion(current, next, cutEdges); - cutEdges = findNewCutEdges(cutEdges, extrusion); - generatedSurfaces.addAll(extrusion); - current = next; - } - Collection<Surface> extrusion = makeExtrusion(contour.get(contour.size() - 1), - first, cutEdges); - cutEdges = findNewCutEdges(cutEdges, extrusion); - for (int k = 0; k < cutEdges.size(); k++) { - Edge oldEdge = cut.getEdges().get(k); - for (Surface s : oldEdge.getSurfaces()) { - s.replace(oldEdge, cutEdges.get(k)); - } - } - generatedSurfaces.addAll(extrusion); - return generatedSurfaces; - } - - private static Collection<Surface> makeExtrusion(Edge e1, Edge e2, - List<Edge> cutEdges) { - double angle = Geometry.angle(e1, e2); - Vertex shared = Edge.commonVertex(e1, e2); - Vertex i = e2.otherVertex(shared).minus(shared); - Vertex j = e1.otherVertex(shared).minus(shared); - Vertex n = i.cross(j); - j = n.cross(i); - n.normalize(); - j.normalize(); - i.normalize(); - CoordinateSystem local = new CoordinateSystem(i, j, n, new Vertex(0, 0, 0)); - Vertex angleV = new Vertex(Math.sin(angle / 2), -Math.cos(angle / 2), 0); - angleV = local.unTranslate(angleV); - Plane plane = new Plane(angleV.getX(), angleV.getY(), angleV.getZ(), shared); - j.scaleIt(-1); - Collection<Surface> extrusion = Edge.extrude(cutEdges, j, plane); - return extrusion; - } - - private static List<Edge> findNewCutEdges(List<Edge> contour, Collection<Surface> extrusion) { - Map<Edge, Edge> old2new = new HashMap<Edge, Edge>(); - for (Surface s : extrusion) { - List<Edge> edges = s.getEdges(); - Edge contourEdge = null; - for (Edge e : edges) { - if (contour.contains(e)) { - contourEdge = e; - } - } - if (contourEdge == null) { - log.error("Surface: " + s + " was not extruded from contour: " + contour); - continue; - } - for (Edge e : edges) { - if (Edge.commonVertex(e, contourEdge) == null) { - old2new.put(contourEdge, e); - } - } - } - List<Edge> newContour = new LinkedList<Edge>(); - for (Edge old : contour) { - Edge edge = old2new.get(old); - if (edge != null) { - newContour.add(edge); - } else { - log.error("Contour edge: " + old + - " does not have an adjacent edge in: " + extrusion); - } - } - return newContour; - } - - /** * Generates a frame based an a surface descibing a cut of the frame --- 623,626 ---- *************** *** 1015,1017 **** --- 790,796 ---- return determinant > 0; } + + /** {@inheritDoc} */ + public void delete() { + } } |
From: Michael L. <he...@us...> - 2010-02-26 13:48:22
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv12243/src/net/sourceforge/bprocessor/gl/view Modified Files: Display.java PopupMenu.java Log Message: Index: Display.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/Display.java,v retrieving revision 1.101 retrieving revision 1.102 diff -C2 -d -r1.101 -r1.102 *** Display.java 5 Feb 2010 13:32:59 -0000 1.101 --- Display.java 26 Feb 2010 13:48:12 -0000 1.102 *************** *** 145,148 **** --- 145,156 ---- } } + + private static void enable(int what) { + gl.glEnable(what); + } + + private static void disable(int what) { + gl.glDisable(what); + } private static class TesselatorCallback extends GLUtessellatorCallbackAdapter { *************** *** 446,452 **** private static void paintStippled(Collection<Edge> edges, float[] color, float size) { if (!edges.isEmpty()) { ! gl.glEnable(GL.GL_LINE_STIPPLE); paintEdges(edges, color, size); ! gl.glDisable(GL.GL_LINE_STIPPLE); } } --- 454,460 ---- private static void paintStippled(Collection<Edge> edges, float[] color, float size) { if (!edges.isEmpty()) { ! enable(GL.GL_LINE_STIPPLE); paintEdges(edges, color, size); ! disable(GL.GL_LINE_STIPPLE); } } *************** *** 488,492 **** private static void paintSurfaces(Collection<Surface> surfaces, float[] color) { if (edgesEnabled) { ! gl.glEnable(GL.GL_POLYGON_OFFSET_FILL); gl.glPolygonOffset(1.0f, 1.0f); } --- 496,500 ---- private static void paintSurfaces(Collection<Surface> surfaces, float[] color) { if (edgesEnabled) { ! enable(GL.GL_POLYGON_OFFSET_FILL); gl.glPolygonOffset(1.0f, 1.0f); } *************** *** 498,502 **** } if (edgesEnabled) { ! gl.glDisable(GL.GL_POLYGON_OFFSET_FILL); } } --- 506,510 ---- } if (edgesEnabled) { ! disable(GL.GL_POLYGON_OFFSET_FILL); } } *************** *** 513,524 **** private static void paintSurfaces(Collection<Surface> surfaces, boolean transparency) { ! gl.glEnable(GL.GL_LIGHTING); gl.glShadeModel(GL.GL_SMOOTH); if (edgesEnabled) { ! gl.glEnable(GL.GL_POLYGON_OFFSET_FILL); gl.glPolygonOffset(1.0f, 1.0f); } ! gl.glEnable(GL.GL_CULL_FACE); gl.glCullFace(GL.GL_BACK); for (Surface current : surfaces) { --- 521,532 ---- private static void paintSurfaces(Collection<Surface> surfaces, boolean transparency) { ! enable(GL.GL_LIGHTING); gl.glShadeModel(GL.GL_SMOOTH); if (edgesEnabled) { ! enable(GL.GL_POLYGON_OFFSET_FILL); gl.glPolygonOffset(1.0f, 1.0f); } ! enable(GL.GL_CULL_FACE); gl.glCullFace(GL.GL_BACK); for (Surface current : surfaces) { *************** *** 543,550 **** } if (edgesEnabled) { ! gl.glDisable(GL.GL_POLYGON_OFFSET_FILL); } ! gl.glDisable(GL.GL_CULL_FACE); ! gl.glDisable(GL.GL_LIGHTING); } --- 551,558 ---- } if (edgesEnabled) { ! disable(GL.GL_POLYGON_OFFSET_FILL); } ! disable(GL.GL_CULL_FACE); ! disable(GL.GL_LIGHTING); } *************** *** 663,670 **** private static void paint(Line line, float[] color) { gl.glLineWidth(1.0f); ! gl.glEnable(GL.GL_LINE_STIPPLE); gl.glColor3fv(color, 0); draw(line); ! gl.glDisable(GL.GL_LINE_STIPPLE); } --- 671,678 ---- private static void paint(Line line, float[] color) { gl.glLineWidth(1.0f); ! enable(GL.GL_LINE_STIPPLE); gl.glColor3fv(color, 0); draw(line); ! disable(GL.GL_LINE_STIPPLE); } *************** *** 736,740 **** Vertex direction = to.minus(from); double dist = direction.length() * 16; ! gl.glEnable(GL.GL_LIGHTING); GLUquadric quad = glu.gluNewQuadric(); glu.gluQuadricNormals(quad, GLU.GLU_SMOOTH); --- 744,748 ---- Vertex direction = to.minus(from); double dist = direction.length() * 16; ! enable(GL.GL_LIGHTING); GLUquadric quad = glu.gluNewQuadric(); glu.gluQuadricNormals(quad, GLU.GLU_SMOOTH); *************** *** 746,750 **** glu.gluCylinder(quad, (dist / 90), 0, (dist / 20), 10, 10); gl.glPopMatrix(); ! gl.glDisable(GL.GL_LIGHTING); } --- 754,758 ---- glu.gluCylinder(quad, (dist / 90), 0, (dist / 20), 10, 10); gl.glPopMatrix(); ! disable(GL.GL_LIGHTING); } *************** *** 788,794 **** for (Edge current : lines) { if (current.getStrippled()) { ! gl.glEnable(GL.GL_LINE_STIPPLE); draw(current); ! gl.glDisable(GL.GL_LINE_STIPPLE); } else { draw(current); --- 796,802 ---- for (Edge current : lines) { if (current.getStrippled()) { ! enable(GL.GL_LINE_STIPPLE); draw(current); ! disable(GL.GL_LINE_STIPPLE); } else { draw(current); *************** *** 1006,1010 **** } } ! long t0 = System.currentTimeMillis(); long tc0 = System.currentTimeMillis(); --- 1014,1018 ---- } } ! long t0 = System.currentTimeMillis(); long tc0 = System.currentTimeMillis(); *************** *** 1121,1125 **** // Geometry rendering ! gl.glEnable(GL.GL_DEPTH_TEST); if (selecting()) { --- 1129,1133 ---- // Geometry rendering ! enable(GL.GL_DEPTH_TEST); if (selecting()) { *************** *** 1195,1199 **** } ! gl.glDisable(GL.GL_DEPTH_TEST); if (selecting()) { --- 1203,1207 ---- } ! disable(GL.GL_DEPTH_TEST); if (selecting()) { *************** *** 1258,1265 **** private static void hilite(Collection<Geometric> geometrics) { ! gl.glEnable(GL.GL_DEPTH_TEST); gl.glColor3fv(View.SELECTED_COLOR, 0); gl.glLineWidth(3.0f); ! gl.glEnable(GL.GL_POLYGON_STIPPLE); gl.glPolygonStipple(highlight, 0); --- 1266,1274 ---- private static void hilite(Collection<Geometric> geometrics) { ! enable(GL.GL_DEPTH_TEST); ! gl.glColor3fv(View.SELECTED_COLOR, 0); gl.glLineWidth(3.0f); ! enable(GL.GL_POLYGON_STIPPLE); gl.glPolygonStipple(highlight, 0); *************** *** 1280,1288 **** Item space = (Item) current; Collection<Edge> edges = space.hiliteEdges(); ! paintEdges(edges, View.SELECTED_COLOR, 2.0f); } } ! gl.glEnable(GL.GL_LINE_STIPPLE); gl.glLineWidth(3.0f); for (Geometric current : geometrics) { --- 1289,1299 ---- Item space = (Item) current; Collection<Edge> edges = space.hiliteEdges(); ! gl.glDepthMask(false); ! paintEdges(edges, View.SELECTED_COLOR, 5.0f); ! gl.glDepthMask(true); } } ! enable(GL.GL_LINE_STIPPLE); gl.glLineWidth(3.0f); for (Geometric current : geometrics) { *************** *** 1291,1298 **** } } ! gl.glDisable(GL.GL_LINE_STIPPLE); ! gl.glDisable(GL.GL_POLYGON_STIPPLE); ! gl.glDisable(GL.GL_DEPTH_TEST); for (Geometric current : geometrics) { --- 1302,1309 ---- } } ! disable(GL.GL_LINE_STIPPLE); ! disable(GL.GL_POLYGON_STIPPLE); ! disable(GL.GL_DEPTH_TEST); for (Geometric current : geometrics) { *************** *** 1332,1340 **** } } ! gl.glEnable(GL.GL_LINE_STIPPLE); for (Edge edge : stippled) { draw(edge); } ! gl.glDisable(GL.GL_LINE_STIPPLE); } --- 1343,1351 ---- } } ! enable(GL.GL_LINE_STIPPLE); for (Edge edge : stippled) { draw(edge); } ! disable(GL.GL_LINE_STIPPLE); } *************** *** 1395,1398 **** --- 1406,1432 ---- Space world = project.world(); grid = world.getGrid(); + + if (!selecting()) { + disableClipplanes(); + Collection<Geometric> geometrics = new HashSet(); + geometrics.addAll(Selection.primary()); + if (target != null) { + Collection<Geometric> hilite = new HashSet(); + hilite.add(target); + hilite(hilite); + } + if (active.isInstance()) { + gl.glPushMatrix(); + translateToCoordinatesystem((Instance) active); + } + + hilite(geometrics); + + if (active.isInstance()) { + gl.glPopMatrix(); + } + enableClipplanes(); + } + draw(world, world == active); *************** *** 1450,1474 **** } ! if (!selecting()) { ! disableClipplanes(); ! Collection<Geometric> geometrics = new HashSet(); ! geometrics.addAll(Selection.primary()); ! if (target != null) { ! Collection<Geometric> hilite = new HashSet(); ! hilite.add(target); ! hilite(hilite); ! } ! if (active.isInstance()) { ! gl.glPushMatrix(); ! translateToCoordinatesystem((Instance) active); ! } ! ! hilite(geometrics); ! ! if (active.isInstance()) { ! gl.glPopMatrix(); ! } ! enableClipplanes(); ! } } } --- 1484,1488 ---- } ! } } Index: PopupMenu.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/PopupMenu.java,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** PopupMenu.java 25 Feb 2010 14:43:52 -0000 1.40 --- PopupMenu.java 26 Feb 2010 13:48:12 -0000 1.41 *************** *** 402,405 **** --- 402,409 ---- AbstractAction action = new SpaceMenuAction(sp, "Make Component") { public void actionPerformed(ActionEvent event) { + CoordinateSystem system = space.getHandle(); + if (system == null) { + space.add(Project.getInstance().getActiveCoordinateSystem().copy()); + } Component component = new Component(space); space.getOwner().remove(space); |
From: Michael L. <he...@us...> - 2010-02-26 13:48:17
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv12225/src/net/sourceforge/bprocessor/model Modified Files: Space.java Log Message: Index: Space.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Space.java,v retrieving revision 1.248 retrieving revision 1.249 diff -C2 -d -r1.248 -r1.249 *** Space.java 13 Jan 2010 10:58:34 -0000 1.248 --- Space.java 26 Feb 2010 13:48:09 -0000 1.249 *************** *** 560,564 **** return current; } ! return Project.getInstance().getActiveCoordinateSystem().copy(); } --- 560,564 ---- return current; } ! return null; } |
From: Michael L. <he...@us...> - 2010-02-25 15:55:16
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/attrview In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv10167/src/net/sourceforge/bprocessor/gui/attrview Modified Files: StringAttribute.java GenericPanel.java Log Message: Index: StringAttribute.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/attrview/StringAttribute.java,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** StringAttribute.java 9 Sep 2009 12:51:35 -0000 1.20 --- StringAttribute.java 25 Feb 2010 14:43:55 -0000 1.21 *************** *** 282,286 **** Stack stack = new Stack(); function.evaluate(env, stack); - System.out.println("stack contains " + stack.size() + " elements"); Object o = stack.pop(); if (o instanceof Double) { --- 282,285 ---- *************** *** 296,300 **** log.error(error); } - //attribute.setValue(Double.valueOf(editor.getText()) / 1000); } component.remove(editor); --- 295,298 ---- Index: GenericPanel.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/attrview/GenericPanel.java,v retrieving revision 1.55 retrieving revision 1.56 diff -C2 -d -r1.55 -r1.56 *** GenericPanel.java 18 Sep 2009 09:09:02 -0000 1.55 --- GenericPanel.java 25 Feb 2010 14:43:55 -0000 1.56 *************** *** 264,268 **** */ public void stopEditing() { - System.out.println("stop editing"); if (current != null) { current.stopEditing(); --- 264,267 ---- *************** *** 378,381 **** --- 377,381 ---- //FIXME need to delay call to a reasonable time content.removeAll(); + genAttributes.clear(); generateContentFor(obj); revalidate(); |
From: Michael L. <he...@us...> - 2010-02-25 14:44:04
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/modellor In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv10124/src/net/sourceforge/bprocessor/model/modellor Removed Files: TileModellor.java WallPartingModellor.java InnerWallModellor.java ModelBathModellor2.java Log Message: --- TileModellor.java DELETED --- --- WallPartingModellor.java DELETED --- --- InnerWallModellor.java DELETED --- --- ModelBathModellor2.java DELETED --- |
From: Michael L. <he...@us...> - 2010-02-25 14:44:00
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv10148/src/net/sourceforge/bprocessor/gl/view Modified Files: PopupMenu.java Log Message: Index: PopupMenu.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/PopupMenu.java,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** PopupMenu.java 12 Feb 2010 11:44:24 -0000 1.39 --- PopupMenu.java 25 Feb 2010 14:43:52 -0000 1.40 *************** *** 360,364 **** menu.add(action); } - menu.add(getFrameMenu(sp)); { AbstractAction action = new SpaceMenuAction(sp, "Frame..") { --- 360,363 ---- *************** *** 894,920 **** } - private JMenu getFrameMenu(Space net) { - JMenu menu = new JMenu("Frame"); - { - AbstractAction action = new SpaceMenuAction(net, "Initialize Frame") { - public void actionPerformed(ActionEvent e) { - Command command = new Command.InitializeFrame(space); - AttributeView.instance().display(command); - } - }; - menu.add(action); - } - { - AbstractAction action = new SpaceMenuAction(net, "Render Frame") { - public void actionPerformed(ActionEvent e) { - Command command = new Command.RenderFrame(space); - AttributeView.instance().display(command); - } - }; - menu.add(action); - } - return menu; - } - /** * --- 893,896 ---- |
From: Michael L. <he...@us...> - 2010-02-25 14:43:56
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv10124/src/net/sourceforge/bprocessor/model Modified Files: Command.java Project.java Log Message: Index: Command.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Command.java,v retrieving revision 1.81 retrieving revision 1.82 diff -C2 -d -r1.81 -r1.82 *** Command.java 12 Feb 2010 11:44:28 -0000 1.81 --- Command.java 25 Feb 2010 14:43:48 -0000 1.82 *************** *** 2154,2280 **** * */ - public static class InitializeFrame extends Command { - - /** - * Initialize Net - * @param net Container - */ - public InitializeFrame(Space net) { - parameters.put("net", net); - parameters.put("frame-width", 0.4); - parameters.put("interior-width", 0.1); - parameters.put("depth", 1.0); - } - - /** {@inheritDoc} */ - @Override - public void evaluate() { - Space net = (Space) parameters.get("net"); - double frameWidth = parameters.getDouble("frame-width"); - double interiorWidth = parameters.getDouble("interior-width"); - double depth = parameters.getDouble("depth"); - ParameterBlock block = new ParameterBlock(); - block.put("frame-width", frameWidth); - block.put("interior-width", interiorWidth); - block.put("depth", depth); - net.setParameters(block); - Collection<Surface> surfaces = net.getSurfaces(); - Collection<Edge> edges = Surface.edges(surfaces); - Inverse inv = new Inverse(surfaces); - List<Edge> frame = new LinkedList(); - List<Edge> interior = new LinkedList(); - for (Edge current : edges) { - List<Surface> adjacent = inv.surfaces(current); - if (adjacent.size() == 1) { - frame.add(current); - } else { - interior.add(current); - } - } - for (Edge current : frame) { - ParameterBlock parms = new ParameterBlock(); - parms.put("width", frameWidth); - current.setParameters(parms); - } - for (Edge current : interior) { - ParameterBlock parms = new ParameterBlock(); - parms.put("width", interiorWidth); - current.setParameters(parms); - } - } - } - - /** - * - */ - public static class RenderFrame extends Command { - - /** - * Render Frame - * @param net Container - */ - public RenderFrame(Space net) { - parameters.put("net", net); - } - - /** {@inheritDoc} */ - @Override - public void evaluate() { - Space net = (Space) parameters.get("net"); - ParameterBlock block = net.getParameters(); - System.out.println("block " + block); - - Collection<Surface> surfaces = net.getSurfaces(); - Inverse inv = new Inverse(surfaces); - List<Edge> boundary = new LinkedList(); - for (Edge current : inv.edges()) { - List<Surface> adjacent = inv.surfaces(current); - if (adjacent.size() == 1) { - boundary.add(current); - } - } - boundary = Offset.order(boundary); - Map map = new HashMap(); - - List<Edge> edges = new LinkedList(); - for (Edge current : boundary) { - edges.add((Edge) current.copy(map)); - } - - Map<Edge, Double> distances = new HashMap(); - { - double distance = block.getDouble("frame-width"); - for (Edge current : boundary) { - ParameterBlock params = current.getParameters(); - double d = distance; - if (params != null) { - Double param = (Double) params.get("width"); - if (param != null) { - d = param.doubleValue(); - } - } - Edge edge = (Edge) map.get(current); - distances.put(edge, d); - } - } - Offset.offsetIt(edges, distances); - - Collection<Vertex> vertices = Edge.vertices(edges); - - Space union = Item.createUnion("Frame"); - for (Vertex current : vertices) { - union.add(current); - } - for (Edge current : edges) { - union.add(current); - } - Project.getInstance().getActiveSpace().add(union); - Project.getInstance().changed(Project.getInstance()); - } - } - - /** - * - */ public static class InsertFrame extends Command { --- 2154,2157 ---- Index: Project.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Project.java,v retrieving revision 1.185 retrieving revision 1.186 diff -C2 -d -r1.185 -r1.186 *** Project.java 12 Feb 2010 11:44:28 -0000 1.185 --- Project.java 25 Feb 2010 14:43:48 -0000 1.186 *************** *** 49,56 **** import net.sourceforge.bprocessor.model.brunata.io.XMLDocument; import net.sourceforge.bprocessor.model.brunata.io.DocumentParser; - import net.sourceforge.bprocessor.model.modellor.InnerWallModellor; - import net.sourceforge.bprocessor.model.modellor.ModelBathModellor2; - import net.sourceforge.bprocessor.model.modellor.Modellor; - import net.sourceforge.bprocessor.model.modellor.TileModellor; import net.sourceforge.bprocessor.model.sense.SensorItem; import net.sourceforge.bprocessor.model.xml.Bmodel; --- 49,52 ---- *************** *** 512,518 **** globals.putDouble("brick", 0.12); globals.putDouble("roof", 0.07); - Modellor.registerModellor(new TileModellor(null)); - Modellor.registerModellor(new InnerWallModellor()); - Modellor.registerModellor(new ModelBathModellor2()); sensor = new Sensor(); if (SENSE) { --- 508,511 ---- |
From: Michael L. <he...@us...> - 2010-02-25 14:43:51
|
Update of /cvsroot/bprocessor/facade/src/net/sourceforge/bprocessor/facade/modellor In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv10106/src/net/sourceforge/bprocessor/facade/modellor Removed Files: FacadeModellor.java Log Message: --- FacadeModellor.java DELETED --- |
From: Michael L. <he...@us...> - 2010-02-25 14:43:51
|
Update of /cvsroot/bprocessor/facade/src/net/sourceforge/bprocessor/facade In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv10106/src/net/sourceforge/bprocessor/facade Modified Files: FacadeMain.java Log Message: Index: FacadeMain.java =================================================================== RCS file: /cvsroot/bprocessor/facade/src/net/sourceforge/bprocessor/facade/FacadeMain.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** FacadeMain.java 15 Apr 2007 11:05:02 -0000 1.9 --- FacadeMain.java 25 Feb 2010 14:43:42 -0000 1.10 *************** *** 7,22 **** package net.sourceforge.bprocessor.facade; - import net.sourceforge.bprocessor.facade.modellor.FacadeModellor; import net.sourceforge.bprocessor.facade.modellor.NetFacadeModellor; import net.sourceforge.bprocessor.model.modellor.Modellor; - import org.apache.log4j.Logger; - /** The facade main class */ public class FacadeMain { - /** The logger */ - private static Logger log = Logger.getLogger(FacadeMain.class); /** --- 7,17 ---- *************** *** 24,30 **** */ public FacadeMain () { - Modellor.registerModellor(new FacadeModellor()); Modellor.registerModellor(new NetFacadeModellor()); - } } --- 19,23 ---- |