]> gerrit.simantics Code Review - simantics/3d.git/blobdiff - org.simantics.plant3d/src/org/simantics/plant3d/utils/ComponentUtils.java
Fix division by zero in ComponentUtls.addComponent()
[simantics/3d.git] / org.simantics.plant3d / src / org / simantics / plant3d / utils / ComponentUtils.java
index 913fceb9178276045828d04d9546000e39b62dd2..ea9f492f6b96e8144215cff483399e6ee7d9af32 100644 (file)
@@ -427,9 +427,8 @@ public class ComponentUtils {
                        }
                        Vector3d start = new Vector3d();
                        Vector3d end = new Vector3d();
-                       dir = new Vector3d();
-                       toPcp.getInlineControlPointEnds(start, end, dir);
-                       dir.normalize();
+                       dir = toPcp.getInlineDir();
+                       toPcp.getControlPointEnds(start, end);
                        switch (position) {
                        case NEXT:
                                pos = new Vector3d(end);