11within OpenHPL.Icons;
2+
23partial class Surge "Surge tank/shaft icon"
3- input SI.Length lds "Lenght of watercolumn in the surge shaft(for DynamicSelect)" ;
4- input SI.Length Lds "Length of the surge shaft (for DynamicSelect)" ;
5- annotation (
6- preferredView="icon" ,
7- Icon(coordinateSystem(preserveAspectRatio=false, grid={1,1}),
8- graphics={
9- Text(
10- textColor={28,108,200},
11- extent={{-150,-60},{150,-100}},
12- textString="%name" ,
13- textStyle={TextStyle.Bold}),
4+ input SI.Length h_ds "Height of watercolumn in the surge shaft (for DynamicSelect)" ;
5+ input SI.Length H_ds "Height of the surge shaft (for DynamicSelect)" ;
6+ input SI.Position h_abs_ds "Absolut height of watercolumn in the surge shaft (for DynamicSelect)" ;
7+ input Boolean show "Show additional level info" ;
8+
9+ annotation(
10+ preferredView = "icon" ,
11+ Icon(
12+ coordinateSystem(preserveAspectRatio = false, grid = {1, 1}),
13+ graphics = {
14+ Text(
15+ origin = {0, 10},
16+ textColor = {28, 108, 200},
17+ extent = {{-150, -60}, {150, -100}},
18+ textString = "%name" ,
19+ textStyle = {TextStyle.Bold}
20+ ),
1421 Rectangle(
15- extent={{-90,30},{90,-50}},
16- lineColor={0,0,0},
17- fillPattern=FillPattern.Solid,
18- fillColor={175,175,175}),
22+ origin = {0, 10},
23+ fillColor = {175, 175, 175},
24+ fillPattern = FillPattern.Solid,
25+ extent = {{-90, 30}, {90, -50}}
26+ ),
1927 Rectangle(
20- extent={{-90,20},{90,-40}},
21- lineColor={28,108,200},
22- fillColor={0,128,255},
23- fillPattern=FillPattern.Solid),
28+ origin = {0, 10},
29+ lineColor = {28, 108, 200},
30+ fillColor = {0, 128, 255},
31+ fillPattern = FillPattern.Solid,
32+ extent = {{-90, 20}, {90, -40}}
33+ ),
2434 Rectangle(
25- extent={{-40,90},{40,30}},
26- lineColor={0,0,0},
27- fillPattern=FillPattern.Solid,
28- fillColor={175,175,175},
29- pattern=LinePattern.None),
35+ origin = {0, 10},
36+ fillColor = {175, 175, 175},
37+ pattern = LinePattern.None,
38+ fillPattern = FillPattern.Solid,
39+ extent = {{-40, 90}, {40, 30}}
40+ ),
3041 Rectangle(
31- extent={{-30,90},{30,20}},
32- lineColor={0,0,0},
33- fillPattern=FillPattern.Solid,
34- fillColor={255,255,255},
35- pattern=LinePattern.None),
42+ origin = {0, 10},
43+ fillColor = {255, 255, 255},
44+ pattern = LinePattern.None,
45+ fillPattern = FillPattern.Solid,
46+ extent = {{-30, 90}, {30, 20}}
47+ ),
3648 Rectangle(
37- extent=DynamicSelect({{-30,60},{30,18} },
38- {{-30,(20+70*lds/Lds)},{30,18}}) ,
39- lineColor={28,108,200} ,
40- fillColor={0,128,255} ,
41- fillPattern=FillPattern.Solid,
42- pattern=LinePattern.None ),
49+ lineColor = {28, 108, 200 },
50+ fillColor = {0, 128, 255} ,
51+ pattern = LinePattern.None ,
52+ fillPattern = FillPattern.Solid ,
53+ extent = DynamicSelect({{-30, 60}, {30, 30}}, {{-30, 30 + 70*h_ds/H_ds}, {30, 30}})
54+ ),
4355 Rectangle(
44- extent={{-30,90},{30,80}},
45- lineColor={0,0,0},
46- pattern=LinePattern.None),
47- Line(points={{-40,30},{-40,90},{-30,90},{-30,20},{-90,20}}, color={0,0,0}),
48- Line(points={{-90,-41}}, color={0,0,0}),
49- Line(points={{-90,-40},{90,-40}}, color={0,0,0}),
50- Line(points={{40,30},{40,90},{30,90},{30,20},{90,20}}, color={0,0,0})}));
51- end Surge;
56+ origin = {0, 10},
57+ pattern = LinePattern.None,
58+ extent = {{-30, 90}, {30, 80}}
59+ ),
60+ Line(
61+ origin = {0, 10},
62+ points = {{-40, 30}, {-40, 90}, {-30, 90}, {-30, 20}, {-90, 20}}
63+ ),
64+ Line(
65+ origin = {0, 10},
66+ points = {{-90, -41}}
67+ ),
68+ Line(
69+ origin = {0, 10},
70+ points = {{-90, -40}, {90, -40}}
71+ ),
72+ Line(
73+ origin = {0, 10},
74+ points = {{40, 30}, {40, 90}, {30, 90}, {30, 20}, {90, 20}}
75+ ),
76+ Text(
77+ visible = show,
78+ textColor = {255, 255, 255},
79+ extent = {{-30, 50}, {30, 30}},
80+ textString = DynamicSelect("(level)" , "(" + String(h_abs_ds, ".1f" ) + ")" )
81+ )
82+ }
83+ )
84+ );
85+ end Surge;
0 commit comments