From: Marko Luukkainen Date: Thu, 17 Oct 2019 12:14:04 +0000 (+0300) Subject: Piping Rules moved turns next nozzle when they were misaligned X-Git-Tag: v1.43.0~188 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=c107c8c7654c47da1cbc57336a524efe0f48d77a;hp=46c28cc32944d0f73c5ab4062bd6b0b232143be7;p=simantics%2F3d.git 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 --- 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); }