bprocessor-commit Mailing List for B-processor (Page 20)
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...> - 2009-05-14 13:16:48
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv1783/src/net/sourceforge/bprocessor/gl/view Modified Files: Display.java Log Message: Made Grid a Constructor Index: Display.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/Display.java,v retrieving revision 1.86 retrieving revision 1.87 diff -C2 -d -r1.86 -r1.87 *** Display.java 4 Feb 2009 15:09:41 -0000 1.86 --- Display.java 14 May 2009 12:28:09 -0000 1.87 *************** *** 28,31 **** --- 28,32 ---- import net.sourceforge.bprocessor.gl.model.GlObject; + import net.sourceforge.bprocessor.model.Grid; import net.sourceforge.bprocessor.model.Material; import net.sourceforge.bprocessor.model.Space; *************** *** 146,190 **** } - - private static class Grid { - private Vertex origin; - private double size; - private double delta; - - /** - * - * - */ - public Grid() { - origin = new Vertex(0, 0, 0); - size = 200.0; - delta = 2.0; - } - - /** - * - * @return origin - */ - public Vertex origin() { - return origin; - } - - /** - * - * @return size - */ - public double size() { - return size; - } - - /** - * - * @return delta - */ - public double delta() { - return delta; - } - } - private static class TesselatorCallback extends GLUtessellatorCallbackAdapter { --- 147,150 ---- |
From: Michael L. <he...@us...> - 2009-05-14 13:16:46
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv1804/src/net/sourceforge/bprocessor/model Modified Files: Grid.java Log Message: Made Grid a Constructor Index: Grid.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Grid.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Grid.java 17 Dec 2007 13:09:16 -0000 1.2 --- Grid.java 14 May 2009 12:28:12 -0000 1.3 *************** *** 7,10 **** --- 7,11 ---- package net.sourceforge.bprocessor.model; + import java.util.LinkedList; import java.util.List; *************** *** 13,17 **** --- 14,46 ---- */ public class Grid extends Constructor { + private double size; + private double delta; + + /** + * + * + */ + public Grid() { + super(new Vertex(0, 0, 0)); + size = 40.0; + delta = 1.0; + } + /** + * + * @return size + */ + public double size() { + return size; + } + + /** + * + * @return delta + */ + public double delta() { + return delta; + } + /** {@inheritDoc} */ @Override *************** *** 21,34 **** /** {@inheritDoc} */ public List<Attribute> getAttributes() { ! return null; } /** {@inheritDoc} */ ! public String title() { ! return "Grid"; } /** {@inheritDoc} */ ! public void setAttributes(List<Attribute> attributes) { } } --- 50,63 ---- /** {@inheritDoc} */ public List<Attribute> getAttributes() { ! return new LinkedList(); } /** {@inheritDoc} */ ! public void setAttributes(List<Attribute> attributes) { } /** {@inheritDoc} */ ! public String title() { ! return "Grid"; } } |
From: Michael L. <he...@us...> - 2009-05-12 13:31:19
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv15818/src/net/sourceforge/bprocessor/model Modified Files: Container.java Log Message: Index: Container.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Container.java,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** Container.java 12 May 2009 12:11:33 -0000 1.23 --- Container.java 12 May 2009 12:19:05 -0000 1.24 *************** *** 1622,1626 **** for (Vertex v : verts) { int i = vmap.get(v); ! out.print(" " + i + "//"); } out.println(); --- 1622,1626 ---- for (Vertex v : verts) { int i = vmap.get(v); ! out.print(" " + i); } out.println(); |
From: Michael L. <he...@us...> - 2009-05-12 12:11:43
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv14414/src/net/sourceforge/bprocessor/model Modified Files: Container.java Log Message: Index: Container.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Container.java,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** Container.java 12 May 2009 11:51:19 -0000 1.22 --- Container.java 12 May 2009 12:11:33 -0000 1.23 *************** *** 1622,1626 **** for (Vertex v : verts) { int i = vmap.get(v); ! out.print(" " + i); } out.println(); --- 1622,1626 ---- for (Vertex v : verts) { int i = vmap.get(v); ! out.print(" " + i + "//"); } out.println(); |
From: Michael L. <he...@us...> - 2009-05-12 11:51:31
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv10030/src/net/sourceforge/bprocessor/model Modified Files: Project.java Container.java Log Message: export obj Index: Container.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Container.java,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** Container.java 4 May 2009 09:43:24 -0000 1.21 --- Container.java 12 May 2009 11:51:19 -0000 1.22 *************** *** 1597,1602 **** interior.orient(interior.getEnvelope().iterator().next()); interior.export(out); ! getOwner().add(holder); ! Project.getInstance().changed(Project.getInstance()); } --- 1597,1602 ---- interior.orient(interior.getEnvelope().iterator().next()); interior.export(out); ! //getOwner().add(holder); ! //Project.getInstance().changed(Project.getInstance()); } Index: Project.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Project.java,v retrieving revision 1.166 retrieving revision 1.167 diff -C2 -d -r1.166 -r1.167 *** Project.java 12 May 2009 11:02:03 -0000 1.166 --- Project.java 12 May 2009 11:51:19 -0000 1.167 *************** *** 11,14 **** --- 11,16 ---- import java.io.ByteArrayOutputStream; import java.io.File; + import java.io.FileNotFoundException; + import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; *************** *** 33,36 **** --- 35,40 ---- import java.util.StringTokenizer; + import javax.swing.SwingUtilities; + import net.sourceforge.bprocessor.model.bridge.Connection; import net.sourceforge.bprocessor.model.bridge.DataItem; *************** *** 99,102 **** --- 103,107 ---- private static boolean doDisplayGeometry; private static boolean doDebugGeometry; + private static boolean doExport; /** The cameras */ *************** *** 118,121 **** --- 123,128 ---- private boolean dirty; + private boolean isExporting; + /** The path to the current project */ private String savePath; *************** *** 147,150 **** --- 154,159 ---- /** The script of the Project */ private Description script; + + private String exportPath; /** The copy buffer */ *************** *** 317,320 **** --- 326,330 ---- super(); setName("new project"); + setExportPath("b-processor-export.obj"); script = new Description(""); undoStack = new Stack(); *************** *** 747,750 **** --- 757,772 ---- public void makeDirty() { dirty = true; + if (doExport) { + if (!isExporting) { + isExporting = true; + SwingUtilities.invokeLater( + new Runnable() { + public void run() { + export(); + } + } + ); + } + } } *************** *** 1011,1015 **** } else if (a.getName().equals("Debug Geometry")) { doDebugGeometry = ((Boolean) a.getValue()).booleanValue(); ! } } changed(this); --- 1033,1041 ---- } else if (a.getName().equals("Debug Geometry")) { doDebugGeometry = ((Boolean) a.getValue()).booleanValue(); ! } else if (a.getName().equals("Export")) { ! doExport = ((Boolean) a.getValue()).booleanValue(); ! } else if (a.getName().equals("Export Path")) { ! setExportPath((String)a.getValue()); ! } } changed(this); *************** *** 1026,1029 **** --- 1052,1057 ---- 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())); res.add(new Attribute("Script", script)); return res; *************** *** 1053,1056 **** --- 1081,1101 ---- } + + /** + * + * @return Export Path + */ + public String getExportPath() { + return exportPath; + } + + /** + * Set export path + * @param value new export path + */ + public void setExportPath(String value) { + exportPath = value; + } + /** * String representation of the object *************** *** 1615,1620 **** /** * */ ! public void exportOBJ() { List<Container> constructs = new LinkedList(); for (Space current : world.getElements()) { --- 1660,1667 ---- /** * + * @param out OutputStream */ ! public void exportOBJ(OutputStream out) { ! PrintStream printer = new PrintStream(out); List<Container> constructs = new LinkedList(); for (Space current : world.getElements()) { *************** *** 1628,1633 **** for (Container current : constructs) { System.out.println("-- " + current.getName() + " --"); ! current.exportTesselated(System.out); } } --- 1675,1699 ---- for (Container current : constructs) { System.out.println("-- " + current.getName() + " --"); ! current.exportTesselated(printer); ! } ! } ! ! /** ! * ! */ ! public void export() { ! System.out.println("export to " + getExportPath()); ! try { ! OutputStream out = new FileOutputStream(new File(getExportPath())); ! exportOBJ(out); ! out.close(); ! } catch (FileNotFoundException e) { ! // TODO Auto-generated catch block ! System.out.println("cannot export to " + getExportPath()); ! } catch (IOException e) { ! // TODO Auto-generated catch block ! System.out.println("cannot export to " + getExportPath()); } + isExporting = false; } |
From: Michael L. <he...@us...> - 2009-05-12 11:51:25
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv10046/src/net/sourceforge/bprocessor/gui Modified Files: GUI.java Log Message: export obj Index: GUI.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/GUI.java,v retrieving revision 1.107 retrieving revision 1.108 diff -C2 -d -r1.107 -r1.108 *** GUI.java 23 Apr 2009 08:17:42 -0000 1.107 --- GUI.java 12 May 2009 11:51:22 -0000 1.108 *************** *** 612,616 **** objExport.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { ! Project.getInstance().exportOBJ(); } }); --- 612,629 ---- 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); ! } ! } ! } }); |
From: Michael L. <he...@us...> - 2009-05-12 11:02:18
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv2027/src/net/sourceforge/bprocessor/model Modified Files: Project.java Log Message: New exporter for PPLM Index: Project.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Project.java,v retrieving revision 1.165 retrieving revision 1.166 diff -C2 -d -r1.165 -r1.166 *** Project.java 30 Apr 2009 11:55:08 -0000 1.165 --- Project.java 12 May 2009 11:02:03 -0000 1.166 *************** *** 1345,1352 **** } private Location createLocationModel(Container space, int level, ! Map<Surface, Location> locations, Map<Edge, List<Opening>> openings) { Location location = new Location(); ! location.setId(space.getName()); if (level == 1) { location.setDescription("Site"); --- 1345,1383 ---- } + + private List<Edge> bounds(List<Surface> surfaces) { + Command.Inverse inv = new Command.Inverse(surfaces); + Collection<Edge> soup = Surface.edges(surfaces); + List<Edge> loners = new LinkedList(); + for (Edge current : soup) { + List<Surface> lst = inv.surfaces(current); + if (lst.size() == 1) { + loners.add(current); + } + } + return Command.Offset.order(loners); + } + + private List<Location> createLocationModel(Container space, int level, + Map<Surface, Location> locations, Map<Edge, List<Opening>> openings) { + List<Location> locs = new LinkedList(); + List<Surface> envelope = new LinkedList(space.getEnvelope()); + int no = 0; + if (envelope.size() > 0) { + for (Surface current : envelope) { + no++; + locs.add(createLocationModel(space, level, locations, openings, current, no)); + } + } else { + locs.add(createLocationModel(space, level, locations, openings, null, no)); + } + return locs; + } + private Location createLocationModel(Container space, int level, ! Map<Surface, Location> locations, Map<Edge, List<Opening>> openings, ! Surface surface, int no) { Location location = new Location(); ! location.setId(space.getName() + no); if (level == 1) { location.setDescription("Site"); *************** *** 1359,1440 **** } ! { ! Set<Surface> envelope = space.getEnvelope(); ! ! if (envelope.size() == 1) { ! Surface surface = envelope.iterator().next(); ! List<Edge> all = new LinkedList(surface.getEdges()); ! List<Vertex> vertices = surface.getVertices(); ! Boundary boundary = new Boundary(convert(vertices)); ! location.setExternalBoundary(boundary); ! ! { ! List<Surface> holes = new LinkedList(surface.getHoles()); ! if (holes.size() > 0) { ! Command.Inverse inv = new Command.Inverse(holes); ! Collection<Edge> soup = Surface.edges(holes); ! List<Edge> loners = new LinkedList(); ! for (Edge current : soup) { ! List<Surface> lst = inv.surfaces(current); ! if (lst.size() == 1) { ! loners.add(current); ! } } ! ! all.addAll(loners); ! ! List<List<Edge>> internals = new LinkedList(); ! Set<Edge> bag = new HashSet(loners); ! while (!bag.isEmpty()) { ! List<Edge> partition = new LinkedList(); ! Queue<Edge> queue = new LinkedList(); ! Edge leader = bag.iterator().next(); ! bag.remove(leader); ! queue.add(leader); ! partition.add(leader); ! while (!queue.isEmpty()) { ! Edge current = queue.remove(); ! List<Edge> fl = inv.edges(current.from); ! List<Edge> tl = inv.edges(current.to); ! List<Edge> lst = new LinkedList(); ! lst.addAll(fl); ! lst.addAll(tl); ! for (Edge adjacant : lst) { ! if (bag.contains(adjacant)) { ! bag.remove(adjacant); ! partition.add(adjacant); ! queue.add(adjacant); ! } } } - internals.add(partition); - } - for (List<Edge> partition : internals) { - List<Edge> internal = Command.Offset.order(partition); - List<Vertex> verts = Command.Offset.vertices(internal); - Boundary b = new Boundary(convert(verts)); - location.addInternalBoundary(b); } } ! } ! ! ! locations.put(surface, location); ! int count = 1; ! for (Edge edge : all) { ! if (edge.isSmooth()) { ! Segment segment = convert(edge); ! segment = find(location, segment); ! Opening opening = new Opening(); ! opening.setId(String.valueOf(count++)); ! opening.setDistance(0.0); ! opening.setWidth(segment.getLength()); ! opening.setSegment(segment); ! location.addOpening(opening); ! List<Opening> lst = openings.get(edge); ! lst.add(opening); } } } } --- 1390,1474 ---- } ! if (surface != null) { ! List<Edge> all = new LinkedList(surface.getEdges()); ! List<Vertex> vertices = surface.getVertices(); ! ! { ! Vertex first = vertices.get(0); ! double z = first.getZ(); ! location.setFloor(z); ! location.setHeight(4); ! } ! ! Boundary boundary = new Boundary(convert(vertices)); ! location.setExternalBoundary(boundary); ! ! { ! List<Surface> holes = new LinkedList(surface.getHoles()); ! if (holes.size() > 0) { ! Command.Inverse inv = new Command.Inverse(holes); ! Collection<Edge> soup = Surface.edges(holes); ! List<Edge> loners = new LinkedList(); ! for (Edge current : soup) { ! List<Surface> lst = inv.surfaces(current); ! if (lst.size() == 1) { ! loners.add(current); } ! } ! ! all.addAll(loners); ! ! List<List<Edge>> internals = new LinkedList(); ! Set<Edge> bag = new HashSet(loners); ! while (!bag.isEmpty()) { ! List<Edge> partition = new LinkedList(); ! Queue<Edge> queue = new LinkedList(); ! Edge leader = bag.iterator().next(); ! bag.remove(leader); ! queue.add(leader); ! partition.add(leader); ! while (!queue.isEmpty()) { ! Edge current = queue.remove(); ! List<Edge> fl = inv.edges(current.from); ! List<Edge> tl = inv.edges(current.to); ! List<Edge> lst = new LinkedList(); ! lst.addAll(fl); ! lst.addAll(tl); ! for (Edge adjacant : lst) { ! if (bag.contains(adjacant)) { ! bag.remove(adjacant); ! partition.add(adjacant); ! queue.add(adjacant); } } } + internals.add(partition); } ! for (List<Edge> partition : internals) { ! List<Edge> internal = Command.Offset.order(partition); ! List<Vertex> verts = Command.Offset.vertices(internal); ! Boundary b = new Boundary(convert(verts)); ! location.addInternalBoundary(b); } } } + + + locations.put(surface, location); + int count = 1; + for (Edge edge : all) { + if (edge.isSmooth()) { + Segment segment = convert(edge); + segment = find(location, segment); + Opening opening = new Opening(); + opening.setId(String.valueOf(count++)); + opening.setDistance(0.0); + opening.setWidth(segment.getLength()); + opening.setSegment(segment); + location.addOpening(opening); + List<Opening> lst = openings.get(edge); + lst.add(opening); + } + } } *************** *** 1451,1456 **** for (Space element : space.getElements()) { if (!element.isVoid()) { ! Location child = createLocationModel((Container) element, level + 1, s2l, e2o); ! location.addChild(child); } } --- 1485,1492 ---- for (Space element : space.getElements()) { if (!element.isVoid()) { ! List<Location> children = createLocationModel((Container) element, level + 1, s2l, e2o); ! for (Location child : children) { ! location.addChild(child); ! } } } *************** *** 1569,1573 **** public void exportPPLM(OutputStream out) { world().setName(getName()); ! Location root = createLocationModel(world(), 1, new HashMap(), new HashMap()); LocationModel model = new LocationModel(); model.setLocation(root); --- 1605,1610 ---- public void exportPPLM(OutputStream out) { world().setName(getName()); ! List<Location> roots = createLocationModel(world(), 1, new HashMap(), new HashMap()); ! Location root = roots.get(0); LocationModel model = new LocationModel(); model.setLocation(root); |
From: Michael L. <he...@us...> - 2009-05-04 09:43:35
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv10019/src/net/sourceforge/bprocessor/model Modified Files: Space.java Container.java Log Message: implementing the closed operation on space Index: Space.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Space.java,v retrieving revision 1.238 retrieving revision 1.239 diff -C2 -d -r1.238 -r1.239 *** Space.java 3 Nov 2008 14:26:18 -0000 1.238 --- Space.java 4 May 2009 09:43:24 -0000 1.239 *************** *** 17,20 **** --- 17,21 ---- import java.util.List; import java.util.Map; + import java.util.Queue; import java.util.Set; *************** *** 459,462 **** --- 460,504 ---- /** + * + * @return true if closed + */ + public boolean closed() { + List<Surface> envelope = new LinkedList(getEnvelope()); + if (!envelope.isEmpty()) { + Surface leader = envelope.iterator().next(); + Command.Inverse inv = new Command.Inverse(envelope); + Set<Surface> mark = new HashSet(); + Queue<Surface> queue = new LinkedList(); + queue.add(leader); + mark.add(leader); + while (!queue.isEmpty()) { + Surface current = queue.remove(); + for (Edge edge : current.getEdges()) { + List<Surface> lst = inv.surfaces(edge); + for (Surface adjacent : lst) { + if (!mark.contains(adjacent)) { + mark.add(adjacent); + queue.add(adjacent); + } + } + } + } + + List<Surface> unreachable = new LinkedList(); + for (Surface current : envelope) { + if (!mark.contains(current)) { + unreachable.add(current); + } + } + + System.out.println("unreach: " + unreachable.size()); + + return (unreachable.size() < 0); + } else { + return false; + } + } + + /** * Notify that this Space has changed * FIXME: Make the change-update mechanism general *************** *** 574,577 **** --- 616,620 ---- res.add(new Attribute("Material", new Reference(material(), materials))); res.add(new Attribute("Euler", Double.valueOf(eulerCharacteristic()))); + res.add(new Attribute("Closed", Boolean.valueOf(closed()))); res.add(new Attribute("Description", getDescription())); if (getModellor() != null) { Index: Container.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Container.java,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** Container.java 21 Apr 2009 10:21:21 -0000 1.20 --- Container.java 4 May 2009 09:43:24 -0000 1.21 *************** *** 1518,1521 **** --- 1518,1523 ---- } + + /** * |
From: Michael L. <he...@us...> - 2009-04-30 11:55:22
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv1005/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.164 retrieving revision 1.165 diff -C2 -d -r1.164 -r1.165 *** Project.java 23 Apr 2009 08:17:46 -0000 1.164 --- Project.java 30 Apr 2009 11:55:08 -0000 1.165 *************** *** 1309,1316 **** } private Segment find(Location location, Segment segment) { ! Boundary boundary = location.getExternalBoundary(); ! for (Segment current : boundary.getSegments()) { ! if (eq(current, segment)) { ! return current; } } --- 1309,1320 ---- } private Segment find(Location location, Segment segment) { ! List<Boundary> all = new LinkedList(); ! all.add(location.getExternalBoundary()); ! all.addAll(location.getInternalBoundaries()); ! for (Boundary boundary : all) { ! for (Segment current : boundary.getSegments()) { ! if (eq(current, segment)) { ! return current; ! } } } *************** *** 1357,1362 **** --- 1361,1368 ---- { Set<Surface> envelope = space.getEnvelope(); + if (envelope.size() == 1) { Surface surface = envelope.iterator().next(); + List<Edge> all = new LinkedList(surface.getEdges()); List<Vertex> vertices = surface.getVertices(); Boundary boundary = new Boundary(convert(vertices)); *************** *** 1376,1379 **** --- 1382,1387 ---- } + all.addAll(loners); + List<List<Edge>> internals = new LinkedList(); Set<Edge> bag = new HashSet(loners); *************** *** 1414,1418 **** locations.put(surface, location); int count = 1; ! for (Edge edge : surface.getEdges()) { if (edge.isSmooth()) { Segment segment = convert(edge); --- 1422,1426 ---- locations.put(surface, location); int count = 1; ! for (Edge edge : all) { if (edge.isSmooth()) { Segment segment = convert(edge); *************** *** 1448,1452 **** --- 1456,1464 ---- } for (Edge edge : smoothies) { + System.out.println(edge + " is smooth"); List<Opening> lst = e2o.get(edge); + for (Opening opening : lst) { + System.out.println(" " + opening); + } if (lst.size() == 2) { Opening from = lst.get(0); |
From: Michael L. <he...@us...> - 2009-04-30 11:55:10
|
Update of /cvsroot/bprocessor/tools/perpos In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv974/perpos Modified Files: routefinding.jar Log Message: Index: routefinding.jar =================================================================== RCS file: /cvsroot/bprocessor/tools/perpos/routefinding.jar,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 Binary files /tmp/cvsKJps55 and /tmp/cvszbVLx0 differ |
From: Michael L. <he...@us...> - 2009-04-23 08:18:02
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv28042/src/net/sourceforge/bprocessor/model Modified Files: Project.java Log Message: Export of PPLM Index: Project.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Project.java,v retrieving revision 1.163 retrieving revision 1.164 diff -C2 -d -r1.163 -r1.164 *** Project.java 21 Apr 2009 10:21:21 -0000 1.163 --- Project.java 23 Apr 2009 08:17:46 -0000 1.164 *************** *** 28,31 **** --- 28,32 ---- import java.util.List; import java.util.Map; + import java.util.Queue; import java.util.Set; import java.util.Stack; *************** *** 1361,1364 **** --- 1362,1415 ---- Boundary boundary = new Boundary(convert(vertices)); location.setExternalBoundary(boundary); + + { + List<Surface> holes = new LinkedList(surface.getHoles()); + if (holes.size() > 0) { + Command.Inverse inv = new Command.Inverse(holes); + Collection<Edge> soup = Surface.edges(holes); + List<Edge> loners = new LinkedList(); + for (Edge current : soup) { + List<Surface> lst = inv.surfaces(current); + if (lst.size() == 1) { + loners.add(current); + } + } + + List<List<Edge>> internals = new LinkedList(); + Set<Edge> bag = new HashSet(loners); + while (!bag.isEmpty()) { + List<Edge> partition = new LinkedList(); + Queue<Edge> queue = new LinkedList(); + Edge leader = bag.iterator().next(); + bag.remove(leader); + queue.add(leader); + partition.add(leader); + while (!queue.isEmpty()) { + Edge current = queue.remove(); + List<Edge> fl = inv.edges(current.from); + List<Edge> tl = inv.edges(current.to); + List<Edge> lst = new LinkedList(); + lst.addAll(fl); + lst.addAll(tl); + for (Edge adjacant : lst) { + if (bag.contains(adjacant)) { + bag.remove(adjacant); + partition.add(adjacant); + queue.add(adjacant); + } + } + } + internals.add(partition); + } + for (List<Edge> partition : internals) { + List<Edge> internal = Command.Offset.order(partition); + List<Vertex> verts = Command.Offset.vertices(internal); + Boundary b = new Boundary(convert(verts)); + location.addInternalBoundary(b); + } + } + } + + locations.put(surface, location); int count = 1; *************** *** 1502,1513 **** /** * */ ! public void exportPPLM() { world().setName(getName()); Location root = createLocationModel(world(), 1, new HashMap(), new HashMap()); LocationModel model = new LocationModel(); model.setLocation(root); ! PrintStream out = System.out; ! PPLMPrinter printer = new PPLMPrinter(out); printer.printLocationModel(model); } --- 1553,1564 ---- /** * + * @param out OutputStream */ ! public void exportPPLM(OutputStream out) { world().setName(getName()); Location root = createLocationModel(world(), 1, new HashMap(), new HashMap()); LocationModel model = new LocationModel(); model.setLocation(root); ! PPLMPrinter printer = new PPLMPrinter(new PrintStream(out)); printer.printLocationModel(model); } |
From: Michael L. <he...@us...> - 2009-04-23 08:18:00
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv28031/src/net/sourceforge/bprocessor/gui Modified Files: GUI.java Log Message: Export of PPLM Index: GUI.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/GUI.java,v retrieving revision 1.106 retrieving revision 1.107 diff -C2 -d -r1.106 -r1.107 *** GUI.java 30 Mar 2009 09:16:39 -0000 1.106 --- GUI.java 23 Apr 2009 08:17:42 -0000 1.107 *************** *** 57,62 **** --- 57,66 ---- import java.awt.event.MouseEvent; import java.io.File; + import java.io.FileNotFoundException; + import java.io.FileOutputStream; + import java.io.OutputStream; import javax.swing.AbstractAction; + import javax.swing.JFileChooser; import javax.swing.JFrame; import javax.swing.JMenu; *************** *** 586,594 **** ppExport.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { ! Project.getInstance().exportPPLM(); } }); file.add(ppExport); ! JMenuItem objExport = new JMenuItem("Export OBJ"); objExport.addActionListener(new ActionListener() { --- 590,612 ---- ppExport.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().exportPPLM(out); ! } catch (FileNotFoundException e1) { ! System.out.println("unable to write to " + file); ! } ! } ! } }); file.add(ppExport); ! JMenuItem objExport = new JMenuItem("Export OBJ"); objExport.addActionListener(new ActionListener() { |
From: Michael L. <he...@us...> - 2009-04-23 08:17:55
|
Update of /cvsroot/bprocessor/tools/perpos In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv28053/perpos Modified Files: routefinding.jar Log Message: Export of PPLM Index: routefinding.jar =================================================================== RCS file: /cvsroot/bprocessor/tools/perpos/routefinding.jar,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 Binary files /tmp/cvsICZUe8 and /tmp/cvsGlb8UR differ |
From: Michael L. <he...@us...> - 2009-04-21 10:21:46
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv18970/src/net/sourceforge/bprocessor/gl/view Modified Files: View.java PopupMenu.java Added Files: GLTesselator.java Removed Files: Tesselator.java Log Message: Export tesselated objects --- NEW FILE: GLTesselator.java --- //--------------------------------------------------------------------------------- // $Id: GLTesselator.java,v 1.1 2009/04/21 10:21:18 henryml Exp $ // // Copyright (c) 2005 The BProcessor Team (http://bprocessor.sourceforge.net) // Released under the Lesser GNU Public License v2.1 //--------------------------------------------------------------------------------- package net.sourceforge.bprocessor.gl.view; import java.util.LinkedList; import java.util.List; import javax.media.opengl.GL; import javax.media.opengl.glu.GLU; import javax.media.opengl.glu.GLUtessellator; import javax.media.opengl.glu.GLUtessellatorCallback; import javax.media.opengl.glu.GLUtessellatorCallbackAdapter; import net.sourceforge.bprocessor.model.Edge; import net.sourceforge.bprocessor.model.Surface; import net.sourceforge.bprocessor.model.Tesselator; import net.sourceforge.bprocessor.model.Vertex; /** * Tesselator divides arbitrary surfaces into triangular patches */ public class GLTesselator implements Tesselator { private static GLUtessellator tesselator; private static GLU glu; private static Vertex v0; private static Vertex vi; private static List<Surface> triangles; private static int mode; /** * * @param g GLU */ public GLTesselator(GLU g) { tesselator = g.gluNewTess(); glu = g; GLUtessellatorCallback callback = new TesselatorCallback(); glu.gluTessCallback(tesselator, GLU.GLU_TESS_BEGIN, callback); glu.gluTessCallback(tesselator, GLU.GLU_TESS_END, callback); glu.gluTessCallback(tesselator, GLU.GLU_TESS_VERTEX, callback); glu.gluTessProperty(tesselator, GLU.GLU_TESS_WINDING_RULE, GLU.GLU_TESS_WINDING_ODD); } private static class TesselatorCallback extends GLUtessellatorCallbackAdapter { /** {@inheritDoc} */ public void begin(int type) { mode = type; } /** {@inheritDoc} */ public void end() { v0 = null; vi = null; } /** {@inheritDoc} */ @Override public void vertex(Object object) { double[] vertex = (double[]) object; Vertex current = new Vertex(vertex); if (v0 == null) { v0 = current; } else if (vi == null) { vi = current; } else { if (mode == GL.GL_TRIANGLE_FAN || mode == GL.GL_TRIANGLE_STRIP || mode == GL.GL_TRIANGLES) { Edge e0 = new Edge(v0, vi); Edge e1 = new Edge(vi, current); Edge e2 = new Edge(current, v0); List<Edge> edges = new LinkedList(); edges.add(e0); edges.add(e1); edges.add(e2); Surface s = new Surface(edges); if (s.valid()) { triangles.add(s); } if (mode == GL.GL_TRIANGLE_FAN) { vi = current; } else if (mode == GL.GL_TRIANGLE_STRIP) { v0 = vi; vi = current; } else if (mode == GL.GL_TRIANGLES) { v0 = null; vi = null; } } } } /** {@inheritDoc} */ @Override public void error(int arg0) { System.out.println(glu.gluErrorString(arg0)); } } /** * Tesselates a surface * @param surface Surface to tesselate * @return List of triangular surfaces */ public List<Surface> tesselate(Surface surface) { triangles = new LinkedList(); glu.gluTessBeginPolygon(tesselator, null); drawContour(surface); for (Surface current : surface.getHoles()) { if (surface.getOwner() == current.getOwner()) { drawContour(current); } } glu.gluTessEndPolygon(tesselator); return triangles; } private static void drawContour(Surface surface) { List<Vertex> vertices = surface.getVertices(); if (vertices.size() > 2) { vertices.add(vertices.get(0)); glu.gluTessBeginContour(tesselator); for (Vertex current : vertices) { double[] content = current.values(); glu.gluTessVertex(tesselator, content, 0, content); } glu.gluTessEndContour(tesselator); } } } --- Tesselator.java DELETED --- Index: View.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/View.java,v retrieving revision 1.286 retrieving revision 1.287 diff -C2 -d -r1.286 -r1.287 *** View.java 30 Mar 2009 09:16:42 -0000 1.286 --- View.java 21 Apr 2009 10:21:18 -0000 1.287 *************** *** 67,71 **** private boolean enabled; ! private Tesselator tesselator; /** OBJECTS flag */ --- 67,71 ---- private boolean enabled; ! private GLTesselator tesselator; /** OBJECTS flag */ *************** *** 477,481 **** glu = new GLU(); ! tesselator = new Tesselator(glu); --- 477,482 ---- glu = new GLU(); ! tesselator = new GLTesselator(glu); ! Project.getInstance().setTesselator(tesselator); *************** *** 563,566 **** --- 564,571 ---- public void tesselate(Surface surface) { List<Surface> surfaces = tesselator.tesselate(surface); + Vertex normal = surface.normal(); + Container front = surface.getFrontDomain(); + Container back = surface.getBackDomain(); + Container owner = surface.getOwner(); Collection<Surface> holes = new LinkedList(surface.getHoles()); *************** *** 571,575 **** for (Surface current : surfaces) { ! owner.insert(current); } Selection.primary().clear(); --- 576,588 ---- for (Surface current : surfaces) { ! Surface inserted = owner.insert(current); ! Vertex n = inserted.normal(); ! if (n.dot(normal) > 0) { ! inserted.setFrontDomain(front); ! inserted.setBackDomain(back); ! } else { ! inserted.setBackDomain(front); ! inserted.setFrontDomain(back); ! } } Selection.primary().clear(); Index: PopupMenu.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/PopupMenu.java,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** PopupMenu.java 16 Apr 2009 11:11:48 -0000 1.28 --- PopupMenu.java 21 Apr 2009 10:21:18 -0000 1.29 *************** *** 368,374 **** Vertex normal = surface.normal(); Vertex origin = surface.center(); - CoordinateSystem system = CoordinateSystem.systemFor(origin, normal); - Container pyramid = Command.Pyramid.pyramid(0.05, 0.05, 0.2); for (Vertex current : pyramid.getVertices()) { --- 368,372 ---- *************** *** 411,434 **** AbstractAction action = new SpaceMenuAction(sp, "Export") { public void actionPerformed(ActionEvent event) { ! List<Surface> surfaces = new LinkedList(space.getEnvelope()); ! List<Edge> edges = new LinkedList(Surface.edges(surfaces)); ! List<Vertex> vertices = new LinkedList(Edge.vertices(edges)); ! ! HashMap<Vertex, Integer> vmap = new HashMap(); ! int count = 1; ! for (Vertex current : vertices) { ! vmap.put(current, count++); ! System.out.println("v " + current.getX() + ! " " + current.getY() + " " + current.getZ()); ! } ! for (Surface current : surfaces) { ! List<Vertex> verts = current.getVertices(); ! System.out.print("f"); ! for (Vertex v : verts) { ! int i = vmap.get(v); ! System.out.print(" " + i); ! } ! System.out.println(); ! } } }; --- 409,413 ---- AbstractAction action = new SpaceMenuAction(sp, "Export") { public void actionPerformed(ActionEvent event) { ! space.export(System.out); } }; |
From: Michael L. <he...@us...> - 2009-04-21 10:21:44
|
Update of /cvsroot/bprocessor/test/input In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv19016/input Added Files: walls.xml wall-hole.xml house.xml cube.xml walls-openings.xml wall-door.xml cube-tri.xml Log Message: Export tesselated objects --- NEW FILE: cube-tri.xml --- <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <bmodel> <active>1</active> <cs>46</cs> <name>new project</name> <space type="1" transparent="true" union="false" net="false" voidref="2" name="World" progid="0" id="1"> <description/> <Classification>unassigned</Classification> <constructor xsi:type="CoordinateSystemType" onlyplane="false" editable="true" active="true" progid="1" id="46" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <vertex x="0.0" y="0.0" z="0.0" id="47"/> <ijn> <vertex x="1.0" y="0.0" z="0.0" id="43"/> <vertex x="0.0" y="1.0" z="0.0" id="44"/> <vertex x="0.0" y="0.0" z="1.0" id="45"/> </ijn> </constructor> <space type="1" transparent="true" union="false" net="false" name="Void" progid="1" id="2"> <description/> <Classification>unassigned</Classification> <boundary>5</boundary> <boundary>6</boundary> <boundary>7</boundary> <boundary>8</boundary> <boundary>9</boundary> <boundary>10</boundary> <boundary>11</boundary> <boundary>12</boundary> <boundary>13</boundary> <boundary>14</boundary> <boundary>15</boundary> <boundary>16</boundary> </space> <space type="0" transparent="false" union="false" net="false" voidref="4" name="cube" progid="2" id="3"> <description/> <Classification>unassigned</Classification> <boundary>5</boundary> <boundary>6</boundary> <boundary>7</boundary> <boundary>8</boundary> <boundary>9</boundary> <boundary>10</boundary> <boundary>11</boundary> <boundary>12</boundary> <boundary>13</boundary> <boundary>14</boundary> <boundary>15</boundary> <boundary>16</boundary> <space type="1" transparent="true" union="false" net="false" name="Void" progid="1" id="4"> <description/> <Classification>unassigned</Classification> </space> </space> <surface progid="13" id="5"> <edgeref>20</edgeref> <edgeref>26</edgeref> <edgeref>29</edgeref> <back>3</back> <front>2</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="14" id="6"> <edgeref>29</edgeref> <edgeref>21</edgeref> <edgeref>27</edgeref> <back>3</back> <front>2</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="15" id="7"> <edgeref>17</edgeref> <edgeref>18</edgeref> <edgeref>30</edgeref> <back>3</back> <front>2</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="16" id="8"> <edgeref>30</edgeref> <edgeref>19</edgeref> <edgeref>20</edgeref> <back>3</back> <front>2</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="17" id="9"> <edgeref>22</edgeref> <edgeref>21</edgeref> <edgeref>31</edgeref> <back>3</back> <front>2</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="18" id="10"> <edgeref>31</edgeref> <edgeref>28</edgeref> <edgeref>24</edgeref> <back>3</back> <front>2</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="19" id="11"> <edgeref>26</edgeref> <edgeref>19</edgeref> <edgeref>32</edgeref> <back>3</back> <front>2</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="20" id="12"> <edgeref>32</edgeref> <edgeref>25</edgeref> <edgeref>28</edgeref> <back>3</back> <front>2</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="21" id="13"> <edgeref>27</edgeref> <edgeref>22</edgeref> <edgeref>33</edgeref> <back>3</back> <front>2</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="22" id="14"> <edgeref>33</edgeref> <edgeref>23</edgeref> <edgeref>17</edgeref> <back>3</back> <front>2</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="23" id="15"> <edgeref>18</edgeref> <edgeref>23</edgeref> <edgeref>34</edgeref> <back>3</back> <front>2</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="24" id="16"> <edgeref>34</edgeref> <edgeref>24</edgeref> <edgeref>25</edgeref> <back>3</back> <front>2</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <edge constructor="false" smooth="false" progid="1" id="17"> <from>38</from> <to>35</to> </edge> <edge constructor="false" smooth="false" progid="2" id="18"> <from>35</from> <to>36</to> </edge> <edge constructor="false" smooth="false" progid="3" id="19"> <from>36</from> <to>37</to> </edge> <edge constructor="false" smooth="false" progid="4" id="20"> <from>37</from> <to>38</to> </edge> <edge constructor="false" smooth="false" progid="5" id="21"> <from>41</from> <to>39</to> </edge> <edge constructor="false" smooth="false" progid="6" id="22"> <from>39</from> <to>40</to> </edge> <edge constructor="false" smooth="false" progid="7" id="23"> <from>35</from> <to>40</to> </edge> <edge constructor="false" smooth="false" progid="8" id="24"> <from>40</from> <to>42</to> </edge> <edge constructor="false" smooth="false" progid="9" id="25"> <from>36</from> <to>42</to> </edge> <edge constructor="false" smooth="false" progid="10" id="26"> <from>37</from> <to>41</to> </edge> <edge constructor="false" smooth="false" progid="11" id="27"> <from>38</from> <to>39</to> </edge> <edge constructor="false" smooth="false" progid="12" id="28"> <from>42</from> <to>41</to> </edge> <edge constructor="false" smooth="false" progid="13" id="29"> <from>41</from> <to>38</to> </edge> <edge constructor="false" smooth="false" progid="14" id="30"> <from>36</from> <to>38</to> </edge> <edge constructor="false" smooth="false" progid="15" id="31"> <from>41</from> <to>40</to> </edge> <edge constructor="false" smooth="false" progid="16" id="32"> <from>36</from> <to>41</to> </edge> <edge constructor="false" smooth="false" progid="17" id="33"> <from>40</from> <to>38</to> </edge> <edge constructor="false" smooth="false" progid="18" id="34"> <from>40</from> <to>36</to> </edge> <vertex x="0.0" y="1.0" z="0.0" progid="1" id="35"/> <vertex x="1.0" y="1.0" z="0.0" progid="2" id="36"/> <vertex x="1.0" y="0.0" z="0.0" progid="3" id="37"/> <vertex x="0.0" y="0.0" z="0.0" progid="4" id="38"/> <vertex x="0.0" y="0.0" z="1.0" progid="5" id="39"/> <vertex x="0.0" y="1.0" z="1.0" progid="6" id="40"/> <vertex x="1.0" y="0.0" z="1.0" progid="7" id="41"/> <vertex x="1.0" y="1.0" z="1.0" progid="8" id="42"/> </space> <material name="Construction" B="0.9" G="0.9" R="0.9" id="48"/> <material name="Void" B="0.8035714" G="0.8142857" R="0.91071427" id="49"/> <material name="Functional" B="0.7" G="0.87" R="0.96" id="50"/> <view name="(Current)" id="51"> <scalefactor>0</scalefactor> <camera x="2.383519023807846" z="2.2436107128075493" y="-2.1033238178381777"/> <center x="0.4999999999999998" z="0.5" y="0.5"/> <roll x="0.1418082326449691" z="0.9702957262759971" y="-0.1960016038828433"/> <focalwidth>35.0</focalwidth> <type>6</type> </view> <global> <key>brick</key> <value xsi:type="DoubleType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <double>0.12</double> </value> </global> <global> <key>isolation</key> <value xsi:type="DoubleType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <double>0.1</double> </value> </global> <global> <key>pi</key> <value xsi:type="DoubleType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <double>3.141592653589793</double> </value> </global> <global> <key>roof</key> <value xsi:type="DoubleType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <double>0.07</double> </value> </global> <global> <key>wall</key> <value xsi:type="DoubleType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <double>0.15</double> </value> </global> </bmodel> --- NEW FILE: cube.xml --- <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <bmodel> <active>1</active> <cs>34</cs> <name>new project</name> <space type="1" transparent="true" union="false" net="false" voidref="2" name="World" progid="0" id="1"> <description/> <Classification>unassigned</Classification> <constructor xsi:type="CoordinateSystemType" onlyplane="false" editable="true" active="true" progid="1" id="34" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <vertex x="0.0" y="0.0" z="0.0" id="35"/> <ijn> <vertex x="1.0" y="0.0" z="0.0" id="31"/> <vertex x="0.0" y="1.0" z="0.0" id="32"/> <vertex x="0.0" y="0.0" z="1.0" id="33"/> </ijn> </constructor> <space type="1" transparent="true" union="false" net="false" name="Void" progid="1" id="2"> <description/> <Classification>unassigned</Classification> <boundary>5</boundary> <boundary>6</boundary> <boundary>7</boundary> <boundary>8</boundary> <boundary>9</boundary> <boundary>10</boundary> </space> <space type="0" transparent="false" union="false" net="false" voidref="4" name="cube" progid="2" id="3"> <description/> <Classification>unassigned</Classification> <boundary>5</boundary> <boundary>6</boundary> <boundary>7</boundary> <boundary>8</boundary> <boundary>9</boundary> <boundary>10</boundary> <space type="1" transparent="true" union="false" net="false" name="Void" progid="1" id="4"> <description/> <Classification>unassigned</Classification> </space> </space> <surface progid="7" id="5"> <edgeref>15</edgeref> <edgeref>21</edgeref> <edgeref>14</edgeref> <edgeref>20</edgeref> <back>3</back> <front>2</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="8" id="6"> <edgeref>22</edgeref> <edgeref>18</edgeref> <edgeref>16</edgeref> <edgeref>15</edgeref> <back>3</back> <front>2</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="9" id="7"> <edgeref>16</edgeref> <edgeref>17</edgeref> <edgeref>11</edgeref> <edgeref>21</edgeref> <back>3</back> <front>2</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="10" id="8"> <edgeref>14</edgeref> <edgeref>11</edgeref> <edgeref>12</edgeref> <edgeref>13</edgeref> <back>3</back> <front>2</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="11" id="9"> <edgeref>19</edgeref> <edgeref>22</edgeref> <edgeref>20</edgeref> <edgeref>13</edgeref> <back>3</back> <front>2</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="12" id="10"> <edgeref>17</edgeref> <edgeref>18</edgeref> <edgeref>19</edgeref> <edgeref>12</edgeref> <back>3</back> <front>2</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <edge constructor="false" smooth="false" progid="1" id="11"> <from>26</from> <to>23</to> </edge> <edge constructor="false" smooth="false" progid="2" id="12"> <from>23</from> <to>24</to> </edge> <edge constructor="false" smooth="false" progid="3" id="13"> <from>24</from> <to>25</to> </edge> <edge constructor="false" smooth="false" progid="4" id="14"> <from>25</from> <to>26</to> </edge> <edge constructor="false" smooth="false" progid="5" id="15"> <from>29</from> <to>27</to> </edge> <edge constructor="false" smooth="false" progid="6" id="16"> <from>27</from> <to>28</to> </edge> <edge constructor="false" smooth="false" progid="7" id="17"> <from>23</from> <to>28</to> </edge> <edge constructor="false" smooth="false" progid="8" id="18"> <from>28</from> <to>30</to> </edge> <edge constructor="false" smooth="false" progid="9" id="19"> <from>24</from> <to>30</to> </edge> <edge constructor="false" smooth="false" progid="10" id="20"> <from>25</from> <to>29</to> </edge> <edge constructor="false" smooth="false" progid="11" id="21"> <from>26</from> <to>27</to> </edge> <edge constructor="false" smooth="false" progid="12" id="22"> <from>30</from> <to>29</to> </edge> <vertex x="0.0" y="1.0" z="0.0" progid="1" id="23"/> <vertex x="1.0" y="1.0" z="0.0" progid="2" id="24"/> <vertex x="1.0" y="0.0" z="0.0" progid="3" id="25"/> <vertex x="0.0" y="0.0" z="0.0" progid="4" id="26"/> <vertex x="0.0" y="0.0" z="1.0" progid="5" id="27"/> <vertex x="0.0" y="1.0" z="1.0" progid="6" id="28"/> <vertex x="1.0" y="0.0" z="1.0" progid="7" id="29"/> <vertex x="1.0" y="1.0" z="1.0" progid="8" id="30"/> </space> <material name="Void" B="0.8035714" G="0.8142857" R="0.91071427" id="36"/> <material name="Construction" B="0.9" G="0.9" R="0.9" id="37"/> <material name="Functional" B="0.7" G="0.87" R="0.96" id="38"/> <view name="(Current)" id="39"> <scalefactor>0</scalefactor> <camera x="2.383519023807846" z="2.2436107128075493" y="-2.1033238178381777"/> <center x="0.4999999999999998" z="0.5" y="0.5"/> <roll x="0.1418082326449691" z="0.9702957262759971" y="-0.1960016038828433"/> <focalwidth>35.0</focalwidth> <type>6</type> </view> <global> <key>pi</key> <value xsi:type="DoubleType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <double>3.141592653589793</double> </value> </global> <global> <key>wall</key> <value xsi:type="DoubleType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <double>0.15</double> </value> </global> <global> <key>isolation</key> <value xsi:type="DoubleType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <double>0.1</double> </value> </global> <global> <key>brick</key> <value xsi:type="DoubleType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <double>0.12</double> </value> </global> <global> <key>roof</key> <value xsi:type="DoubleType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <double>0.07</double> </value> </global> </bmodel> --- NEW FILE: house.xml --- <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <bmodel> <active>1</active> <cs>513</cs> <name>new project</name> <space type="1" transparent="true" union="false" net="false" voidref="2" name="World" progid="0" id="1"> <description/> <Classification>unassigned</Classification> <constructor xsi:type="CoordinateSystemType" onlyplane="false" editable="true" active="true" progid="1" id="513" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <vertex x="0.0" y="0.0" z="0.0" id="514"/> <ijn> <vertex x="1.0" y="0.0" z="0.0" id="510"/> <vertex x="0.0" y="1.0" z="0.0" id="511"/> <vertex x="0.0" y="0.0" z="1.0" id="512"/> </ijn> </constructor> <space type="1" transparent="true" union="false" net="false" name="Void" progid="1" id="2"> <description/> <Classification>unassigned</Classification> [...2693 lines suppressed...] <global> <key>pi</key> <value xsi:type="DoubleType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <double>3.141592653589793</double> </value> </global> <global> <key>roof</key> <value xsi:type="DoubleType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <double>0.07</double> </value> </global> <global> <key>wall</key> <value xsi:type="DoubleType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <double>0.15</double> </value> </global> </bmodel> --- NEW FILE: walls.xml --- <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <bmodel> <active>1</active> <cs>64</cs> <name>new project</name> <space type="1" voidref="2" name="World" net="false" union="false" transparent="true" progid="0" id="1"> <description/> <Classification>unassigned</Classification> <constructor xsi:type="CoordinateSystemType" onlyplane="false" editable="true" active="true" progid="1" id="64" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <vertex y="0.0" z="0.0" x="0.0" id="65"/> <ijn> <vertex y="0.0" z="0.0" x="1.0" id="61"/> <vertex y="1.0" z="0.0" x="0.0" id="62"/> <vertex y="0.0" z="1.0" x="0.0" id="63"/> </ijn> </constructor> <space type="1" name="Void" net="false" union="false" transparent="true" progid="1" id="2"> <description/> <Classification>unassigned</Classification> </space> <space type="0" voidref="4" name="Wall" net="false" union="false" transparent="false" progid="2" id="3"> <description/> <Classification>unassigned</Classification> <boundary>9</boundary> <boundary>11</boundary> <boundary>12</boundary> <boundary>13</boundary> <boundary>15</boundary> <boundary>16</boundary> <boundary>17</boundary> <boundary>18</boundary> <boundary>19</boundary> <boundary>20</boundary> <space type="1" name="Void" net="false" union="false" transparent="true" progid="1" id="4"> <description/> <Classification>unassigned</Classification> </space> </space> <space type="1" voidref="6" name="Exterior" net="false" union="false" transparent="true" progid="3" id="5"> <description/> <Classification>unassigned</Classification> <boundary>10</boundary> <boundary>11</boundary> <boundary>12</boundary> <boundary>13</boundary> <boundary>14</boundary> <boundary>15</boundary> <boundary>19</boundary> <boundary>20</boundary> <space type="1" name="Void" net="false" union="false" transparent="true" progid="1" id="6"> <description/> <Classification>unassigned</Classification> </space> </space> <space type="1" voidref="8" name="Room" net="false" union="false" transparent="true" progid="4" id="7"> <description/> <Classification>unassigned</Classification> <boundary>9</boundary> <boundary>10</boundary> <boundary>14</boundary> <boundary>16</boundary> <boundary>17</boundary> <boundary>18</boundary> <space type="1" name="Void" net="false" union="false" transparent="true" progid="1" id="8"> <description/> <Classification>unassigned</Classification> </space> </space> <surface progid="73" id="9"> <edgeref>29</edgeref> <edgeref>35</edgeref> <edgeref>27</edgeref> <edgeref>31</edgeref> <back>3</back> <front>7</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="74" id="10"> <edgeref>29</edgeref> <edgeref>32</edgeref> <edgeref>36</edgeref> <edgeref>41</edgeref> <back>7</back> <front>5</front> <exterior>11</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="75" id="11"> <edgeref>38</edgeref> <edgeref>44</edgeref> <edgeref>42</edgeref> <edgeref>39</edgeref> <hole>10</hole> <back>3</back> <front>5</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="76" id="12"> <edgeref>30</edgeref> <edgeref>42</edgeref> <edgeref>40</edgeref> <edgeref>23</edgeref> <back>3</back> <front>5</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="77" id="13"> <edgeref>30</edgeref> <edgeref>39</edgeref> <edgeref>43</edgeref> <edgeref>24</edgeref> <back>5</back> <front>3</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="78" id="14"> <edgeref>27</edgeref> <edgeref>28</edgeref> <edgeref>25</edgeref> <edgeref>26</edgeref> <back>5</back> <front>7</front> <exterior>15</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="79" id="15"> <edgeref>21</edgeref> <edgeref>22</edgeref> <edgeref>23</edgeref> <edgeref>24</edgeref> <hole>14</hole> <back>5</back> <front>3</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="80" id="16"> <edgeref>26</edgeref> <edgeref>31</edgeref> <edgeref>41</edgeref> <edgeref>37</edgeref> <back>7</back> <front>3</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="81" id="17"> <edgeref>32</edgeref> <edgeref>33</edgeref> <edgeref>28</edgeref> <edgeref>35</edgeref> <back>3</back> <front>7</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="82" id="18"> <edgeref>33</edgeref> <edgeref>36</edgeref> <edgeref>37</edgeref> <edgeref>25</edgeref> <back>3</back> <front>7</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="83" id="19"> <edgeref>34</edgeref> <edgeref>38</edgeref> <edgeref>43</edgeref> <edgeref>21</edgeref> <back>3</back> <front>5</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="84" id="20"> <edgeref>34</edgeref> <edgeref>44</edgeref> <edgeref>40</edgeref> <edgeref>22</edgeref> <back>5</back> <front>3</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <edge smooth="false" constructor="false" progid="49" id="21"> <from>46</from> <to>45</to> </edge> <edge smooth="false" constructor="false" progid="50" id="22"> <from>45</from> <to>48</to> </edge> <edge smooth="false" constructor="false" progid="51" id="23"> <from>48</from> <to>47</to> </edge> <edge smooth="false" constructor="false" progid="52" id="24"> <from>47</from> <to>46</to> </edge> <edge smooth="false" constructor="false" progid="53" id="25"> <from>52</from> <to>49</to> </edge> <edge smooth="false" constructor="false" progid="54" id="26"> <from>49</from> <to>50</to> </edge> <edge smooth="false" constructor="false" progid="55" id="27"> <from>50</from> <to>51</to> </edge> <edge smooth="false" constructor="false" progid="56" id="28"> <from>51</from> <to>52</to> </edge> <edge smooth="false" constructor="false" progid="57" id="29"> <from>59</from> <to>54</to> </edge> <edge smooth="false" constructor="false" progid="58" id="30"> <from>47</from> <to>57</to> </edge> <edge smooth="false" constructor="false" progid="59" id="31"> <from>50</from> <to>59</to> </edge> <edge smooth="false" constructor="false" progid="60" id="32"> <from>54</from> <to>56</to> </edge> <edge smooth="false" constructor="false" progid="61" id="33"> <from>52</from> <to>56</to> </edge> <edge smooth="false" constructor="false" progid="62" id="34"> <from>45</from> <to>60</to> </edge> <edge smooth="false" constructor="false" progid="63" id="35"> <from>51</from> <to>54</to> </edge> <edge smooth="false" constructor="false" progid="64" id="36"> <from>56</from> <to>53</to> </edge> <edge smooth="false" constructor="false" progid="65" id="37"> <from>49</from> <to>53</to> </edge> <edge smooth="false" constructor="false" progid="66" id="38"> <from>55</from> <to>60</to> </edge> <edge smooth="false" constructor="false" progid="67" id="39"> <from>57</from> <to>55</to> </edge> <edge smooth="false" constructor="false" progid="68" id="40"> <from>48</from> <to>58</to> </edge> <edge smooth="false" constructor="false" progid="69" id="41"> <from>53</from> <to>59</to> </edge> <edge smooth="false" constructor="false" progid="70" id="42"> <from>58</from> <to>57</to> </edge> <edge smooth="false" constructor="false" progid="71" id="43"> <from>46</from> <to>55</to> </edge> <edge smooth="false" constructor="false" progid="72" id="44"> <from>60</from> <to>58</to> </edge> <vertex y="1.0" z="0.0" x="9.0" progid="17" id="45"/> <vertex y="1.0" z="0.0" x="1.0" progid="18" id="46"/> <vertex y="7.0" z="0.0" x="1.0" progid="19" id="47"/> <vertex y="7.0" z="0.0" x="9.0" progid="20" id="48"/> <vertex y="1.3" z="0.0" x="8.7" progid="21" id="49"/> <vertex y="6.7" z="0.0" x="8.7" progid="22" id="50"/> <vertex y="6.7" z="0.0" x="1.3" progid="23" id="51"/> <vertex y="1.3" z="0.0" x="1.3" progid="24" id="52"/> <vertex y="1.3" z="3.0" x="8.7" progid="25" id="53"/> <vertex y="6.7" z="3.0" x="1.3" progid="26" id="54"/> <vertex y="1.0" z="3.0" x="1.0" progid="27" id="55"/> <vertex y="1.3" z="3.0" x="1.3" progid="28" id="56"/> <vertex y="7.0" z="3.0" x="1.0" progid="29" id="57"/> <vertex y="7.0" z="3.0" x="9.0" progid="30" id="58"/> <vertex y="6.7" z="3.0" x="8.7" progid="31" id="59"/> <vertex y="1.0" z="3.0" x="9.0" progid="32" id="60"/> </space> <material G="0.87" R="0.96" name="Functional" B="0.7" id="66"/> <material G="0.8142857" R="0.91071427" name="Void" B="0.8035714" id="67"/> <material G="0.9" R="0.9" name="Construction" B="0.9" id="68"/> <view name="(Current)" id="69"> <scalefactor>0</scalefactor> <camera y="-5.7985673989341615" x="11.75330643497795" z="11.520997733404194"/> <center y="2.2215847923777625" x="4.4335083533500015" z="1.2220239392598131"/> <roll y="0.012890709361903986" x="-0.011765037296966565" z="0.9998476951563947"/> <focalwidth>35.0</focalwidth> <type>6</type> <hidden>7</hidden> <hidden>5</hidden> </view> <global> <key>brick</key> <value xsi:type="DoubleType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <double>0.12</double> </value> </global> <global> <key>isolation</key> <value xsi:type="DoubleType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <double>0.1</double> </value> </global> <global> <key>pi</key> <value xsi:type="DoubleType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <double>3.141592653589793</double> </value> </global> <global> <key>roof</key> <value xsi:type="DoubleType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <double>0.07</double> </value> </global> <global> <key>wall</key> <value xsi:type="DoubleType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <double>0.15</double> </value> </global> </bmodel> --- NEW FILE: walls-openings.xml --- <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <bmodel> <active>1</active> <cs>444</cs> <name>new project</name> <space type="1" transparent="true" union="false" net="false" voidref="2" name="World" progid="0" id="1"> <description/> <Classification>unassigned</Classification> <constructor xsi:type="CoordinateSystemType" onlyplane="false" editable="true" active="true" progid="1" id="444" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <vertex x="0.0" y="0.0" z="0.0" id="445"/> <ijn> <vertex x="1.0" y="0.0" z="0.0" id="441"/> <vertex x="0.0" y="1.0" z="0.0" id="442"/> <vertex x="0.0" y="0.0" z="1.0" id="443"/> </ijn> </constructor> <space type="1" transparent="true" union="false" net="false" name="Void" progid="1" id="2"> <description/> <Classification>unassigned</Classification> [...2770 lines suppressed...] <global> <key>pi</key> <value xsi:type="DoubleType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <double>3.141592653589793</double> </value> </global> <global> <key>roof</key> <value xsi:type="DoubleType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <double>0.07</double> </value> </global> <global> <key>wall</key> <value xsi:type="DoubleType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <double>0.15</double> </value> </global> </bmodel> --- NEW FILE: wall-door.xml --- <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <bmodel> <active>1</active> <cs>112</cs> <name>new project</name> <space type="1" transparent="true" union="false" net="false" voidref="2" name="World" progid="0" id="1"> <description/> <Classification>unassigned</Classification> <constructor xsi:type="CoordinateSystemType" onlyplane="false" editable="true" active="true" progid="1" id="112" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <vertex x="0.0" y="0.0" z="0.0" id="113"/> <ijn> <vertex x="1.0" y="0.0" z="0.0" id="109"/> <vertex x="0.0" y="1.0" z="0.0" id="110"/> <vertex x="0.0" y="0.0" z="1.0" id="111"/> </ijn> </constructor> <space type="1" transparent="true" union="false" net="false" name="Void" progid="1" id="2"> <description/> <Classification>unassigned</Classification> </space> <space type="0" transparent="false" union="false" net="false" voidref="4" name="Wall" progid="2" id="3"> <description/> <Classification>unassigned</Classification> <boundary>7</boundary> <boundary>8</boundary> <boundary>9</boundary> <boundary>10</boundary> <boundary>11</boundary> <boundary>12</boundary> <boundary>13</boundary> <boundary>14</boundary> <boundary>15</boundary> <boundary>16</boundary> <boundary>18</boundary> <boundary>19</boundary> <boundary>20</boundary> <boundary>21</boundary> <boundary>23</boundary> <boundary>25</boundary> <boundary>27</boundary> <boundary>28</boundary> <space type="1" transparent="true" union="false" net="false" name="Void" progid="1" id="4"> <description/> <Classification>unassigned</Classification> </space> </space> <space type="1" transparent="true" union="false" net="false" voidref="6" name="Exterior" progid="3" id="5"> <description/> <Classification>unassigned</Classification> <boundary>7</boundary> <boundary>8</boundary> <boundary>9</boundary> <boundary>10</boundary> <boundary>11</boundary> <boundary>12</boundary> <boundary>13</boundary> <boundary>14</boundary> <boundary>15</boundary> <boundary>16</boundary> <boundary>17</boundary> <boundary>18</boundary> <boundary>19</boundary> <boundary>20</boundary> <boundary>21</boundary> <boundary>22</boundary> <boundary>23</boundary> <boundary>24</boundary> <boundary>25</boundary> <boundary>26</boundary> <boundary>27</boundary> <boundary>28</boundary> <space type="1" transparent="true" union="false" net="false" name="Void" progid="1" id="6"> <description/> <Classification>unassigned</Classification> </space> </space> <surface progid="8" id="7"> <edgeref>31</edgeref> <edgeref>37</edgeref> <edgeref>35</edgeref> <edgeref>30</edgeref> <back>3</back> <front>5</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="9" id="8"> <edgeref>32</edgeref> <edgeref>33</edgeref> <edgeref>38</edgeref> <edgeref>29</edgeref> <back>5</back> <front>3</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="10" id="9"> <edgeref>33</edgeref> <edgeref>34</edgeref> <edgeref>37</edgeref> <edgeref>36</edgeref> <back>5</back> <front>3</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="20" id="10"> <edgeref>46</edgeref> <edgeref>51</edgeref> <edgeref>43</edgeref> <edgeref>48</edgeref> <back>3</back> <front>5</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="22" id="11"> <edgeref>46</edgeref> <edgeref>44</edgeref> <edgeref>31</edgeref> <edgeref>34</edgeref> <edgeref>32</edgeref> <edgeref>45</edgeref> <edgeref>47</edgeref> <edgeref>49</edgeref> <hole>17</hole> <hole>26</hole> <back>5</back> <front>3</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="23" id="12"> <edgeref>51</edgeref> <edgeref>44</edgeref> <edgeref>30</edgeref> <edgeref>42</edgeref> <back>3</back> <front>5</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="25" id="13"> <edgeref>50</edgeref> <edgeref>45</edgeref> <edgeref>29</edgeref> <edgeref>39</edgeref> <back>5</back> <front>3</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="26" id="14"> <edgeref>41</edgeref> <edgeref>43</edgeref> <edgeref>42</edgeref> <edgeref>35</edgeref> <edgeref>36</edgeref> <edgeref>38</edgeref> <edgeref>39</edgeref> <edgeref>40</edgeref> <hole>22</hole> <hole>24</hole> <back>3</back> <front>5</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="28" id="15"> <edgeref>41</edgeref> <edgeref>48</edgeref> <edgeref>49</edgeref> <edgeref>52</edgeref> <back>5</back> <front>3</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="29" id="16"> <edgeref>47</edgeref> <edgeref>52</edgeref> <edgeref>40</edgeref> <edgeref>50</edgeref> <back>3</back> <front>5</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="37" id="17"> <edgeref>61</edgeref> <edgeref>68</edgeref> <edgeref>66</edgeref> <edgeref>65</edgeref> <back>5</back> <front>5</front> <exterior>11</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="38" id="18"> <edgeref>61</edgeref> <edgeref>63</edgeref> <edgeref>55</edgeref> <edgeref>64</edgeref> <back>5</back> <front>3</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="39" id="19"> <edgeref>62</edgeref> <edgeref>66</edgeref> <edgeref>67</edgeref> <edgeref>53</edgeref> <back>5</back> <front>3</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="40" id="20"> <edgeref>62</edgeref> <edgeref>68</edgeref> <edgeref>63</edgeref> <edgeref>54</edgeref> <back>3</back> <front>5</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="41" id="21"> <edgeref>64</edgeref> <edgeref>65</edgeref> <edgeref>67</edgeref> <edgeref>56</edgeref> <back>3</back> <front>5</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="42" id="22"> <edgeref>54</edgeref> <edgeref>53</edgeref> <edgeref>56</edgeref> <edgeref>55</edgeref> <back>5</back> <front>5</front> <exterior>14</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="48" id="23"> <edgeref>57</edgeref> <edgeref>75</edgeref> <edgeref>73</edgeref> <edgeref>69</edgeref> <back>5</back> <front>3</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="49" id="24"> <edgeref>60</edgeref> <edgeref>59</edgeref> <edgeref>58</edgeref> <edgeref>57</edgeref> <back>5</back> <front>5</front> <exterior>14</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="50" id="25"> <edgeref>69</edgeref> <edgeref>71</edgeref> <edgeref>74</edgeref> <edgeref>60</edgeref> <back>5</back> <front>3</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="51" id="26"> <edgeref>70</edgeref> <edgeref>73</edgeref> <edgeref>71</edgeref> <edgeref>76</edgeref> <back>5</back> <front>5</front> <exterior>11</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="52" id="27"> <edgeref>70</edgeref> <edgeref>75</edgeref> <edgeref>58</edgeref> <edgeref>72</edgeref> <back>5</back> <front>3</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="53" id="28"> <edgeref>59</edgeref> <edgeref>74</edgeref> <edgeref>76</edgeref> <edgeref>72</edgeref> <back>5</back> <front>3</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <edge constructor="false" smooth="false" progid="1" id="29"> <from>79</from> <to>78</to> </edge> <edge constructor="false" smooth="false" progid="3" id="30"> <from>77</from> <to>80</to> </edge> <edge constructor="false" smooth="false" progid="5" id="31"> <from>77</from> <to>81</to> </edge> <edge constructor="false" smooth="false" progid="6" id="32"> <from>78</from> <to>82</to> </edge> <edge constructor="false" smooth="false" progid="7" id="33"> <from>84</from> <to>82</to> </edge> <edge constructor="false" smooth="false" progid="8" id="34"> <from>82</from> <to>81</to> </edge> <edge constructor="false" smooth="false" progid="9" id="35"> <from>80</from> <to>83</to> </edge> <edge constructor="false" smooth="false" progid="10" id="36"> <from>83</from> <to>84</to> </edge> <edge constructor="false" smooth="false" progid="11" id="37"> <from>81</from> <to>83</to> </edge> <edge constructor="false" smooth="false" progid="12" id="38"> <from>79</from> <to>84</to> </edge> <edge constructor="false" smooth="false" progid="14" id="39"> <from>86</from> <to>79</to> </edge> <edge constructor="false" smooth="false" progid="15" id="40"> <from>86</from> <to>85</to> </edge> <edge constructor="false" smooth="false" progid="16" id="41"> <from>85</from> <to>87</to> </edge> <edge constructor="false" smooth="false" progid="17" id="42"> <from>80</from> <to>88</to> </edge> <edge constructor="false" smooth="false" progid="19" id="43"> <from>87</from> <to>88</to> </edge> <edge constructor="false" smooth="false" progid="21" id="44"> <from>91</from> <to>77</to> </edge> <edge constructor="false" smooth="false" progid="22" id="45"> <from>78</from> <to>92</to> </edge> <edge constructor="false" smooth="false" progid="24" id="46"> <from>90</from> <to>91</to> </edge> <edge constructor="false" smooth="false" progid="25" id="47"> <from>92</from> <to>89</to> </edge> <edge constructor="false" smooth="false" progid="26" id="48"> <from>87</from> <to>90</to> </edge> <edge constructor="false" smooth="false" progid="27" id="49"> <from>89</from> <to>90</to> </edge> <edge constructor="false" smooth="false" progid="28" id="50"> <from>86</from> <to>92</to> </edge> <edge constructor="false" smooth="false" progid="29" id="51"> <from>88</from> <to>91</to> </edge> <edge constructor="false" smooth="false" progid="30" id="52"> <from>85</from> <to>89</to> </edge> <edge constructor="false" smooth="false" progid="31" id="53"> <from>94</from> <to>95</to> </edge> <edge constructor="false" smooth="false" progid="32" id="54"> <from>95</from> <to>93</to> </edge> <edge constructor="false" smooth="false" progid="33" id="55"> <from>93</from> <to>96</to> </edge> <edge constructor="false" smooth="false" progid="34" id="56"> <from>96</from> <to>94</to> </edge> <edge constructor="false" smooth="false" progid="35" id="57"> <from>97</from> <to>100</to> </edge> <edge constructor="false" smooth="false" progid="36" id="58"> <from>100</from> <to>99</to> </edge> <edge constructor="false" smooth="false" progid="37" id="59"> <from>99</from> <to>98</to> </edge> <edge constructor="false" smooth="false" progid="38" id="60"> <from>98</from> <to>97</to> </edge> <edge constructor="false" smooth="false" progid="39" id="61"> <from>104</from> <to>103</to> </edge> <edge constructor="false" smooth="false" progid="40" id="62"> <from>95</from> <to>101</to> </edge> <edge constructor="false" smooth="false" progid="41" id="63"> <from>93</from> <to>103</to> </edge> <edge constructor="false" smooth="false" progid="42" id="64"> <from>96</from> <to>104</to> </edge> <edge constructor="false" smooth="false" progid="43" id="65"> <from>102</from> <to>104</to> </edge> <edge constructor="false" smooth="false" progid="44" id="66"> <from>101</from> <to>102</to> </edge> <edge constructor="false" smooth="false" progid="45" id="67"> <from>94</from> <to>102</to> </edge> <edge constructor="false" smooth="false" progid="46" id="68"> <from>103</from> <to>101</to> </edge> <edge constructor="false" smooth="false" progid="47" id="69"> <from>97</from> <to>108</to> </edge> <edge constructor="false" smooth="false" progid="48" id="70"> <from>106</from> <to>105</to> </edge> <edge constructor="false" smooth="false" progid="49" id="71"> <from>108</from> <to>107</to> </edge> <edge constructor="false" smooth="false" progid="50" id="72"> <from>99</from> <to>106</to> </edge> <edge constructor="false" smooth="false" progid="51" id="73"> <from>105</from> <to>108</to> </edge> <edge constructor="false" smooth="false" progid="52" id="74"> <from>98</from> <to>107</to> </edge> <edge constructor="false" smooth="false" progid="53" id="75"> <from>100</from> <to>105</to> </edge> <edge constructor="false" smooth="false" progid="54" id="76"> <from>107</from> <to>106</to> </edge> <vertex x="9.0" y="1.3" z="0.0" progid="1" id="77"/> <vertex x="1.0" y="1.3" z="0.0" progid="2" id="78"/> <vertex x="1.0" y="1.0" z="0.0" progid="3" id="79"/> <vertex x="9.0" y="1.0" z="0.0" progid="4" id="80"/> <vertex x="9.0" y="1.3" z="3.0" progid="5" id="81"/> <vertex x="1.0" y="1.3" z="3.0" progid="6" id="82"/> <vertex x="9.0" y="1.0" z="3.0" progid="7" id="83"/> <vertex x="1.0" y="1.0" z="3.0" progid="8" id="84"/> <vertex x="7.1" y="1.0" z="2.0" progid="9" id="85"/> <vertex x="7.1" y="1.0" z="0.0" progid="10" id="86"/> <vertex x="7.9" y="1.0" z="2.0" progid="11" id="87"/> <vertex x="7.9" y="1.0" z="0.0" progid="12" id="88"/> <vertex x="7.1" y="1.3" z="2.0" progid="13" id="89"/> <vertex x="7.9" y="1.3" z="2.0" progid="14" id="90"/> <vertex x="7.9" y="1.3" z="0.0" progid="15" id="91"/> <vertex x="7.1" y="1.3" z="0.0" progid="16" id="92"/> <vertex x="3.5" y="1.0" z="2.3" progid="17" id="93"/> <vertex x="2.0" y="1.0" z="0.8" progid="18" id="94"/> <vertex x="2.0" y="1.0" z="2.3" progid="19" id="95"/> <vertex x="3.5" y="1.0" z="0.8" progid="20" id="96"/> <vertex x="4.5" y="1.0" z="0.8" progid="21" id="97"/> <vertex x="6.0" y="1.0" z="0.8" progid="22" id="98"/> <vertex x="6.0" y="1.0" z="2.3" progid="23" id="99"/> <vertex x="4.5" y="1.0" z="2.3" progid="24" id="100"/> <vertex x="2.0" y="1.3" z="2.3" progid="25" id="101"/> <vertex x="2.0" y="1.3" z="0.8" progid="26" id="102"/> <vertex x="3.5" y="1.3" z="2.3" progid="27" id="103"/> <vertex x="3.5" y="1.3" z="0.8" progid="28" id="104"/> <vertex x="4.5" y="1.3" z="2.3" progid="29" id="105"/> <vertex x="6.0" y="1.3" z="2.3" progid="30" id="106"/> <vertex x="6.0" y="1.3" z="0.8" progid="31" id="107"/> <vertex x="4.5" y="1.3" z="0.8" progid="32" id="108"/> </space> <material name="Functional" B="0.7" G="0.87" R="0.96" id="114"/> <material name="Construction" B="0.9" G="0.9" R="0.9" id="115"/> <material name="Void" B="0.8035714" G="0.8142857" R="0.91071427" id="116"/> <view name="(Current)" id="117"> <scalefactor>0</scalefactor> <camera x="8.817874928365503" z="7.55822554847203" y="-11.683021349640233"/> <center x="5.0144273074238574" z="1.8066970676353993" y="1.681528059637209"/> <roll x="0.09361887314388918" z="0.9396926207859122" y="-0.32895787729097087"/> <focalwidth>35.0</focalwidth> <type>6</type> <hidden>5</hidden> </view> <global> <key>brick</key> <value xsi:type="DoubleType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <double>0.12</double> </value> </global> <global> <key>isolation</key> <value xsi:type="DoubleType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <double>0.1</double> </value> </global> <global> <key>pi</key> <value xsi:type="DoubleType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <double>3.141592653589793</double> </value> </global> <global> <key>roof</key> <value xsi:type="DoubleType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <double>0.07</double> </value> </global> <global> <key>wall</key> <value xsi:type="DoubleType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <double>0.15</double> </value> </global> </bmodel> --- NEW FILE: wall-hole.xml --- <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <bmodel> <active>1</active> <cs>64</cs> <name>new project</name> <space type="1" transparent="true" union="false" net="false" voidref="2" name="World" progid="0" id="1"> <description/> <Classification>unassigned</Classification> <constructor xsi:type="CoordinateSystemType" onlyplane="false" editable="true" active="true" progid="1" id="64" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <vertex x="0.0" y="0.0" z="0.0" id="65"/> <ijn> <vertex x="1.0" y="0.0" z="0.0" id="61"/> <vertex x="0.0" y="1.0" z="0.0" id="62"/> <vertex x="0.0" y="0.0" z="1.0" id="63"/> </ijn> </constructor> <space type="1" transparent="true" union="false" net="false" name="Void" progid="1" id="2"> <description/> <Classification>unassigned</Classification> </space> <space type="0" transparent="false" union="false" net="false" voidref="4" name="Wall" progid="2" id="3"> <description/> <Classification>unassigned</Classification> <boundary>9</boundary> <boundary>10</boundary> <boundary>11</boundary> <boundary>12</boundary> <boundary>13</boundary> <boundary>14</boundary> <boundary>15</boundary> <boundary>16</boundary> <boundary>18</boundary> <boundary>20</boundary> <space type="1" transparent="true" union="false" net="false" name="Void" progid="1" id="4"> <description/> <Classification>unassigned</Classification> </space> </space> <space type="1" transparent="true" union="false" net="false" voidref="6" name="Window" progid="3" id="5"> <description/> <Classification>unassigned</Classification> <boundary>15</boundary> <boundary>16</boundary> <boundary>17</boundary> <boundary>18</boundary> <boundary>19</boundary> <boundary>20</boundary> <space type="1" transparent="true" union="false" net="false" name="Void" progid="1" id="6"> <description/> <Classification>unassigned</Classification> </space> </space> <space type="1" transparent="true" union="false" net="false" voidref="8" name="Exterior" progid="4" id="7"> <description/> <Classification>una... [truncated message content] |
From: Michael L. <he...@us...> - 2009-04-21 10:21:39
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv18998/src/net/sourceforge/bprocessor/model Modified Files: Vertex.java Surface.java Project.java Container.java Added Files: Tesselator.java Log Message: Export tesselated objects Index: Surface.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Surface.java,v retrieving revision 1.223 retrieving revision 1.224 diff -C2 -d -r1.223 -r1.224 *** Surface.java 31 Mar 2009 11:03:21 -0000 1.223 --- Surface.java 21 Apr 2009 10:21:21 -0000 1.224 *************** *** 1525,1528 **** --- 1525,1539 ---- /** + * + * @return true if valid + */ + public boolean valid() { + if (Double.isNaN(getArea())) { + return false; + } + return true; + } + + /** * Returns the outward pointing normal to this Surface * @return A vector normal for this surface, null if the surface consists of only one edge *************** *** 1533,1536 **** --- 1544,1557 ---- } + + private static boolean check(double[] values) { + for (int i = 0; i < values.length; i++) { + if (String.valueOf(values[i]).equals("NaN")) { + return false; + } + } + return true; + } + /** * @param edges edges *************** *** 1557,1560 **** --- 1578,1582 ---- ys[i] = current.y; zs[i] = current.z; + if (current == e[i].from) { current = e[i].to; *************** *** 1594,1597 **** --- 1616,1620 ---- } } + double min = Double.MAX_VALUE; int inx1 = -1; Index: Vertex.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Vertex.java,v retrieving revision 1.79 retrieving revision 1.80 diff -C2 -d -r1.79 -r1.80 *** Vertex.java 31 Mar 2009 11:03:21 -0000 1.79 --- Vertex.java 21 Apr 2009 10:21:21 -0000 1.80 *************** *** 675,677 **** --- 675,702 ---- log.info(object); } + + + private static boolean invalid(double value) { + if (Double.isNaN(value)) { + return true; + } + return false; + } + + /** + * + * @return false if problem + */ + public boolean check() { + if (invalid(x)) { + return false; + } + if (invalid(y)) { + return false; + } + if (invalid(z)) { + return false; + } + return true; + } } Index: Container.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Container.java,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** Container.java 16 Apr 2009 11:12:10 -0000 1.19 --- Container.java 21 Apr 2009 10:21:21 -0000 1.20 *************** *** 8,11 **** --- 8,12 ---- package net.sourceforge.bprocessor.model; + import java.io.PrintStream; import java.util.ArrayList; import java.util.Collection; *************** *** 264,274 **** } } ! { ! Iterator iter = getVertices().iterator(); ! while (iter.hasNext()) { ! Geometric current = (Geometric) iter.next(); ! if (current.getOwner() != this) { ! throw new Error(current + " not owned by " + this); ! } } } --- 265,274 ---- } } ! for (Vertex current : getVertices()) { ! if (current.getOwner() != this) { ! throw new Error(current + " not owned by " + this); ! } ! if (!current.check()) { ! throw new Error(current + " is wrong "); } } *************** *** 1523,1526 **** --- 1523,1530 ---- */ public void orient(Surface leader) { + if (leader.getFrontDomain() == this) { + leader.flip(); + } + List<Surface> envelope = new LinkedList(getEnvelope()); Command.Inverse inv = new Command.Inverse(envelope); *************** *** 1553,1568 **** } } ! if (unreachable.isEmpty()) { ! System.out.println("-- everything reachable --"); ! } else { ! System.out.println("-- unreachable --"); ! for (Surface current : unreachable) { ! System.out.println(" " + current); } } } ! ! } --- 1557,1627 ---- } } + } + + /** + * + * @param out PrintStream + */ + public void exportTesselated(PrintStream out) { + Tesselator tesselator = Project.getInstance().getTesselator(); + Container holder = + new Container("tesselation of " + this.getName(), Container.FUNCTIONAL, true); + Container interior = new Container("interior", Container.CONSTRUCTION, true); + holder.add(interior); + List<Surface> surfaces = new LinkedList(getEnvelope()); ! for (Surface current : surfaces) { ! Vertex normal = current.normal(); ! ! 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); ! } ! } } } + interior.orient(interior.getEnvelope().iterator().next()); + interior.export(out); + getOwner().add(holder); + Project.getInstance().changed(Project.getInstance()); } ! /** ! * ! * @param out PrintStream ! */ ! public void export(PrintStream out) { ! List<Surface> surfaces = new LinkedList(getEnvelope()); ! List<Edge> edges = new LinkedList(Surface.edges(surfaces)); ! List<Vertex> vertices = new LinkedList(Edge.vertices(edges)); ! ! HashMap<Vertex, Integer> vmap = new HashMap(); ! int count = 1; ! for (Vertex current : vertices) { ! vmap.put(current, count++); ! out.println("v " + current.getX() + ! " " + current.getY() + " " + current.getZ()); ! } ! for (Surface current : surfaces) { ! List<Vertex> verts = current.getVertices(); ! out.print("f"); ! for (Vertex v : verts) { ! int i = vmap.get(v); ! out.print(" " + i); ! } ! out.println(); ! } ! } } --- NEW FILE: Tesselator.java --- //--------------------------------------------------------------------------------- // $Id: Tesselator.java,v 1.1 2009/04/21 10:21:21 henryml Exp $ // // Copyright (c) 2005 The BProcessor Team (http://bprocessor.sourceforge.net) // Released under the Lesser GNU Public License v2.1 //--------------------------------------------------------------------------------- package net.sourceforge.bprocessor.model; import java.util.List; /** * */ public interface Tesselator { /** * * @param surface Surface * @return list of triangular surfaces */ public List<Surface> tesselate(Surface surface); } Index: Project.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Project.java,v retrieving revision 1.162 retrieving revision 1.163 diff -C2 -d -r1.162 -r1.163 *** Project.java 30 Mar 2009 09:16:49 -0000 1.162 --- Project.java 21 Apr 2009 10:21:21 -0000 1.163 *************** *** 72,75 **** --- 72,77 ---- private static final int PORT = 8800; + private Tesselator tesselator; + /** The observers */ private List observers; *************** *** 357,360 **** --- 359,378 ---- /** * + * @param tesselator Tesselator + */ + public void setTesselator(Tesselator tesselator) { + this.tesselator = tesselator; + } + /** + * + * @return Tesselator + */ + public Tesselator getTesselator() { + return tesselator; + } + + + /** + * */ public void resetCam() { *************** *** 1499,1503 **** */ public void exportOBJ() { ! } --- 1517,1533 ---- */ public void exportOBJ() { ! List<Container> constructs = new LinkedList(); ! for (Space current : world.getElements()) { ! if (current instanceof Container) { ! if (!current.isVoid() && current.isConstructionSpace()) { ! Container container = (Container) current; ! constructs.add(container); ! } ! } ! } ! for (Container current : constructs) { ! System.out.println("-- " + current.getName() + " --"); ! current.exportTesselated(System.out); ! } } |
From: Michael L. <he...@us...> - 2009-04-16 11:12:21
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv14673/src/net/sourceforge/bprocessor/model Modified Files: SpaceAnalysis.java Container.java Log Message: Work in progress Index: SpaceAnalysis.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/SpaceAnalysis.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** SpaceAnalysis.java 13 Oct 2008 10:54:13 -0000 1.13 --- SpaceAnalysis.java 16 Apr 2009 11:12:10 -0000 1.14 *************** *** 22,27 **** ! private static final int FORWARD = 1; ! private static final int BACKWARD = -1; private Map<Edge, List<Surface>> edgemap; --- 22,29 ---- ! /** */ ! public static final int FORWARD = 1; ! /** */ ! public static final int BACKWARD = -1; private Map<Edge, List<Surface>> edgemap; *************** *** 29,33 **** private Set<Surface> mark; ! private static int travel(Surface surface, Edge edge) { Vertex vertex = surface.getFirstVertex(); for (Edge current : surface.getEdges()) { --- 31,41 ---- private Set<Surface> mark; ! /** ! * ! * @param surface Surface ! * @param edge Edge ! * @return status ! */ ! public static int travel(Surface surface, Edge edge) { Vertex vertex = surface.getFirstVertex(); for (Edge current : surface.getEdges()) { Index: Container.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Container.java,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** Container.java 31 Mar 2009 11:03:21 -0000 1.18 --- Container.java 16 Apr 2009 11:12:10 -0000 1.19 *************** *** 17,20 **** --- 17,21 ---- import java.util.List; import java.util.Map; + import java.util.Queue; import java.util.Set; *************** *** 1517,1519 **** --- 1518,1568 ---- } + /** + * + * @param leader Surface + */ + public void orient(Surface leader) { + List<Surface> envelope = new LinkedList(getEnvelope()); + Command.Inverse inv = new Command.Inverse(envelope); + Set<Surface> mark = new HashSet(); + Queue<Surface> queue = new LinkedList(); + queue.add(leader); + mark.add(leader); + while (!queue.isEmpty()) { + Surface current = queue.remove(); + for (Edge edge : current.getEdges()) { + List<Surface> lst = inv.surfaces(edge); + for (Surface adjacent : lst) { + if (!mark.contains(adjacent)) { + mark.add(adjacent); + queue.add(adjacent); + int lead = SpaceAnalysis.travel(current, edge); + int follow = SpaceAnalysis.travel(adjacent, edge); + if (lead == follow) { + adjacent.flip(); + } + } + } + } + } + + List<Surface> unreachable = new LinkedList(); + for (Surface current : envelope) { + if (!mark.contains(current)) { + unreachable.add(current); + } + } + + if (unreachable.isEmpty()) { + System.out.println("-- everything reachable --"); + } else { + System.out.println("-- unreachable --"); + for (Surface current : unreachable) { + System.out.println(" " + current); + } + } + } + + + } |
From: Michael L. <he...@us...> - 2009-04-16 11:12:18
|
Update of /cvsroot/bprocessor/test/input In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv14648/input Added Files: tesselate2.xml Log Message: Work in progress --- NEW FILE: tesselate2.xml --- <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <bmodel> <active>1</active> <cs>64</cs> <name>new project</name> <space net="false" union="false" transparent="true" type="1" voidref="2" name="World" progid="0" id="1"> <description/> <Classification>unassigned</Classification> <constructor xsi:type="CoordinateSystemType" onlyplane="false" editable="true" active="true" progid="1" id="64" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <vertex y="0.0" x="0.0" z="0.0" id="65"/> <ijn> <vertex y="0.0" x="1.0" z="0.0" id="61"/> <vertex y="1.0" x="0.0" z="0.0" id="62"/> <vertex y="0.0" x="0.0" z="1.0" id="63"/> </ijn> </constructor> <space net="false" union="false" transparent="true" type="1" name="Void" progid="1" id="2"> <description/> <Classification>unassigned</Classification> </space> <space net="false" union="false" transparent="false" type="0" voidref="4" name="Wall" progid="2" id="3"> <description/> <Classification>unassigned</Classification> <boundary>9</boundary> <boundary>10</boundary> <boundary>11</boundary> <boundary>12</boundary> <boundary>13</boundary> <boundary>14</boundary> <boundary>16</boundary> <boundary>18</boundary> <boundary>19</boundary> <boundary>20</boundary> <space net="false" union="false" transparent="true" type="1" name="Void" progid="1" id="4"> <description/> <Classification>unassigned</Classification> </space> </space> <space net="false" union="false" transparent="true" type="1" voidref="6" name="Exterior" progid="3" id="5"> <description/> <Classification>unassigned</Classification> <boundary>9</boundary> <boundary>10</boundary> <boundary>11</boundary> <boundary>12</boundary> <boundary>13</boundary> <boundary>14</boundary> <boundary>15</boundary> <boundary>17</boundary> <space net="false" union="false" transparent="true" type="1" name="Void" progid="1" id="6"> <description/> <Classification>unassigned</Classification> </space> </space> <space net="false" union="false" transparent="true" type="1" voidref="8" name="Hole" progid="4" id="7"> <description/> <Classification>unassigned</Classification> <boundary>15</boundary> <boundary>16</boundary> <boundary>17</boundary> <boundary>18</boundary> <boundary>19</boundary> <boundary>20</boundary> <space net="false" union="false" transparent="true" type="1" name="Void" progid="1" id="8"> <description/> <Classification>unassigned</Classification> </space> </space> <surface progid="7" id="9"> <edgeref>25</edgeref> <edgeref>32</edgeref> <edgeref>28</edgeref> <edgeref>31</edgeref> <back>5</back> <front>3</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="8" id="10"> <edgeref>25</edgeref> <edgeref>27</edgeref> <edgeref>23</edgeref> <edgeref>30</edgeref> <back>3</back> <front>5</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="9" id="11"> <edgeref>26</edgeref> <edgeref>32</edgeref> <edgeref>27</edgeref> <edgeref>24</edgeref> <hole>15</hole> <back>5</back> <front>3</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="10" id="12"> <edgeref>26</edgeref> <edgeref>28</edgeref> <edgeref>29</edgeref> <edgeref>21</edgeref> <back>3</back> <front>5</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="11" id="13"> <edgeref>21</edgeref> <edgeref>22</edgeref> <edgeref>23</edgeref> <edgeref>24</edgeref> <back>3</back> <front>5</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="12" id="14"> <edgeref>22</edgeref> <edgeref>30</edgeref> <edgeref>31</edgeref> <edgeref>29</edgeref> <hole>17</hole> <back>5</back> <front>3</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="19" id="15"> <edgeref>36</edgeref> <edgeref>33</edgeref> <edgeref>34</edgeref> <edgeref>35</edgeref> <back>5</back> <front>7</front> <exterior>11</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="20" id="16"> <edgeref>36</edgeref> <edgeref>40</edgeref> <edgeref>37</edgeref> <edgeref>38</edgeref> <back>7</back> <front>3</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="21" id="17"> <edgeref>43</edgeref> <edgeref>42</edgeref> <edgeref>44</edgeref> <edgeref>37</edgeref> <back>5</back> <front>7</front> <exterior>14</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="22" id="18"> <edgeref>38</edgeref> <edgeref>43</edgeref> <edgeref>41</edgeref> <edgeref>35</edgeref> <back>7</back> <front>3</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="23" id="19"> <edgeref>39</edgeref> <edgeref>44</edgeref> <edgeref>40</edgeref> <edgeref>33</edgeref> <back>7</back> <front>3</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="24" id="20"> <edgeref>39</edgeref> <edgeref>42</edgeref> <edgeref>41</edgeref> <edgeref>34</edgeref> <back>3</back> <front>7</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <edge constructor="false" smooth="false" progid="1" id="21"> <from>47</from> <to>46</to> </edge> <edge constructor="false" smooth="false" progid="2" id="22"> <from>46</from> <to>45</to> </edge> <edge constructor="false" smooth="false" progid="3" id="23"> <from>45</from> <to>48</to> </edge> <edge constructor="false" smooth="false" progid="4" id="24"> <from>48</from> <to>47</to> </edge> <edge constructor="false" smooth="false" progid="5" id="25"> <from>51</from> <to>52</to> </edge> <edge constructor="false" smooth="false" progid="6" id="26"> <from>47</from> <to>50</to> </edge> <edge constructor="false" smooth="false" progid="7" id="27"> <from>48</from> <to>52</to> </edge> <edge constructor="false" smooth="false" progid="8" id="28"> <from>50</from> <to>49</to> </edge> <edge constructor="false" smooth="false" progid="9" id="29"> <from>46</from> <to>49</to> </edge> <edge constructor="false" smooth="false" progid="10" id="30"> <from>45</from> <to>51</to> </edge> <edge constructor="false" smooth="false" progid="11" id="31"> <from>49</from> <to>51</to> </edge> <edge constructor="false" smooth="false" progid="12" id="32"> <from>52</from> <to>50</to> </edge> <edge constructor="false" smooth="false" progid="13" id="33"> <from>54</from> <to>53</to> </edge> <edge constructor="false" smooth="false" progid="14" id="34"> <from>56</from> <to>53</to> </edge> <edge constructor="false" smooth="false" progid="15" id="35"> <from>55</from> <to>56</to> </edge> <edge constructor="false" smooth="false" progid="16" id="36"> <from>55</from> <to>54</to> </edge> <edge constructor="false" smooth="false" progid="17" id="37"> <from>60</from> <to>58</to> </edge> <edge constructor="false" smooth="false" progid="18" id="38"> <from>55</from> <to>60</to> </edge> <edge constructor="false" smooth="false" progid="19" id="39"> <from>53</from> <to>57</to> </edge> <edge constructor="false" smooth="false" progid="20" id="40"> <from>54</from> <to>58</to> </edge> <edge constructor="false" smooth="false" progid="21" id="41"> <from>56</from> <to>59</to> </edge> <edge constructor="false" smooth="false" progid="22" id="42"> <from>57</from> <to>59</to> </edge> <edge constructor="false" smooth="false" progid="23" id="43"> <from>59</from> <to>60</to> </edge> <edge constructor="false" smooth="false" progid="24" id="44"> <from>58</from> <to>57</to> </edge> <vertex y="1.4" x="8.0" z="0.0" progid="1" id="45"/> <vertex y="1.4" x="1.0" z="0.0" progid="2" id="46"/> <vertex y="1.0" x="1.0" z="0.0" progid="3" id="47"/> <vertex y="1.0" x="8.0" z="0.0" progid="4" id="48"/> <vertex y="1.4" x="1.0" z="4.0" progid="5" id="49"/> <vertex y="1.0" x="1.0" z="4.0" progid="6" id="50"/> <vertex y="1.4" x="8.0" z="4.0" progid="7" id="51"/> <vertex y="1.0" x="8.0" z="4.0" progid="8" id="52"/> <vertex y="1.0" x="1.5" z="3.5" progid="9" id="53"/> <vertex y="1.0" x="1.5" z="0.5" progid="10" id="54"/> <vertex y="1.0" x="7.5" z="0.5" progid="11" id="55"/> <vertex y="1.0" x="7.5" z="3.5" progid="12" id="56"/> <vertex y="1.4" x="1.5" z="3.5" progid="13" id="57"/> <vertex y="1.4" x="1.5" z="0.5" progid="14" id="58"/> <vertex y="1.4" x="7.5" z="3.5" progid="15" id="59"/> <vertex y="1.4" x="7.5" z="0.5" progid="16" id="60"/> </space> <material name="Void" B="0.8035714" R="0.91071427" G="0.8142857" id="66"/> <material name="Construction" B="0.9" R="0.9" G="0.9" id="67"/> <material name="Functional" B="0.7" R="0.96" G="0.87" id="68"/> <view name="(Current)" id="69"> <scalefactor>0</scalefactor> <camera z="12.150178565737747" y="-12.472347509862619" x="15.813726719528631"/> <center z="2.0" y="3.0" x="6.0"/> <roll z="0.9723699203976769" y="-0.1971351203864072" x="0.12503792311156225"/> <focalwidth>35.0</focalwidth> <type>6</type> <hidden>5</hidden> <hidden>7</hidden> </view> <global> <key>pi</key> <value xsi:type="DoubleType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <double>3.141592653589793</double> </value> </global> <global> <key>wall</key> <value xsi:type="DoubleType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <double>0.15</double> </value> </global> <global> <key>isolation</key> <value xsi:type="DoubleType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <double>0.1</double> </value> </global> <global> <key>brick</key> <value xsi:type="DoubleType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <double>0.12</double> </value> </global> <global> <key>roof</key> <value xsi:type="DoubleType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <double>0.07</double> </value> </global> </bmodel> |
From: Michael L. <he...@us...> - 2009-04-16 11:12:16
|
Update of /cvsroot/bprocessor/bprocessor/components In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv14524/components Modified Files: lib.bpl Log Message: Work in progress Index: lib.bpl =================================================================== RCS file: /cvsroot/bprocessor/bprocessor/components/lib.bpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** lib.bpl 26 Nov 2007 18:21:32 -0000 1.2 --- lib.bpl 16 Apr 2009 11:11:59 -0000 1.3 *************** *** 1,9 **** <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <Library> ! <libObj useableLevels="0" name="box.obj" author="n/a" version="n/a" locked="false" progid="0" id="1"> ! <space union="true" voidref="3" transparent="false" type="0" name="box.obj" progid="0" id="2"> <description/> <Classification>unassigned</Classification> ! <space union="false" transparent="true" type="1" name="Void" progid="1" id="3"> <description/> <Classification>unassigned</Classification> --- 1,9 ---- [...110917 lines suppressed...] + <vertex y="0.02" z="0.013" x="0.0080" progid="49" id="27477"/> + <vertex y="0.013" z="0.087" x="0.0" progid="50" id="27478"/> + <vertex y="0.107" z="0.087" x="0.0" progid="51" id="27479"/> + <vertex y="0.054" z="0.013" x="0.0080" progid="52" id="27480"/> + <vertex y="0.098" z="0.09" x="0.023" progid="53" id="27481"/> + <vertex y="0.11" z="0.049" x="0.0" progid="54" id="27482"/> + <vertex y="0.098" z="0.087" x="0.0080" progid="55" id="27483"/> + <vertex y="0.107" z="0.041" x="0.0" progid="56" id="27484"/> + <vertex y="0.02" z="0.01" x="0.023" progid="57" id="27485"/> + <vertex y="0.11" z="0.01" x="0.03" progid="58" id="27486"/> + <vertex y="0.107" z="0.049" x="0.0" progid="59" id="27487"/> + <vertex y="0.098" z="0.09" x="0.0080" progid="60" id="27488"/> + <vertex y="0.107" z="0.049" x="0.02" progid="61" id="27489"/> + <vertex y="0.02" z="0.013" x="0.023" progid="62" id="27490"/> + <vertex y="0.066" z="0.01" x="0.0080" progid="63" id="27491"/> + <vertex y="0.1" z="0.01" x="0.023" progid="64" id="27492"/> + </space> + </libObj> </Library> |
From: Michael L. <he...@us...> - 2009-04-16 11:12:01
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv14513/src/net/sourceforge/bprocessor/gl/view Modified Files: PopupMenu.java Log Message: Work in progress Index: PopupMenu.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/PopupMenu.java,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** PopupMenu.java 31 Mar 2009 11:03:24 -0000 1.27 --- PopupMenu.java 16 Apr 2009 11:11:48 -0000 1.28 *************** *** 435,438 **** --- 435,449 ---- menu.add(action); } + { + AbstractAction action = new SpaceMenuAction(sp, "Orient") { + public void actionPerformed(ActionEvent event) { + List<Surface> surfaces = new LinkedList(space.getEnvelope()); + Surface leader = surfaces.iterator().next(); + space.orient(leader); + } + }; + menu.add(action); + } + if (CHECKS) { AbstractAction check = new SpaceMenuAction(sp, "Consistency Check") { |
From: Michael L. <he...@us...> - 2009-03-31 11:03:28
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv3871/src/net/sourceforge/bprocessor/gl/view Modified Files: PopupMenu.java Log Message: Automatic assignment Index: PopupMenu.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/PopupMenu.java,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** PopupMenu.java 30 Mar 2009 09:16:42 -0000 1.26 --- PopupMenu.java 31 Mar 2009 11:03:24 -0000 1.27 *************** *** 408,411 **** --- 408,438 ---- menu.add(action); } + { + AbstractAction action = new SpaceMenuAction(sp, "Export") { + public void actionPerformed(ActionEvent event) { + List<Surface> surfaces = new LinkedList(space.getEnvelope()); + List<Edge> edges = new LinkedList(Surface.edges(surfaces)); + List<Vertex> vertices = new LinkedList(Edge.vertices(edges)); + + HashMap<Vertex, Integer> vmap = new HashMap(); + int count = 1; + for (Vertex current : vertices) { + vmap.put(current, count++); + System.out.println("v " + current.getX() + + " " + current.getY() + " " + current.getZ()); + } + for (Surface current : surfaces) { + List<Vertex> verts = current.getVertices(); + System.out.print("f"); + for (Vertex v : verts) { + int i = vmap.get(v); + System.out.print(" " + i); + } + System.out.println(); + } + } + }; + menu.add(action); + } if (CHECKS) { AbstractAction check = new SpaceMenuAction(sp, "Consistency Check") { |
From: Michael L. <he...@us...> - 2009-03-31 11:03:28
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv3854/src/net/sourceforge/bprocessor/model Modified Files: Vertex.java Surface.java Container.java Log Message: Automatic assignment Index: Surface.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Surface.java,v retrieving revision 1.222 retrieving revision 1.223 diff -C2 -d -r1.222 -r1.223 *** Surface.java 4 Feb 2009 15:09:52 -0000 1.222 --- Surface.java 31 Mar 2009 11:03:21 -0000 1.223 *************** *** 35,39 **** */ public class Surface extends Geometric implements Parametric { ! private static final boolean AUTOMATIC = false; private static Logger log = Logger.getLogger(Surface.class); --- 35,39 ---- */ public class Surface extends Geometric implements Parametric { ! private static final boolean AUTOMATIC = true; private static Logger log = Logger.getLogger(Surface.class); Index: Vertex.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Vertex.java,v retrieving revision 1.78 retrieving revision 1.79 diff -C2 -d -r1.78 -r1.79 *** Vertex.java 21 Jan 2008 13:37:25 -0000 1.78 --- Vertex.java 31 Mar 2009 11:03:21 -0000 1.79 *************** *** 558,562 **** } - /** * --- 558,561 ---- *************** *** 578,583 **** } ! ! /** * Center --- 577,627 ---- } ! /** ! * ! * @param a double ! * @param b double ! * @return true if considered equal within some small value ! */ ! public static boolean eq(double a, double b) { ! return Math.abs(a - b) < 0.00001; ! } ! ! /** ! * Sort ! * @param vertices list of vertices to sort ! */ ! public static void sort(List<Vertex> vertices) { ! Comparator<Vertex> comparator = new Comparator<Vertex>() { ! public int compare(Vertex v1, Vertex v2) { ! if (eq(v1.x, v2.x)) { ! if (eq(v1.y, v2.y)) { ! if (eq(v1.z, v2.z)) { ! return 0; ! } else { ! if (v1.z < v2.z) { ! return -1; ! } else { ! return 1; ! } ! } ! } else { ! if (v1.y < v2.y) { ! return -1; ! } else { ! return 1; ! } ! } ! } else { ! if (v1.x < v2.x) { ! return -1; ! } else { ! return 1; ! } ! } ! } ! }; ! Collections.sort(vertices, comparator); ! } ! /** * Center Index: Container.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Container.java,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** Container.java 3 Nov 2008 13:14:09 -0000 1.17 --- Container.java 31 Mar 2009 11:03:21 -0000 1.18 *************** *** 11,15 **** import java.util.Collection; import java.util.Collections; - import java.util.Comparator; import java.util.HashMap; import java.util.HashSet; --- 11,14 ---- *************** *** 1127,1133 **** } ! private static boolean eq(double a, double b) { ! return Math.abs(a - b) < 0.00001; ! } /** --- 1126,1130 ---- } ! /** *************** *** 1151,1188 **** public void simplify() { { - Comparator<Vertex> comparator = new Comparator<Vertex>() { - public int compare(Vertex v1, Vertex v2) { - if (eq(v1.x, v2.x)) { - if (eq(v1.y, v2.y)) { - if (eq(v1.z, v2.z)) { - return 0; - } else { - if (v1.z < v2.z) { - return -1; - } else { - return 1; - } - } - } else { - if (v1.y < v2.y) { - return -1; - } else { - return 1; - } - } - } else { - if (v1.x < v2.x) { - return -1; - } else { - return 1; - } - } - } - }; List<Vertex> sorted = new LinkedList(getVertices()); ! Collections.sort(sorted, comparator); Collection<Collection<Vertex>> equivalences = new LinkedList(); { ! //Remove eqivalent vertexes Vertex leader = null; Collection<Vertex> equivalence = null; --- 1148,1156 ---- public void simplify() { { List<Vertex> sorted = new LinkedList(getVertices()); ! Vertex.sort(sorted); Collection<Collection<Vertex>> equivalences = new LinkedList(); { ! // Remove equivalent vertexes Vertex leader = null; Collection<Vertex> equivalence = null; |
From: Michael L. <he...@us...> - 2009-03-30 09:16:59
|
Update of /cvsroot/bprocessor/test/input In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv23379/input Added Files: cut2.xml tesselate1.xml cut5.xml cut4.xml cut1.xml cut3.xml Log Message: Tesselation implemented --- NEW FILE: cut5.xml --- <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <bmodel> <active>1</active> <cs>92</cs> <name>new project</name> <space union="false" net="false" transparent="true" voidref="2" name="World" type="1" progid="0" id="1"> <description/> <Classification>unassigned</Classification> <constructor xsi:type="CoordinateSystemType" onlyplane="false" editable="true" active="true" progid="1" id="92" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <vertex z="0.0" y="0.0" x="0.0" id="93"/> <ijn> <vertex z="0.0" y="0.0" x="1.0" id="89"/> <vertex z="0.0" y="1.0" x="0.0" id="90"/> <vertex z="1.0" y="0.0" x="0.0" id="91"/> </ijn> </constructor> <space union="false" net="false" transparent="true" name="Void" type="1" progid="1" id="2"> <description/> <Classification>unassigned</Classification> </space> <space union="false" net="false" transparent="true" voidref="4" name="Inside" type="1" progid="4" id="3"> <description/> <Classification>unassigned</Classification> <boundary>12</boundary> <boundary>18</boundary> <boundary>19</boundary> <boundary>20</boundary> <boundary>21</boundary> <boundary>22</boundary> <boundary>28</boundary> <space union="false" net="false" transparent="true" name="Void" type="1" progid="1" id="4"> <description/> <Classification>unassigned</Classification> </space> </space> <space union="false" net="false" transparent="false" voidref="6" name="Wall" type="0" progid="5" id="5"> <description/> <Classification>unassigned</Classification> <boundary>11</boundary> <boundary>13</boundary> <boundary>14</boundary> <boundary>15</boundary> <boundary>16</boundary> <boundary>17</boundary> <boundary>19</boundary> <boundary>20</boundary> <boundary>21</boundary> <boundary>22</boundary> <boundary>24</boundary> <boundary>25</boundary> <boundary>26</boundary> <boundary>27</boundary> <space union="false" net="false" transparent="true" name="Void" type="1" progid="1" id="6"> <description/> <Classification>unassigned</Classification> </space> </space> <space union="false" net="false" transparent="true" voidref="8" name="E" type="1" progid="6" id="7"> <description/> <Classification>unassigned</Classification> <boundary>11</boundary> <boundary>12</boundary> <boundary>13</boundary> <boundary>14</boundary> <boundary>15</boundary> <boundary>16</boundary> <boundary>17</boundary> <boundary>18</boundary> <boundary>23</boundary> <space union="false" net="false" transparent="true" name="Void" type="1" progid="1" id="8"> <description/> <Classification>unassigned</Classification> </space> </space> <space union="false" net="false" transparent="true" voidref="10" name="Vindue" type="1" progid="7" id="9"> <description/> <Classification>unassigned</Classification> <boundary>23</boundary> <boundary>24</boundary> <boundary>25</boundary> <boundary>26</boundary> <boundary>27</boundary> <boundary>28</boundary> <space union="false" net="false" transparent="true" name="Void" type="1" progid="1" id="10"> <description/> <Classification>unassigned</Classification> </space> </space> <surface progid="91" id="11"> <edgeref>30</edgeref> <edgeref>40</edgeref> <edgeref>47</edgeref> <edgeref>51</edgeref> <back>7</back> <front>5</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="92" id="12"> <edgeref>36</edgeref> <edgeref>33</edgeref> <edgeref>34</edgeref> <edgeref>35</edgeref> <back>3</back> <front>7</front> <exterior>13</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="93" id="13"> <edgeref>30</edgeref> <edgeref>31</edgeref> <edgeref>32</edgeref> <edgeref>29</edgeref> <hole>12</hole> <back>5</back> <front>7</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="94" id="14"> <edgeref>37</edgeref> <edgeref>39</edgeref> <edgeref>38</edgeref> <edgeref>32</edgeref> <hole>23</hole> <back>7</back> <front>5</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="95" id="15"> <edgeref>37</edgeref> <edgeref>43</edgeref> <edgeref>51</edgeref> <edgeref>29</edgeref> <back>5</back> <front>7</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="96" id="16"> <edgeref>38</edgeref> <edgeref>45</edgeref> <edgeref>40</edgeref> <edgeref>31</edgeref> <back>7</back> <front>5</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="97" id="17"> <edgeref>39</edgeref> <edgeref>43</edgeref> <edgeref>47</edgeref> <edgeref>45</edgeref> <hole>18</hole> <back>7</back> <front>5</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="98" id="18"> <edgeref>42</edgeref> <edgeref>49</edgeref> <edgeref>52</edgeref> <edgeref>44</edgeref> <back>7</back> <front>3</front> <exterior>17</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="99" id="19"> <edgeref>41</edgeref> <edgeref>52</edgeref> <edgeref>46</edgeref> <edgeref>35</edgeref> <back>5</back> <front>3</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="100" id="20"> <edgeref>41</edgeref> <edgeref>44</edgeref> <edgeref>48</edgeref> <edgeref>36</edgeref> <hole>28</hole> <back>3</back> <front>5</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="101" id="21"> <edgeref>42</edgeref> <edgeref>50</edgeref> <edgeref>33</edgeref> <edgeref>48</edgeref> <back>3</back> <front>5</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="102" id="22"> <edgeref>46</edgeref> <edgeref>49</edgeref> <edgeref>50</edgeref> <edgeref>34</edgeref> <back>5</back> <front>3</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="109" id="23"> <edgeref>53</edgeref> <edgeref>54</edgeref> <edgeref>55</edgeref> <edgeref>56</edgeref> <back>7</back> <front>9</front> <exterior>14</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="110" id="24"> <edgeref>53</edgeref> <edgeref>60</edgeref> <edgeref>58</edgeref> <edgeref>64</edgeref> <back>9</back> <front>5</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="111" id="25"> <edgeref>54</edgeref> <edgeref>60</edgeref> <edgeref>63</edgeref> <edgeref>62</edgeref> <back>5</back> <front>9</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="112" id="26"> <edgeref>57</edgeref> <edgeref>59</edgeref> <edgeref>64</edgeref> <edgeref>56</edgeref> <back>5</back> <front>9</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="113" id="27"> <edgeref>57</edgeref> <edgeref>61</edgeref> <edgeref>62</edgeref> <edgeref>55</edgeref> <back>9</back> <front>5</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="114" id="28"> <edgeref>59</edgeref> <edgeref>61</edgeref> <edgeref>63</edgeref> <edgeref>58</edgeref> <back>3</back> <front>9</front> <exterior>20</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <edge smooth="false" constructor="false" progid="84" id="29"> <from>65</from> <to>68</to> </edge> <edge smooth="false" constructor="false" progid="85" id="30"> <from>68</from> <to>66</to> </edge> <edge smooth="false" constructor="false" progid="86" id="31"> <from>66</from> <to>67</to> </edge> <edge smooth="false" constructor="false" progid="87" id="32"> <from>67</from> <to>65</to> </edge> <edge smooth="false" constructor="false" progid="88" id="33"> <from>69</from> <to>70</to> </edge> <edge smooth="false" constructor="false" progid="89" id="34"> <from>70</from> <to>71</to> </edge> <edge smooth="false" constructor="false" progid="90" id="35"> <from>71</from> <to>72</to> </edge> <edge smooth="false" constructor="false" progid="91" id="36"> <from>72</from> <to>69</to> </edge> <edge smooth="false" constructor="false" progid="92" id="37"> <from>65</from> <to>79</to> </edge> <edge smooth="false" constructor="false" progid="93" id="38"> <from>67</from> <to>76</to> </edge> <edge smooth="false" constructor="false" progid="94" id="39"> <from>76</from> <to>79</to> </edge> <edge smooth="false" constructor="false" progid="95" id="40"> <from>66</from> <to>77</to> </edge> <edge smooth="false" constructor="false" progid="96" id="41"> <from>72</from> <to>75</to> </edge> <edge smooth="false" constructor="false" progid="97" id="42"> <from>80</from> <to>74</to> </edge> <edge smooth="false" constructor="false" progid="98" id="43"> <from>79</from> <to>78</to> </edge> <edge smooth="false" constructor="false" progid="99" id="44"> <from>75</from> <to>80</to> </edge> <edge smooth="false" constructor="false" progid="100" id="45"> <from>77</from> <to>76</to> </edge> <edge smooth="false" constructor="false" progid="101" id="46"> <from>71</from> <to>73</to> </edge> <edge smooth="false" constructor="false" progid="102" id="47"> <from>78</from> <to>77</to> </edge> <edge smooth="false" constructor="false" progid="103" id="48"> <from>69</from> <to>80</to> </edge> <edge smooth="false" constructor="false" progid="104" id="49"> <from>74</from> <to>73</to> </edge> <edge smooth="false" constructor="false" progid="105" id="50"> <from>70</from> <to>74</to> </edge> <edge smooth="false" constructor="false" progid="106" id="51"> <from>68</from> <to>78</to> </edge> <edge smooth="false" constructor="false" progid="107" id="52"> <from>73</from> <to>75</to> </edge> <edge smooth="false" constructor="false" progid="108" id="53"> <from>83</from> <to>81</to> </edge> <edge smooth="false" constructor="false" progid="109" id="54"> <from>82</from> <to>81</to> </edge> <edge smooth="false" constructor="false" progid="110" id="55"> <from>84</from> <to>82</to> </edge> <edge smooth="false" constructor="false" progid="111" id="56"> <from>84</from> <to>83</to> </edge> <edge smooth="false" constructor="false" progid="112" id="57"> <from>84</from> <to>88</to> </edge> <edge smooth="false" constructor="false" progid="113" id="58"> <from>85</from> <to>87</to> </edge> <edge smooth="false" constructor="false" progid="114" id="59"> <from>88</from> <to>85</to> </edge> <edge smooth="false" constructor="false" progid="115" id="60"> <from>81</from> <to>87</to> </edge> <edge smooth="false" constructor="false" progid="116" id="61"> <from>86</from> <to>88</to> </edge> <edge smooth="false" constructor="false" progid="117" id="62"> <from>82</from> <to>86</to> </edge> <edge smooth="false" constructor="false" progid="118" id="63"> <from>87</from> <to>86</to> </edge> <edge smooth="false" constructor="false" progid="119" id="64"> <from>83</from> <to>85</to> </edge> <vertex z="0.0" y="1.0" x="1.0" progid="43" id="65"/> <vertex z="0.0" y="5.0" x="6.0" progid="44" id="66"/> <vertex z="0.0" y="1.0" x="6.0" progid="45" id="67"/> <vertex z="0.0" y="5.0" x="1.0" progid="46" id="68"/> <vertex z="0.0" y="1.2" x="1.2" progid="47" id="69"/> <vertex z="0.0" y="4.8" x="1.2" progid="48" id="70"/> <vertex z="0.0" y="4.8" x="5.8" progid="49" id="71"/> <vertex z="0.0" y="1.2" x="5.8" progid="50" id="72"/> <vertex z="3.2" y="4.8" x="5.8" progid="51" id="73"/> <vertex z="3.2" y="4.8" x="1.2" progid="52" id="74"/> <vertex z="3.2" y="1.2" x="5.8" progid="53" id="75"/> <vertex z="3.2" y="1.0" x="6.0" progid="54" id="76"/> <vertex z="3.2" y="5.0" x="6.0" progid="55" id="77"/> <vertex z="3.2" y="5.0" x="1.0" progid="56" id="78"/> <vertex z="3.2" y="1.0" x="1.0" progid="57" id="79"/> <vertex z="3.2" y="1.2" x="1.2" progid="58" id="80"/> <vertex z="2.6614134806" y="1.0" x="1.5385865194" progid="59" id="81"/> <vertex z="2.6614134806" y="1.0" x="5.4614134806" progid="60" id="82"/> <vertex z="0.5385865194" y="1.0" x="1.5385865194" progid="61" id="83"/> <vertex z="0.5385865194" y="1.0" x="5.4614134806" progid="62" id="84"/> <vertex z="0.5385865194" y="1.2" x="1.5385865194" progid="63" id="85"/> <vertex z="2.6614134806" y="1.2" x="5.4614134806" progid="64" id="86"/> <vertex z="2.6614134806" y="1.2" x="1.5385865194" progid="65" id="87"/> <vertex z="0.5385865194" y="1.2" x="5.4614134806" progid="66" id="88"/> </space> <material B="0.8035714" name="Void" G="0.8142857" R="0.91071427" id="94"/> <material B="0.9" name="Functional" G="0.9" R="0.9" id="95"/> <material B="0.7" name="Construction" G="0.87" R="0.96" id="96"/> <view name="(Current)" id="97"> <scalefactor>0</scalefactor> <camera z="12.37714463219495" x="9.317860080288696" y="-4.789742999094569"/> <center z="0.554590324401814" x="2.063276902567469" y="2.7525868000060267"/> <roll z="0.9945218953682806" x="-0.0724617480972579" y="0.07533587920630429"/> <focalwidth>35.0</focalwidth> <type>6</type> <hidden>2</hidden> <hidden>9</hidden> <hidden>7</hidden> <hidden>3</hidden> </view> <global> <key>brick</key> <value xsi:type="DoubleType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <double>0.12</double> </value> </global> <global> <key>isolation</key> <value xsi:type="DoubleType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <double>0.1</double> </value> </global> <global> <key>pi</key> <value xsi:type="DoubleType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <double>3.141592653589793</double> </value> </global> <global> <key>roof</key> <value xsi:type="DoubleType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <double>0.07</double> </value> </global> <global> <key>wall</key> <value xsi:type="DoubleType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <double>0.15</double> </value> </global> </bmodel> --- NEW FILE: cut1.xml --- <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <bmodel> <active>1</active> <cs>36</cs> <name>new project</name> <space union="false" net="false" transparent="true" voidref="2" name="World" type="1" progid="0" id="1"> <description/> <Classification>unassigned</Classification> <constructor xsi:type="CoordinateSystemType" onlyplane="false" editable="true" active="true" progid="1" id="36" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <vertex z="0.0" y="0.0" x="0.0" id="37"/> <ijn> <vertex z="0.0" y="0.0" x="1.0" id="33"/> <vertex z="0.0" y="1.0" x="0.0" id="34"/> <vertex z="1.0" y="0.0" x="0.0" id="35"/> </ijn> </constructor> <space union="false" net="false" transparent="true" name="Void" type="1" progid="1" id="2"> <description/> <Classification>unassigned</Classification> </space> <space union="false" net="false" transparent="false" voidref="4" name="Box" type="0" progid="2" id="3"> <description/> <Classification>unassigned</Classification> <boundary>7</boundary> <boundary>8</boundary> <boundary>9</boundary> <boundary>10</boundary> <boundary>11</boundary> <boundary>12</boundary> <space union="false" net="false" transparent="true" name="Void" type="1" progid="1" id="4"> <description/> <Classification>unassigned</Classification> </space> </space> <space union="false" net="false" transparent="true" voidref="6" name="E" type="1" progid="3" id="5"> <description/> <Classification>unassigned</Classification> <boundary>7</boundary> <boundary>8</boundary> <boundary>9</boundary> <boundary>10</boundary> <boundary>11</boundary> <boundary>12</boundary> <space union="false" net="false" transparent="true" name="Void" type="1" progid="1" id="6"> <description/> <Classification>unassigned</Classification> </space> </space> <surface progid="7" id="7"> <edgeref>17</edgeref> <edgeref>23</edgeref> <edgeref>22</edgeref> <edgeref>16</edgeref> <back>3</back> <front>5</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="8" id="8"> <edgeref>17</edgeref> <edgeref>19</edgeref> <edgeref>18</edgeref> <edgeref>15</edgeref> <back>5</back> <front>3</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="9" id="9"> <edgeref>18</edgeref> <edgeref>20</edgeref> <edgeref>24</edgeref> <edgeref>14</edgeref> <back>5</back> <front>3</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="10" id="10"> <edgeref>19</edgeref> <edgeref>23</edgeref> <edgeref>21</edgeref> <edgeref>20</edgeref> <back>5</back> <front>3</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="11" id="11"> <edgeref>21</edgeref> <edgeref>24</edgeref> <edgeref>13</edgeref> <edgeref>22</edgeref> <back>3</back> <front>5</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="12" id="12"> <edgeref>13</edgeref> <edgeref>14</edgeref> <edgeref>15</edgeref> <edgeref>16</edgeref> <back>3</back> <front>5</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <edge smooth="false" constructor="false" progid="1" id="13"> <from>26</from> <to>28</to> </edge> <edge smooth="false" constructor="false" progid="2" id="14"> <from>28</from> <to>25</to> </edge> <edge smooth="false" constructor="false" progid="3" id="15"> <from>25</from> <to>27</to> </edge> <edge smooth="false" constructor="false" progid="4" id="16"> <from>27</from> <to>26</to> </edge> <edge smooth="false" constructor="false" progid="5" id="17"> <from>27</from> <to>32</to> </edge> <edge smooth="false" constructor="false" progid="6" id="18"> <from>25</from> <to>31</to> </edge> <edge smooth="false" constructor="false" progid="7" id="19"> <from>31</from> <to>32</to> </edge> <edge smooth="false" constructor="false" progid="8" id="20"> <from>30</from> <to>31</to> </edge> <edge smooth="false" constructor="false" progid="9" id="21"> <from>29</from> <to>30</to> </edge> <edge smooth="false" constructor="false" progid="10" id="22"> <from>26</from> <to>29</to> </edge> <edge smooth="false" constructor="false" progid="11" id="23"> <from>32</from> <to>29</to> </edge> <edge smooth="false" constructor="false" progid="12" id="24"> <from>28</from> <to>30</to> </edge> <vertex z="0.0" y="4.0" x="5.0" progid="1" id="25"/> <vertex z="0.0" y="1.0" x="1.0" progid="2" id="26"/> <vertex z="0.0" y="1.0" x="5.0" progid="3" id="27"/> <vertex z="0.0" y="4.0" x="1.0" progid="4" id="28"/> <vertex z="2.2" y="1.0" x="1.0" progid="5" id="29"/> <vertex z="2.2" y="4.0" x="1.0" progid="6" id="30"/> <vertex z="2.2" y="4.0" x="5.0" progid="7" id="31"/> <vertex z="2.2" y="1.0" x="5.0" progid="8" id="32"/> </space> <material B="0.8035714" name="Void" G="0.8142857" R="0.91071427" id="38"/> <material B="0.9" name="Construction" G="0.9" R="0.9" id="39"/> <material B="0.7" name="Functional" G="0.87" R="0.96" id="40"/> <view name="(Current)" id="41"> <scalefactor>0</scalefactor> <camera z="11.862847562367817" x="6.0921355745231605" y="-5.820749379256284"/> <center z="1.1" x="3.0" y="2.5"/> <roll z="0.9902680687415732" x="-0.048479850259323054" y="0.13045633809698243"/> <focalwidth>35.0</focalwidth> <type>6</type> </view> <global> <key>pi</key> <value xsi:type="DoubleType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <double>3.141592653589793</double> </value> </global> <global> <key>wall</key> <value xsi:type="DoubleType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <double>0.15</double> </value> </global> <global> <key>isolation</key> <value xsi:type="DoubleType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <double>0.1</double> </value> </global> <global> <key>brick</key> <value xsi:type="DoubleType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <double>0.12</double> </value> </global> <global> <key>roof</key> <value xsi:type="DoubleType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <double>0.07</double> </value> </global> </bmodel> --- NEW FILE: cut3.xml --- <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <bmodel> <active>1</active> <cs>84</cs> <name>new project</name> <space union="false" net="false" transparent="true" voidref="2" name="World" type="1" progid="0" id="1"> <description/> <Classification>unassigned</Classification> <constructor xsi:type="CoordinateSystemType" onlyplane="false" editable="true" active="true" progid="1" id="84" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <vertex z="0.0" y="0.0" x="0.0" id="85"/> <ijn> <vertex z="0.0" y="0.0" x="1.0" id="81"/> <vertex z="0.0" y="1.0" x="0.0" id="82"/> <vertex z="1.0" y="0.0" x="0.0" id="83"/> </ijn> </constructor> <space union="false" net="false" transparent="true" name="Void" type="1" progid="1" id="2"> <description/> <Classification>unassigned</Classification> </space> <space union="false" net="false" transparent="false" voidref="4" name="Shape" type="0" progid="2" id="3"> <description/> <Classification>unassigned</Classification> <boundary>7</boundary> <boundary>8</boundary> <boundary>9</boundary> <boundary>10</boundary> <boundary>11</boundary> <boundary>12</boundary> <boundary>13</boundary> <boundary>14</boundary> <boundary>15</boundary> <boundary>16</boundary> <boundary>17</boundary> <boundary>18</boundary> <boundary>19</boundary> <boundary>20</boundary> <space union="false" net="false" transparent="true" name="Void" type="1" progid="1" id="4"> <description/> <Classification>unassigned</Classification> </space> </space> <space union="false" net="false" transparent="true" voidref="6" name="E" type="1" progid="3" id="5"> <description/> <Classification>unassigned</Classification> <boundary>7</boundary> <boundary>8</boundary> <boundary>9</boundary> <boundary>10</boundary> <boundary>11</boundary> <boundary>12</boundary> <boundary>13</boundary> <boundary>14</boundary> <boundary>15</boundary> <boundary>16</boundary> <boundary>17</boundary> <boundary>18</boundary> <boundary>19</boundary> <boundary>20</boundary> <space union="false" net="false" transparent="true" name="Void" type="1" progid="1" id="6"> <description/> <Classification>unassigned</Classification> </space> </space> <surface progid="27" id="7"> <edgeref>25</edgeref> <edgeref>30</edgeref> <edgeref>29</edgeref> <edgeref>23</edgeref> <back>3</back> <front>5</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="31" id="8"> <edgeref>21</edgeref> <edgeref>22</edgeref> <edgeref>23</edgeref> <edgeref>24</edgeref> <back>3</back> <front>5</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="53" id="9"> <edgeref>41</edgeref> <edgeref>48</edgeref> <edgeref>46</edgeref> <edgeref>42</edgeref> <back>5</back> <front>3</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="58" id="10"> <edgeref>33</edgeref> <edgeref>31</edgeref> <edgeref>26</edgeref> <edgeref>32</edgeref> <back>5</back> <front>3</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="59" id="11"> <edgeref>42</edgeref> <edgeref>44</edgeref> <edgeref>34</edgeref> <edgeref>43</edgeref> <back>3</back> <front>5</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="60" id="12"> <edgeref>45</edgeref> <edgeref>48</edgeref> <edgeref>47</edgeref> <edgeref>33</edgeref> <back>5</back> <front>3</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="66" id="13"> <edgeref>49</edgeref> <edgeref>55</edgeref> <edgeref>40</edgeref> <edgeref>51</edgeref> <back>3</back> <front>5</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="67" id="14"> <edgeref>49</edgeref> <edgeref>54</edgeref> <edgeref>50</edgeref> <edgeref>56</edgeref> <back>5</back> <front>3</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="68" id="15"> <edgeref>50</edgeref> <edgeref>52</edgeref> <edgeref>37</edgeref> <edgeref>53</edgeref> <back>3</back> <front>5</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="69" id="16"> <edgeref>40</edgeref> <edgeref>38</edgeref> <edgeref>30</edgeref> <edgeref>39</edgeref> <back>3</back> <front>5</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="71" id="17"> <edgeref>37</edgeref> <edgeref>36</edgeref> <edgeref>34</edgeref> <edgeref>35</edgeref> <back>5</back> <front>3</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="76" id="18"> <edgeref>27</edgeref> <edgeref>31</edgeref> <edgeref>47</edgeref> <edgeref>41</edgeref> <edgeref>44</edgeref> <edgeref>36</edgeref> <edgeref>53</edgeref> <edgeref>54</edgeref> <edgeref>55</edgeref> <edgeref>38</edgeref> <edgeref>29</edgeref> <edgeref>24</edgeref> <back>5</back> <front>3</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="77" id="19"> <edgeref>27</edgeref> <edgeref>26</edgeref> <edgeref>28</edgeref> <edgeref>21</edgeref> <back>3</back> <front>5</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="78" id="20"> <edgeref>51</edgeref> <edgeref>56</edgeref> <edgeref>52</edgeref> <edgeref>35</edgeref> <edgeref>43</edgeref> <edgeref>46</edgeref> <edgeref>45</edgeref> <edgeref>32</edgeref> <edgeref>28</edgeref> <edgeref>22</edgeref> <edgeref>25</edgeref> <edgeref>39</edgeref> <back>5</back> <front>3</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <edge smooth="false" constructor="false" progid="28" id="21"> <from>58</from> <to>60</to> </edge> <edge smooth="false" constructor="false" progid="29" id="22"> <from>60</from> <to>59</to> </edge> <edge smooth="false" constructor="false" progid="30" id="23"> <from>59</from> <to>57</to> </edge> <edge smooth="false" constructor="false" progid="31" id="24"> <from>57</from> <to>58</to> </edge> <edge smooth="false" constructor="false" progid="32" id="25"> <from>59</from> <to>63</to> </edge> <edge smooth="false" constructor="false" progid="34" id="26"> <from>62</from> <to>61</to> </edge> <edge smooth="false" constructor="false" progid="35" id="27"> <from>58</from> <to>62</to> </edge> <edge smooth="false" constructor="false" progid="36" id="28"> <from>60</from> <to>61</to> </edge> <edge smooth="false" constructor="false" progid="37" id="29"> <from>57</from> <to>64</to> </edge> <edge smooth="false" constructor="false" progid="38" id="30"> <from>63</from> <to>64</to> </edge> <edge smooth="false" constructor="false" progid="41" id="31"> <from>65</from> <to>62</to> </edge> <edge smooth="false" constructor="false" progid="42" id="32"> <from>61</from> <to>66</to> </edge> <edge smooth="false" constructor="false" progid="44" id="33"> <from>66</from> <to>65</to> </edge> <edge smooth="false" constructor="false" progid="49" id="34"> <from>68</from> <to>67</to> </edge> <edge smooth="false" constructor="false" progid="50" id="35"> <from>68</from> <to>69</to> </edge> <edge smooth="false" constructor="false" progid="53" id="36"> <from>70</from> <to>67</to> </edge> <edge smooth="false" constructor="false" progid="54" id="37"> <from>69</from> <to>70</to> </edge> <edge smooth="false" constructor="false" progid="55" id="38"> <from>64</from> <to>71</to> </edge> <edge smooth="false" constructor="false" progid="58" id="39"> <from>72</from> <to>63</to> </edge> <edge smooth="false" constructor="false" progid="59" id="40"> <from>72</from> <to>71</to> </edge> <edge smooth="false" constructor="false" progid="68" id="41"> <from>74</from> <to>75</to> </edge> <edge smooth="false" constructor="false" progid="69" id="42"> <from>76</from> <to>74</to> </edge> <edge smooth="false" constructor="false" progid="70" id="43"> <from>68</from> <to>76</to> </edge> <edge smooth="false" constructor="false" progid="71" id="44"> <from>67</from> <to>74</to> </edge> <edge smooth="false" constructor="false" progid="72" id="45"> <from>66</from> <to>73</to> </edge> <edge smooth="false" constructor="false" progid="73" id="46"> <from>73</from> <to>76</to> </edge> <edge smooth="false" constructor="false" progid="74" id="47"> <from>65</from> <to>75</to> </edge> <edge smooth="false" constructor="false" progid="75" id="48"> <from>75</from> <to>73</to> </edge> <edge smooth="false" constructor="false" progid="76" id="49"> <from>77</from> <to>79</to> </edge> <edge smooth="false" constructor="false" progid="77" id="50"> <from>78</from> <to>80</to> </edge> <edge smooth="false" constructor="false" progid="78" id="51"> <from>72</from> <to>77</to> </edge> <edge smooth="false" constructor="false" progid="79" id="52"> <from>69</from> <to>80</to> </edge> <edge smooth="false" constructor="false" progid="80" id="53"> <from>70</from> <to>78</to> </edge> <edge smooth="false" constructor="false" progid="81" id="54"> <from>79</from> <to>78</to> </edge> <edge smooth="false" constructor="false" progid="82" id="55"> <from>71</from> <to>79</to> </edge> <edge smooth="false" constructor="false" progid="83" id="56"> <from>80</from> <to>77</to> </edge> <vertex z="0.0" y="5.1849290038" x="24.1726098927" progid="15" id="57"/> <vertex z="0.0" y="5.1849290038" x="4.8235526752" progid="16" id="58"/> <vertex z="0.0" y="15.1847544861" x="24.1726098927" progid="17" id="59"/> <vertex z="0.0" y="15.1847544861" x="4.8235526752" progid="18" id="60"/> <vertex z="4.2018862618" y="15.1847544861" x="4.8235526752" progid="19" id="61"/> <vertex z="4.2018862618" y="5.1849290038" x="4.8235526752" progid="20" id="62"/> <vertex z="4.2018862618" y="15.1847544861" x="24.1726098927" progid="21" id="63"/> <vertex z="4.2018862618" y="5.1849290038" x="24.1726098927" progid="22" id="64"/> <vertex z="4.2018862618" y="5.1849290038" x="8.1864137195" progid="23" id="65"/> <vertex z="4.2018862618" y="15.1847544861" x="8.1864137195" progid="24" id="66"/> <vertex z="4.2018862618" y="5.1849290038" x="12.004241304" progid="25" id="67"/> <vertex z="4.2018862618" y="15.1847544861" x="12.004241304" progid="26" id="68"/> <vertex z="4.2018862618" y="15.1847544861" x="16.7043991838" progid="27" id="69"/> <vertex z="4.2018862618" y="5.1849290038" x="16.7043991838" progid="28" id="70"/> <vertex z="4.2018862618" y="5.1849290038" x="21.0314897364" progid="29" id="71"/> <vertex z="4.2018862618" y="15.1847544861" x="21.0314897364" progid="30" id="72"/> <vertex z="2.2416503521" y="15.1847544861" x="8.1864137195" progid="35" id="73"/> <vertex z="2.2416503521" y="5.1849290038" x="12.004241304" progid="36" id="74"/> <vertex z="2.2416503521" y="5.1849290038" x="8.1864137195" progid="37" id="75"/> <vertex z="2.2416503521" y="15.1847544861" x="12.004241304" progid="38" id="76"/> <vertex z="8.5875463854" y="15.1847544861" x="21.0314897364" progid="39" id="77"/> <vertex z="8.5875463854" y="5.1849290038" x="16.7043991838" progid="40" id="78"/> <vertex z="8.5875463854" y="5.1849290038" x="21.0314897364" progid="41" id="79"/> <vertex z="8.5875463854" y="15.1847544861" x="16.7043991838" progid="42" id="80"/> </space> <material B="0.7" name="Construction" G="0.87" R="0.96" id="86"/> <material B="0.9" name="Functional" G="0.9" R="0.9" id="87"/> <material B="0.8035714" name="Void" G="0.8142857" R="0.91071427" id="88"/> <view name="(Current)" id="89"> <scalefactor>0</scalefactor> <camera z="19.30764479553361" x="32.036645559669395" y="-20.255417641643007"/> <center z="3.93207415708883" x="14.673310601314089" y="10.577221135912419"/> <roll z="0.9455185755993213" x="0.15975304099998416" y="-0.28367867224713506"/> <focalwidth>35.0</focalwidth> <type>6</type> </view> <global> <key>brick</key> <value xsi:type="DoubleType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <double>0.12</double> </value> </global> <global> <key>isolation</key> <value xsi:type="DoubleType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <double>0.1</double> </value> </global> <global> <key>pi</key> <value xsi:type="DoubleType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <double>3.141592653589793</double> </value> </global> <global> <key>roof</key> <value xsi:type="DoubleType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <double>0.07</double> </value> </global> <global> <key>wall</key> <value xsi:type="DoubleType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <double>0.15</double> </value> </global> </bmodel> --- NEW FILE: cut4.xml --- <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <bmodel> <active>1</active> <cs>67</cs> <name>new project</name> <space union="false" net="false" transparent="true" voidref="2" name="World" type="1" progid="0" id="1"> <description/> <Classification>unassigned</Classification> <constructor xsi:type="LineType" editable="false" active="true" progid="2" id="62" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <vertex z="0.0" y="8.7668661023" x="1.0" id="63"/> <direction> <vertex z="0.0" y="1.0" x="0.0" id="61"/> </direction> </constructor> <constructor xsi:type="CoordinateSystemType" onlyplane="false" editable="true" active="true" progid="1" id="67" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <vertex z="0.0" y="0.0" x="0.0" id="68"/> <ijn> <vertex z="0.0" y="0.0" x="1.0" id="64"/> <vertex z="0.0" y="1.0" x="0.0" id="65"/> <vertex z="1.0" y="0.0" x="0.0" id="66"/> </ijn> </constructor> <constructor xsi:type="LineType" editable="false" active="true" progid="3" id="70" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <vertex z="0.0" y="1.0" x="4.1870389256" id="71"/> <direction> <vertex z="0.0" y="0.0" x="1.0" id="69"/> </direction> </constructor> <space union="false" net="false" transparent="true" name="Void" type="1" progid="1" id="2"> <description/> <Classification>unassigned</Classification> </space> <space union="false" net="false" transparent="true" voidref="4" name="Inside" type="1" progid="4" id="3"> <description/> <Classification>unassigned</Classification> <boundary>10</boundary> <boundary>16</boundary> <boundary>17</boundary> <boundary>18</boundary> <boundary>19</boundary> <boundary>20</boundary> <space union="false" net="false" transparent="true" name="Void" type="1" progid="1" id="4"> <description/> <Classification>unassigned</Classification> </space> </space> <space union="false" net="false" transparent="false" voidref="6" name="Wall" type="0" progid="5" id="5"> <description/> <Classification>unassigned</Classification> <boundary>9</boundary> <boundary>11</boundary> <boundary>12</boundary> <boundary>13</boundary> <boundary>14</boundary> <boundary>15</boundary> <boundary>17</boundary> <boundary>18</boundary> <boundary>19</boundary> <boundary>20</boundary> <space union="false" net="false" transparent="true" name="Void" type="1" progid="1" id="6"> <description/> <Classification>unassigned</Classification> </space> </space> <space union="false" net="false" transparent="true" voidref="8" name="E" type="1" progid="6" id="7"> <description/> <Classification>unassigned</Classification> <boundary>9</boundary> <boundary>10</boundary> <boundary>11</boundary> <boundary>12</boundary> <boundary>13</boundary> <boundary>14</boundary> <boundary>15</boundary> <boundary>16</boundary> <space union="false" net="false" transparent="true" name="Void" type="1" progid="1" id="8"> <description/> <Classification>unassigned</Classification> </space> </space> <surface progid="91" id="9"> <edgeref>22</edgeref> <edgeref>32</edgeref> <edgeref>39</edgeref> <edgeref>43</edgeref> <back>7</back> <front>5</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="92" id="10"> <edgeref>28</edgeref> <edgeref>25</edgeref> <edgeref>26</edgeref> <edgeref>27</edgeref> <back>3</back> <front>7</front> <exterior>11</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="93" id="11"> <edgeref>22</edgeref> <edgeref>23</edgeref> <edgeref>24</edgeref> <edgeref>21</edgeref> <hole>10</hole> <back>5</back> <front>7</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="94" id="12"> <edgeref>29</edgeref> <edgeref>31</edgeref> <edgeref>30</edgeref> <edgeref>24</edgeref> <back>7</back> <front>5</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="95" id="13"> <edgeref>29</edgeref> <edgeref>35</edgeref> <edgeref>43</edgeref> <edgeref>21</edgeref> <back>5</back> <front>7</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="96" id="14"> <edgeref>30</edgeref> <edgeref>37</edgeref> <edgeref>32</edgeref> <edgeref>23</edgeref> <back>7</back> <front>5</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="97" id="15"> <edgeref>31</edgeref> <edgeref>35</edgeref> <edgeref>39</edgeref> <edgeref>37</edgeref> <hole>16</hole> <back>7</back> <front>5</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="98" id="16"> <edgeref>34</edgeref> <edgeref>41</edgeref> <edgeref>44</edgeref> <edgeref>36</edgeref> <back>7</back> <front>3</front> <exterior>15</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="99" id="17"> <edgeref>33</edgeref> <edgeref>44</edgeref> <edgeref>38</edgeref> <edgeref>27</edgeref> <back>5</back> <front>3</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="100" id="18"> <edgeref>33</edgeref> <edgeref>36</edgeref> <edgeref>40</edgeref> <edgeref>28</edgeref> <back>3</back> <front>5</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="101" id="19"> <edgeref>34</edgeref> <edgeref>42</edgeref> <edgeref>25</edgeref> <edgeref>40</edgeref> <back>3</back> <front>5</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <surface progid="102" id="20"> <edgeref>38</edgeref> <edgeref>41</edgeref> <edgeref>42</edgeref> <edgeref>26</edgeref> <back>5</back> <front>3</front> <exterior>0</exterior> <frontMaterial>0</frontMaterial> <backMaterial>0</backMaterial> </surface> <edge smooth="false" constructor="false" progid="84" id="21"> <from>45</from> <to>48</to> </edge> <edge smooth="false" constructor="false" progid="85" id="22"> <from>48</from> <to>46</to> </edge> <edge smooth="false" constructor="false" progid="86" id="23"> <from>46</from> <to>47</to> </edge> <edge smooth="false" constructor="false" progid="87" id="24"> <from>47</from> <to>45</to> </edge> <edge smooth="false" constructor="false" progid="88" id="25"> <from>49</from> <to>50</to> </edge> <edge smooth="false" constructor="false" progid="89" id="26"> <from>50</from> <to>51</to> </edge> <edge smooth="false" constructor="false" progid="90" id="27"> <from>51</from> <to>52</to> </edge> <edge smooth="false" constructor="false" progid="91" id="28"> <from>52</from> <to>49</to> </edge> <edge smooth="false" constructor="false" progid="92" id="29"> <from>45</from> <to>59</to> </edge> <edge smooth="false" constructor="false" progid="93" id="30"> <from>47</from> <to>56</to> </edge> <edge smooth="false" constructor="false" progid="94" id="31"> <from>56</from> <to>59</to> </edge> <edge smooth="false" constructor="false" progid="95" id="32"> <from>46</from> <to>57</to> </edge> <edge smooth="false" constructor="false" progid="96" id="33"> <from>52</from> <to>55</to> </edge> <edge smooth="false" constructor="false" progid="97" id="34"> <from>60</from> <to>54</to> </edge> <edge smooth="false" constructor="false" progid="98" id="35"> <from>59</from> <to>58</to> </edge> <edge smooth="false" constructor="false" progid="99" id="36"> <from>55</from> <to>60</to> </edge> <edge smooth="false" constructor="false" progid="100" id="37"> <from>57</from> <to>56</to> </edge> <edge smooth="false" constructor="false" progid="101" id="38"> <from>51</from> <to>53</to> </edge> <edge smooth="false" constructor="false" progid="102" id="39"> <from>58</from> <to>57</to> </edge> <edge smooth="false" constructor="false" progid="103" id="40"> <from>49</from> <to>60</to> </edge> <edge smooth="false" constructor="false" progid="104" id="41"> <from>54</from> <to>53</to> </edge> <edge smooth="false" constructor="false" progid="105" id="42"> <from>50</from> <to>54</to> </edge> <edge smooth="false" constructor="false" progid="106" id="43"> <from>48</from> <to>58</to> </edge> <edge smooth="false" constructor="false" progid="107" id="44"> <from>53</from> <to>55</to> </edge> <vertex z="0.0" y="1.0" x="1.0" progid="43" id="45"/> <vertex z="0.0" y="5.0" x="6.0" progid="44" id="46"/> <vertex z="0.0" y="1.0" x="6.0" progid="45" id="47"/> <vertex z="0.0" y="5.0" x="1.0" progid="46" id="48"/> <vertex z="0.0" y="1.2" x="1.2" progid="47" id="49"/> <vertex z="0.0" y="4.8" x="1.2" progid="48" id="50"/> <vertex z="0.0" y="4.8" x="5.8" progid="49" id="51"/> <vertex z="0.0" y="1.2" x="5.8" progid="50" id="52"/> <vertex z="3.2" y="4.8" x="5.8" progid="51" id="53"/> <vertex z="3.2" y="4.8" x="1.2" progid="52" id="54"/> <vertex z="3.2" y="1.2" x="5.8" progid="53" id="55"/> <vertex z="3.2" y="1.0" x="6.0" progid="54" id="56"/> <vertex z="3.2" y="5.0" x="6.0" progid="55" id="57"/> <vertex z="3.2" y="5.0" x="1.0" progid="56" id="58"/> <vertex z="3.2" y="1.0" x="1.0" progid="57" id="59"/> <vertex z="3.2" y="1.2" x="1.2" progid="58" id="60"/> </space> <material B="0.7" name="Construction" G="0.87" R="0.96" id="72"/> <material B="0.9" name="Functional" G="0.9" R="0.9" id="73"/> <material B="0.8035714" name="Void" G="0.8142857" R="0.91071427" id="74"/> <view name="(Current)" id="75"> <scalefactor>0</scalefactor> <camera z="13.242305185493212" x="8.418460872633224" y="-6.031291454946749"/> <center z="0.554590324401814" x="2.063276902567469" y="2.7525868000060267"/> <roll z="0.9925461516413268" x="-0.0714365938603796" y="0.09873677085882969"/> <focalwidth>35.0</focalwidth> <type>6</type> <hidden>7</hidden> <hidden>3</hidden> </view> <global> <key>brick</key> <value xsi:type="DoubleType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <double>0.12</double> </value> </global> <global> <key>isolation</key> <value xsi:type="DoubleType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <double>0.1</double> </value> </global> <global> <key>pi</key> <value xsi:type="DoubleType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <double>3.141592653589793</double> </value> </global> <global> <key>roof</key> <value xsi:type="DoubleType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <double>0.07</double> </value> </global> <global> <key>wall</key> <value xsi:type="DoubleType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <double>0.15</double> </value> </global> </bmodel> --- NEW FILE: tesselate1.xml --- <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <bmodel> <active>1</active> <cs>220</cs> <name>new project</name> <space union="false" net="false" transparent="true" voidref="2" name="World" type="1" progid="0" id="1"> <description/> <Classification>unassigned</Classification> <constructor xsi:type="CoordinateSystemType" onlyplane="false" editable="true" active="true" progid="1" id="220" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <vertex z="0.0" y="0.0" x="0.0" id="221"/> <ijn> <vertex z="0.0" y="0.0" x="1.0" id="217"/> <vertex z="0.0" y="1.0" x="0.0" id="218"/> <vertex z="1.0" y="0.0" x="0.0" id="219"/> </ijn> </constructor> <space union="false" net="false" transparent="true" name="Void" type="1" progid="1" id="2"> <description/> <Classification>unassigned</Classification> [...1136 lines suppressed...] <global> <key>pi</key> <value xsi:type="DoubleType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <double>3.141592653589793</double> </value> </global> <global> <key>roof</key> <value xsi:type="DoubleType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> ... [truncated message content] |
From: Michael L. <he...@us...> - 2009-03-30 09:16:57
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv23363/src/net/sourceforge/bprocessor/model Modified Files: Project.java Log Message: Tesselation implemented Index: Project.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Project.java,v retrieving revision 1.161 retrieving revision 1.162 diff -C2 -d -r1.161 -r1.162 *** Project.java 17 Feb 2009 11:08:33 -0000 1.161 --- Project.java 30 Mar 2009 09:16:49 -0000 1.162 *************** *** 28,31 **** --- 28,32 ---- import java.util.List; import java.util.Map; + import java.util.Set; import java.util.Stack; import java.util.StringTokenizer; *************** *** 47,50 **** --- 48,52 ---- import dk.au.perpos.spatialsupport.routefinding.Boundary; import dk.au.perpos.spatialsupport.routefinding.Location; + import dk.au.perpos.spatialsupport.routefinding.LocationModel; import dk.au.perpos.spatialsupport.routefinding.Opening; import dk.au.perpos.spatialsupport.routefinding.Segment; *************** *** 1297,1300 **** --- 1299,1310 ---- } + private List<dk.au.perpos.spatialsupport.routefinding.Point> convert(List<Vertex> vertices) { + List<dk.au.perpos.spatialsupport.routefinding.Point> points = new LinkedList(); + for (Vertex current : vertices) { + points.add(convert(current)); + } + return points; + } + private dk.au.perpos.spatialsupport.routefinding.Point convert(Vertex vertex) { dk.au.perpos.spatialsupport.routefinding.Point point *************** *** 1312,1316 **** } ! private Location createLocationModel() { Location root = new Location(); root.setId("building"); --- 1322,1397 ---- } ! private Location createLocationModel(Container space, int level, ! Map<Surface, Location> locations, Map<Edge, List<Opening>> openings) { ! Location location = new Location(); ! location.setId(space.getName()); ! if (level == 1) { ! location.setDescription("Site"); ! } else if (level == 2) { ! location.setDescription("Building"); ! } else if (level == 3) { ! location.setDescription("Floor"); ! } else { ! location.setDescription("Room"); ! } ! ! { ! Set<Surface> envelope = space.getEnvelope(); ! if (envelope.size() == 1) { ! Surface surface = envelope.iterator().next(); ! List<Vertex> vertices = surface.getVertices(); ! Boundary boundary = new Boundary(convert(vertices)); ! location.setExternalBoundary(boundary); ! locations.put(surface, location); ! int count = 1; ! for (Edge edge : surface.getEdges()) { ! if (edge.isSmooth()) { ! Segment segment = convert(edge); ! segment = find(location, segment); ! Opening opening = new Opening(); ! opening.setId(String.valueOf(count++)); ! opening.setDistance(0.0); ! opening.setWidth(segment.getLength()); ! opening.setSegment(segment); ! location.addOpening(opening); ! List<Opening> lst = openings.get(edge); ! lst.add(opening); ! } ! } ! } ! } ! ! Map<Surface, Location> s2l = new HashMap(); ! Map<Edge, List<Opening>> e2o = new HashMap(); ! List<Edge> smoothies = new LinkedList(); ! for (Edge edge : space.getEdges()) { ! if (edge.isSmooth()) { ! List<Opening> lst = new LinkedList(); ! e2o.put(edge, lst); ! smoothies.add(edge); ! } ! } ! for (Space element : space.getElements()) { ! if (!element.isVoid()) { ! Location child = createLocationModel((Container) element, level + 1, s2l, e2o); ! location.addChild(child); ! } ! } ! for (Edge edge : smoothies) { ! List<Opening> lst = e2o.get(edge); ! if (lst.size() == 2) { ! Opening from = lst.get(0); ! Opening to = lst.get(1); ! dk.au.perpos.spatialsupport.routefinding.Connection connection ! = new dk.au.perpos.spatialsupport.routefinding.Connection(); ! connection.setFrom(from); ! connection.setTo(to); ! connection.setId("door"); ! } ! } ! return location; ! } ! ! private Location createFlatLocationModel() { Location root = new Location(); root.setId("building"); *************** *** 1405,1412 **** */ public void exportPPLM() { ! Location root = createLocationModel(); PrintStream out = System.out; PPLMPrinter printer = new PPLMPrinter(out); ! printer.printLocationModel(root); } --- 1486,1503 ---- */ public void exportPPLM() { ! world().setName(getName()); ! Location root = createLocationModel(world(), 1, new HashMap(), new HashMap()); ! LocationModel model = new LocationModel(); ! model.setLocation(root); PrintStream out = System.out; PPLMPrinter printer = new PPLMPrinter(out); ! printer.printLocationModel(model); ! } ! ! /** ! * ! */ ! public void exportOBJ() { ! } *************** *** 1415,1419 **** */ public void exportJLMA() { ! Location root = createLocationModel(); PrintStream out = System.out; out.println("<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>"); --- 1506,1510 ---- */ public void exportJLMA() { ! Location root = createFlatLocationModel(); PrintStream out = System.out; out.println("<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>"); |
From: Michael L. <he...@us...> - 2009-03-30 09:16:55
|
Update of /cvsroot/bprocessor/tools/perpos In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv23347/perpos Modified Files: routefinding.jar Log Message: Tesselation implemented Index: routefinding.jar =================================================================== RCS file: /cvsroot/bprocessor/tools/perpos/routefinding.jar,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 Binary files /tmp/cvsjnEW70 and /tmp/cvsuBYcqv differ |