From 192fb6753ee068aaf535daf2626f3821a4c7795a Mon Sep 17 00:00:00 2001 From: Reino Ruusu Date: Fri, 14 Feb 2020 14:20:42 +0200 Subject: [PATCH] Fix update of inline components with offsets gitlab #82 Change-Id: I735a8756886f16c7a7d6b877fc240039ff8322c8 --- .../plant3d/scenegraph/controlpoint/PipingRules.java | 11 +++++++++++ 1 file changed, 11 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 d00e4018..33c832f1 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 @@ -216,6 +216,17 @@ public class PipingRules { System.out.println("PipingRules.updateInlineControlPoint() " + pcp); PipeControlPoint start = pcp.findPreviousEnd(); updatePathLegNext(start, pcp, PathLegUpdateType.NONE); + + if (pcp.isOffset()) { + // Adjusting the rotation angle of an offset component may change variable angle turns + PipeControlPoint end = pcp.findNextEnd(); + if (end.isVariableAngle()) { + updatePathLegNext(end, end, PathLegUpdateType.NONE); + } + if (start.isVariableAngle()) { + updatePathLegPrev(start, start, PathLegUpdateType.NONE); + } + } } private static PipeControlPoint insertElbow(PipeControlPoint pcp1, PipeControlPoint pcp2, Vector3d pos) throws Exception{ -- 2.47.1