From: Marko Luukkainen Date: Wed, 4 Dec 2019 14:29:48 +0000 (+0200) Subject: Directed path leg update handled offset wrong way. X-Git-Tag: v1.43.0~101 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=f14dcbc36aa8931a68795716d5ebcb3808d6bce5;p=simantics%2F3d.git Directed path leg update handled offset wrong way. Additionally, removed debug messages. gitlab #12 Change-Id: I8abab7e87115a1ce9439fed4d70a9e0973ed5ca8 (cherry picked from commit a53efc63bed07331a3a2f9879f266e41cbe738cb) --- diff --git a/org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/controlpoint/PipingRules.java b/org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/controlpoint/PipingRules.java index 4f95e796..58873b0f 100644 --- a/org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/controlpoint/PipingRules.java +++ b/org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/controlpoint/PipingRules.java @@ -447,7 +447,6 @@ public class PipingRules { Vector3d endPoint = end.getWorldPosition(); Vector3d dir = new Vector3d(); hasOffsets = calculateOffset(startPoint, endPoint, start, list, end, dir, offset); - System.out.println(); return new UpdateStruct2(start, startPoint, list, end, endPoint, dir, offset, hasOffsets, iter, direction == Direction.PREVIOUS, toRemove, updated); } @@ -1010,7 +1009,7 @@ public class PipingRules { } Point3d directedEndPoint = new Point3d(u.endPoint); if (u.hasOffsets) - directedEndPoint.add(u.offset); + directedEndPoint.sub(u.offset); double mu[] = new double[2]; @@ -1262,7 +1261,6 @@ public class PipingRules { return tr; // space for 90 deg Vector3d dir = dcp.getDirectedControlPointDirection(); Vector3d dp = dcp.getWorldPosition(); - //Vector3d tp = tcp.getWorldPosition(); Vector3d op = other.getWorldPosition(); double u[] = new double[1]; Vector3d closest = MathTools.closestPointOnStraight(op, dp, dir,u); @@ -1893,7 +1891,6 @@ public class PipingRules { List list2 = pcps.get(i+1); PipeControlPoint prev = list.get(list.size()-1); PipeControlPoint next = list2.get(0); - System.out.println(); if (prev == next) { // Reverse the component on the boundary. InlineComponent ic = (InlineComponent)prev.getPipelineComponent();