]> gerrit.simantics Code Review - simantics/3d.git/blobdiff - org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/controlpoint/PipingRules.java
Fix update of inline components with offsets
[simantics/3d.git] / org.simantics.plant3d / src / org / simantics / plant3d / scenegraph / controlpoint / PipingRules.java
index d00e4018de1407887cb1982e578bb2b3d967a4a5..33c832f1b8c4bec41cc22d5c0d1dec791f6f8968 100644 (file)
@@ -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{