From 3eb220c649ab8125712af7fd2241acc731364545 Mon Sep 17 00:00:00 2001 From: Reino Ruusu Date: Tue, 11 Feb 2020 13:55:37 +0200 Subject: [PATCH] Fix orientation of new straight components in insertStraight gitlab #77 Change-Id: Ic04f7ac4e12297ee6cfa830b428dd4fe2dd70951 --- .../simantics/plant3d/scenegraph/controlpoint/PipingRules.java | 3 +++ 1 file changed, 3 insertions(+) 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 2c5f7427..100852bf 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 @@ -280,6 +280,9 @@ public class PipingRules { scp.insert(pcp1, pcp2); scp.setWorldPosition(pos); + Vector3d dir = new Vector3d(); + dir.sub(pcp2.getWorldPosition(), pcp1.getWorldPosition()); + updateControlPointOrientation(scp, dir); scp.setLength(length); validate(scp.getPipeRun()); return scp; -- 2.47.1