From c107c8c7654c47da1cbc57336a524efe0f48d77a Mon Sep 17 00:00:00 2001 From: Marko Luukkainen Date: Thu, 17 Oct 2019 15:14:04 +0300 Subject: [PATCH] Piping Rules moved turns next nozzle when they were misaligned Cutoff range was 1.0m, turns closer than that were moved next to nozzle. gitlab #14 Change-Id: Icfc20ab6f78aa2d70635c608deaf8354a22de802 --- .../plant3d/scenegraph/controlpoint/PipingRules.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/controlpoint/PipingRules.java b/org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/controlpoint/PipingRules.java index 854b265d..a0ff359e 100644 --- a/org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/controlpoint/PipingRules.java +++ b/org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/controlpoint/PipingRules.java @@ -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); } -- 2.47.1