X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=org.simantics.plant3d%2Fsrc%2Forg%2Fsimantics%2Fplant3d%2Fscenegraph%2Fcontrolpoint%2FControlPointFactory.java;h=ff49b93a74404adf1b5164e7bcbfb2a54ba00518;hb=a899aac9dd52296206f302a20a8e7bae2501cf2c;hp=6b92e4479aa1a8fe34cb7681bcd94255a83055d7;hpb=10e661e9b5bf90e754626811976e1014f8a0b2c8;p=simantics%2F3d.git diff --git a/org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/controlpoint/ControlPointFactory.java b/org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/controlpoint/ControlPointFactory.java index 6b92e447..ff49b93a 100644 --- a/org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/controlpoint/ControlPointFactory.java +++ b/org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/controlpoint/ControlPointFactory.java @@ -45,6 +45,7 @@ public class ControlPointFactory { PipeControlPoint pcp = new PipeControlPoint(component); pcp.setType(inst.type); pcp.setFixed(inst.fixed); + pcp.setMod(inst.mod); pcp.setRotate(inst.isRotate); pcp.setReverse(inst.isReverse); switch(inst.type) { @@ -58,6 +59,7 @@ public class ControlPointFactory { sub.parent = pcp; sub.setType(inst.type); sub.setFixed(inst.fixed); + sub.setMod(inst.mod); sub.setSub(true); sub.setDeletable(false); if (inst.isOffset) @@ -78,6 +80,7 @@ public class ControlPointFactory { private static class Instruction { PointType type; boolean fixed; + boolean mod; boolean isOffset; boolean isSizeChange; boolean isRotate; @@ -98,6 +101,7 @@ public class ControlPointFactory { i.isRotate = false; i.isReverse = false; i.type = PointType.INLINE; + i.mod = false; if (graph.isInheritedFrom(res, p3d.Nozzle)) { i.fixed = true; i.isOffset = false; @@ -110,6 +114,11 @@ public class ControlPointFactory { i.fixed = false; } else if (graph.hasStatement(res,p3d.FixedLengthInlineComponent)) { i.fixed = true; + } else if (graph.hasStatement(res,p3d.AdjustableLengthInlineComponent)) { + i.fixed = true; + i.mod = true; + } else { + throw new DatabaseException("Inline component type " + res + " does not have length configuration."); } if (graph.hasStatement(res,p3d.SizeChangeComponent)) { @@ -133,6 +142,8 @@ public class ControlPointFactory { i.fixed = false; } else if (graph.hasStatement(res,p3d.FixedAngleTurnComponent)) { i.fixed = true; + } else { + throw new DatabaseException("Turn component type " + res + " does not have angle configuration."); } } else if (graph.isInheritedFrom(res, p3d.EndComponent)) { i.fixed = false;