]> gerrit.simantics Code Review - simantics/3d.git/blobdiff - org.simantics.plant3d/src/org/simantics/plant3d/geometry/HorizontalTankGeometryProvider.java
Rotating eccentric reducer did not update elbows on the same leg
[simantics/3d.git] / org.simantics.plant3d / src / org / simantics / plant3d / geometry / HorizontalTankGeometryProvider.java
index 7a3dc41b3a088ef2f46d393304d918cd34e777bb..c6d4201597ad9e8c74e9b8af5fd83a9d57ae3a5c 100644 (file)
@@ -29,12 +29,12 @@ public class HorizontalTankGeometryProvider extends BuiltinGeometryProvider  {
        @Override
        public Collection<TopoDS_Shape> getModel() throws Exception {
                
-               double p0[] = new double[]{-length*0.50,        0.0,0.0};
-               double p1[] = new double[]{-length*0.488, radius*0.6,0.0};
-               double p2[] = new double[]{-length*0.46,     radius,0.0};
-               double p3[] = new double[]{ length*0.46,     radius,0.0};
-               double p4[] = new double[]{ length*0.488, radius*0.6,0.0};
-               double p5[] = new double[]{ length*0.50,        0.0,0.0};
+               double p0[] = new double[]{ length*0.50,        0.0,0.0};
+               double p1[] = new double[]{ length*0.488, radius*0.6,0.0};
+               double p2[] = new double[]{ length*0.46,     radius,0.0};
+               double p3[] = new double[]{-length*0.46,     radius,0.0};
+               double p4[] = new double[]{-length*0.488, radius*0.6,0.0};
+               double p5[] = new double[]{-length*0.50,        0.0,0.0};
                
                GC_MakeArcOfCircle m1 = new GC_MakeArcOfCircle(p0,p1,p2);
                GC_MakeSegment s1 = new GC_MakeSegment(p2,p3);
@@ -75,17 +75,16 @@ public class HorizontalTankGeometryProvider extends BuiltinGeometryProvider  {
                
                TopoDS_Shape shape2 = OccTriangulator.makeTranslation(shape, 0.0, radius, 0.0);
                shape.delete();
-               shape = shape2;
                TopoDS_Shape box = OccTriangulator.makeBox(-length*0.4, 0.0, -radius*0.5, -length*0.3, radius, radius*0.5);
-               shape2 = OccTriangulator.makeFuse(shape, box);
-               shape.delete();
-               box.delete();
-               box = OccTriangulator.makeBox(length*0.3, 0.0, -radius*0.5, length*0.4, radius, radius*0.5);
                shape = OccTriangulator.makeFuse(shape2, box);
                shape2.delete();
                box.delete();
+               box = OccTriangulator.makeBox(length*0.3, 0.0, -radius*0.5, length*0.4, radius, radius*0.5);
+               shape2 = OccTriangulator.makeFuse(shape, box);
+               shape.delete();
+               box.delete();
                
-               return Collections.singletonList(shape);
+               return Collections.singletonList(shape2);
        }
        
        @Override