import java.util.List;
import java.util.Map;
-import javax.vecmath.Point3d;
import javax.vecmath.Vector3d;
import org.simantics.Simantics;
switch (position) {
case NEXT:
if (toPcp.isDualInline()) {
- toPcp = toPcp.getSubPoint().get(0);
+ toPcp = toPcp.getDualSub();
pipeRun = toPcp.getPipeRun();
}
pipeRun = toPcp.getPipeRun();
}
break;
+ default:
+ break;
}
Vector3d start = new Vector3d();
Vector3d end = new Vector3d();
case SPLIT:
pos = new Vector3d(toPcp.getWorldPosition());
break;
+ default:
+ break;
}
} else if (toPcp.isDirected()) {
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;
break;
case SPLIT:
PipingRules.splitVariableLengthComponent(newComponent, (InlineComponent)component, true);
+ default:
+ break;
}
} else {
PipeRun other = new PipeRun();
break;
case SPLIT:
break;
+ default:
+ break;
}
newPcp.setWorldPosition(pos);
requiresReverse = true;
}
PipeRun other = endCP.getPipeRun();
- boolean mergeRuns = other == null ? true : pipeRun.equalSpecs(other);
+ boolean mergeRuns = other == null ? true : pipeRun.canMerge(other);
if (requiresReverse) {
// Pipe line must be traversible with next/previous relations without direction change.
PipingRules.reverse(other);
}
+
if (mergeRuns) {
// Runs have compatible specs and must be merged
if (other != null && pipeRun != other)
- PipingRules.merge(pipeRun, other);
+ pipeRun.merge(other);
else if (other == null) {
if (!(endTo instanceof Nozzle)) {
pipeRun.addChild(endTo);
// 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();