]> gerrit.simantics Code Review - simantics/3d.git/blobdiff - org.simantics.plant3d/src/org/simantics/plant3d/geometry/GateValveGeometryProvider.java
Yesterdays change introduced infinite loop for directed path leg updates
[simantics/3d.git] / org.simantics.plant3d / src / org / simantics / plant3d / geometry / GateValveGeometryProvider.java
index 90c39363cded7860fad4ce0c5642b8f91c8c9f78..3ab958898aaace972e6197dbdd78edd29996cf33 100644 (file)
@@ -19,7 +19,8 @@ public class GateValveGeometryProvider extends BuiltinGeometryProvider {
        
        @Override
        public Collection<TopoDS_Shape> getModel() throws Exception {
-               
+               if (radius < MathTools.NEAR_ZERO)
+                       return Collections.emptyList();
                TopoDS_Shape con = OccTriangulator.makeCone(new double[] {-radius, 0.0, 0.0}, new double[] { 1.0, 0.0, 0.0 }, radius, radius*0.1,radius);
                TopoDS_Shape con2 = OccTriangulator.makeCone(new double[] {radius, 0.0, 0.0}, new double[] { -1.0, 0.0, 0.0 }, radius, radius*0.1,radius);
                //TopoDS_Shape sph = OccTriangulator.makeSphere(0, 0, 0, radius*0.75);