X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=org.simantics.plant3d%2Fsrc%2Forg%2Fsimantics%2Fplant3d%2Futils%2FComponentUtils.java;h=69bf593156e3fa448e8a335e94de60388712c54c;hb=e75c2f6a2f0bdef0e8077879664715d99cede843;hp=fb065f111f98b84c9d7ebf4ee27cb85ac4517190;hpb=a1e1faa6915445e786f482170576b9c9d0f5d982;p=simantics%2F3d.git diff --git a/org.simantics.plant3d/src/org/simantics/plant3d/utils/ComponentUtils.java b/org.simantics.plant3d/src/org/simantics/plant3d/utils/ComponentUtils.java index fb065f11..69bf5931 100644 --- a/org.simantics.plant3d/src/org/simantics/plant3d/utils/ComponentUtils.java +++ b/org.simantics.plant3d/src/org/simantics/plant3d/utils/ComponentUtils.java @@ -5,7 +5,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import javax.vecmath.Point3d; import javax.vecmath.Vector3d; import org.simantics.Simantics; @@ -345,7 +344,7 @@ public class ComponentUtils { switch (position) { case NEXT: if (toPcp.isDualInline()) { - toPcp = toPcp.getSubPoint().get(0); + toPcp = toPcp.getDualSub(); pipeRun = toPcp.getPipeRun(); } @@ -356,6 +355,8 @@ public class ComponentUtils { pipeRun = toPcp.getPipeRun(); } break; + default: + break; } Vector3d start = new Vector3d(); Vector3d end = new Vector3d(); @@ -372,6 +373,8 @@ public class ComponentUtils { case SPLIT: pos = new Vector3d(toPcp.getWorldPosition()); break; + default: + break; } } else if (toPcp.isDirected()) { @@ -433,12 +436,14 @@ public class ComponentUtils { break; case SPLIT: break; + default: + break; } switch (position) { case NEXT: if (toPcp.isDualInline()) - toPcp = toPcp.getSubPoint().get(0); + toPcp = toPcp.getDualSub(); newPcp.insert(toPcp, Direction.NEXT); newPcp.setWorldPosition(pos); break; @@ -450,6 +455,8 @@ public class ComponentUtils { break; case SPLIT: PipingRules.splitVariableLengthComponent(newComponent, (InlineComponent)component, true); + default: + break; } } else { PipeRun other = new PipeRun(); @@ -479,6 +486,8 @@ public class ComponentUtils { break; case SPLIT: break; + default: + break; } newPcp.setWorldPosition(pos); @@ -559,7 +568,6 @@ public class ComponentUtils { // Runs do not have compatible specs, and a reducer must be attached in between. InlineComponent reducer = ComponentUtils.createReducer(root); PipeControlPoint pcp = reducer.getControlPoint(); - PipeControlPoint ocp = pcp.getSubPoint().get(0); Vector3d endPos = endCP.getWorldPosition(); Vector3d currentPos = currentCP.getWorldPosition();