]> gerrit.simantics Code Review - simantics/3d.git/blobdiff - org.simantics.g3d/src/org/simantics/g3d/shape/Tube.java
Allow tube shape to handle shorter distances.
[simantics/3d.git] / org.simantics.g3d / src / org / simantics / g3d / shape / Tube.java
index a3c9dd192f085d201a76c6c9536074bb0cb3e422..64cf8f35f869c139895482f3d9f2b64a45e4a4ba 100644 (file)
@@ -73,7 +73,7 @@ public class Tube {
                for (int i = 0; i < vertices.size() - 1; i++) {
                        t.set(vertices.get(i+1));
                        t.sub(vertices.get(i));
-                       if (t.lengthSquared() < 0.0000001)
+                       if (t.lengthSquared() < MathTools.NEAR_ZERO)
                                throw new IllegalArgumentException("vertices at index " + i + " are too close to each other");
                }
                }