]> gerrit.simantics Code Review - simantics/3d.git/commitdiff
Turn component calculation with offset vector fixed 20/3020/1
authorMarko Luukkainen <marko.luukkainen@semantum.fi>
Tue, 16 Jul 2019 12:28:11 +0000 (15:28 +0300)
committerMarko Luukkainen <marko.luukkainen@semantum.fi>
Tue, 16 Jul 2019 12:28:11 +0000 (15:28 +0300)
gitlab #12

Change-Id: Iac7b2676a2f189db135f81fe24420912f994bf9b

org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/controlpoint/PipingRules.java

index 8cbe5a8ae997e9808df5a34e37cf587af2d625c5..606479ad8e09f1299b607455de37e6b9341a10f7 100644 (file)
@@ -1011,7 +1011,7 @@ public class PipingRules {
                                        a = updateTurnControlPointTurn(u.start, startPrev, u.end);
                                } else {
                                        Vector3d ep = new Vector3d(u.endPoint);
-                                       ep.add(u.offset);
+                                       ep.sub(u.offset);
                                        a = updateTurnControlPointTurn(u.start, u.startPoint, startPrev.getPosition(), ep);
 
                                }
@@ -1036,7 +1036,7 @@ public class PipingRules {
                                        a = updateTurnControlPointTurn(u.end, u.start, endNext);
                                } else {
                                        Vector3d sp = new Vector3d(u.startPoint);
-                                       sp.sub(u.offset);
+                                       sp.add(u.offset);
                                        a = updateTurnControlPointTurn(u.end, u.endPoint, sp, endNext.getPosition());
                                }
                                if (a < MIN_TURN_ANGLE && u.end.isDeletable())