Thread: [Bprocessor-commit] model/src/net/sourceforge/bprocessor/model Edge.java,1.41,1.42 Vertex.java,1.30,
Status: Pre-Alpha
Brought to you by:
henryml
From: Michael L. <he...@us...> - 2006-03-25 18:10:02
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8351/src/net/sourceforge/bprocessor/model Modified Files: Edge.java Vertex.java Surface.java Geometry.java Space.java LayerModellor.java Geometric.java Project.java Removed Files: Mesh.java Log Message: Remove the Mesh Ð has been replaced by Space. The world is a Space with type = Functional and name "Void" Index: Vertex.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Vertex.java,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** Vertex.java 17 Mar 2006 18:59:24 -0000 1.30 --- Vertex.java 25 Mar 2006 18:08:32 -0000 1.31 *************** *** 131,138 **** public Set getEdges() { Set result = new HashSet(); ! if (getMesh() == null) { return result; } ! Collection edges = getMesh().getEdges(); Iterator iter = edges.iterator(); while (iter.hasNext()) { --- 131,138 ---- public Set getEdges() { Set result = new HashSet(); ! if (getOwner() == null) { return result; } ! Collection edges = getOwner().getEdges(); Iterator iter = edges.iterator(); while (iter.hasNext()) { Index: Surface.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Surface.java,v retrieving revision 1.84 retrieving revision 1.85 diff -C2 -d -r1.84 -r1.85 *** Surface.java 20 Mar 2006 13:48:58 -0000 1.84 --- Surface.java 25 Mar 2006 18:08:32 -0000 1.85 *************** *** 177,182 **** */ public void delete() { ! if (getMesh() != null) { ! getMesh().delete(this); } } --- 177,182 ---- */ public void delete() { ! if (getOwner() != null) { ! getOwner().delete(this); } } *************** *** 316,320 **** * @return The copy */ ! public Surface copy(Mesh mesh) { Surface surface = new Surface(); --- 316,320 ---- * @return The copy */ ! public Surface copy(Space mesh) { Surface surface = new Surface(); *************** *** 415,419 **** vmap[i] = v[i].copy(); v2dir.put(v[i], new Direction(vmap[i], normal)); ! getMesh().add(vmap[i]); } } --- 415,419 ---- vmap[i] = v[i].copy(); v2dir.put(v[i], new Direction(vmap[i], normal)); ! getOwner().add(vmap[i]); } } *************** *** 425,429 **** topmap[i] = new Edge(vmap[i], vmap[(i + 1) % n]); e2e.put(e[i], topmap[i]); ! getMesh().add(topmap[i]); } } --- 425,429 ---- topmap[i] = new Edge(vmap[i], vmap[(i + 1) % n]); e2e.put(e[i], topmap[i]); ! getOwner().add(topmap[i]); } } *************** *** 435,439 **** sidemap[i] = new Edge(v[i], vmap[i]); v2e.put(v[i], sidemap[i]); ! getMesh().add(sidemap[i]); } } --- 435,439 ---- sidemap[i] = new Edge(v[i], vmap[i]); v2e.put(v[i], sidemap[i]); ! getOwner().add(sidemap[i]); } } *************** *** 454,458 **** facemap[i] = new Surface(newEdges); e2s.put(b, facemap[i]); ! getMesh().add(facemap[i]); } sides.add(facemap[i]); --- 454,458 ---- facemap[i] = new Surface(newEdges); e2s.put(b, facemap[i]); ! getOwner().add(facemap[i]); } sides.add(facemap[i]); *************** *** 465,469 **** } top = new Surface(newEdges); ! getMesh().add(top); } --- 465,469 ---- } top = new Surface(newEdges); ! getOwner().add(top); } *************** *** 943,947 **** // FIXME The material attribute should be ... a material! // The id does not work if this is not a toplevel surface. ! if (getMesh() == Project.getInstance().mesh()) { res.add(new Attribute("Front Material", getId())); } --- 943,947 ---- // FIXME The material attribute should be ... a material! // The id does not work if this is not a toplevel surface. ! if (getOwner() == Project.getInstance().world()) { res.add(new Attribute("Front Material", getId())); } *************** *** 954,958 **** // FIXME The material attribute should be ... a material! // The id does not work if this is not a toplevel surface. ! if (getMesh() == Project.getInstance().mesh()) { res.add(new Attribute("Back Material", getId())); } --- 954,958 ---- // FIXME The material attribute should be ... a material! // The id does not work if this is not a toplevel surface. ! if (getOwner() == Project.getInstance().world()) { res.add(new Attribute("Back Material", getId())); } --- Mesh.java DELETED --- Index: Project.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Project.java,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** Project.java 23 Mar 2006 10:43:49 -0000 1.50 --- Project.java 25 Mar 2006 18:08:32 -0000 1.51 *************** *** 40,44 **** /** The Mesh */ ! private Mesh mesh; /** The spaces */ --- 40,44 ---- /** The Mesh */ ! private Space world; /** The spaces */ *************** *** 101,105 **** addCams(); observers = new LinkedList(); ! mesh = new Mesh(); constraints = new LinkedList(); } --- 101,105 ---- addCams(); observers = new LinkedList(); ! world = new Space("Void", Space.FUNCTIONAL); constraints = new LinkedList(); } *************** *** 109,114 **** * @return The mesh */ ! public Mesh mesh() { ! return mesh; } --- 109,114 ---- * @return The mesh */ ! public Space world() { ! return world; } *************** *** 147,151 **** public void clear() { spaces.clear(); ! mesh.clear(); this.setActiveSpace(null); changed(this); --- 147,151 ---- public void clear() { spaces.clear(); ! world.clear(); this.setActiveSpace(null); changed(this); *************** *** 181,189 **** Object next = iter.next(); if (next instanceof Edge) { ! mesh.delete((Edge)next); } else if (next instanceof Surface) { ! mesh.delete((Surface)next); } else if (next instanceof Vertex) { ! mesh.delete((Vertex)next); } } --- 181,189 ---- Object next = iter.next(); if (next instanceof Edge) { ! world.delete((Edge)next); } else if (next instanceof Surface) { ! world.delete((Surface)next); } else if (next instanceof Vertex) { ! world.delete((Vertex)next); } } *************** *** 335,339 **** */ public void add(Edge edge) { ! mesh.add(edge); changed(this); } --- 335,339 ---- */ public void add(Edge edge) { ! world.add(edge); changed(this); } *************** *** 344,348 **** */ public void delete(Edge edge) { ! mesh.delete(edge); changed(this); } --- 344,348 ---- */ public void delete(Edge edge) { ! world.delete(edge); changed(this); } *************** *** 354,358 **** */ public void remove(Edge edge) { ! mesh.delete(edge); changed(this); } --- 354,358 ---- */ public void remove(Edge edge) { ! world.delete(edge); changed(this); } *************** *** 363,367 **** */ public Collection getEdges() { ! return mesh.getEdges(); } --- 363,367 ---- */ public Collection getEdges() { ! return world.getEdges(); } *************** *** 421,425 **** */ public void add(Surface surface) { ! mesh.add(surface); changed(this); } --- 421,425 ---- */ public void add(Surface surface) { ! world.add(surface); changed(this); } *************** *** 430,434 **** */ public void remove(Surface surface) { ! mesh.remove(surface); changed(this); } --- 430,434 ---- */ public void remove(Surface surface) { ! world.remove(surface); changed(this); } *************** *** 439,443 **** */ public void delete(Surface surface) { ! mesh.delete(surface); changed(this); } --- 439,443 ---- */ public void delete(Surface surface) { ! world.delete(surface); changed(this); } *************** *** 448,452 **** */ public Collection getSurfaces() { ! return mesh.getSurfaces(); } --- 448,452 ---- */ public Collection getSurfaces() { ! return world.getSurfaces(); } *************** *** 457,461 **** */ public Surface findSurfaceById(long id) { ! return (Surface)mesh.getSurface(id); } --- 457,461 ---- */ public Surface findSurfaceById(long id) { ! return (Surface)world.getSurface(id); } *************** *** 466,470 **** */ public void add(Vertex vertex) { ! mesh.add(vertex); changed(this); } --- 466,470 ---- */ public void add(Vertex vertex) { ! world.add(vertex); changed(this); } *************** *** 475,479 **** */ public void remove(Vertex vertex) { ! mesh.remove(vertex); changed(this); } --- 475,479 ---- */ public void remove(Vertex vertex) { ! world.remove(vertex); changed(this); } *************** *** 484,488 **** */ public void delete(Vertex vertex) { ! mesh.delete(vertex); changed(this); } --- 484,488 ---- */ public void delete(Vertex vertex) { ! world.delete(vertex); changed(this); } *************** *** 493,497 **** */ public Collection getVertices() { ! return mesh.getVertices(); } --- 493,497 ---- */ public Collection getVertices() { ! return world.getVertices(); } *************** *** 542,546 **** */ public Set findByLocation(double x, double y, double z, double delta) { ! return mesh.findByLocation(x, y, z, delta); } --- 542,546 ---- */ public Set findByLocation(double x, double y, double z, double delta) { ! return world.findByLocation(x, y, z, delta); } *************** *** 551,573 **** */ public Set findEdge(Vertex vertex) { ! return mesh.findEdge(vertex); ! } ! ! /** ! * Make a set of objects in values of the specified clarse ! * @param values The values to filter ! * @param clarse The class ! * @return The set ! */ ! private Set filter(Collection values, Class clarse) { ! HashSet result = new HashSet(); ! Iterator iter = values.iterator(); ! while (iter.hasNext()) { ! Object current = iter.next(); ! if (current.getClass() == clarse) { ! result.add(current); ! } ! } ! return result; } --- 551,555 ---- */ public Set findEdge(Vertex vertex) { ! return world.findEdge(vertex); } Index: Space.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Space.java,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** Space.java 23 Mar 2006 10:43:49 -0000 1.22 --- Space.java 25 Mar 2006 18:08:32 -0000 1.23 *************** *** 8,11 **** --- 8,14 ---- import java.util.ArrayList; + import java.util.Collection; + import java.util.Collections; + import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; *************** *** 41,52 **** /** The Discription */ private Description description; - /** The attributes - private Set attributes; */ /** The envelope (a set of surfaces) */ private Set envelope; /** The elements (a list of spaces) */ private List elements; ! /** The interior mesh */ ! private Mesh interior; /** The modellor */ private Modellor modellor; --- 44,68 ---- /** The Discription */ private Description description; /** The envelope (a set of surfaces) */ private Set envelope; /** The elements (a list of spaces) */ private List elements; ! /** The vertices */ ! private HashMap vertices; ! ! /** The next vertex id */ ! private long nextVertexId; ! ! /** The edges */ ! private HashMap edges; ! ! /** The next edge id */ ! private long nextEdgeId; ! ! /** The surfaces */ ! private HashMap surfaces; ! ! /** The next surface id */ ! private long nextSurfaceId; /** The modellor */ private Modellor modellor; *************** *** 71,74 **** --- 87,93 ---- setType(type); description = new Description(""); + vertices = new HashMap(); + edges = new HashMap(); + surfaces = new HashMap(); } *************** *** 142,159 **** } /** ! * Get the interior mesh ! * @return The interior mesh */ ! public Mesh getInterior() { ! return interior; } /** ! * Set the interior mesh ! * @param mesh The mesh */ ! public void setInterior(Mesh mesh) { ! interior = mesh; } --- 161,532 ---- } + /** ! * Clear this space */ ! public void clear() { ! vertices.clear(); ! nextVertexId = 0; ! edges.clear(); ! nextEdgeId = 0; ! surfaces.clear(); ! nextSurfaceId = 0; } /** ! * Add a vertex ! * @param vertex The vertex */ ! public void add(Vertex vertex) { ! Long id = new Long(nextVertexId++); ! vertex.setId(id); ! vertices.put(id, vertex); ! vertex.setOwner(this); ! } ! ! /** ! * Remove a vertex ! * @param vertex The vertex ! */ ! public void remove(Vertex vertex) { ! vertices.remove(vertex.getId()); ! vertex.setId(null); ! vertex.setOwner(null); ! } ! ! /** ! * Insert a vertex ! * @param vertex The vertex ! * @return The vertex ! */ ! public Vertex insert(Vertex vertex) { ! add(vertex); ! return vertex; ! } ! ! /** ! * Delete a vertex ! * @param vertex The vertex ! */ ! public void delete(Vertex vertex) { ! if (vertex.getId() != null) { ! Set edges = vertex.getEdges(); ! remove(vertex); ! Iterator iter = edges.iterator(); ! while (iter.hasNext()) { ! Edge current = (Edge) iter.next(); ! delete(current); ! } ! } ! } ! ! /** ! * Return the vertices ! * @return The vertices ! */ ! public Collection getVertices() { ! return vertices.values(); ! } ! ! /** ! * Return the vertex ! * @param id The id ! * @return The vertex ! */ ! public Vertex getVertex(long id) { ! return (Vertex) vertices.get(new Long(id)); ! } ! ! /** ! * Add a edge ! * @param edge The edge ! */ ! public void add(Edge edge) { ! Long id = new Long(nextEdgeId++); ! edge.setId(id); ! edges.put(id, edge); ! edge.setOwner(this); ! } ! ! /** ! * Remove a edge ! * @param edge The edge ! */ ! public void remove(Edge edge) { ! edges.remove(edge.getId()); ! edge.setId(null); ! edge.setOwner(null); ! } ! ! /** ! * Insert a edge ! * @param edge The edge ! * @return The edge ! */ ! public Edge insert(Edge edge) { ! add(edge); ! return edge; ! } ! ! /** ! * Delete a edge ! * @param edge The edge ! */ ! public void delete(Edge edge) { ! if (edge.getId() != null) { ! Set surfaces = edge.getSurfaces(); ! ! Vertex to = edge.getTo(); ! Vertex from = edge.getFrom(); ! ! remove(edge); ! ! { ! // Find adjacent surfaces that must be combined to one surface. ! // ! // First the adjacent surfaces are partioned into groups of ! // coplanar surfaces. ! // If there is only one group consisting of two coplanar surfaces ! // these two surfaces are combined. ! ! List partions = new LinkedList(); ! List work = new LinkedList(surfaces); ! while (!work.isEmpty()) { ! Iterator iter = work.iterator(); ! Surface first = (Surface) iter.next(); ! iter.remove(); ! Plane plane = first.plane(); ! List partion = new LinkedList(); ! partion.add(first); ! while (iter.hasNext()) { ! Surface current = (Surface) iter.next(); ! if (plane.contains(current)) { ! partion.add(current); ! iter.remove(); ! } ! } ! partions.add(partion); ! } ! int count = 0; ! List partion = null; ! { ! Iterator iter = partions.iterator(); ! while (iter.hasNext()) { ! List current = (List) iter.next(); ! if (current.size() == 2) { ! count++; ! partion = current; ! } ! } ! } ! if (count == 1) { ! Surface s1 = (Surface) partion.get(0); ! Surface s2 = (Surface) partion.get(1); ! List edges1 = new LinkedList(); ! List edges2 = new LinkedList(); ! { ! boolean gab = false; ! List prefix = new LinkedList(); ! Iterator iter = s1.getEdges().iterator(); ! while (iter.hasNext()) { ! Edge current = (Edge) iter.next(); ! if (!s2.contains(current)) { ! if (!gab) { ! prefix.add(current); ! } else { ! edges1.add(current); ! } ! } else { ! gab = true; ! } ! } ! edges1.addAll(prefix); ! } ! { ! boolean gab = false; ! List prefix = new LinkedList(); ! Iterator iter = s2.getEdges().iterator(); ! while (iter.hasNext()) { ! Edge current = (Edge) iter.next(); ! if (!s1.contains(current)) { ! if (!gab) { ! prefix.add(current); ! } else { ! edges2.add(current); ! } ! } else { ! gab = true; ! } ! } ! edges2.addAll(prefix); ! } ! if (Edge.first(edges1) == Edge.first(edges2)) { ! Collections.reverse(edges2); ! } ! edges1.addAll(edges2); ! Surface surface = new Surface(edges1); ! add(surface); ! if (s1.getExterior() != null) { ! s1.getExterior().addHole(surface); ! // FIXME: Assign spaces ! } ! } ! } ! ! ! Iterator it = surfaces.iterator(); ! while (it.hasNext()) { ! Surface surface = (Surface)it.next(); ! remove(surface); ! } ! if (to.getOwner() != null) { ! if (to.getEdges().size() == 0) { ! remove(to); ! } ! } ! if (from.getOwner() != null) { ! if (from.getEdges().size() == 0) { ! remove(from); ! } ! } ! } ! } ! ! /** ! * Return the edges ! * @return The edges ! */ ! public Collection getEdges() { ! return edges.values(); ! } ! ! /** ! * Return the edge ! * @param id The id ! * @return The edge ! */ ! public Edge getEdge(long id) { ! return (Edge) edges.get(new Long(id)); ! } ! ! /** ! * Add a surface ! * @param surface The surface ! */ ! public void add(Surface surface) { ! Long id = new Long(nextSurfaceId++); ! surface.setId(id); ! surfaces.put(id, surface); ! surface.setOwner(this); ! } ! ! /** ! * Remove a surface ! * @param surface The surface ! */ ! public void remove(Surface surface) { ! if (surface.getExterior() != null) { ! Surface exterior = surface.getExterior(); ! exterior.removeHole(surface); ! } ! Space back = surface.getBackDomain(); ! if (back != null) { ! back.removeSurface(surface); ! surface.setBackDomain(null); ! } ! Space front = surface.getFrontDomain(); ! if (front != null) { ! front.removeSurface(surface); ! surface.setFrontDomain(null); ! } ! surfaces.remove(surface.getId()); ! surface.setId(null); ! surface.setOwner(null); ! } ! ! /** ! * Insert a surface ! * @param surface The surface ! * @return The surface ! */ ! public Surface insert(Surface surface) { ! add(surface); ! return surface; ! } ! ! /** ! * Delete a surface ! * @param surface The surface ! */ ! public void delete(Surface surface) { ! remove(surface); ! List edges = surface.getEdges(); ! Iterator it = edges.iterator(); ! while (it.hasNext()) { ! Edge edge = (Edge)it.next(); ! if (edge.getSurfaces().size() < 1) { ! delete(edge); ! } ! } ! ! } ! ! /** ! * Return the surfaces ! * @return The surfaces ! */ ! public Collection getSurfaces() { ! return surfaces.values(); ! } ! ! /** ! * Return the surface ! * @param id The id ! * @return The surface ! */ ! public Surface getSurface(long id) { ! return (Surface) surfaces.get(new Long(id)); ! } ! ! /** ! * Find vertex based upon location and delta ! * @param x The x coordinate ! * @param y The y coordinate ! * @param z The z coordinate ! * @param delta The delta value ! * @return The vertexs ! */ ! public Set findByLocation(double x, double y, double z, double delta) { ! Set result = new HashSet(); ! Collection vertices = getVertices(); ! Iterator iter = vertices.iterator(); ! double limit = delta; ! Vertex tester = new Vertex(x, y, z); ! while (iter.hasNext()) { ! Vertex current = (Vertex) iter.next(); ! double distance = current.distance(tester); ! if (distance <= limit) { ! result.add(current); ! } ! } ! return result; ! } ! ! /** ! * Find set of edges that coincides with the vertex ! * @param vertex The vertex ! * @return The set of edges ! */ ! public Set findEdge(Vertex vertex) { ! Set result = new HashSet(); ! Collection edges = getEdges(); ! Iterator iter = edges.iterator(); ! while (iter.hasNext()) { ! Edge current = (Edge) iter.next(); ! if (current.coincides(vertex)) { ! result.add(current); ! } ! } ! return result; } Index: Geometry.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Geometry.java,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** Geometry.java 23 Mar 2006 11:49:55 -0000 1.16 --- Geometry.java 25 Mar 2006 18:08:32 -0000 1.17 *************** *** 257,261 **** System.out.println("find-surfaces"); List surfaces = new LinkedList(); ! Mesh mesh = ((Edge) edges.iterator().next()).getMesh(); { --- 257,261 ---- System.out.println("find-surfaces"); List surfaces = new LinkedList(); ! Space mesh = ((Edge) edges.iterator().next()).getOwner(); { *************** *** 618,622 **** */ public static void holeAnalysis(Surface surface) { ! Collection surfaces = surface.getMesh().getSurfaces(); Iterator iter = surfaces.iterator(); while (iter.hasNext()) { --- 618,622 ---- */ public static void holeAnalysis(Surface surface) { ! Collection surfaces = surface.getOwner().getSurfaces(); Iterator iter = surfaces.iterator(); while (iter.hasNext()) { Index: Geometric.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Geometric.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Geometric.java 17 Mar 2006 18:59:24 -0000 1.3 --- Geometric.java 25 Mar 2006 18:08:32 -0000 1.4 *************** *** 14,18 **** public abstract class Geometric extends Entity { /** The mesh containing this geometric entity */ ! private Mesh mesh; /** --- 14,18 ---- public abstract class Geometric extends Entity { /** The mesh containing this geometric entity */ ! private Space owner; /** *************** *** 20,25 **** * @return The mesh */ ! public Mesh getMesh() { ! return mesh; } --- 20,25 ---- * @return The mesh */ ! public Space getOwner() { ! return owner; } *************** *** 28,33 **** * @param mesh The mesh */ ! public void setMesh(Mesh mesh) { ! this.mesh = mesh; } --- 28,33 ---- * @param mesh The mesh */ ! public void setOwner(Space mesh) { ! this.owner = mesh; } *************** *** 38,42 **** public String getName() { String name; ! if (getMesh() == Project.getInstance().mesh()) { name = ""; } else { --- 38,42 ---- public String getName() { String name; ! if (getOwner() == Project.getInstance().world()) { name = ""; } else { Index: LayerModellor.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/LayerModellor.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** LayerModellor.java 17 Mar 2006 09:30:34 -0000 1.6 --- LayerModellor.java 25 Mar 2006 18:08:32 -0000 1.7 *************** *** 45,51 **** */ public void update(Object entity) { - Mesh interior = new Mesh(); ! Surface bottom = surface.copy(interior); if (surface.getBackDomain() == space) { bottom.flip(); --- 45,50 ---- */ public void update(Object entity) { ! Surface bottom = surface.copy(space); if (surface.getBackDomain() == space) { bottom.flip(); *************** *** 57,62 **** bottom.flip(); } - - space.setInterior(interior); } --- 56,59 ---- Index: Edge.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Edge.java,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** Edge.java 21 Mar 2006 22:33:28 -0000 1.41 --- Edge.java 25 Mar 2006 18:08:32 -0000 1.42 *************** *** 142,146 **** */ public void delete() { ! getMesh().delete(this); } --- 142,146 ---- */ public void delete() { ! getOwner().delete(this); } *************** *** 281,287 **** Vertex to = getTo(); Edge e1 = new Edge(from, vertex); ! getMesh().add(e1); Edge e2 = new Edge(vertex, to); ! getMesh().add(e2); --- 281,287 ---- Vertex to = getTo(); Edge e1 = new Edge(from, vertex); ! getOwner().add(e1); Edge e2 = new Edge(vertex, to); ! getOwner().add(e2); *************** *** 292,296 **** current.replace(this, e1, e2); } ! getMesh().remove(this); } } --- 292,296 ---- current.replace(this, e1, e2); } ! getOwner().remove(this); } } *************** *** 310,314 **** public Set getSurfaces() { Set result = new HashSet(); ! Collection surfaces = getMesh().getSurfaces(); Iterator iter = surfaces.iterator(); while (iter.hasNext()) { --- 310,314 ---- public Set getSurfaces() { Set result = new HashSet(); ! Collection surfaces = getOwner().getSurfaces(); Iterator iter = surfaces.iterator(); while (iter.hasNext()) { |