]> gerrit.simantics Code Review - simantics/3d.git/blobdiff - org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/controlpoint/PipeControlPoint.java
Showing error messages when components overlap each other
[simantics/3d.git] / org.simantics.plant3d / src / org / simantics / plant3d / scenegraph / controlpoint / PipeControlPoint.java
index 8b1455ca2980a8f4927b291299efff2102d5606f..8616e70352815a50256a1b16e32afdbe1c52c787 100644 (file)
@@ -147,6 +147,11 @@ public class PipeControlPoint extends G3DNode implements IP3DNode {
        public boolean isInline() {
                return type == PointType.INLINE;
        }
+       
+       public boolean asPathLegEnd() {
+           // Ends and Turns are path leg ends by default, but also unconnected inline are path leg ends.
+           return isPathLegEnd() || getNext() == null || getPrevious() == null;
+       }
 
        /**
         * True for end components, if control point defines absolute position direction, which rules cannot modify. 
@@ -343,6 +348,7 @@ public class PipeControlPoint extends G3DNode implements IP3DNode {
         if (MathTools.createRotation(dirOutN, dirOut, dir, aa)) {
             setRotationAngle(aa.angle);
             setTurnAngle(angle);
+            if (DEBUG) System.out.println("convertToFixed " + dir + " " + dirOut + " " +dirOutN + " " +angle + " "+ aa.angle);
         }
        }