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=99b1448cb8e498decc9c8eef3f7655bd0fdea324;hb=24ef19cca93feb0306bca916c0506280c79bada0;hp=0967f38b77981bc12b618ad9309b8827f1715ddb;hpb=480f31b77f516043c679bea4357da438fc98d4cf;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 0967f38b..99b1448c 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 @@ -11,7 +11,7 @@ import org.simantics.db.exception.DatabaseException; import org.simantics.db.request.Read; import org.simantics.plant3d.ontology.Plant3D; import org.simantics.plant3d.scenegraph.PipelineComponent; -import org.simantics.plant3d.scenegraph.controlpoint.PipeControlPoint.Type; +import org.simantics.plant3d.scenegraph.controlpoint.PipeControlPoint.PointType; import org.simantics.plant3d.utils.Item; import org.simantics.plant3d.utils.P3DUtil; @@ -46,6 +46,7 @@ public class ControlPointFactory { pcp.setType(inst.type); pcp.setFixed(inst.fixed); pcp.setRotate(inst.isRotate); + pcp.setReverse(inst.isReverse); switch(inst.type) { case END: @@ -73,11 +74,12 @@ public class ControlPointFactory { private static class Instruction { - Type type; + PointType type; boolean fixed; boolean isOffset; boolean isSizeChange; boolean isRotate; + boolean isReverse; } @@ -92,15 +94,16 @@ public class ControlPointFactory { i.isOffset = false; i.isSizeChange = false; i.isRotate = false; - i.type = Type.INLINE; + i.isReverse = false; + i.type = PointType.INLINE; if (graph.isInheritedFrom(res, p3d.Nozzle)) { i.fixed = true; i.isOffset = false; i.isSizeChange = false; - i.type = Type.END; + i.type = PointType.END; } else if (graph.isInheritedFrom(res, p3d.InlineComponent)){ - i.type = Type.INLINE; + i.type = PointType.INLINE; if (graph.hasStatement(res,p3d.VariableLengthInlineComponent)) { i.fixed = false; } else if (graph.hasStatement(res,p3d.FixedLengthInlineComponent)) { @@ -118,8 +121,12 @@ public class ControlPointFactory { i.isRotate = true; } + if (graph.hasStatement(res,p3d.ReverseComponent)) { + i.isReverse = true; + } + } else if (graph.isInheritedFrom(res, p3d.TurnComponent)) { - i.type = Type.TURN; + i.type = PointType.TURN; if (graph.hasStatement(res,p3d.VariableAngleTurnComponent)) { i.fixed = false; } else if (graph.hasStatement(res,p3d.FixedAngleTurnComponent)) { @@ -127,7 +134,7 @@ public class ControlPointFactory { } } else if (graph.isInheritedFrom(res, p3d.EndComponent)) { i.fixed = false; - i.type = Type.END; + i.type = PointType.END; } else { return null; }