- if (newComponent instanceof InlineComponent) {
- InlineComponent inlineComponent = (InlineComponent)newComponent;
- if (inlineComponent.isVariableLength()|| inlineComponent.isModifialble()) {
- newPcp.setLength(inst.length);
- newComponent.setParameter("length", inst.length);
- }
- if (inst.rotationAngle != null)
- ((InlineComponent) newComponent).setRotationAngle(inst.rotationAngle);
- } else if (newComponent instanceof TurnComponent) {
- TurnComponent turnComponent = (TurnComponent)newComponent;
- if (turnComponent.isVariableAngle()) {
- newPcp.setTurnAngle(inst.angle);
- newComponent.setParameter("turnAngle", inst.angle);
- }
- if (inst.rotationAngle != null)
- ((TurnComponent) newComponent).setRotationAngle(inst.rotationAngle);
- }
-
-
- newComponent.updateParameters();
-
- Vector3d v = new Vector3d(dir);
- if (insertAdjustable) {
- if (insertPosition == PositionType.NEXT)
- v.scale(newComponent.getControlPoint().getInlineLength());
- else if (insertPosition == PositionType.SPLIT)
- v.set(0, 0, 0);
- else if (insertPosition == PositionType.PREVIOUS)
- v.scale(-newComponent.getControlPoint().getInlineLength());
- } else {
+ if (newComponent instanceof InlineComponent) {
+ InlineComponent inlineComponent = (InlineComponent)newComponent;
+ if (inlineComponent.isVariableLength()|| inlineComponent.isModifialble()) {
+ newPcp.setLength(inst.length);
+ newComponent.setParameter("length", inst.length);
+ }
+ if (inst.rotationAngle != null)
+ ((InlineComponent) newComponent).setRotationAngle(inst.rotationAngle);
+ } else if (newComponent instanceof TurnComponent) {
+ TurnComponent turnComponent = (TurnComponent)newComponent;
+ if (turnComponent.isVariableAngle()) {
+ newPcp.setTurnAngle(inst.angle);
+ newComponent.setParameter("turnAngle", inst.angle);
+ }
+ if (inst.rotationAngle != null)
+ ((TurnComponent) newComponent).setRotationAngle(inst.rotationAngle);
+ }
+
+
+ newComponent.updateParameters();
+
+ Vector3d v = new Vector3d(dir);
+ if (insertAdjustable) {
+ if (insertPosition == PositionType.NEXT)