]> gerrit.simantics Code Review - simantics/3d.git/blobdiff - org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/controlpoint/PipingRules.java
Piping Rules moved turns next nozzle when they were misaligned
[simantics/3d.git] / org.simantics.plant3d / src / org / simantics / plant3d / scenegraph / controlpoint / PipingRules.java
index 854b265d3a09e7c00ae370a5c93460a4b99ef020..a0ff359e8479a8c0f2b23889aee55ef7dd28018e 100644 (file)
@@ -882,14 +882,15 @@ public class PipingRules {
                                if (other.isVariableAngle()) {
 
                                        // TODO calculate needed space from next run end.
-                                       if (mu[0] < 1.0) {
+                                   double space = spaceForTurn(other);
+                                       if (mu[0] < space) {
                                                if (dcpStart) {
                                                        closest.set(u.startPoint);
                                                } else {
                                                        closest.set(u.endPoint);
                                                }
                                                Vector3d v = new Vector3d(directedDirection);
-                                               v.scale(spaceForTurn(other));
+                                               v.scale(space);
                                                closest.add(v);
                                        }