switch (position) {
case NEXT:
if (toPcp.isDualInline()) {
- toPcp = toPcp.getSubPoint().get(0);
+ toPcp = toPcp.getDualSub();
pipeRun = toPcp.getPipeRun();
}
switch (position) {
case NEXT:
if (toPcp.isDualInline())
- toPcp = toPcp.getSubPoint().get(0);
+ toPcp = toPcp.getDualSub();
newPcp.insert(toPcp, Direction.NEXT);
newPcp.setWorldPosition(pos);
break;
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);