]> gerrit.simantics Code Review - simantics/3d.git/commitdiff
Fix getControlPointEnds() for end components 13/4113/1
authorReino Ruusu <reino.ruusu@semantum.fi>
Tue, 7 Apr 2020 07:27:39 +0000 (10:27 +0300)
committerTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Tue, 7 Apr 2020 07:32:34 +0000 (07:32 +0000)
gitlab #115

Change-Id: I55806b0b8545351a3162b5455102c31a49f4d59a
(cherry picked from commit 1cd59e8997dc9cc0a31c876ecc2bed92cf3a81f2)

org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/controlpoint/PipeControlPoint.java

index cd4f407b22b6f65e3e80a91c2bc4cc5fae2df9a6..f5db5880b5a1e3be8cfe042af19cdb64167faddf 100644 (file)
@@ -951,6 +951,8 @@ public class PipeControlPoint extends G3DNode implements IP3DNode {
                        dir2.scale(length * 0.5);
                        dir1 = new Vector3d(dir2);
                        dir1.negate();
+               } else if (isEnd()) {
+                       dir2 = dir1 = new Vector3d();
                } else {
                        dir1 = getPathLegDirection(Direction.PREVIOUS);
                        dir2 = sub.getPathLegDirection(Direction.NEXT);