diff --git a/examples/frontend.json b/examples/frontend.json new file mode 100644 index 0000000..2a0f25b --- /dev/null +++ b/examples/frontend.json @@ -0,0 +1,48 @@ +{ + "diagramName": "Test P&ID", + "extent": { + "min": { + "x": 100, + "y": 100 + }, + "max": { + "x": 200, + "y": 200 + } + }, + "symbols": [ + { + "id": "https://assetid.equinor.com/plantx#PressureVessel-1", + "position": { + "x": 390, + "y": 210, + "rotation": 0 + }, + "svg": "1 A" + } + ], + "lines": [ + { + "id": "https://assetid.equinor.com/plantx#GateValve-5-node2-connector", + "coordinates": [ + { + "x": 646, + "y": 188 + }, + { + "x": 646, + "y": 180 + }, + { + "x": 412, + "y": 180 + } + ], + "style": { + "stroke-dasharray": "none", + "stroke-width": "1,4", + "stroke": "rgb(255,255,255)" + } + } + ] + } \ No newline at end of file diff --git a/examples/graphical.trig b/examples/graphical.trig new file mode 100644 index 0000000..d8ca90f --- /dev/null +++ b/examples/graphical.trig @@ -0,0 +1,68 @@ +@prefix : . +@prefix css: . +@prefix graphic: . +@prefix document: . +@prefix symbol: . + +# This example is based on the examples in + +document:doc1234 a :PID ; + :visualisedAs graphic:doc1234 . + +document:PressureVessel-1 :visualisedAs graphic:PressureVessel-1 . +document:GateValve-5-node2-connector :visualisedAs graphic:GateValve-5-node2-connector . + + +graphic:doc1234 a :Diagram ; + :hasExtent [ + a :Extent ; + :minimumExtent [ :x 100 ; :y 100 ] ; + :maximumExtent [ :x 200 ; :y 200 ] + ] ; + :hasSymbol graphic:PressureVessel-1 ; + :hasLine graphic:GateValve-5-node2-connector . + + +graphic:PressureVessel-1 a :Symbol ; + :hasPosition [ + a :Position ; + :x 390 ; + :y 210 ; + :rotation 0 + ]; + :hasGraphics symbol:PT002A . + +graphic:GateValve-5-node2-connector a :Line ; + :hasCoordinates ( + [ + a :Position ; + :x 646 ; + :y 188 + ] + [ + a :Position ; + :x 646 ; + :y 180 + ] + [ + a :Position ; + :x 412 ; + :y 180 + ] + ); + :hasStyle [ + :hasStroke [ + a :Stroke ; + :dasharray "none"^^xsd:css ; + :width 1.4 ; + :color [ + a :Color ; + :type :rgb ; + :red 255 ; + :green 255 ; + :blue 255 + ] ; + :color "rgb(255,255,255)"^^css:funcdef-rgb + ] + ] ; + :hasStyle "stroke-dasharray:none; stroke:rgb(255,255,255); stroke-width:1.4"^^css:style .