]> gerrit.simantics Code Review - simantics/3d.git/commitdiff
Piping Rules moved turns next nozzle when they were misaligned 59/3359/1
authorMarko Luukkainen <marko.luukkainen@semantum.fi>
Thu, 17 Oct 2019 12:14:04 +0000 (15:14 +0300)
committerMarko Luukkainen <marko.luukkainen@semantum.fi>
Thu, 17 Oct 2019 12:14:04 +0000 (15:14 +0300)
Cutoff range was 1.0m, turns closer than that were moved next to nozzle.

gitlab #14

Change-Id: Icfc20ab6f78aa2d70635c608deaf8354a22de802

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);
                                        }