From: Reino Ruusu Date: Fri, 14 Feb 2020 12:20:42 +0000 (+0200) Subject: Fix update of inline components with offsets X-Git-Tag: v1.43.0~75 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F71%2F3871%2F1;p=simantics%2F3d.git Fix update of inline components with offsets gitlab #82 Change-Id: I735a8756886f16c7a7d6b877fc240039ff8322c8 --- 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{