--- /dev/null
+%import "layer0.graph"\r
+%import "layer0.graph" L0\r
+%import "animation.graph"\r
+%import "g3d.graph"\r
+%define symmetric()\r
+ $subject\r
+ $layer0.InverseOf $subject\r
+%define tag($tagname)\r
+ $subject\r
+ $tagname $subject\r
+%deflib Type _ @ "Types" : TypeLibrary\r
+ PartOf CSGOntology\r
+%deflib Relation _ @ "Relations" : RelationLibrary\r
+ PartOf CSGOntology\r
+%deflib Library CSGOntology\r
+CSGOntology @ "CSG Ontology" : Ontology\r
+ PartOf TypeSystemProject\r
+ HasNamespace "http://www.vtt.fi/Simantics/CSG/1.0" : URI\r
+ HasVersion "1.0" : Version\r
+ HasResourceClass "org.simantics.proconf.g3d.csg.stubs.CSGResource" : String\r
+ HasStubsPackage "org.simantics.proconf.g3d.csg.stubs" : String\r
+\r
+CSGNamespace : Namespace\r
+ PartOf TypeSystemNamespaces\r
+ HasNamespace "http://www.vtt.fi/Simantics/CSG/1.0" : URI\r
+ HasNamespaceRoot CSGOntology\r
+\r
+# Project\r
+CSGProjectType <T ProjectType\r
+CSGProject : CSGProjectType <T Project\r
+ PartOf ProjectTypes\r
+ \r
+CSGShape <T Shape\r
+CSGModel <T G3DModel\r
+Primitive <T CSGShape\r
+ [HasSizingProperty card "0..*"]\r
+HasMainShape <R HasGeometryDefinition\r
+ HasDomain [BooleanOperation]\r
+ HasRange [CSGShape]\r
+HasSecondaryShape <R HasGeometryDefinition\r
+ HasDomain [BooleanOperation]\r
+ HasRange [CSGShape]\r
+BooleanOperation <T CSGShape\r
+ [HasMainShape card "0..1"]\r
+ [HasSecondaryShape card "0..*"]\r
+Difference <T BooleanOperation\r
+Intersection <T BooleanOperation\r
+Union <T BooleanOperation\r
+HasSizingProperty <R HasNonTransformation\r
+HasXAxisSize @ "Has X Axis Size" <R HasSizingProperty\r
+ HasRange [Double]\r
+HasYAxisSize @ "Has Y Axis Size" <R HasSizingProperty\r
+ HasRange [Double]\r
+HasZAxisSize @ "Has Z Axis Size" <R HasSizingProperty\r
+ HasRange [Double]\r
+HasXAxisMinimumSize @ "Has X Axis Minimum Size" <R HasSizingProperty\r
+ HasRange [Double]\r
+HasZAxisMinimumSize @ "Has Z Axis Minimum Size" <R HasSizingProperty\r
+ HasRange [Double]\r
+HasXAxisMaximumSize @ "Has X Axis Maximum Size" <R HasSizingProperty\r
+ HasRange [Double]\r
+HasZAxisMaximumSize @ "Has Z Axis Maximum Size" <R HasSizingProperty\r
+ HasRange [Double]\r
+HasRadius <R HasSizingProperty\r
+ HasRange [Double]\r
+HasMajorRadius <R HasSizingProperty\r
+ HasRange [Double]\r
+HasMinorRadius <R HasSizingProperty\r
+ HasRange [Double]\r
+HasTopRadius <R HasSizingProperty\r
+ HasRange [Double]\r
+HasBottomRadius <R HasSizingProperty\r
+ HasRange [Double]\r
+HasHeight <R HasSizingProperty\r
+ HasRange [Double]\r
+HasCorners <R HasSizingProperty\r
+ HasRange [Integer]\r
+Box <T Primitive\r
+ [HasXAxisSize card "1"]\r
+ [HasYAxisSize card "1"]\r
+ [HasZAxisSize card "1"]\r
+Sphere <T Primitive\r
+ [HasRadius card "1"]\r
+Cone <T Primitive\r
+ [HasTopRadius card "1"]\r
+ [HasBottomRadius card "1"]\r
+ [HasHeight card "1"]\r
+Cylinder <T Primitive\r
+ [HasRadius card "1"]\r
+ [HasHeight card "1"]\r
+Barrel <T Primitive\r
+ [HasMinorRadius card "1"]\r
+ [HasMajorRadius card "1"]\r
+ [HasHeight card "1"]\r
+EllipticCylinder <T Primitive\r
+ [HasMinorRadius card "1"]\r
+ [HasMajorRadius card "1"]\r
+ [HasHeight card "1"]\r
+RegularPrism <T Primitive\r
+ [HasHeight card "1"]\r
+ [HasRadius card "1"]\r
+ [HasCorners card "1"]\r
+Torus <T Primitive\r
+ [HasMinorRadius card "1"]\r
+ [HasMajorRadius card "1"]\r
+RectangularSolid <T Primitive\r
+ [HasXAxisMinimumSize card "1"]\r
+ [HasXAxisMaximumSize card "1"]\r
+ [HasYAxisSize card "1"]\r
+ [HasZAxisMinimumSize card "1"]\r
+ [HasZAxisMaximumSize card "1"]\r
+\r
+csgViewpointLibrary @ "Viewpoint Library" : ViewpointLibrary\r
+ PartOf CSGOntology\r
+csgState @ _ : ViewpointState\r
+csgTraversalRule @ _ : RelationBasedTraversalRule\r
+ HasContext csgState\r
+ L0.HasTargetState csgState\r
+ AcceptsRelation HasChild\r
+csgAcceptRule @ _ : AcceptAllResourceAcceptRule\r
+CSGStructureViewpoint @ "CSG Structure Viewpoint" : ResourceViewpoint\r
+ HasInitialState csgState\r
+ HasTraversalRule csgTraversalRule\r
+ HasResourceAcceptRule csgAcceptRule\r
+ PartOf csgViewpointLibrary\r
--- /dev/null
+%import "layer0.graph" \r
+%import "animation.graph"\r
+%import "image.graph" IMAGE\r
+%define symmetric()\r
+ $subject\r
+ $layer0.InverseOf $subject\r
+%define tag($tagname)\r
+ $subject\r
+ $tagname $subject\r
+%deflib Type _ @ "Types" : TypeLibrary\r
+ PartOf G3DOntology\r
+%deflib Relation _ @ "Relations" : RelationLibrary\r
+ PartOf G3DOntology\r
+%deflib Library G3DOntology\r
+G3DOntology @ "G3D Ontology" : Ontology\r
+ PartOf TypeSystemProject\r
+ HasNamespace "http://www.vtt.fi/Simantics/G3D/1.0" : URI\r
+ HasVersion "1.0" : Version\r
+ HasResourceClass "org.simantics.proconf.g3d.stubs.G3DResource" : String\r
+ HasStubsPackage "org.simantics.proconf.g3d.stubs" : String\r
+\r
+G3DNamespace @ "G3D Namespace" : Namespace\r
+ PartOf TypeSystemNamespaces\r
+ HasNamespace "http://www.vtt.fi/Simantics/G3D/1.0" : URI\r
+ HasNamespaceRoot G3DOntology\r
+\r
+HasTransformationValue <R HasProperty\r
+ InverseOf TransformationValueOf\r
+ HasRange [Double]\r
+HasX <R HasTransformationValue\r
+HasY <R HasTransformationValue\r
+HasZ <R HasTransformationValue\r
+HasAngle <R HasTransformationValue\r
+Tuple3 <T Property\r
+ [HasX card "1"]\r
+ [HasY card "1"]\r
+ [HasZ card "1"]\r
+Position <T Tuple3\r
+Center <T Tuple3\r
+Orientation <T Property\r
+ [HasX card "1"]\r
+ [HasY card "1"]\r
+ [HasZ card "1"]\r
+ [HasAngle card "1"]\r
+Transformation <T Property\r
+Position <T Transformation\r
+Orientation <T Transformation\r
+Center <T Transformation\r
+\r
+# Parent-child relationship\r
+HasChild <R IsRelatedTo\r
+ InverseOf HasParent\r
+ HasDomain [G3DNode]\r
+ HasRange [G3DNode]\r
+HasGeometryDefinition <R HasChild\r
+ InverseOf GeometryDefinitionOf\r
+\r
+# Properties of G3DNode are divided into transformation properties and non-transformation properties \r
+# All 3D properties must be inherited from these two. (Queries that update scene-graph require this) \r
+HasTransformation <R HasProperty\r
+ InverseOf TransformationOf\r
+HasNonTransformation <R HasProperty\r
+ InverseOf NonTransformationOf\r
+ \r
+HasLocalPosition <R HasTransformation\r
+ HasRange [Position]\r
+ InverseOf LocalPositionOf\r
+HasWorldPosition <R HasTransformation\r
+ HasRange [Position]\r
+ InverseOf WorldPositionOf\r
+HasLocalOrientation <R HasTransformation\r
+ HasRange [Orientation]\r
+ InverseOf LocalOrientationOf\r
+HasWorldOrientation <R HasTransformation\r
+ HasRange [Orientation]\r
+ InverseOf WorldOrientationOf\r
+HasCenter <R HasTransformation\r
+ HasRange [Center]\r
+G3DNode @ "G3DNode" <T Entity\r
+ [HasParent card "0..1"]\r
+ [HasChild card "0..*"]\r
+ [HasLocalPosition card "0..1"]\r
+ [HasWorldPosition card "0..1"]\r
+ [HasLocalOrientation card "0..1"]\r
+ [HasWorldOrientation card "0..1"]\r
+ [HasCenter card "0..1"]\r
+ HasDescription "Base node for scene-graph" : String\r
+ Includes\r
+ HasChild\r
+ Propagates\r
+ HasChild\r
+HasG3DNode @ "Has G3DNode" <R DependsOn\r
+ HasRange [G3DNode]\r
+HasRed <R HasProperty\r
+ HasRange [Double]\r
+HasGreen <R HasProperty\r
+ HasRange [Double]\r
+HasBlue <R HasProperty\r
+ HasRange [Double]\r
+HasTransparency <R HasProperty\r
+ HasRange [Double]\r
+HasShininess <R HasProperty\r
+ HasRange [Double]\r
+Color <T Entity\r
+ [HasRed card "1"]\r
+ [HasGreen card "1"]\r
+ [HasBlue card "1"]\r
+HasDiffuseColor <R IsRelatedTo\r
+ InverseOf DiffuseColorOf\r
+ HasRange [Color]\r
+HasSpecularColor <R IsRelatedTo\r
+ InverseOf SpecularColorOf\r
+ HasRange [Color]\r
+HasAmbientColor <R IsRelatedTo\r
+ InverseOf AmbientColorOf\r
+ HasRange [Color]\r
+HasEmissiveColor <R IsRelatedTo\r
+ InverseOf EmissiveColorOf\r
+ HasRange [Color]\r
+\r
+Material <T Entity\r
+ [HasDiffuseColor card "1"]\r
+ [HasSpecularColor card "1"]\r
+ [HasAmbientColor card "1"]\r
+ [HasEmissiveColor card "1"]\r
+ [HasTransparency card "1"]\r
+ [HasShininess card "1"]\r
+ Includes\r
+ HasDiffuseColor\r
+ HasSpecularColor\r
+ HasAmbientColor\r
+ HasEmissiveColor\r
+ HasTransparency\r
+ HasShininess\r
+ Propagates\r
+ HasDiffuseColor\r
+ HasSpecularColor\r
+ HasAmbientColor\r
+ HasEmissiveColor\r
+ HasTransparency\r
+ HasShininess\r
+TextureCoordinateGenerator <T Property\r
+ tag(Enumeration)\r
+HasTextureCoordinateGenerator <R DependsOn\r
+ HasRange [TextureCoordinateGenerator]\r
+TextureCoordinateGenerations : Library\r
+ ConsistsOf\r
+ _sphere @ "sphere" : TextureCoordinateGenerator\r
+ _eye_linear @ "eye linear" : TextureCoordinateGenerator\r
+ _object_linear @ "object linear" : TextureCoordinateGenerator\r
+ _normal @ "normal" : TextureCoordinateGenerator\r
+ _reflection @ "reflection" : TextureCoordinateGenerator\r
+\r
+TextureMode @ "MultiTexture Mode" <T Property\r
+ tag(Enumeration)\r
+ ConsistsOf\r
+ mt_add @ "add" : TextureMode\r
+ mt_modulate @ "modulate" : TextureMode\r
+ mt_blend @ "blend" : TextureMode\r
+ mt_decal @ "decal" : TextureMode\r
+ mt_replace @ "replace" : TextureMode\r
+ mt_combine @ "combine" : TextureMode\r
+HasTextureMode @ "Has Texture Mode" <R DependsOn\r
+ HasRange [TextureMode]\r
+ \r
+CombineMode <T Property\r
+ tag(Enumeration)\r
+ ConsistsOf\r
+ cm_add @ "add" : CombineMode\r
+ cm_replace @ "replace" : CombineMode\r
+ cm_modulate @ "modulate" : CombineMode\r
+ cm_add_signed @ "add signed" : CombineMode\r
+ cm_subtract @ "subtract" : CombineMode\r
+ cm_interpolate @ "interpolate" : CombineMode\r
+ cm_dot3 @ "dot3" : CombineMode\r
+#HasCombineMode <R DependsOn\r
+# HasRange [CombineMode]\r
+ \r
+CombineSource <T Property\r
+ tag(Enumeration)\r
+ ConsistsOf\r
+ cs_object_color @ "object color" : CombineSource\r
+ cs_texture_color @ "texture color" : CombineSource\r
+ cs_constant_color @ "constant color" : CombineSource\r
+ cs_previous_texture_state @ "previous state" : CombineSource\r
+ cs_texture0 @ "texture 0" : CombineSource\r
+ cs_texture1 @ "texture 1" : CombineSource\r
+#HasCombineSource <R DependsOn\r
+# HasRange [CombineSource]\r
+CombineFunction <T Property\r
+ tag(Enumeration)\r
+ ConsistsOf\r
+ cf_src_color @ "src color" : CombineFunction\r
+ cf_one_minus_src_color @ "one minus src color" : CombineFunction\r
+ cf_src_alpha @ "src alpha" : CombineFunction\r
+ cf_one_minus_src_alpha @ "one minus src alpha" : CombineFunction\r
+#HasCombineFunction <R DependsOn\r
+# HasRange [CombineFunction]\r
+\r
+HasCombineDefinition @ "Has Combine Definition" <R HasProperty\r
+ HasRange [LinkedList]\r
+ \r
+#MultiTextureElement @ "MultiTextureElement" <T Entity\r
+# [HasTexture card "1"]\r
+\r
+Texture <T Property\r
+ [HasTextureMode card "0..1"]\r
+ [HasCombineDefinition card "0..1"]\r
+ [HasTextureCoordinateGenerator card "0..1"]\r
+ #[HasCombineMode card "0..1"]\r
+ #[HasCombineSource card "0..1"]\r
+ #[HasCombineFunction card "0..1"]\r
+ \r
+HasTexture <R DependsOn\r
+ HasRange [Texture]\r
+ \r
+Texture1D @ "Texture1D" <T Texture\r
+Texture2D @ "Texture2D" <T Texture\r
+Texture3D @ "Texture3D" <T Texture\r
+CubeMapTexture @ "CubeMap Texture" <T Texture\r
+ \r
+#MultiTextureElementList @ "MultiTextureElementList" <T LinkedList\r
+#HasMultiTextureElementList @ "Has MultiTextureElementList" <R DependsOn : FunctionalRelation\r
+HasMultiTextureElementList @ "Has MultiTextureElementList" <R HasProperty\r
+ HasRange [LinkedList]\r
+ #HasRange [MultiTextureElementList]\r
+# this definition is incorrect: multitexture cannot have texturemode,m etc. itself\r
+MultiTexture @ "MultiTexture" <T Texture\r
+ [HasMultiTextureElementList card "1"]\r
+HasImage <R DependsOn\r
+ HasRange [IMAGE.Image]\r
+ImageTexture @ "ImageTexture" <T Texture2D\r
+ [HasImage card "1"]\r
+HasVertexShader <R HasProperty\r
+ HasRange [String]\r
+HasFragmentShader <R HasProperty\r
+ HasRange [String]\r
+Shader <T Entity\r
+ [HasVertexShader card "1"]\r
+ [HasFragmentShader card "1"]\r
+HasMaterial <R IsRelatedTo\r
+ HasRange [Material]\r
+HasShader <R IsRelatedTo\r
+ HasRange [Shader]\r
+Appearance <T Entity\r
+ [HasMaterial card "0..1"]\r
+ [HasTexture card "0..1"]\r
+ [HasShader card "0..1"]\r
+ Includes\r
+ HasMaterial\r
+ HasTexture\r
+ HasShader\r
+ Propagates\r
+ HasMaterial\r
+ HasTexture\r
+ HasShader\r
+HasAppearance <R HasProperty # HasNonTransformation \r
+ HasRange [Appearance]\r
+Shape <T G3DNode\r
+ [HasAppearance card "0..1"]\r
+ HasDescription "Node for representing geometries" : String\r
+ Includes\r
+ HasAppearance\r
+G3DModel @ "G3DModel" <T G3DNode\r
+ [HasAnimation card "0..*"]\r
+ [HasSizingParameter card "0..*"]\r
+ Includes\r
+ HasAnimation\r
+ HasSizingParameter\r
+ Propagates\r
+ HasAnimation\r
+ HasSizingParameter\r
+HasSizingParameter <R HasNonTransformation\r
+ HasDescription "Sizing parameters are used for defining parameterization of a model" : String\r
+ HasDomain [G3DModel]\r
+ HasRange [Double]\r
+HasDefaultDoubleValue <R HasProperty\r
+ HasDescription "Sizing Parameter's default value" : String\r
+ HasDomain [Double]\r
+ HasRange [Double]\r
+ \r
+HasConstraints <R HasAdapter2 : FunctionalRelation\r
+\r
+\r
--- /dev/null
+HasNext\r
+HasPrevious\r
+%import "layer0.graph"\r
+%import "animation.graph"\r
+%import "g3d.graph"\r
+%define symmetric()\r
+ $subject\r
+ $layer0.InverseOf $subject\r
+%define tag($tagname)\r
+ $subject\r
+ $tagname $subject\r
+%deflib Type _ @ "Types" : TypeLibrary\r
+ PartOf Plant3DOntology\r
+%deflib Relation _ @ "Relations" : RelationLibrary\r
+ PartOf Plant3DOntology\r
+%deflib Library Plant3DOntology\r
+Plant3DOntology @ "Plant3D Ontology" : Ontology\r
+ PartOf TypeSystemProject\r
+ HasNamespace "http://www.vtt.fi/Simantics/Plant3D/1.0" : URI\r
+ HasVersion "1.0" : Version\r
+ HasResourceClass "fi.vtt.simantics.processeditor.stubs.Plant3DResource" : String\r
+ HasStubsPackage "fi.vtt.simantics.processeditor.stubs" : String\r
+\r
+Plant3DNamespace : Namespace\r
+ PartOf TypeSystemNamespaces\r
+ HasNamespace "http://www.vtt.fi/Simantics/Plant3D/1.0" : URI\r
+ HasNamespaceRoot Plant3DOntology\r
+ \r
+# Project\r
+Plant3DProjectType @ "Plant3DProjectType" <T ProjectType\r
+Plant3DProject @ "Plant3DProject" : Plant3DProjectType <T Project\r
+ PartOf ProjectTypes\r
+\r
+\r
+#****************************************************************************\r
+#\r
+# PBS structure and components\r
+#\r
+#****************************************************************************\r
+\r
+P3DNode @ "P3DNode" <T G3DNode\r
+ HasDescription "Base node for all 3D plant objects. Used as an identifier." : String\r
+PBSNode <T Entity\r
+ HasDescription "Plant Breakdown Structure super type" : String\r
+ HasDescription "Example: Site > Plant > Area > Unit" : String\r
+ [HasParentStructure card "0..1"]\r
+ [HasChildStructure card "0..*"]\r
+HasChildStructure <R IsRelatedTo\r
+ InverseOf HasParentStructure\r
+ HasDomain [PBSNode]\r
+ HasRange [PBSNode]\r
+Plant <T P3DNode <T PBSNode\r
+ HasDescription "Root node of the scene-graph" : String\r
+ HasDescription "Contains Equipment and Pipe Runs (Scene-graph)" : String\r
+ HasDescription "Scene-graph structure IS NOT Plant Breakdown Structure (PBS)" : String\r
+HasGraphics <R IsWeaklyRelatedTo\r
+ HasDescription "link to geometric representation of component or equipment" : String\r
+ HasRange [G3DModel]\r
+LibraryComponent <T P3DNode <T PBSNode\r
+ HasDescription "Base type for librarised components and equipment" : String\r
+ [HasGraphics card "0..1"]\r
+Equipment <T LibraryComponent\r
+ [HasNozzle card "0..1"]\r
+ [HasNozzleDefinition card "0..*"]\r
+ [HasNozzleRestriction card "0..1"]\r
+# TODO : PipeRun should link to Spec and use its information\r
+PipeRun <T P3DNode\r
+ HasDescription "Non visible node" : String\r
+ HasDescription "Contains all pipeline components that contain same specification (size, ..)" : String\r
+ [HasPipeDiameter card "1"]\r
+ [HasTurnRadius card "1"]\r
+ [HasControlPoints card "0..*"]\r
+Nozzle <T LibraryComponent\r
+ [HasPipeDiameter card "1"]\r
+ [HasLength card "1"]\r
+ [HasControlPoint card "0..1"] #0..1 prevents automatic instantion of control point\r
+PipelineComponent <T LibraryComponent\r
+ [HasPipeDiameter card "1"]\r
+ [HasControlPoint card "0..1"]\r
+SingleConnectedComponent <T PipelineComponent\r
+ HasDescription "A component that is connected to only one component" : String\r
+DualConnectedComponent <T PipelineComponent\r
+ HasDescription "A component that is connected to two components" : String\r
+MultiConnectedComponent <T PipelineComponent\r
+ HasDescription "A component that is connected to more than two components" : String\r
+InlineComponent <T PipelineComponent\r
+ HasDescription "Component that connects to two or more components, and maintains direction of (main) " : String\r
+ HasDescription "pipe run. Centerline of main pipeline may have offset: with offset there is two control " : String\r
+ HasDescription "points for main pipeline, and without offset, there is only one control point for main " : String\r
+ HasDescription "pipeline. The component may also join two pipe runs together: then there is always one " : String\r
+ HasDescription "control point for one pipe run." : String\r
+ [HasLength card "1"]\r
+EndComponent <T PipelineComponent\r
+ HasDescription "Component that ends the pipe run" : String\r
+ HasDescription "Component may contain other control points" : String\r
+TurnComponent <T PipelineComponent\r
+ HasDescription "Component that changes direction of the pipeline" : String\r
+ HasDescription "Component that connects to two or more components, and specifies connectivity of main " : String\r
+ HasDescription "pipe run. Is base type for elbows, pipe bends, etc., but also for components that won't " : String\r
+ HasDescription "maintain main pipeline direction (inline component). CHECK!!!" : String\r
+ [HasTurnAngle card "1"]\r
+FixedLengthInlineComponent <T InlineComponent\r
+ HasDescription "Inline component that has fixed length" : String\r
+ [HasRotationAngle card "1"]\r
+VariableLengthInlineComponent <T InlineComponent\r
+ HasDescription "Inline component whose length can be changed" : String\r
+FixedAngleTurnComponent <T TurnComponent\r
+ HasDescription "Turn Component that has specific turning angle that cannot be changed" : String\r
+ [HasRotationAngle card "1"]\r
+VariableAngleTurnComponent <T TurnComponent\r
+ HasDescription "Turn Component whose turning angle can be modified" : String\r
+ HasDescription "Contains always one control point (there are no contradictory cases / how to calculate?)" : String\r
+ [HasTurnRadius card "1"]\r
+SizeChangeComponent <T FixedLengthInlineComponent\r
+ HasDescription "Component that changes pipe run along main pipeline. (Spec change)" : String\r
+OffsetComponent <T FixedLengthInlineComponent\r
+ HasDescription "Component that offsets the center of piperun." : String \r
+CodedComponent <T PipelineComponent\r
+ HasDescription "Currently used with non-customizable / hard-coded components" : String\r
+NonVisibleComponent <T PipelineComponent\r
+ HasDescription "(Pseudo) Component that cannot bee seen." : String\r
+\r
+#****************************************************************************\r
+#\r
+# Pipe Control Points\r
+#\r
+#****************************************************************************\r
+\r
+# control point base type\r
+PipeControlPoint <T Entity\r
+ HasDescription "Base type" : String\r
+ [HasLocalPosition card "1"]\r
+ [HasWorldPosition card "1"]\r
+ [HasLocalOrientation card "1"]\r
+ [HasWorldOrientation card "1"]\r
+ [HasNext card "0..1"]\r
+ [HasPrevious card "0..1"]\r
+ [HasNext card "0..1"]\r
+ [HasSubPoint card "0..*"]\r
+ [SubPointOf card "0..1"]\r
+ [HasPipeDiameter card "1"]\r
+ [ControlPointOf card "0..1"]\r
+ [ControlPointOfPipeRun card "0..1"]\r
+\r
+# divide to path leg ends and inline\r
+PathLegEndControlPoint <T PipeControlPoint\r
+ HasDescription "A control point that ends path leg." : String\r
+InlineControlPoint <T PipeControlPoint\r
+ [HasLength card "1"]\r
+\r
+# turns\r
+TurnControlPoint <T PathLegEndControlPoint\r
+ [HasTurnAngle card "1"]\r
+ [HasLength card "1"] # TODO : should this be length or something else?\r
+ \r
+FixedAngleTurnControlPoint <T TurnControlPoint #is this unnecessary ( Fixed angle could be created with EndComponent + Directed as a subpoint)? \r
+ HasDescription "While variable angle turn control point is positioned by path legs, user is responsible for rotating fixed angle turn components." : String\r
+ [HasRotationAngle card "1"]\r
+ [IsReversed card "1"]\r
+VariableAngleTurnControlPoint <T TurnControlPoint\r
+ [HasTurnRadius card "1"]\r
+ [HasTurnAxis card "1"] # this was for update purposes\r
+# inline\r
+VariableLengthControlPoint <T InlineControlPoint\r
+FixedLengthControlPoint <T InlineControlPoint\r
+ [HasRotationAngle card "1"]\r
+\r
+RunEndControlPoint <T PathLegEndControlPoint\r
+ HasDescription "Control Point that ends a PipeRun." : String\r
+ HasDescription "Only Next or Previous ControlPoint must be set, and other must be end" : String\r
+\r
+# directed and undirected\r
+\r
+DirectedControlPoint <T RunEndControlPoint\r
+ [HasLocalOrientation card "1"]\r
+ [HasWorldOrientation card "1"]\r
+# [HasDirection card "1"]\r
+UndirectedControlPoint <T RunEndControlPoint\r
+\r
+EndComponentControlPoint <T UndirectedControlPoint\r
+ [HasRotationAngle card "1"]\r
+ \r
+# for N-Port components (N > 3), defines position and direction of control point relative to main control point \r
+NPortControlPoint <T DirectedControlPoint\r
+# [HasRelativePosition card "1"]\r
+# [HasRelativeDirection card "1"] \r
+\r
+# Size change & Offset\r
+# TODO: could we allow variable length components that offset piperun ? (currently only component that is variable length is straight pipe, so for now: no) \r
+# note: SizeChange actually ends a piperun, but allows path leg to continue\r
+DualInlineControlPoint <T FixedLengthControlPoint\r
+ HasDescription "FixedLengthInlineControlPoint that has subcontrolpoint in the same PipeRun/Pathleg." : String\r
+ HasDescription "The previous controlpoint is connected (next) to this point and the next point is connected (previous) to subpoint, while this point and the subpoint are connected both the previous and the next point." : String\r
+SizeChangeControlPoint <T DualInlineControlPoint\r
+ HasDescription "Changes PipeRun within the path leg." : String\r
+ HasDescription "This CP belongs to the PipeRun that is the previous side and subpoint belongs to the PipeRun that is on the next side." : String \r
+OffsettingPoint <T DualInlineControlPoint\r
+ [HasOffset card "1"]\r
+ HasDescription "Offsets the center of the pipe." : String \r
+DualSubControlPoint <T FixedLengthControlPoint\r
+ HasDescription "DualInlineControlPoint's subpoint." : String\r
+\r
+# nozzle must have its own control point so that we know to link pipe diameters of the nozzle and the piperun\r
+NozzleControlPoint <T DirectedControlPoint\r
+\r
+# TODO : is it necessary to model inline control point that has no length?\r
+BranchEndControlPoint <T UndirectedControlPoint\r
+BranchControlPoint <T FixedLengthControlPoint\r
+\r
+# TODO : we also need a way to specify if control point can be moved from its current place or not (this may be dynamic)\r
+ \r
+\r
+# relation and property definitions\r
+\r
+HasControlPoint <R IsRelatedTo\r
+ InverseOf ControlPointOf\r
+ HasDomain [(PipelineComponent or Nozzle)]\r
+ HasRange [PipeControlPoint]\r
+ HasDescription "Relation between PipelineComponent and ControlPoint" : String\r
+HasControlPoints <R IsRelatedTo\r
+ InverseOf ControlPointOfPipeRun\r
+ HasDomain [PipeRun]\r
+ HasRange [PipeControlPoint]\r
+ HasDescription "Relation between PipeRun and ControlPoint" : String\r
+ HasDescription "This is needed because a PipeLineComponent may contain multiple ControlPoints that belong to different PipeRuns." : String\r
+HasNext <R IsWeaklyRelatedTo\r
+ HasDomain [PipeControlPoint]\r
+ HasRange [PipeControlPoint]\r
+ HasDescription "Next point in the piperun" : String\r
+HasPrevious <R IsWeaklyRelatedTo\r
+ HasDomain [PipeControlPoint]\r
+ HasRange [PipeControlPoint]\r
+ HasDescription "Previous point in the piperun" : String\r
+HasSubPoint @ "Has SubPoint" <R IsRelatedTo\r
+ InverseOf SubPointOf\r
+ HasDomain [PipeControlPoint]\r
+ HasRange [PipeControlPoint]\r
+ HasDescription "Subcontrolpoint's position is defined by its parent control point. Local Position of subpoint is its position relative to its parent point similar to child/parent relationship in scene-graph." : String \r
+\r
+HasPipeDiameter <R HasNonTransformation\r
+ HasRange [Double]\r
+HasLength <R HasNonTransformation\r
+ HasRange [Double]\r
+HasTurnAngle <R HasNonTransformation\r
+ HasRange [Double]\r
+HasRotationAngle <R HasTransformation\r
+ HasRange [Double]\r
+HasOffset <R HasProperty\r
+ HasRange [Double]\r
+#HasRelativePosition <R HasProperty\r
+# HasRange [Position]\r
+#HasRelativeDirection <R HasProperty\r
+# HasRange [Tuple3]\r
+#HasDirection <R HasProperty\r
+# HasRange [Tuple3] \r
+HasTurnRadius <R HasNonTransformation\r
+ HasRange [Double] \r
+IsReversed <R HasProperty\r
+ HasRange [Boolean]\r
+HasTurnAxis <R HasTransformation\r
+ HasRange [Tuple3]\r
+ \r
+HasNozzleDefinition <R HasProperty\r
+ HasDomain [Equipment]\r
+ HasRange [Nozzle]\r
+ HasDescription "This relation is used to connect nozzles to equipment in the template. For instantiated equipment nozzles must be connected with HasNozzle relation." : String \r
+HasNozzle <R HasChild\r
+ InverseOf NozzleOf\r
+ HasDomain [Equipment]\r
+ HasRange [Nozzle]\r
+ HasDescription "Used to connect nozzles to equipment." : String\r
+HasNozzleRestriction <R HasMultiplicity\r
+ HasDescription "Used in template equipment to restrict amount of nozzles." : String\r
+ HasDescription "If template has as many nozzleDefinitions that maximum count in this restriction, user cannot add new nozzles to the equipment instance." : String\r
+\r
+\r
+\r
+#****************************************************************************\r
+#\r
+# Predefined equipment and components\r
+#\r
+#**************************************************************************** \r
+ \r
+ \r
+Reducer <T CodedComponent <T SizeChangeComponent <T FixedLengthInlineComponent <T DualConnectedComponent\r
+#ConcentricReducer <T Reducer\r
+#ConcentricReducerImpl : ConcentricReducer\r
+ConcentricReducer <T Reducer : Reducer\r
+ PartOf Plant3DOntology\r
+ HasRotationAngle "0.0" : Double\r
+ HasControlPoint \r
+ _ : SizeChangeControlPoint\r
+ HasWorldPosition\r
+ _ : Position\r
+ HasX "0.0" : Double\r
+ HasY "0.0" : Double\r
+ HasZ "0.0" : Double\r
+ HasWorldOrientation\r
+ _ : Orientation\r
+ HasX "0.0" : Double\r
+ HasY "1.0" : Double\r
+ HasZ "0.0" : Double\r
+ HasAngle "0.0" : Double\r
+ HasLocalPosition\r
+ _ : Position\r
+ HasX "0.0" : Double\r
+ HasY "0.0" : Double\r
+ HasZ "0.0" : Double\r
+ HasLocalOrientation\r
+ _ : Orientation\r
+ HasX "0.0" : Double\r
+ HasY "1.0" : Double\r
+ HasZ "0.0" : Double\r
+ HasAngle "0.0" : Double\r
+ HasSubPoint\r
+ _ : DualSubControlPoint\r
+ HasWorldPosition\r
+ _ : Position\r
+ HasX "0.0" : Double\r
+ HasY "0.0" : Double\r
+ HasZ "0.0" : Double\r
+ HasWorldOrientation\r
+ _ : Orientation\r
+ HasX "0.0" : Double\r
+ HasY "1.0" : Double\r
+ HasZ "0.0" : Double\r
+ HasAngle "0.0" : Double\r
+ HasLocalPosition\r
+ _ : Position\r
+ HasX "0.0" : Double\r
+ HasY "0.0" : Double\r
+ HasZ "0.0" : Double\r
+ HasLocalOrientation\r
+ _ : Orientation\r
+ HasX "0.0" : Double\r
+ HasY "1.0" : Double\r
+ HasZ "0.0" : Double\r
+ HasAngle "0.0" : Double \r
+#EccentricReducer <T Reducer <T OffsetComponent\r
+#EccentricReducerImpl : EccentricReducer\r
+EccentricReducer <T Reducer <T OffsetComponent : Reducer : OffsetComponent\r
+ PartOf Plant3DOntology\r
+ HasRotationAngle "0.0" : Double\r
+ HasControlPoint \r
+ _ : SizeChangeControlPoint : OffsettingPoint\r
+ HasOffset "1.0" : Double #TODO : define an equation that can calculate the offset form pipediameters. This requires relative \r
+ HasWorldPosition\r
+ _ : Position\r
+ HasX "0.0" : Double\r
+ HasY "0.0" : Double\r
+ HasZ "0.0" : Double\r
+ HasWorldOrientation\r
+ _ : Orientation\r
+ HasX "0.0" : Double\r
+ HasY "1.0" : Double\r
+ HasZ "0.0" : Double\r
+ HasAngle "0.0" : Double\r
+ HasLocalPosition\r
+ _ : Position\r
+ HasX "0.0" : Double\r
+ HasY "0.0" : Double\r
+ HasZ "0.0" : Double\r
+ HasLocalOrientation\r
+ _ : Orientation\r
+ HasX "0.0" : Double\r
+ HasY "1.0" : Double\r
+ HasZ "0.0" : Double\r
+ HasAngle "0.0" : Double\r
+ HasSubPoint\r
+ _ : DualSubControlPoint\r
+ HasWorldPosition\r
+ _ : Position\r
+ HasX "0.0" : Double\r
+ HasY "0.0" : Double\r
+ HasZ "0.0" : Double\r
+ HasWorldOrientation\r
+ _ : Orientation\r
+ HasX "0.0" : Double\r
+ HasY "1.0" : Double\r
+ HasZ "0.0" : Double\r
+ HasAngle "0.0" : Double\r
+ HasLocalPosition\r
+ _ : Position\r
+ HasX "0.0" : Double\r
+ HasY "0.0" : Double\r
+ HasZ "0.0" : Double\r
+ HasLocalOrientation\r
+ _ : Orientation\r
+ HasX "0.0" : Double\r
+ HasY "1.0" : Double\r
+ HasZ "0.0" : Double\r
+ HasAngle "0.0" : Double\r
+#Elbow <T CodedComponent <T VariableAngleTurnComponent <T DualConnectedComponent\r
+#ElbowImpl : Elbow\r
+Elbow <T CodedComponent <T VariableAngleTurnComponent <T DualConnectedComponent : CodedComponent : VariableAngleTurnComponent : DualConnectedComponent\r
+ PartOf Plant3DOntology\r
+ HasLength "0.0" : Double\r
+ HasTurnRadius "0.0" : Double\r
+ HasTurnAngle "0.0" : Double\r
+ HasControlPoint \r
+ _ : VariableAngleTurnControlPoint\r
+ HasWorldPosition\r
+ _ : Position\r
+ HasX "0.0" : Double\r
+ HasY "0.0" : Double\r
+ HasZ "0.0" : Double\r
+ HasWorldOrientation\r
+ _ : Orientation\r
+ HasX "0.0" : Double\r
+ HasY "1.0" : Double\r
+ HasZ "0.0" : Double\r
+ HasAngle "0.0" : Double\r
+ HasLocalPosition\r
+ _ : Position\r
+ HasX "0.0" : Double\r
+ HasY "0.0" : Double\r
+ HasZ "0.0" : Double\r
+ HasLocalOrientation\r
+ _ : Orientation\r
+ HasX "0.0" : Double\r
+ HasY "1.0" : Double\r
+ HasZ "0.0" : Double\r
+ HasAngle "0.0" : Double \r
+#Straight <T CodedComponent <T DualConnectedComponent <T VariableLengthInlineComponent\r
+#StraightImpl : Straight\r
+Straight <T CodedComponent <T DualConnectedComponent <T VariableLengthInlineComponent : CodedComponent : DualConnectedComponent : VariableLengthInlineComponent\r
+ PartOf Plant3DOntology\r
+ HasLength "0.0" : Double\r
+ HasControlPoint \r
+ _ : VariableLengthControlPoint\r
+ HasWorldPosition\r
+ _ : Position\r
+ HasX "0.0" : Double\r
+ HasY "0.0" : Double\r
+ HasZ "0.0" : Double\r
+ HasWorldOrientation\r
+ _ : Orientation\r
+ HasX "0.0" : Double\r
+ HasY "1.0" : Double\r
+ HasZ "0.0" : Double\r
+ HasAngle "0.0" : Double\r
+ HasLocalPosition\r
+ _ : Position\r
+ HasX "0.0" : Double\r
+ HasY "0.0" : Double\r
+ HasZ "0.0" : Double\r
+ HasLocalOrientation\r
+ _ : Orientation\r
+ HasX "0.0" : Double\r
+ HasY "1.0" : Double\r
+ HasZ "0.0" : Double\r
+ HasAngle "0.0" : Double \r
+ \r
+BranchSplitComponent <T FixedLengthInlineComponent <T NonVisibleComponent : FixedLengthInlineComponent : NonVisibleComponent \r
+ PartOf Plant3DOntology\r
+ HasLength "0.0" : Double \r
+ HasControlPoint\r
+ _ : BranchControlPoint\r
+ HasWorldPosition\r
+ _ : Position\r
+ HasX "0.0" : Double\r
+ HasY "0.0" : Double\r
+ HasZ "0.0" : Double\r
+ HasWorldOrientation\r
+ _ : Orientation\r
+ HasX "0.0" : Double\r
+ HasY "1.0" : Double\r
+ HasZ "0.0" : Double\r
+ HasAngle "0.0" : Double\r
+ HasLocalPosition\r
+ _ : Position\r
+ HasX "0.0" : Double\r
+ HasY "0.0" : Double\r
+ HasZ "0.0" : Double\r
+ HasLocalOrientation\r
+ _ : Orientation\r
+ HasX "0.0" : Double\r
+ HasY "1.0" : Double\r
+ HasZ "0.0" : Double\r
+ HasAngle "0.0" : Double\r
+ \r
+#Tee <T FixedLengthInlineComponent <T MultiConnectedComponent\r
+#BendPipe <T PipeComponent <T VariableAngleTurnComponent <T DualConnectedComponent\r
+#Cap <T EndComponent\r
+#BlindFlange <T EndComponent\r
+#TwoWayBallValve <T FixedLengthInlineComponent <T DualConnectedComponent\r
+#ThreeWayTTypeBallValve <T FixedLengthInlineComponent <T MultiConnectedComponent\r
+# HasName "Three Way T Type Ball Valve" : String\r
+#ThreeWayYType120DegreeBallValve <T EndComponent <T MultiConnectedComponent\r
+# HasName "Three Way Y Type 120 Degree Ball Valve" : String\r
+Vessel <T Equipment\r
+VerticalVessel <T Vessel\r
+ [HasHeight card "1"]\r
+HorizontalVessel <T Vessel\r
+ [HasLength card "1"]\r
+\r
+HasHeight <R HasNonTransformation\r
+ HasRange [Double]\r
+HasLength <R HasNonTransformation\r
+ HasRange [Double]\r
+\r
+#****************************************************************************\r
+#\r
+# Specs \r
+#\r
+#****************************************************************************\r
+\r