Skip to content
Snippets Groups Projects
Commit 416ff486 authored by Alberto Nidasio's avatar Alberto Nidasio Committed by Federico Lolli
Browse files

Added most of the PID symbols

parent 664441f6
Branches
No related tags found
1 merge request!15Integrated P&ID Editor and Configurable Pane
Showing
with 423 additions and 237 deletions
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="4"
height="4"
version="1.1"
id="svg1"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs1" />
<path
id="path1"
d="M 0.7,2 l 2.6,-1.5 v 3 z"
style="fill:#000000;stroke:#000000;stroke-opacity:1;stroke-width:0.2;stroke-dasharray:none;stroke-linejoin:round;fill-opacity:1" />
<path
id="path2"
d="M 0,2 h 4"
style="stroke:#000000;stroke-opacity:1;fill:none;stroke-width:0.2;stroke-dasharray:none" />
</svg>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="4"
height="6"
version="1.1"
id="svg1"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs1" />
<path
style="fill:none;stroke:#000000;stroke-width:0.2;stroke-linejoin:round"
d="M 0.5,0 V 6"
id="path1" />
<path
style="fill:none;stroke:#000000;stroke-width:0.2;stroke-linejoin:round"
d="m 1.5,0 v 1 a 2,2 0 1 1 0,4 v 1"
id="path2" />
<path
style="fill:none;stroke:#000000;stroke-width:0.2;stroke-linejoin:round"
d="m 0,3 h 0.5"
id="path3" />
<path
style="fill:none;stroke:#000000;stroke-width:0.2;stroke-linejoin:round"
d="m 3.5,3 h 0.5"
id="path4" />
</svg>
...@@ -4,60 +4,13 @@ ...@@ -4,60 +4,13 @@
height="5" height="5"
version="1.1" version="1.1"
id="svg1" id="svg1"
sodipodi:docname="2_check_valve.svg"
inkscape:version="1.4 (e7c3feb100, 2024-10-09)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"> xmlns:svg="http://www.w3.org/2000/svg">
<defs <defs
id="defs1"> id="defs1" />
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 0 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="10 : 0 : 1"
inkscape:persp3d-origin="5 : -1.6666667 : 1"
id="perspective3" />
</defs>
<sodipodi:namedview
id="namedview1"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="true"
inkscape:deskcolor="#d1d1d1"
inkscape:zoom="64"
inkscape:cx="3.7109375"
inkscape:cy="5.2421875"
inkscape:window-width="1996"
inkscape:window-height="1371"
inkscape:window-x="20"
inkscape:window-y="20"
inkscape:window-maximized="0"
inkscape:current-layer="svg1"
showgrid="true">
<inkscape:grid
id="grid3"
units="px"
originx="0"
originy="0"
spacingx="0.1"
spacingy="0.1"
empcolor="#0099e5"
empopacity="0.30196078"
color="#0099e5"
opacity="0.14901961"
empspacing="5"
enabled="true"
visible="true" />
</sodipodi:namedview>
<circle <circle
style="fill:#000000;stroke:none" style="fill:#000000;stroke:none"
id="path2" id="path2"
inkscape:label="path4"
cx="1" cx="1"
cy="4.5" cy="4.5"
r="0.5" /> r="0.5" />
...@@ -66,22 +19,17 @@ ...@@ -66,22 +19,17 @@
stroke="#000000" stroke="#000000"
d="m 9,2.5 h 1 z" d="m 9,2.5 h 1 z"
id="path1-5-2" id="path1-5-2"
style="stroke-width:0.2;stroke-dasharray:none" style="stroke-width:0.2;stroke-dasharray:none" />
sodipodi:nodetypes="ccccc"
inkscape:label="path3" />
<path <path
fill="none" fill="none"
stroke="#000000" stroke="#000000"
d="M 0,2.5 H 1 Z" d="M 0,2.5 H 1 Z"
id="path1-5" id="path1-5"
style="stroke-width:0.2;stroke-dasharray:none" style="stroke-width:0.2;stroke-dasharray:none" />
sodipodi:nodetypes="ccccc"
inkscape:label="path2" />
<path <path
fill="none" fill="none"
stroke="#000000" stroke="#000000"
d="m 1,0.5 v 4 l 8,-4 v 4" d="m 1,0.5 v 4 l 8,-4 v 4"
id="path1" id="path1"
style="stroke-width:0.2;stroke-dasharray:none" style="stroke-width:0.2;stroke-dasharray:none;stroke-linejoin:round" />
sodipodi:nodetypes="cccc" />
</svg> </svg>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="10"
height="10"
version="1.1"
id="svg1"
sodipodi:docname="0_empty.svg"
inkscape:version="1.4 (e7c3feb100, 2024-10-09)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs1" />
<sodipodi:namedview
id="namedview1"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="true"
inkscape:deskcolor="#d1d1d1"
inkscape:zoom="93.176471"
inkscape:cx="4.3787879"
inkscape:cy="3.2143308"
inkscape:window-width="1996"
inkscape:window-height="1371"
inkscape:window-x="20"
inkscape:window-y="20"
inkscape:window-maximized="0"
inkscape:current-layer="svg1"
showgrid="true">
<inkscape:grid
id="grid3"
units="px"
originx="0"
originy="0"
spacingx="0.1"
spacingy="0.1"
empcolor="#0099e5"
empopacity="0.30196078"
color="#0099e5"
opacity="0.14901961"
empspacing="5"
enabled="true"
visible="true" />
</sodipodi:namedview>
</svg>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="10"
height="6"
version="1.1"
id="svg1"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs1" />
<path
id="path1"
d="M 0,3 H 1"
style="fill:none;stroke:#000000;stroke-width:0.2;stroke-dasharray:none;stroke-opacity:1" />
<path
id="path2"
d="m 9,3 h 1"
style="fill:none;stroke:#000000;stroke-width:0.2;stroke-dasharray:none;stroke-opacity:1" />
<path
id="path3"
d="M 1,0 V 6 M 2,6 V 0"
style="fill:none;stroke:#000000;stroke-width:0.2;stroke-dasharray:none;stroke-opacity:1" />
<path
id="path4"
d="M 8,0 V 6 M 9,0 v 6"
style="fill:none;stroke:#000000;stroke-width:0.2;stroke-dasharray:none;stroke-opacity:1" />
<path
id="path5"
d="M 2,3 H 3 A 2,2 0 1 1 7,3 H 8"
style="fill:none;stroke:#000000;stroke-width:0.2;stroke-dasharray:none;stroke-opacity:1" />
</svg>
...@@ -4,77 +4,26 @@ ...@@ -4,77 +4,26 @@
height="5" height="5"
version="1.1" version="1.1"
id="svg1" id="svg1"
sodipodi:docname="1_manual_valve.svg"
inkscape:version="1.4 (e7c3feb100, 2024-10-09)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"> xmlns:svg="http://www.w3.org/2000/svg">
<defs <defs
id="defs1"> id="defs1" />
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 0 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="10 : 0 : 1"
inkscape:persp3d-origin="5 : -1.6666667 : 1"
id="perspective3" />
</defs>
<sodipodi:namedview
id="namedview1"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="true"
inkscape:deskcolor="#d1d1d1"
inkscape:zoom="64"
inkscape:cx="3.7109375"
inkscape:cy="5.2421875"
inkscape:window-width="1996"
inkscape:window-height="1371"
inkscape:window-x="20"
inkscape:window-y="20"
inkscape:window-maximized="0"
inkscape:current-layer="svg1"
showgrid="true">
<inkscape:grid
id="grid3"
units="px"
originx="0"
originy="0"
spacingx="0.1"
spacingy="0.1"
empcolor="#0099e5"
empopacity="0.30196078"
color="#0099e5"
opacity="0.14901961"
empspacing="5"
enabled="true"
visible="true" />
</sodipodi:namedview>
<path <path
fill="none" fill="none"
stroke="#000000" stroke="#000000"
d="m 9,2.5 h 1 z" d="M 0,2.5 H 1"
id="path1-5-2" id="path2"
style="stroke-width:0.2;stroke-dasharray:none" style="stroke-width:0.2" />
sodipodi:nodetypes="ccccc"
inkscape:label="path3" />
<path <path
fill="none" fill="none"
stroke="#000000" stroke="#000000"
d="M 0,2.5 H 1 Z" d="m 9,2.5 h 1"
id="path1-5" id="path3"
style="stroke-width:0.2;stroke-dasharray:none" style="stroke-width:0.2" />
sodipodi:nodetypes="ccccc"
inkscape:label="path2" />
<path <path
fill="none" fill="none"
stroke="#000000" stroke="#000000"
d="m 1,0.5 v 4 l 8,-4 v 4 z" d="m 1,0.5 v 4 l 8,-4 v 4 z"
id="path1" id="path1"
style="stroke-width:0.2;stroke-dasharray:none" style="stroke-width:0.2;stroke-linejoin:round" />
sodipodi:nodetypes="cccc" />
</svg> </svg>
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg <svg
width="10" width="10"
height="7.5" height="8"
version="1.1" version="1.1"
id="svg1" id="svg1"
sodipodi:docname="5_motor_valve.svg"
inkscape:version="1.4 (e7c3feb100, 2024-10-09)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"> xmlns:svg="http://www.w3.org/2000/svg">
<defs <defs
id="defs1" /> id="defs1" />
<sodipodi:namedview
id="namedview1"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="false"
inkscape:deskcolor="#d1d1d1"
inkscape:zoom="90.509668"
inkscape:cx="4.3752232"
inkscape:cy="2.4362038"
inkscape:window-width="1996"
inkscape:window-height="1371"
inkscape:window-x="20"
inkscape:window-y="20"
inkscape:window-maximized="0"
inkscape:current-layer="svg1"
showgrid="true">
<inkscape:grid
id="grid3"
units="px"
originx="0"
originy="0"
spacingx="0.1"
spacingy="0.1"
empcolor="#0099e5"
empopacity="0.30196078"
color="#0099e5"
opacity="0.14901961"
empspacing="5"
enabled="true"
visible="true" />
</sodipodi:namedview>
<path <path
fill="none" fill="none"
stroke="#000000" stroke="#000000"
d="M 1,3 V 7 L 9,3 v 4 z" d="M 1,3 V 7 L 9,3 v 4 z"
id="path1" id="path1"
style="stroke-width:0.225" style="stroke-width:0.2;stroke-linejoin:round" />
sodipodi:nodetypes="ccccc" />
<path <path
fill="none" fill="none"
stroke="#000000" stroke="#000000"
d="M 0,5 H 1 Z" d="M 0,5 H 1"
id="path2" id="path2"
style="stroke-width:0.225" style="stroke-width:0.2" />
sodipodi:nodetypes="ccccc" />
<path <path
fill="none" fill="none"
stroke="#000000" stroke="#000000"
d="M 5,2.5 L 5,5 Z" d="M 5,2.5 V 5"
id="path3" id="path3"
style="stroke-width:0.225" style="stroke-width:0.2" />
sodipodi:nodetypes="ccccc" />
<path <path
fill="none" fill="none"
stroke="#000000" stroke="#000000"
d="m 9,5 h 1 z" d="m 9,5 h 1"
id="path4" id="path4"
style="stroke-width:0.225" style="stroke-width:0.2" />
sodipodi:nodetypes="ccccc" />
<circle <circle
style="fill:none;stroke:#000000;stroke-width:0.2;stroke-opacity:1" style="fill:none;stroke:#000000;stroke-width:0.2"
id="circle1" id="circle1"
cx="5" cx="5"
cy="1.5" cy="1.5"
r="1" /> r="1" />
<path <path
style="font-size:1.33333px;-inkscape-font-specification:'sans-serif, Normal';fill:#000000;stroke:none;stroke-width:0.2;fill-opacity:1" style="fill:#000000;stroke:#000000;stroke-opacity:1;stroke-width:0.05;stroke-dasharray:none;stroke-linejoin:round"
d="M 4.9446681,1.9759989 4.6313347,1.1413322 h -0.00533 q 0.00267,0.026667 0.004,0.068 0.00267,0.041333 0.004,0.090667 0.00133,0.048 0.00133,0.098667 V 1.9759989 H 4.5246681 v -0.952 h 0.1773333 l 0.2933333,0.78 h 0.00533 l 0.2986666,-0.78 h 0.1760001 v 0.952 H 5.3566681 V 1.3906655 q 0,-0.046667 0.00133,-0.092 0.00133,-0.046667 0.004,-0.086667 0.00267,-0.041333 0.004,-0.069333 h -0.00533 L 5.0433347,1.9759989 Z" d="M 4.5,2 L 4.5,1 L 4.7,1 L 5,1.9 L 5.3,1 L 5.5,1 L 5.5,2 L 5.4,2 L 5.4,1.1 L 5.1,2 L 4.9,2 L 4.6,1.1 L 4.6,2 Z"
id="text1" id="text1" />
inkscape:transform-center-x="0.034572172"
inkscape:transform-center-y="-0.11235956"
aria-label="M" />
</svg> </svg>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="7"
height="7"
version="1.1"
id="svg1"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs1" />
<path
id="path1"
d="m 3.5,6.5 v 0.5"
style="fill:none;stroke:#000000;stroke-width:0.2;stroke-dasharray:none;stroke-opacity:1" />
<path
id="path2"
d="M 1.73,5.43 2.43,4.56 M 1,3.5 H 2 M 1.73,1.73 2.43,2.43 M 3.5,1 V 2 M 5.27,1.73 4.56,2.43 M 6,3.5 H 5 M 5.27,5.27 4.56,4.56"
style="fill:none;stroke:#000000;stroke-width:0.2;stroke-dasharray:none;stroke-opacity:1" />
<circle
style="fill:none;stroke:#000000;stroke-width:0.2;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
id="circle1"
cx="3.5"
cy="3.5"
r="3" />
<path
style="fill:none;stroke:#000000;stroke-width:0.2;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
d="M 2.7,6.3 3.5,3.5 4.3,6.3"
id="path3" />
</svg>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="10"
height="10"
version="1.1"
id="svg1"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs1" />
<path
fill="none"
stroke="#000000"
d="M 0,7 H 1"
id="path2"
style="stroke-width:0.2" />
<path
fill="none"
stroke="#000000"
d="m 9,7 h 1"
id="path3"
style="stroke-width:0.2" />
<path
fill="none"
stroke="#000000"
d="M 1,5 V 9 L 9,5 v 4 z"
id="path1"
style="stroke-width:0.2;stroke-linejoin:round" />
<path
style="fill:none;stroke:#000000;stroke-width:0.2;stroke-linejoin:round"
d="M 5,7 V 4"
id="path4" />
<path
style="fill:none;stroke:#000000;stroke-width:0.2;stroke-linejoin:round"
d="M 5,7 8,4 V 1 H 5 v 1"
id="path5" />
<path
style="fill:none;stroke:#000000;stroke-width:0.2;stroke-linejoin:round"
id="path6"
d="M 3,4 A 2,2 0 0 1 5,2 2,2 0 0 1 7,4 H 5 Z" />
</svg>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="7"
height="7"
version="1.1"
id="svg1"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs1" />
<path
id="path1"
d="M 3.5,6.5 V 7"
style="fill:none;stroke:#000000;stroke-width:0.2;stroke-dasharray:none;stroke-opacity:1" />
<path
id="path3"
d="M 2,4.2 V 1.5 H 2.5 A 0.75,0.75 0 1 1 2.5,3 H 2 M 4,4 H 5 M 4.5,4 V 1.5 M 4,1.5 h 1"
style="fill:none;stroke:#000000;stroke-width:0.4;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1" />
<path
id="path2"
d="M 0.7,4.5 H 6.3"
style="fill:none;stroke:#000000;stroke-width:0.2;stroke-dasharray:none;stroke-opacity:1" />
<circle
style="fill:none;stroke:#000000;stroke-width:0.2;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
id="circle1"
cx="3.5"
cy="3.5"
r="3" />
</svg>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="6"
height="5"
version="1.1"
id="svg1"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs1" />
<path
style="fill:none;stroke:#000000;stroke-width:0.2;stroke-linejoin:round"
d="m 1,0.5 v 4 h 4 v -4 z"
id="path1" />
<path
style="fill:none;stroke:#000000;stroke-width:0.2;stroke-linejoin:round"
d="M 0,2.5 H 1"
id="path3" />
<path
style="fill:none;stroke:#000000;stroke-width:0.2;stroke-linejoin:round"
d="M 5,2.5 H 6"
id="path4" />
<path
style="fill:none;stroke:#000000;stroke-width:0.4;stroke-linejoin:round;stroke-dasharray:none"
d="M 3,0 V 5"
id="path5" />
</svg>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="6"
height="10"
version="1.1"
id="svg1"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs1" />
<path
d="M 3,6 1.5,8.6 h 3 z"
stroke-width="0,1"
id="path1"
style="fill:none;stroke:#000000;stroke-width:0.2;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1" />
<path
style="fill:none;stroke:#000000;stroke-width:0.2;stroke-dasharray:none;stroke-opacity:1"
d="M 3,8.6 V 10"
id="path2" />
<path
style="fill:none;stroke:#000000;stroke-width:0.4;stroke-dasharray:none;stroke-opacity:1"
d="M 4.8,4.4 V 7.6"
id="path3" />
<path
d="M 3,6 V 5 L 2,4.5 4,3.5 2,2.5 4,1.5 3,1 V 0"
stroke-width="1.13386"
style="fill:none;stroke:#000000;stroke-width:0.2;stroke-linecap:butt;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
id="path4" />
<path
d="m 3,6 2.6,1.5 v -3 z"
stroke-width="0,1"
id="path5"
style="fill:none;stroke:#000000;stroke-width:0.2;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1" />
<circle
cx="3"
cy="6"
fill="#000000"
id="circle1"
r="0.5" />
</svg>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="10"
height="8"
version="1.1"
id="svg1"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs1" />
<path
fill="none"
stroke="#000000"
d="M 0,3 H 1"
id="path2"
style="stroke-width:0.2" />
<path
fill="none"
stroke="#000000"
d="m 9,3 h 1"
id="path3"
style="stroke-width:0.2" />
<path
fill="none"
stroke="#000000"
d="M 1,1 V 5 L 9,1 v 4 z"
id="path1"
style="stroke-width:0.2;stroke-linejoin:round" />
<path
style="fill:none;stroke:#000000;stroke-width:0.2;stroke-linejoin:round;stroke-dasharray:none"
d="M 5,3 7,7 H 3 Z"
id="path4" />
<path
style="fill:none;stroke:#000000;stroke-width:0.2;stroke-linejoin:round;stroke-dasharray:none"
d="M 5,7 v 1"
id="path5" />
</svg>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="8.1999998"
height="15.2"
version="1.1"
id="svg1"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs1" />
<path
id="path1"
d="" />
<path
style="fill:none;stroke:#000000;stroke-width:0.2;stroke-linejoin:round"
d="m 0.1,13.6 a 4,1.5 0 0 0 8,0 v -12 a 4,1.5 0 0 0 -8,0 z"
id="path2" />
</svg>
...@@ -5,23 +5,36 @@ use strum_macros::{Display, EnumIter}; ...@@ -5,23 +5,36 @@ use strum_macros::{Display, EnumIter};
#[derive(Clone, Serialize, Deserialize, PartialEq, EnumIter, Display, Debug)] #[derive(Clone, Serialize, Deserialize, PartialEq, EnumIter, Display, Debug)]
pub enum Symbol { pub enum Symbol {
ManualValve, Arrow,
BurstDisk,
CheckValve, CheckValve,
// ReliefValve, FlexibleConnection,
ManualValve,
MotorValve, MotorValve,
// ThreeWayValve, PressureGauge,
// PressureRegulator, PressureRegulator,
// BurstDisk, PressureTransducer,
// QuickConnector, QuickConnector,
// PressureTransducer, ReliefValve,
// PressureGauge, ThreeWayValve,
// FlexibleConnection, Vessel,
// PressurizedVessel,
} }
impl Symbol { impl Symbol {
pub fn get_image(&self, theme: Theme) -> ImageSource { pub fn get_image(&self, theme: Theme) -> ImageSource {
match (&self, theme) { match (&self, theme) {
(Symbol::Arrow, Theme::Light) => {
egui::include_image!("../../../../icons/pid_symbols/light/arrow.svg")
}
(Symbol::Arrow, Theme::Dark) => {
egui::include_image!("../../../../icons/pid_symbols/light/arrow.svg")
}
(Symbol::BurstDisk, Theme::Light) => {
egui::include_image!("../../../../icons/pid_symbols/light/burst_disk.svg")
}
(Symbol::BurstDisk, Theme::Dark) => {
egui::include_image!("../../../../icons/pid_symbols/light/burst_disk.svg")
}
(Symbol::ManualValve, Theme::Light) => { (Symbol::ManualValve, Theme::Light) => {
egui::include_image!("../../../../icons/pid_symbols/light/manual_valve.svg") egui::include_image!("../../../../icons/pid_symbols/light/manual_valve.svg")
} }
...@@ -34,30 +47,102 @@ impl Symbol { ...@@ -34,30 +47,102 @@ impl Symbol {
(Symbol::CheckValve, Theme::Dark) => { (Symbol::CheckValve, Theme::Dark) => {
egui::include_image!("../../../../icons/pid_symbols/light/check_valve.svg") egui::include_image!("../../../../icons/pid_symbols/light/check_valve.svg")
} }
(Symbol::ReliefValve, Theme::Light) => {
egui::include_image!("../../../../icons/pid_symbols/light/relief_valve.svg")
}
(Symbol::ReliefValve, Theme::Dark) => {
egui::include_image!("../../../../icons/pid_symbols/light/relief_valve.svg")
}
(Symbol::MotorValve, Theme::Light) => { (Symbol::MotorValve, Theme::Light) => {
egui::include_image!("../../../../icons/pid_symbols/light/motor_valve.svg") egui::include_image!("../../../../icons/pid_symbols/light/motor_valve.svg")
} }
(Symbol::MotorValve, Theme::Dark) => { (Symbol::MotorValve, Theme::Dark) => {
egui::include_image!("../../../../icons/pid_symbols/light/motor_valve.svg") egui::include_image!("../../../../icons/pid_symbols/light/motor_valve.svg")
} }
(Symbol::ThreeWayValve, Theme::Light) => {
egui::include_image!("../../../../icons/pid_symbols/light/three_way_valve.svg")
}
(Symbol::ThreeWayValve, Theme::Dark) => {
egui::include_image!("../../../../icons/pid_symbols/light/three_way_valve.svg")
}
(Symbol::PressureRegulator, Theme::Light) => {
egui::include_image!("../../../../icons/pid_symbols/light/pressure_regulator.svg")
}
(Symbol::PressureRegulator, Theme::Dark) => {
egui::include_image!("../../../../icons/pid_symbols/light/pressure_regulator.svg")
}
(Symbol::QuickConnector, Theme::Light) => {
egui::include_image!("../../../../icons/pid_symbols/light/quick_connector.svg")
}
(Symbol::QuickConnector, Theme::Dark) => {
egui::include_image!("../../../../icons/pid_symbols/light/quick_connector.svg")
}
(Symbol::PressureTransducer, Theme::Light) => {
egui::include_image!("../../../../icons/pid_symbols/light/pressure_transducer.svg")
}
(Symbol::PressureTransducer, Theme::Dark) => {
egui::include_image!("../../../../icons/pid_symbols/light/pressure_transducer.svg")
}
(Symbol::PressureGauge, Theme::Light) => {
egui::include_image!("../../../../icons/pid_symbols/light/pressure_gauge.svg")
}
(Symbol::PressureGauge, Theme::Dark) => {
egui::include_image!("../../../../icons/pid_symbols/light/pressure_gauge.svg")
}
(Symbol::FlexibleConnection, Theme::Light) => {
egui::include_image!("../../../../icons/pid_symbols/light/flexible_connection.svg")
}
(Symbol::FlexibleConnection, Theme::Dark) => {
egui::include_image!("../../../../icons/pid_symbols/light/flexible_connection.svg")
}
(Symbol::Vessel, Theme::Light) => {
egui::include_image!("../../../../icons/pid_symbols/light/vessel.svg")
}
(Symbol::Vessel, Theme::Dark) => {
egui::include_image!("../../../../icons/pid_symbols/light/vessel.svg")
}
} }
} }
/// Symbol size in grid coordinates /// Symbol size in grid coordinates
pub fn size(&self) -> Vec2 { pub fn size(&self) -> Vec2 {
match self { match self {
Symbol::ManualValve => Vec2::new(10.0, 5.0), Symbol::Arrow => (4.0, 4.0),
Symbol::CheckValve => Vec2::new(10.0, 5.0), Symbol::BurstDisk => (4.0, 6.0),
Symbol::MotorValve => Vec2::new(10.0, 7.5), Symbol::CheckValve => (10.0, 5.0),
Symbol::FlexibleConnection => (10.0, 6.0),
Symbol::ManualValve => (10.0, 5.0),
Symbol::MotorValve => (10.0, 8.0),
Symbol::PressureGauge => (7.0, 7.0),
Symbol::PressureRegulator => (10.0, 10.0),
Symbol::PressureTransducer => (7.0, 7.0),
Symbol::QuickConnector => (6.0, 5.0),
Symbol::ReliefValve => (6.0, 10.0),
Symbol::ThreeWayValve => (10.0, 8.0),
Symbol::Vessel => (8.2, 15.2),
} }
.into()
} }
/// Anchor point position relative to top right corner in grid units /// Anchor point position relative to top right corner in grid units
pub fn anchor_points(&self) -> Vec<Vec2> { pub fn anchor_points(&self) -> Vec<Vec2> {
match self { match self {
Symbol::ManualValve => [Vec2::new(0.0, 2.5), Vec2::new(10.0, 2.5)].into(), Symbol::Arrow => vec![(0.0, 2.0), (4.0, 2.0)],
Symbol::CheckValve => [Vec2::new(0.0, 2.5), Vec2::new(10.0, 2.5)].into(), Symbol::BurstDisk => vec![(0.0, 3.0), (4.0, 3.0)],
Symbol::MotorValve => [Vec2::new(0.0, 5.0), Vec2::new(10.0, 5.0)].into(), Symbol::CheckValve => vec![(0.0, 2.5), (10.0, 2.5)],
Symbol::FlexibleConnection => vec![(0.0, 3.0), (10.0, 3.0)],
Symbol::ManualValve => vec![(0.0, 2.5), (10.0, 2.5)],
Symbol::MotorValve => vec![(0.0, 5.0), (10.0, 5.0)],
Symbol::PressureGauge => vec![(0.0, 3.5), (7.0, 3.5)],
Symbol::PressureRegulator => vec![(0.0, 7.0), (10.0, 7.0)],
Symbol::PressureTransducer => vec![(0.0, 3.5), (7.0, 3.5)],
Symbol::QuickConnector => vec![(0.0, 2.5), (6.0, 2.5)],
Symbol::ReliefValve => vec![(3.0, 10.0)],
Symbol::ThreeWayValve => vec![(0.0, 3.0), (10.0, 3.0), (5.0, 8.0)],
Symbol::Vessel => vec![(0.0, 7.6), (8.2, 7.6), (4.1, 0.0), (4.1, 15.1)],
} }
.iter()
.map(|&p| p.into())
.collect()
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment