From 1746010c9ddf01ccc755dd9f398665800515d575 Mon Sep 17 00:00:00 2001 From: Reino Ruusu Date: Thu, 30 Apr 2020 12:31:05 +0300 Subject: [PATCH] Change rotation angle 0 to flat-side-down in eccentric reducers gitlab #125 Change-Id: Ia4ed51a0c25496f8ac5fd4fa3fbbd1920e7a938b --- .../simantics/plant3d/geometry/ReducerGeometryProvider.java | 2 +- .../plant3d/scenegraph/controlpoint/PipeControlPoint.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/org.simantics.plant3d/src/org/simantics/plant3d/geometry/ReducerGeometryProvider.java b/org.simantics.plant3d/src/org/simantics/plant3d/geometry/ReducerGeometryProvider.java index c793fd26..c82eab56 100644 --- a/org.simantics.plant3d/src/org/simantics/plant3d/geometry/ReducerGeometryProvider.java +++ b/org.simantics.plant3d/src/org/simantics/plant3d/geometry/ReducerGeometryProvider.java @@ -53,7 +53,7 @@ public class ReducerGeometryProvider extends BuiltinMeshProvider { List radius = new ArrayList(); List tangents = new ArrayList(); vertices.add(new Point3d(-length*0.5, 0.0, 0.0)); - vertices.add(new Point3d( length*0.5, offset, 0.0)); + vertices.add(new Point3d( length*0.5, -offset, 0.0)); radius.add(this.radius); radius.add(this.radius2); tangents.add(new Vector3d(1.0,0.0,0.0)); diff --git a/org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/controlpoint/PipeControlPoint.java b/org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/controlpoint/PipeControlPoint.java index f5db5880..c5934b36 100644 --- a/org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/controlpoint/PipeControlPoint.java +++ b/org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/controlpoint/PipeControlPoint.java @@ -481,7 +481,7 @@ public class PipeControlPoint extends G3DNode implements IP3DNode { q = getControlPointOrientationQuat(dir, 0.0); else q = getControlPointOrientationQuat(dir, rotationAngle); - Vector3d v = new Vector3d(0.0,offset,0.0); + Vector3d v = new Vector3d(0.0,-offset,0.0); Vector3d offset = new Vector3d(); MathTools.rotate(q, v, offset); return offset; @@ -493,7 +493,7 @@ public class PipeControlPoint extends G3DNode implements IP3DNode { q = getControlPointOrientationQuat(0.0); else q = getControlPointOrientationQuat(rotationAngle); - Vector3d v = new Vector3d(0.0,offset,0.0); + Vector3d v = new Vector3d(0.0,-offset,0.0); Vector3d offset = new Vector3d(); MathTools.rotate(q, v, offset); return offset; -- 2.47.1