[Bprocessor-commit] model/src/net/sourceforge/bprocessor/model Instance.java, 1.3, 1.4 Geometry.jav
Status: Pre-Alpha
Brought to you by:
henryml
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv20690/src/net/sourceforge/bprocessor/model Modified Files: Instance.java Geometry.java EnergyCalc.java Project.java CoordinateSystem.java Persistence.java Edge.java Classification.java SpaceAnalysis.java Surface.java Component.java Camera.java Space.java Geometric.java ClassificationFileReader.java Mesh.java Command.java ClippingPlane.java SurfaceAnalysis.java Log Message: Major change wrt Space/Container Index: CoordinateSystem.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/CoordinateSystem.java,v retrieving revision 1.70 retrieving revision 1.71 diff -C2 -d -r1.70 -r1.71 *** CoordinateSystem.java 11 Dec 2007 15:14:13 -0000 1.70 --- CoordinateSystem.java 13 Dec 2007 12:00:31 -0000 1.71 *************** *** 125,129 **** */ public static CoordinateSystem systemOf(Geometric geometric) { ! Space space = geometric.getOwner(); List<CoordinateSystem> result = new LinkedList(); Collection<CoordinateSystem> systems = space.getCoordinateSystems(); --- 125,129 ---- */ public static CoordinateSystem systemOf(Geometric geometric) { ! Container space = geometric.getOwner(); List<CoordinateSystem> result = new LinkedList(); Collection<CoordinateSystem> systems = space.getCoordinateSystems(); *************** *** 941,945 **** for (Relation relation : relations) { Geometric geometric = relation.geometric(); ! Space space = geometric.getOwner(); Collection<Vertex> vertices = geometric.collect(); Map<Vertex, Vertex> map = space.directionMap(vertices); --- 941,945 ---- for (Relation relation : relations) { Geometric geometric = relation.geometric(); ! Container space = geometric.getOwner(); Collection<Vertex> vertices = geometric.collect(); Map<Vertex, Vertex> map = space.directionMap(vertices); Index: Component.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Component.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Component.java 19 Nov 2007 17:50:21 -0000 1.4 --- Component.java 13 Dec 2007 12:00:31 -0000 1.5 *************** *** 16,20 **** public class Component extends Entity implements Parametric { private File file; ! private Space space = null; private byte useableLevels = 0; private boolean isLocked = false; --- 16,20 ---- public class Component extends Entity implements Parametric { private File file; ! private Container space = null; private byte useableLevels = 0; private boolean isLocked = false; *************** *** 29,33 **** * @param s the space (union) this lib obj encapsulate */ ! public Component(byte usableLvls, File f, Space s) { file = f; useableLevels = usableLvls; --- 29,33 ---- * @param s the space (union) this lib obj encapsulate */ ! public Component(byte usableLvls, File f, Container s) { file = f; useableLevels = usableLvls; *************** *** 40,44 **** * @param union Union */ ! public Component(Space union) { this.space = union; name = union.getName(); --- 40,44 ---- * @param union Union */ ! public Component(Container union) { this.space = union; name = union.getName(); *************** *** 79,83 **** * @return The Space */ ! public Space getSpace() { return space; } --- 79,83 ---- * @return The Space */ ! public Container getSpace() { return space; } *************** *** 87,91 **** * @param s the space */ ! void setSpace(Space s) { space = s; name = s.getName(); --- 87,91 ---- * @param s the space */ ! void setSpace(Container s) { space = s; name = s.getName(); *************** *** 119,126 **** List<Attribute> att = new LinkedList<Attribute>(); att.add(new Attribute("name", getName())); ! att.add(new Attribute("Project", worksAtLevel(Space.PROJECT_LEVEL))); ! att.add(new Attribute("Space", worksAtLevel(Space.SPACE_LEVEL))); ! att.add(new Attribute("Element", worksAtLevel(Space.ELEMENT_LEVEL))); ! att.add(new Attribute("Part", worksAtLevel(Space.PART_LEVEL))); att.add(new Attribute("geometry", getSpace())); att.add(new Attribute("Locked", isLocked())); --- 119,126 ---- List<Attribute> att = new LinkedList<Attribute>(); att.add(new Attribute("name", getName())); ! att.add(new Attribute("Project", worksAtLevel(Container.PROJECT_LEVEL))); ! att.add(new Attribute("Space", worksAtLevel(Container.SPACE_LEVEL))); ! att.add(new Attribute("Element", worksAtLevel(Container.ELEMENT_LEVEL))); ! att.add(new Attribute("Part", worksAtLevel(Container.PART_LEVEL))); att.add(new Attribute("geometry", getSpace())); att.add(new Attribute("Locked", isLocked())); *************** *** 137,141 **** private boolean worksAtLevel(int spaceLevel) { ! int lvl = 1 >> (spaceLevel - Space.PROJECT_LEVEL); if ((getUseLevel() & lvl) == lvl) { return true; --- 137,141 ---- private boolean worksAtLevel(int spaceLevel) { ! int lvl = 1 >> (spaceLevel - Container.PROJECT_LEVEL); if ((getUseLevel() & lvl) == lvl) { return true; Index: SpaceAnalysis.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/SpaceAnalysis.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** SpaceAnalysis.java 11 Dec 2007 14:49:02 -0000 1.9 --- SpaceAnalysis.java 13 Dec 2007 12:00:31 -0000 1.10 *************** *** 70,74 **** */ public void propagate(Surface surface, int side) { ! Space space = surface.getOwner(); edgemap = new HashMap(); for (Edge current : space.getEdges()) { --- 70,74 ---- */ public void propagate(Surface surface, int side) { ! Container space = surface.getOwner(); edgemap = new HashMap(); for (Edge current : space.getEdges()) { Index: Instance.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Instance.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Instance.java 12 Dec 2007 14:38:43 -0000 1.3 --- Instance.java 13 Dec 2007 12:00:30 -0000 1.4 *************** *** 20,24 **** * a container. */ ! private Space proto; /** A anchor for instances */ --- 20,24 ---- * a container. */ ! private Container proto; /** A anchor for instances */ *************** *** 30,34 **** */ public Instance(String name) { ! super(name, Space.CONSTRUCTION, false); } --- 30,34 ---- */ public Instance(String name) { ! super(name, Container.CONSTRUCTION, false); } *************** *** 44,48 **** * @return proto */ ! public Space getProto() { return proto; } --- 44,48 ---- * @return proto */ ! public Container getProto() { return proto; } *************** *** 52,56 **** * @param space Space */ ! public void setProto(Space space) { this.proto = space; if (proto != null) { --- 52,56 ---- * @param space Space */ ! public void setProto(Container space) { this.proto = space; if (proto != null) { Index: ClassificationFileReader.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/ClassificationFileReader.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ClassificationFileReader.java 9 Aug 2007 16:07:53 -0000 1.4 --- ClassificationFileReader.java 13 Dec 2007 12:00:31 -0000 1.5 *************** *** 137,146 **** new InputStreamReader( new FileInputStream(locationPrefix + "construction2.txt"), "ISO-8859-1")); ! clas = new Classification("-1", "Constructional", null, Space.CONSTRUCTION); } else { bf = new BufferedReader( new InputStreamReader( new FileInputStream(locationPrefix + "functionals.txt"), "ISO-8859-1")); ! clas = new Classification("-1", "Functional", null, Space.FUNCTIONAL); } current = bf.readLine(); --- 137,146 ---- new InputStreamReader( new FileInputStream(locationPrefix + "construction2.txt"), "ISO-8859-1")); ! clas = new Classification("-1", "Constructional", null, Container.CONSTRUCTION); } else { bf = new BufferedReader( new InputStreamReader( new FileInputStream(locationPrefix + "functionals.txt"), "ISO-8859-1")); ! clas = new Classification("-1", "Functional", null, Container.FUNCTIONAL); } current = bf.readLine(); Index: Surface.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Surface.java,v retrieving revision 1.208 retrieving revision 1.209 diff -C2 -d -r1.208 -r1.209 *** Surface.java 11 Dec 2007 14:49:02 -0000 1.208 --- Surface.java 13 Dec 2007 12:00:31 -0000 1.209 *************** *** 47,53 **** private Set<Surface> holes; ! private Space frontDomain; ! private Space backDomain; private Material frontMaterial; --- 47,53 ---- private Set<Surface> holes; ! private Container frontDomain; ! private Container backDomain; private Material frontMaterial; *************** *** 346,355 **** exterior.removeHole(this); } ! Space back = getBackDomain(); if (back != null) { back.removeSurface(this); setBackDomain(null); } ! Space front = getFrontDomain(); if (front != null) { front.removeSurface(this); --- 346,355 ---- exterior.removeHole(this); } ! Container back = getBackDomain(); if (back != null) { back.removeSurface(this); setBackDomain(null); } ! Container front = getFrontDomain(); if (front != null) { front.removeSurface(this); *************** *** 399,404 **** } } ! Space holeBack = this.getBackDomain(); ! Space holeFront = this.getFrontDomain(); this.setFrontDomain(holeBack); this.setBackDomain(holeFront); --- 399,404 ---- } } ! Container holeBack = this.getBackDomain(); ! Container holeFront = this.getFrontDomain(); this.setFrontDomain(holeBack); this.setBackDomain(holeFront); *************** *** 547,551 **** * @return The copy */ ! public Surface copy(Space space) { HashMap map = new HashMap(); Surface surface = (Surface) copy(map); --- 547,551 ---- * @return The copy */ ! public Surface copy(Container space) { HashMap map = new HashMap(); Surface surface = (Surface) copy(map); *************** *** 583,587 **** * @return copy */ ! public Surface copyall(Space space) { Surface copy = copy(space); Iterator iter = getHoles().iterator(); --- 583,587 ---- * @return copy */ ! public Surface copyall(Container space) { Surface copy = copy(space); Iterator iter = getHoles().iterator(); *************** *** 742,746 **** */ public Surface extrude(double delta, Set<Surface> sides) { ! Space owner = getOwner(); Surface top = extrusion(delta, sides); Collection<Surface> creation = new LinkedList(sides); --- 742,746 ---- */ public Surface extrude(double delta, Set<Surface> sides) { ! Container owner = getOwner(); Surface top = extrusion(delta, sides); Collection<Surface> creation = new LinkedList(sides); *************** *** 1322,1326 **** * @return the backdomain */ ! public Space getBackDomain() { if (backDomain == null && getOwner() != null) { setBackDomain(getOwner().getEmpty()); --- 1322,1326 ---- * @return the backdomain */ ! public Container getBackDomain() { if (backDomain == null && getOwner() != null) { setBackDomain(getOwner().getEmpty()); *************** *** 1333,1337 **** * @param back the domain */ ! public void setBackDomain(Space back) { if (backDomain != back) { if (backDomain != null && --- 1333,1337 ---- * @param back the domain */ ! public void setBackDomain(Container back) { if (backDomain != back) { if (backDomain != null && *************** *** 1352,1356 **** * to nearby surfaces */ ! public void assignBack(Space back, boolean propagate) { setBackDomain(back); if (propagate) { --- 1352,1356 ---- * to nearby surfaces */ ! public void assignBack(Container back, boolean propagate) { setBackDomain(back); if (propagate) { *************** *** 1364,1368 **** * @return the frontdomain */ ! public Space getFrontDomain() { if (frontDomain == null && getOwner() != null) { setFrontDomain(getOwner().getEmpty()); --- 1364,1368 ---- * @return the frontdomain */ ! public Container getFrontDomain() { if (frontDomain == null && getOwner() != null) { setFrontDomain(getOwner().getEmpty()); *************** *** 1378,1382 **** * to nearby surfaces */ ! public void assignFront(Space front, boolean propagate) { setFrontDomain(front); if (propagate) { --- 1378,1382 ---- * to nearby surfaces */ ! public void assignFront(Container front, boolean propagate) { setFrontDomain(front); if (propagate) { *************** *** 1390,1394 **** * @param front the frontdomain */ ! public void setFrontDomain(Space front) { if (frontDomain != front) { if (frontDomain != null) { --- 1390,1394 ---- * @param front the frontdomain */ ! public void setFrontDomain(Container front) { if (frontDomain != front) { if (frontDomain != null) { *************** *** 1409,1413 **** * @param space the space to remove. */ ! public void removeDomain(Space space) { if (space == frontDomain) { setFrontDomain(null); --- 1409,1413 ---- * @param space the space to remove. */ ! public void removeDomain(Container space) { if (space == frontDomain) { setFrontDomain(null); *************** *** 1808,1812 **** Iterator it = Project.getInstance().getSpaces().iterator(); while (it.hasNext()) { ! Space current = (Space) it.next(); String nid = current.getName() + "-" + current.getId().toString(); if (nid.equals(a.getValue())) { --- 1808,1812 ---- Iterator it = Project.getInstance().getSpaces().iterator(); while (it.hasNext()) { ! Container current = (Container) it.next(); String nid = current.getName() + "-" + current.getId().toString(); if (nid.equals(a.getValue())) { *************** *** 1817,1821 **** Iterator it = Project.getInstance().getSpaces().iterator(); while (it.hasNext()) { ! Space current = (Space) it.next(); String nid = current.getName() + "-" + current.getId().toString(); if (nid.equals(a.getValue())) { --- 1817,1821 ---- Iterator it = Project.getInstance().getSpaces().iterator(); while (it.hasNext()) { ! Container current = (Container) it.next(); String nid = current.getName() + "-" + current.getId().toString(); if (nid.equals(a.getValue())) { *************** *** 1919,1932 **** String res = ""; switch (getOwner().getLevel() + 1) { ! case Space.PROJECT_LEVEL: res = "Project Surface"; break; ! case Space.SPACE_LEVEL: res = "Space Surface"; break; ! case Space.ELEMENT_LEVEL: res = "Element Surface"; break; ! case Space.PART_LEVEL: res = "Part Surface"; break; --- 1919,1932 ---- String res = ""; switch (getOwner().getLevel() + 1) { ! case Container.PROJECT_LEVEL: res = "Project Surface"; break; ! case Container.SPACE_LEVEL: res = "Space Surface"; break; ! case Container.ELEMENT_LEVEL: res = "Element Surface"; break; ! case Container.PART_LEVEL: res = "Part Surface"; break; *************** *** 1994,1999 **** */ public static void mergeSpaceAssign(Surface sur1, Surface sur2, Surface onto) { ! Space front = onto.frontDomain; ! Space back = onto.backDomain; Vertex n1 = sur1.normal(); Vertex n2 = sur2.normal(); --- 1994,1999 ---- */ public static void mergeSpaceAssign(Surface sur1, Surface sur2, Surface onto) { ! Container front = onto.frontDomain; ! Container back = onto.backDomain; Vertex n1 = sur1.normal(); Vertex n2 = sur2.normal(); *************** *** 2060,2064 **** * @return true when succes otherwise false */ ! public boolean setOppositeSpace(Space s1, Space s2) { if (getFrontDomain() == s1 && getBackDomain() != s1) { setBackDomain(s2); --- 2060,2064 ---- * @return true when succes otherwise false */ ! public boolean setOppositeSpace(Container s1, Container s2) { if (getFrontDomain() == s1 && getBackDomain() != s1) { setBackDomain(s2); Index: Space.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Space.java,v retrieving revision 1.223 retrieving revision 1.224 diff -C2 -d -r1.223 -r1.224 *** Space.java 12 Dec 2007 16:11:49 -0000 1.223 --- Space.java 13 Dec 2007 12:00:31 -0000 1.224 *************** *** 45,65 **** /** union flag */ ! private boolean isUnion; /** net flag */ ! private boolean isNet; /** The name */ ! private String name; /** The Discription */ ! private Description description; /** The envelope (a set of surfaces) */ private Set<Surface> envelope; /** type of space */ ! private int type; /** If the constructionspace is transparent */ ! private boolean transparent; /** --- 45,65 ---- /** union flag */ ! protected boolean isUnion; /** net flag */ ! protected boolean isNet; /** The name */ ! protected String name; /** The Discription */ ! protected Description description; /** The envelope (a set of surfaces) */ private Set<Surface> envelope; /** type of space */ ! protected int type; /** If the constructionspace is transparent */ ! protected boolean transparent; /** *************** *** 69,76 **** * hierarchy */ ! private boolean container; /** The classification */ ! private Classification classification; /** The classification type*/ --- 69,76 ---- * hierarchy */ ! protected boolean container; /** The classification */ ! protected Classification classification; /** The classification type*/ *************** *** 78,85 **** /** The empty space in this space (also called void) */ ! protected Space empty; /** The elements (a list of spaces) */ ! private HashMap<Long, Space> elements; /** The next element id */ --- 78,85 ---- /** The empty space in this space (also called void) */ ! protected Container empty; /** The elements (a list of spaces) */ ! protected HashMap<Long, Space> elements; /** The next element id */ *************** *** 198,203 **** * @return The space */ ! public Space createConstructionSpace(String name) { ! return new Container(name, Space.CONSTRUCTION, true); } --- 198,203 ---- * @return The space */ ! public Container createConstructionSpace(String name) { ! return new Container(name, Container.CONSTRUCTION, true); } *************** *** 207,212 **** * @return The space */ ! public Space createFunctionalSpace(String name) { ! return new Container(name, Space.FUNCTIONAL, true); } --- 207,212 ---- * @return The space */ ! public Container createFunctionalSpace(String name) { ! return new Container(name, Container.FUNCTIONAL, true); } *************** *** 217,222 **** * @return The space */ ! public Space createUnion(String name) { ! Space s = createConstructionSpace(name); s.add(new CoordinateSystem(new Vertex(0, 0, 0))); s.setUnion(true); --- 217,222 ---- * @return The space */ ! public Container createUnion(String name) { ! Container s = createConstructionSpace(name); s.add(new CoordinateSystem(new Vertex(0, 0, 0))); s.setUnion(true); *************** *** 229,234 **** * @return space */ ! public static Space createNet(String name) { ! Space net = new Container(name, Space.FUNCTIONAL, true); net.setNet(true); return net; --- 229,234 ---- * @return space */ ! public static Container createNet(String name) { ! Container net = new Container(name, Container.FUNCTIONAL, true); net.setNet(true); return net; *************** *** 297,301 **** * @param element Space */ ! public void setEmpty(Space element) { empty = element; } --- 297,301 ---- * @param element Space */ ! public void setEmpty(Container element) { empty = element; } *************** *** 305,309 **** * @return Empty */ ! public Space getEmpty() { return empty; } --- 305,309 ---- * @return Empty */ ! public Container getEmpty() { return empty; } *************** *** 371,375 **** } constructors.put(id, c); ! c.setOwner(this); } else { throw new Error("adding constructor to non-container " + this); --- 371,375 ---- } constructors.put(id, c); ! c.setOwner((Container)this); } else { throw new Error("adding constructor to non-container " + this); *************** *** 457,461 **** } vertices.put(id, vertex); ! vertex.setOwner(this); } else { throw new Error("adding vertex to non-container " + this); --- 457,461 ---- } vertices.put(id, vertex); ! vertex.setOwner((Container) this); } else { throw new Error("adding vertex to non-container " + this); *************** *** 481,485 **** */ public Vertex insert(Vertex vertex) { ! Space space = this; if (vertex.getOwner() != null) { if (vertex.getOwner() == space) { --- 481,485 ---- */ public Vertex insert(Vertex vertex) { ! Container space = (Container) this; if (vertex.getOwner() != null) { if (vertex.getOwner() == space) { *************** *** 543,547 **** } edges.put(id, edge); ! edge.setOwner(this); } else { throw new Error("adding edge to non-container " + this); --- 543,547 ---- } edges.put(id, edge); ! edge.setOwner((Container) this); } else { throw new Error("adding edge to non-container " + this); *************** *** 670,674 **** } surfaces.put(id, surface); ! surface.setOwner(this); if (surface.getFrontDomain() == null) { surface.setFrontDomain(empty); --- 670,674 ---- } surfaces.put(id, surface); ! surface.setOwner((Container) this); if (surface.getFrontDomain() == null) { surface.setFrontDomain(empty); *************** *** 722,727 **** Vertex n2 = surface.normal(); double dot = n1.dot(n2); ! Space back; ! Space front; if (dot < 0) { front = surface.getBackDomain(); --- 722,727 ---- Vertex n2 = surface.normal(); double dot = n1.dot(n2); ! Container back; ! Container front; if (dot < 0) { front = surface.getBackDomain(); *************** *** 1003,1007 **** } elements.put(id, element); ! element.setOwner(this); } else { throw new Error("adding element to non-container " + this); --- 1003,1007 ---- } elements.put(id, element); ! element.setOwner((Container) this); } else { throw new Error("adding element to non-container " + this); *************** *** 1013,1017 **** * @param element The space to remove as element */ ! public void remove(Space element) { if (container) { Set surfs = element.getEnvelope(); --- 1013,1017 ---- * @param element The space to remove as element */ ! public void remove(Container element) { if (container) { Set surfs = element.getEnvelope(); *************** *** 1021,1026 **** while (iter.hasNext()) { Surface current = (Surface)iter.next(); ! Space back = current.getBackDomain(); ! Space front = current.getFrontDomain(); if (back == element) { current.setBackDomain(empty); --- 1021,1026 ---- while (iter.hasNext()) { Surface current = (Surface)iter.next(); ! Container back = current.getBackDomain(); ! Container front = current.getFrontDomain(); if (back == element) { current.setBackDomain(empty); *************** *** 1032,1036 **** } if (element != null) { ! Space superSpace = findElement(element); if (superSpace != null) { superSpace.elements.remove(element.getId()); --- 1032,1036 ---- } if (element != null) { ! Container superSpace = findElement(element); if (superSpace != null) { superSpace.elements.remove(element.getId()); *************** *** 1051,1063 **** * is returned. */ ! private Space findElement(Space element) { if (elements != null) { if (elements.get(element.getId()) == element) { ! return this; } else { Iterator it = elements.values().iterator(); while (it.hasNext()) { ! Space space = (Space)it.next(); ! Space result = space.findElement(element); if (result != null) { return result; --- 1051,1063 ---- * is returned. */ ! protected Container findElement(Container element) { if (elements != null) { if (elements.get(element.getId()) == element) { ! return (Container) this; } else { Iterator it = elements.values().iterator(); while (it.hasNext()) { ! Container space = (Container)it.next(); ! Container result = space.findElement(element); if (result != null) { return result; *************** *** 1095,1099 **** */ public boolean isConstructionSpace() { ! return (type == Space.CONSTRUCTION); } --- 1095,1099 ---- */ public boolean isConstructionSpace() { ! return (type == Container.CONSTRUCTION); } *************** *** 1103,1107 **** */ public boolean isFunctionalSpace() { ! return (type == Space.FUNCTIONAL); } --- 1103,1107 ---- */ public boolean isFunctionalSpace() { ! return (type == Container.FUNCTIONAL); } *************** *** 1226,1230 **** } if (getOwner() != null && getOwner().getModellor() != null) { ! Parametric parameters = getOwner().getModellor().get(this); if (parameters != null) { res.add(new Attribute(parameters.getGeneralName(), parameters)); --- 1226,1230 ---- } if (getOwner() != null && getOwner().getModellor() != null) { ! Parametric parameters = getOwner().getModellor().get((Container) this); if (parameters != null) { res.add(new Attribute(parameters.getGeneralName(), parameters)); *************** *** 1252,1256 **** } int lvl = getLevel(); ! return res.concat(Space.levelToString(lvl)); } --- 1252,1256 ---- } int lvl = getLevel(); ! return res.concat(Container.levelToString(lvl)); } *************** *** 1379,1383 **** Iterator iter = getElements().iterator(); while (iter.hasNext()) { ! Space element = (Space) iter.next(); element.collectSurfaces(surfaces); } --- 1379,1383 ---- Iterator iter = getElements().iterator(); while (iter.hasNext()) { ! Container element = (Container) iter.next(); element.collectSurfaces(surfaces); } *************** *** 1391,1395 **** List<Surface> deletion = new LinkedList<Surface>(); for (Surface current : getEnvelope()) { ! Space other; if (current.getFrontDomain() == this) { other = current.getBackDomain(); --- 1391,1395 ---- List<Surface> deletion = new LinkedList<Surface>(); for (Surface current : getEnvelope()) { ! Container other; if (current.getFrontDomain() == this) { other = current.getBackDomain(); *************** *** 1404,1408 **** current.erase(); } ! getOwner().remove(this); } --- 1404,1408 ---- current.erase(); } ! getOwner().remove((Container) this); } *************** *** 1411,1416 **** * @return new space */ ! public Space shallowCopy() { ! Space copy = new Container(); copy.classification = classification; copy.container = container; --- 1411,1416 ---- * @return new space */ ! public Container shallowCopy() { ! Container copy = new Container(); copy.classification = classification; copy.container = container; *************** *** 1484,1488 **** Surface bottom = new Surface(edges); getOwner().add(bottom); ! bottom.setFrontDomain(this); bottom.extrude(zmax - zmin, new HashSet()); } --- 1484,1488 ---- Surface bottom = new Surface(edges); getOwner().add(bottom); ! bottom.setFrontDomain((Container) this); bottom.extrude(zmax - zmin, new HashSet()); } *************** *** 1609,1617 **** if (surface.getOwner() == this) { if (surface.protect()) { ! Space back = surface.getBackDomain(); if (back != null) { back.removeSurface(surface); } ! Space front = surface.getFrontDomain(); if (front != null) { front.removeSurface(surface); --- 1609,1617 ---- if (surface.getOwner() == this) { if (surface.protect()) { ! Container back = surface.getBackDomain(); if (back != null) { back.removeSurface(surface); } ! Container front = surface.getFrontDomain(); if (front != null) { front.removeSurface(surface); *************** *** 1764,1768 **** */ public void edit() { ! Project.getInstance().setActiveSpace(this); Selection.primary().clear(); Project.getInstance().changed(Project.getInstance()); --- 1764,1768 ---- */ public void edit() { ! Project.getInstance().setActiveSpace((Container) this); Selection.primary().clear(); Project.getInstance().changed(Project.getInstance()); *************** *** 1915,1919 **** SurfaceAnalysis analysis = new SurfaceAnalysis(); surfaces.clear(); ! surfaces.addAll(analysis.surfaceAnalysis(this, edges)); for (Surface current : surfaces) { --- 1915,1919 ---- SurfaceAnalysis analysis = new SurfaceAnalysis(); surfaces.clear(); ! surfaces.addAll(analysis.surfaceAnalysis((Container) this, edges)); for (Surface current : surfaces) { Index: Geometry.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Geometry.java,v retrieving revision 1.68 retrieving revision 1.69 diff -C2 -d -r1.68 -r1.69 *** Geometry.java 11 Dec 2007 15:14:13 -0000 1.68 --- Geometry.java 13 Dec 2007 12:00:30 -0000 1.69 *************** *** 55,59 **** * @return The collection of edges */ ! public static Collection<Edge> getActiveEdges(Space s) { if (s.getElements().size() == 1) { Collection<Edge> e = new ArrayList<Edge>(); --- 55,59 ---- * @return The collection of edges */ ! public static Collection<Edge> getActiveEdges(Container s) { if (s.getElements().size() == 1) { Collection<Edge> e = new ArrayList<Edge>(); *************** *** 67,71 **** for (Space cur : s.getElements()) { if (cur != s.getEmpty()) { ! Collection<Edge> c = getActiveEdges(cur); edges.addAll(c); } --- 67,71 ---- for (Space cur : s.getElements()) { if (cur != s.getEmpty()) { ! Collection<Edge> c = getActiveEdges((Container) cur); edges.addAll(c); } *************** *** 82,86 **** * @return The collection of surfaces */ ! public static Collection getActiveSurfaces(Space s) { if (s.getElements().size() == 1) { //If void is the only space add all surfaces in the space and the envelope --- 82,86 ---- * @return The collection of surfaces */ ! public static Collection getActiveSurfaces(Container s) { if (s.getElements().size() == 1) { //If void is the only space add all surfaces in the space and the envelope *************** *** 94,98 **** Iterator iter = s.getElements().iterator(); while (iter.hasNext()) { ! Space cur = (Space)iter.next(); if (cur != s.getEmpty()) { surfaces.addAll(getActiveSurfaces(cur)); --- 94,98 ---- Iterator iter = s.getElements().iterator(); while (iter.hasNext()) { ! Container cur = (Container)iter.next(); if (cur != s.getEmpty()) { surfaces.addAll(getActiveSurfaces(cur)); *************** *** 421,425 **** */ public static Constructor insertConstructor(Constructor c) { ! Space space = Project.getInstance().getActiveSpace(); return space.insert(c); } --- 421,425 ---- */ public static Constructor insertConstructor(Constructor c) { ! Container space = Project.getInstance().getActiveSpace(); return space.insert(c); } *************** *** 432,436 **** * @return list of created surfaces */ ! public static List<Surface> insertEdges(Space space, List<Edge> edges) { List<Surface> result = new LinkedList(); --- 432,436 ---- * @return list of created surfaces */ ! public static List<Surface> insertEdges(Container space, List<Edge> edges) { List<Surface> result = new LinkedList(); *************** *** 448,452 **** */ public static List<Surface> insertEdges(List<Edge> edges) { ! Space space = Project.getInstance().getActiveSpace(); return insertEdges(space, edges); } --- 448,452 ---- */ public static List<Surface> insertEdges(List<Edge> edges) { ! Container space = Project.getInstance().getActiveSpace(); return insertEdges(space, edges); } *************** *** 648,655 **** Set<Surface> redundant = new HashSet<Surface>(); for (Surface s : surfaces) { ! Space front = s.getFrontDomain(); if (front != null && front == s.getBackDomain()) { ! Space owner = front.getOwner(); if (owner != null && front != owner.empty) { --- 648,655 ---- Set<Surface> redundant = new HashSet<Surface>(); for (Surface s : surfaces) { ! Container front = s.getFrontDomain(); if (front != null && front == s.getBackDomain()) { ! Container owner = front.getOwner(); if (owner != null && front != owner.empty) { *************** *** 710,717 **** Plane p = s1.plane(); if (p.contains(s2)) { ! Space front = s1.getFrontDomain(); ! Space back = s1.getBackDomain(); ! Space nextFront = s2.getFrontDomain(); ! Space nextBack = s2.getBackDomain(); if (n1.dot(n2) > 0) { if (nextFront == front && nextBack == back) { --- 710,717 ---- Plane p = s1.plane(); if (p.contains(s2)) { ! Container front = s1.getFrontDomain(); ! Container back = s1.getBackDomain(); ! Container nextFront = s2.getFrontDomain(); ! Container nextBack = s2.getBackDomain(); if (n1.dot(n2) > 0) { if (nextFront == front && nextBack == back) { *************** *** 894,898 **** int size = s.getEdges().size(); s.replace(extendable, extendedEdge); ! Space owner = s.getOwner(); if (owner != null) { owner.add(extendedEdge); --- 894,898 ---- int size = s.getEdges().size(); s.replace(extendable, extendedEdge); ! Container owner = s.getOwner(); if (owner != null) { owner.add(extendedEdge); *************** *** 960,964 **** * @param sp2 second space */ ! public static void assignSame(Surface s1, Surface s2, Space sp1, Space sp2) { if (s1.getFrontDomain() == sp1) { Vertex n1 = s1.normal(); --- 960,964 ---- * @param sp2 second space */ ! public static void assignSame(Surface s1, Surface s2, Container sp1, Container sp2) { if (s1.getFrontDomain() == sp1) { Vertex n1 = s1.normal(); Index: Geometric.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Geometric.java,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** Geometric.java 10 Oct 2007 08:32:00 -0000 1.20 --- Geometric.java 13 Dec 2007 12:00:31 -0000 1.21 *************** *** 19,23 **** public abstract class Geometric extends Entity { /** The space containing this geometric entity */ ! private Space owner; /** protected */ --- 19,23 ---- public abstract class Geometric extends Entity { /** The space containing this geometric entity */ ! private Container owner; /** protected */ *************** *** 88,97 **** } ! Set<Space> spaces = new HashSet(); for (Surface current : env) { spaces.add(current.getFrontDomain()); spaces.add(current.getBackDomain()); } ! for (Space current : spaces) { if (current != current.getOwner().empty) { if (env.containsAll(current.getEnvelope())) { --- 88,97 ---- } ! Set<Container> spaces = new HashSet(); for (Surface current : env) { spaces.add(current.getFrontDomain()); spaces.add(current.getBackDomain()); } ! for (Container current : spaces) { if (current != current.getOwner().empty) { if (env.containsAll(current.getEnvelope())) { *************** *** 107,111 **** * @return The space */ ! public Space getOwner() { return owner; } --- 107,111 ---- * @return The space */ ! public Container getOwner() { return owner; } *************** *** 115,119 **** * @param space The space */ ! public void setOwner(Space space) { this.owner = space; } --- 115,119 ---- * @param space The space */ ! public void setOwner(Container space) { this.owner = space; } Index: Classification.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Classification.java,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** Classification.java 18 Oct 2007 12:30:18 -0000 1.22 --- Classification.java 13 Dec 2007 12:00:31 -0000 1.23 *************** *** 96,100 **** Classification par = getParent(); if (par != null) { ! if (cur != null && cur.getOwner().getLevel() != Space.PROJECT_LEVEL) { current = cur.getOwner(); Classification currentClas = current.getClassification(); --- 96,100 ---- Classification par = getParent(); if (par != null) { ! if (cur != null && cur.getOwner().getLevel() != Container.PROJECT_LEVEL) { current = cur.getOwner(); Classification currentClas = current.getClassification(); Index: Mesh.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Mesh.java,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** Mesh.java 8 Nov 2007 08:26:55 -0000 1.25 --- Mesh.java 13 Dec 2007 12:00:32 -0000 1.26 *************** *** 21,25 **** private Collection<Edge> edges; private Collection<Surface> surfaces; ! private Collection<Space> elements; /** --- 21,25 ---- private Collection<Edge> edges; private Collection<Surface> surfaces; ! private Collection<Container> elements; /** *************** *** 52,56 **** * @param vertices Collection of vertices */ ! public Mesh(Collection<Space> elements, Collection<Surface> surfaces, Collection<Edge> edges, --- 52,56 ---- * @param vertices Collection of vertices */ ! public Mesh(Collection<Container> elements, Collection<Surface> surfaces, Collection<Edge> edges, *************** *** 70,77 **** Collection<Edge> edges = new HashSet<Edge>(); Collection<Surface> surfaces = new HashSet<Surface>(); ! Collection<Space> elements = new HashSet<Space>(); for (Geometric current : geometrics) { ! if (current instanceof Space) { ! elements.add((Space) current); } else if (current instanceof Surface) { surfaces.add((Surface) current); --- 70,77 ---- Collection<Edge> edges = new HashSet<Edge>(); Collection<Surface> surfaces = new HashSet<Surface>(); ! Collection<Container> elements = new HashSet<Container>(); for (Geometric current : geometrics) { ! if (current instanceof Container) { ! elements.add((Container) current); } else if (current instanceof Surface) { surfaces.add((Surface) current); *************** *** 118,122 **** * @return elements */ ! public Collection<Space> elements() { return elements; } --- 118,122 ---- * @return elements */ ! public Collection<Container> elements() { return elements; } *************** *** 282,287 **** public Mesh copy(Map map) { Mesh copy = copyGeometry(map); ! for (Space current : elements) { ! Space shallow = current.shallowCopy(); map.put(current, shallow); copy.elements().add(shallow); --- 282,287 ---- public Mesh copy(Map map) { Mesh copy = copyGeometry(map); ! for (Container current : elements) { ! Container shallow = current.shallowCopy(); map.put(current, shallow); copy.elements().add(shallow); *************** *** 290,298 **** Surface surface = (Surface) map.get(current); if (current.getBackDomain() != null) { ! Space back = (Space) map.get(current.getBackDomain()); surface.setBackDomain(back); } if (current.getFrontDomain() != null) { ! Space front = (Space) map.get(current.getFrontDomain()); surface.setFrontDomain(front); } --- 290,298 ---- Surface surface = (Surface) map.get(current); if (current.getBackDomain() != null) { ! Container back = (Container) map.get(current.getBackDomain()); surface.setBackDomain(back); } if (current.getFrontDomain() != null) { ! Container front = (Container) map.get(current.getFrontDomain()); surface.setFrontDomain(front); } Index: ClippingPlane.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/ClippingPlane.java,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** ClippingPlane.java 11 Dec 2007 14:49:02 -0000 1.25 --- ClippingPlane.java 13 Dec 2007 12:00:32 -0000 1.26 *************** *** 191,195 **** public Collection<Vertex> findIntersections() { toModel.clear(); ! Space space = Project.getInstance().getActiveSpace(); Collection edges = Geometry.getActiveEdges(space); silluet.clear(); --- 191,195 ---- public Collection<Vertex> findIntersections() { toModel.clear(); ! Container space = Project.getInstance().getActiveSpace(); Collection edges = Geometry.getActiveEdges(space); silluet.clear(); Index: SurfaceAnalysis.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/SurfaceAnalysis.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** SurfaceAnalysis.java 9 Dec 2007 11:04:01 -0000 1.13 --- SurfaceAnalysis.java 13 Dec 2007 12:00:32 -0000 1.14 *************** *** 61,65 **** * @param space Space */ ! public void clearPlanes(Space space) { Collection<CoordinateSystem> planes = space.getCoordinateSystems(); for (CoordinateSystem current : planes) { --- 61,65 ---- * @param space Space */ ! public void clearPlanes(Container space) { Collection<CoordinateSystem> planes = space.getCoordinateSystems(); for (CoordinateSystem current : planes) { *************** *** 74,78 **** * @return collection of CoordinateSystem */ ! public Collection<CoordinateSystem> planeAnalysis(Space space) { return planeAnalysis(space, space.getEdges()); } --- 74,78 ---- * @return collection of CoordinateSystem */ ! public Collection<CoordinateSystem> planeAnalysis(Container space) { return planeAnalysis(space, space.getEdges()); } *************** *** 83,87 **** * @return Collection of CoordinateSystem */ ! public Collection<CoordinateSystem> planeAnalysis(Space space, Collection<Edge> start) { Collection<CoordinateSystem> systems = new LinkedList(); Collection<Edge> edges = space.getEdges(); --- 83,87 ---- * @return Collection of CoordinateSystem */ ! public Collection<CoordinateSystem> planeAnalysis(Container space, Collection<Edge> start) { Collection<CoordinateSystem> systems = new LinkedList(); Collection<Edge> edges = space.getEdges(); *************** *** 147,151 **** * @param space Space */ ! public void clearSurfaces(Space space) { Collection<Surface> surfaces = new LinkedList(space.getSurfaces()); for (Surface current : surfaces) { --- 147,151 ---- * @param space Space */ ! public void clearSurfaces(Container space) { Collection<Surface> surfaces = new LinkedList(space.getSurfaces()); for (Surface current : surfaces) { *************** *** 161,165 **** * @return collection of surfaces */ ! public Collection<Surface> surfaceAnalysis(Space space, Collection<Edge> start) { Collection<CoordinateSystem> systems = planeAnalysis(space, start); Collection<Surface> added = new LinkedList(); --- 161,165 ---- * @return collection of surfaces */ ! public Collection<Surface> surfaceAnalysis(Container space, Collection<Edge> start) { Collection<CoordinateSystem> systems = planeAnalysis(space, start); Collection<Surface> added = new LinkedList(); *************** *** 174,178 **** * @param space Space */ ! public void surfaceAnalysis(Space space) { Collection<CoordinateSystem> systems = space.getCoordinateSystems(); for (CoordinateSystem current : systems) { --- 174,178 ---- * @param space Space */ ! public void surfaceAnalysis(Container space) { Collection<CoordinateSystem> systems = space.getCoordinateSystems(); for (CoordinateSystem current : systems) { *************** *** 189,193 **** * @return collection of Surfaces */ ! public Collection<Surface> surfaceAnalysis(Space space, CoordinateSystem system, Collection<Edge> start) { Plane plane = system.plane(); --- 189,193 ---- * @return collection of Surfaces */ ! public Collection<Surface> surfaceAnalysis(Container space, CoordinateSystem system, Collection<Edge> start) { Plane plane = system.plane(); *************** *** 299,305 **** private void assign(Surface surface, Collection<Surface> surfaces) { ! Space back = null; Material backmaterial = null; ! Space front = null; Material frontmaterial = null; Vertex n1 = surface.normal(); --- 299,305 ---- private void assign(Surface surface, Collection<Surface> surfaces) { ! Container back = null; Material backmaterial = null; ! Container front = null; Material frontmaterial = null; Vertex n1 = surface.normal(); Index: EnergyCalc.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/EnergyCalc.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** EnergyCalc.java 11 Dec 2007 14:49:01 -0000 1.14 --- EnergyCalc.java 13 Dec 2007 12:00:30 -0000 1.15 *************** *** 28,32 **** HashSet<Surface> functionalAssigned = new HashSet<Surface>(); for (Space space : Project.getInstance().world().getElements()) { ! if (space.getType() == Space.FUNCTIONAL) { functionalAssigned.addAll(space.getEnvelope()); } --- 28,32 ---- HashSet<Surface> functionalAssigned = new HashSet<Surface>(); for (Space space : Project.getInstance().world().getElements()) { ! if (space.getType() == Container.FUNCTIONAL) { functionalAssigned.addAll(space.getEnvelope()); } *************** *** 64,68 **** */ //TODO implement handling of elemented spaces (make calc recursive) ! private static double calcloss(Space classification, Surface current) { double loss = 0; if (isrelevant(classification, current)) { --- 64,68 ---- */ //TODO implement handling of elemented spaces (make calc recursive) ! private static double calcloss(Container classification, Surface current) { double loss = 0; if (isrelevant(classification, current)) { *************** *** 90,94 **** * @return true if the surface is relevant */ ! private static boolean isrelevant(Space classification, Surface current) { boolean relevant = false; Vertex normal = current.normal(); --- 90,94 ---- * @return true if the surface is relevant */ ! private static boolean isrelevant(Container classification, Surface current) { boolean relevant = false; Vertex normal = current.normal(); *************** *** 99,103 **** double distance = 0; Surface closest = null; ! Space spa = null; //Find closest surface that have a functional space as either front or back domain --- 99,103 ---- double distance = 0; Surface closest = null; ! Container spa = null; //Find closest surface that have a functional space as either front or back domain *************** *** 154,158 **** while (it.hasNext()) { Surface current = (Surface) it.next(); ! Space spa = null; if (current.normal().getZ() >= 0.99) { spa = current.getFrontDomain(); --- 154,158 ---- while (it.hasNext()) { Surface current = (Surface) it.next(); ! Container spa = null; if (current.normal().getZ() >= 0.99) { spa = current.getFrontDomain(); Index: Persistence.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Persistence.java,v retrieving revision 1.69 retrieving revision 1.70 diff -C2 -d -r1.69 -r1.70 *** Persistence.java 12 Dec 2007 14:38:43 -0000 1.69 --- Persistence.java 13 Dec 2007 12:00:31 -0000 1.70 *************** *** 125,129 **** Collection xmls = new LinkedList(); ! Space world = internalizeContainer(null, (SpaceType) document.getSpace().iterator().next(), mapper, xmls); --- 125,129 ---- Collection xmls = new LinkedList(); ! Container world = internalizeContainer(null, (SpaceType) document.getSpace().iterator().next(), mapper, xmls); *************** *** 134,138 **** p.setActiveCoordinateSystem( (CoordinateSystem) get(document.getCs(), mapper)); ! p.setActiveSpace((Space) get(document.getActive(), mapper)); p.setName(document.getName()); p.changed(p); --- 134,138 ---- p.setActiveCoordinateSystem( (CoordinateSystem) get(document.getCs(), mapper)); ! p.setActiveSpace((Container) get(document.getActive(), mapper)); p.setName(document.getName()); p.changed(p); *************** *** 233,237 **** Classification classification = null; if (!string.equalsIgnoreCase("unassigned")) { ! if (type == Space.CONSTRUCTION) { if (string.startsWith("-")) { classification = Project.getInstance().getClassification(string, 0); --- 233,237 ---- Classification classification = null; if (!string.equalsIgnoreCase("unassigned")) { ! if (type == Container.CONSTRUCTION) { if (string.startsWith("-")) { classification = Project.getInstance().getClassification(string, 0); *************** *** 255,259 **** ! private static Space internalizeElement(Space owner, net.sourceforge.bprocessor.model.xml.Space xml, Map mapper, Collection xmls) { --- 255,259 ---- ! private static Space internalizeElement(Container owner, net.sourceforge.bprocessor.model.xml.Space xml, Map mapper, Collection xmls) { *************** *** 266,270 **** } ! private static Space internalizeInstance(Space owner, SpaceType xml, Map mapper, Collection xmls) { String name = xml.getName(); --- 266,270 ---- } ! private static Instance internalizeInstance(Container owner, SpaceType xml, Map mapper, Collection xmls) { String name = xml.getName(); *************** *** 302,306 **** * @return The Space */ ! private static Container internalizeContainer(Space owner, SpaceType xml, Map mapper, Collection xmls) { --- 302,306 ---- * @return The Space */ ! private static Container internalizeContainer(Container owner, SpaceType xml, Map mapper, Collection xmls) { *************** *** 346,350 **** } if (empty != 0) { ! space.setEmpty((Space) mapper.get(new Long(empty))); } { --- 346,350 ---- } if (empty != 0) { ! space.setEmpty((Container) mapper.get(new Long(empty))); } { *************** *** 412,416 **** private static ClassificationType internalizeClassificationType(String string, int type) { ! if (type == Space.CONSTRUCTION) { ClassificationType classType = Project.getInstance().findClassificationType(string, 0); return classType; --- 412,416 ---- private static ClassificationType internalizeClassificationType(String string, int type) { ! if (type == Container.CONSTRUCTION) { ClassificationType classType = Project.getInstance().findClassificationType(string, 0); return classType; *************** *** 586,590 **** * @return The Surface */ ! private static Surface internalizeSurface(Space owner, SurfaceType xml, Map mapper, Collection xmls) { Surface surface = new Surface(); --- 586,590 ---- * @return The Surface */ ! private static Surface internalizeSurface(Container owner, SurfaceType xml, Map mapper, Collection xmls) { Surface surface = new Surface(); *************** *** 603,607 **** * @return The Edge */ ! private static Edge internalizeEdge(Space owner, EdgeType xml, Map mapper, Collection xmls) { Edge edge = new Edge(); edge.setId(new Long(xml.getProgid())); --- 603,607 ---- * @return The Edge */ ! private static Edge internalizeEdge(Container owner, EdgeType xml, Map mapper, Collection xmls) { Edge edge = new Edge(); edge.setId(new Long(xml.getProgid())); *************** *** 621,625 **** * @return The Vertex */ ! private static Vertex internalizeVertex(Space owner, VertexType xml, Map mapper, Collection xmls) { Vertex vertex = new Vertex(); --- 621,625 ---- * @return The Vertex */ ! private static Vertex internalizeVertex(Container owner, VertexType xml, Map mapper, Collection xmls) { Vertex vertex = new Vertex(); *************** *** 772,776 **** */ private static void internalizeReferences(Instance object, SpaceType xml, Map map) { ! object.setProto((Space) get(xml.getProtoref(), map)); } --- 772,776 ---- */ private static void internalizeReferences(Instance object, SpaceType xml, Map map) { ! object.setProto((Container) get(xml.getProtoref(), map)); } *************** *** 785,790 **** object.setEdges(asList(xml.getEdgeref(), map)); object.setHoles(asSet(xml.getHole(), map)); ! object.setBackDomain((Space) get(xml.getBack(), map)); ! object.setFrontDomain((Space) get(xml.getFront(), map)); object.setBackMaterial((Material) get(xml.getBackMaterial(), map)); object.setFrontMaterial((Material) get(xml.getFrontMaterial(), map)); --- 785,790 ---- object.setEdges(asList(xml.getEdgeref(), map)); object.setHoles(asSet(xml.getHole(), map)); ! object.setBackDomain((Container) get(xml.getBack(), map)); ! object.setFrontDomain((Container) get(xml.getFront(), map)); object.setBackMaterial((Material) get(xml.getBackMaterial(), map)); object.setFrontMaterial((Material) get(xml.getFrontMaterial(), map)); *************** *** 1590,1596 **** } Classification construction = internalizeClassification( ! (XMLClassificationType)xml.getXMLClassification().get(0), typeMap, Space.CONSTRUCTION); Classification functional = internalizeClassification( ! (XMLClassificationType)xml.getXMLClassification().get(1), typeMap, Space.FUNCTIONAL); input.close(); return new Object[]{construction, functional, types}; --- 1590,1596 ---- } Classification construction = internalizeClassification( ! (XMLClassificationType)xml.getXMLClassification().get(0), typeMap, Container.CONSTRUCTION); Classification functional = internalizeClassification( ! (XMLClassificationType)xml.getXMLClassification().get(1), typeMap, Container.FUNCTIONAL); input.close(); return new Object[]{construction, functional, types}; Index: Edge.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Edge.java,v retrieving revision 1.104 retrieving revision 1.105 diff -C2 -d -r1.104 -r1.105 *** Edge.java 13 Dec 2007 08:21:34 -0000 1.104 --- Edge.java 13 Dec 2007 12:00:31 -0000 1.105 *************** *** 222,226 **** public void delete() { if (getOwner() != null) { ! Space owner = getOwner(); Set<Surface> surfaces = getSurfaces(); --- 222,226 ---- public void delete() { if (getOwner() != null) { ! Container owner = getOwner(); Set<Surface> surfaces = getSurfaces(); *************** *** 240,245 **** Surface s2 = it.next(); if (s1.plane().contains(s2)) { ! List<Edge> edges1 = Space.edgeFirst(s1, this); ! List<Edge> edges2 = Space.edgeFirst(s2, this); edges1.remove(this); edges2.remove(this); --- 240,245 ---- Surface s2 = it.next(); if (s1.plane().contains(s2)) { ! List<Edge> edges1 = Container.edgeFirst(s1, this); ! List<Edge> edges2 = Container.edgeFirst(s2, this); edges1.remove(this); edges2.remove(this); Index: Project.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Project.java,v retrieving revision 1.150 retrieving revision ... [truncated message content] |