]> gerrit.simantics Code Review - simantics/3d.git/commitdiff
Fix interpretation of turn angle in InsertInstruction 92/3992/1
authorReino Ruusu <reino.ruusu@semantum.fi>
Thu, 12 Mar 2020 13:52:46 +0000 (15:52 +0200)
committerReino Ruusu <reino.ruusu@semantum.fi>
Thu, 12 Mar 2020 13:52:46 +0000 (15:52 +0200)
gitlab #109

Change-Id: Ibf7085e95281f1049c493a7f3d5e65344cc52a8e

org.simantics.plant3d/src/org/simantics/plant3d/utils/ComponentUtils.java

index 31bdda9e370887c34e3c80959d8a56f275e6697f..78f4166547b8740367cc3c18eaccb5523d0a3148 100644 (file)
@@ -490,7 +490,7 @@ public class ComponentUtils {
                } else if (newComponent instanceof TurnComponent) {
                    TurnComponent turnComponent = (TurnComponent)newComponent;
                    if  (turnComponent.isVariableAngle()) {
-                               newPcp.setTurnAngle(inst.angle);
+                               newPcp.setTurnAngle(Math.toRadians(inst.angle));
                                newComponent.setParameter("turnAngle", inst.angle);
                    }
                    if (inst.rotationAngle != null)