]> gerrit.simantics Code Review - simantics/3d.git/blobdiff - org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/controlpoint/PipeControlPoint.java
Ask component rotation angle when adding components
[simantics/3d.git] / org.simantics.plant3d / src / org / simantics / plant3d / scenegraph / controlpoint / PipeControlPoint.java
index 491a273331a36ec8a0392122c92dc8833c6bbfb6..eae8ec33220aacc91b27873cf86e9eef4d7110a9 100644 (file)
@@ -36,6 +36,7 @@ public class PipeControlPoint extends G3DNode implements IP3DNode {
 
        private PointType type;
        private boolean isFixed = true;        // In-line: fixed-length Turn: fixed-angle
+       private boolean isMod = false;         // Can user modify fixed value manually 
        private boolean isRotate = false;      // rotates around path leg axis.
        private boolean isReverse = false;     // definition direction can be swapped
        private boolean isDeletable = true;    // can be removed by rules
@@ -88,6 +89,15 @@ public class PipeControlPoint extends G3DNode implements IP3DNode {
        public void setFixed(boolean fixed) {
                this.isFixed = fixed;
        }
+       
+       @GetPropertyValue(name="Mod",tabId="Debug",value="mod")
+       public boolean isMod() {
+        return isMod;
+    }
+    
+    public void setMod(boolean isMod) {
+        this.isMod = isMod;
+    }
 
        @GetPropertyValue(name="Rotate",tabId="Debug",value="rotate")
        public boolean isRotate() {
@@ -388,7 +398,7 @@ public class PipeControlPoint extends G3DNode implements IP3DNode {
 
        @GetPropertyValue(name="Rotation Angle",tabId="Debug",value="rotationAngle")
        public Double getRotationAngle() {
-           if (asFixedAngle())
+           if (isRotate || asFixedAngle())
                return rotationAngle;
            return null;
        }
@@ -1079,6 +1089,7 @@ public class PipeControlPoint extends G3DNode implements IP3DNode {
                        if (currentNext == null && currentPrev == null) {
                                removeComponent();
                                pipeRun.remChild(this);
+                               checkRemove(pipeRun);
                                return;
                        }
                        if (currentNext != null && currentPrev != null) {
@@ -1350,6 +1361,8 @@ public class PipeControlPoint extends G3DNode implements IP3DNode {
                                pcp._remove(); // This call will recursively call also this method...
                                return true;
                        }
+               } else if (points.size() == 2) {
+                   
                }
                return false;
        }