From 863eb596fdb477680a381dc830a4142ba8af1df9 Mon Sep 17 00:00:00 2001 From: Reino Ruusu Date: Thu, 20 Feb 2020 17:44:02 +0200 Subject: [PATCH] Fix error in PipingRules.updateFixedLengths gitlab #86 Change-Id: I21e90ec653096797aa0f011f687baafabb6621d3 --- .../plant3d/scenegraph/controlpoint/PipingRules.java | 6 +++--- 1 file changed, 3 insertions(+), 3 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 f21047f1..cb820072 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 @@ -781,9 +781,9 @@ public class PipingRules { if (curr < -MIN_INLINE_LENGTH && prev != null && prev.gap == Gap.SPACE) { double move = Math.min(-curr, prev.d); curr+= move; - next.d -= move; - if (next.d < MIN_INLINE_LENGTH) - next.gap = Gap.ATTACHED; + prev.d -= move; + if (prev.d < MIN_INLINE_LENGTH) + prev.gap = Gap.ATTACHED; Vector3d mv = new Vector3d(dir); mv.normalize(); mv.scale(-move); -- 2.47.1