]> gerrit.simantics Code Review - simantics/3d.git/blobdiff - org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/PipeRun.java
Reversing pipe runs was never implemented properly
[simantics/3d.git] / org.simantics.plant3d / src / org / simantics / plant3d / scenegraph / PipeRun.java
index 9e163c2e79ba70669ca10e16a75b08c4a7596905..748141a586ed7438a3e4d6a329be3a51756dc420 100644 (file)
@@ -105,26 +105,29 @@ public class PipeRun extends P3DParentNode<IP3DNode> {
                Collections.sort(coll, new ComponentComparator());
                return coll;
        }
+       private static String PIPECP = "pipecp";
+       
        public void addChild(PipeControlPoint node) {
-               addNode("pipecp",node);
+               addNode(PIPECP,node);
        }
        
        public void remChild(PipeControlPoint node) {
-               removeNode("pipecp", node);
+               removeNode(PIPECP, node);
        }
        
        public void deattachChild(PipeControlPoint node) {
-               deattachNode("pipecp", node);
+               deattachNode(PIPECP, node);
        }
        
        public Collection<PipeControlPoint> getControlPoints() {
                Collection<PipeControlPoint> coll = new ArrayList<PipeControlPoint>();
-               for (IG3DNode n : getNodes("pipecp")) {
+               for (IG3DNode n : getNodes(PIPECP)) {
                        coll.add((PipeControlPoint)n);
                }
                return coll;
        }
        
+       
        public boolean equalSpecs(PipeRun other) {
                if (!MathTools.equals(pipeDiameter,other.pipeDiameter))
                        return false;
@@ -158,4 +161,5 @@ public class PipeRun extends P3DParentNode<IP3DNode> {
                        
                }
        }
+       
 }