Skip to content

Commit f79c7fa

Browse files
authored
Merge pull request #2827 from beutlich/improve-block-icons
Improve block icons and diagrams of Math.{Add,Add3,Division} and ComplexMath.{Add,Add3,Division}
2 parents eb5c01b + b3cb5d5 commit f79c7fa

File tree

2 files changed

+51
-97
lines changed

2 files changed

+51
-97
lines changed

Modelica/Blocks/Math.mo

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -938,10 +938,10 @@ Example:
938938
preserveAspectRatio=true,
939939
extent={{-100,-100},{100,100}}), graphics={
940940
Line(points={{-100,60},{-74,24},{-44,24}}, color={0,0,127}),
941-
Line(points={{-100,-60},{-74,-28},{-42,-28}}, color={0,0,127}),
941+
Line(points={{-100,-60},{-74,-24},{-44,-24}}, color={0,0,127}),
942942
Ellipse(lineColor={0,0,127}, extent={{-50,-50},{50,50}}),
943943
Line(points={{50,0},{100,0}}, color={0,0,127}),
944-
Text(extent={{-38,-34},{38,34}}, textString="+"),
944+
Text(extent={{-40,40},{40,-40}}, textString="+"),
945945
Text(extent={{-100,52},{5,92}}, textString="%k1"),
946946
Text(extent={{-100,-92},{5,-52}}, textString="%k2")}),
947947
Diagram(coordinateSystem(preserveAspectRatio=true, extent={{-100,-100},{
@@ -951,10 +951,10 @@ Example:
951951
fillColor={255,255,255},
952952
fillPattern=FillPattern.Solid),Line(points={{50,0},{100,0}},
953953
color={0,0,255}),Line(points={{-100,60},{-74,24},{-44,24}}, color={
954-
0,0,127}),Line(points={{-100,-60},{-74,-28},{-42,-28}}, color={0,0,127}),
954+
0,0,127}),Line(points={{-100,-60},{-74,-24},{-44,-24}}, color={0,0,127}),
955955
Ellipse(extent={{-50,50},{50,-50}}, lineColor={0,0,127}),Line(
956956
points={{50,0},{100,0}}, color={0,0,127}),Text(
957-
extent={{-36,38},{40,-30}},
957+
extent={{-40,40},{40,-40}},
958958
textString="+"),Text(
959959
extent={{-100,52},{5,92}},
960960
textString="k1"),Text(
@@ -1012,7 +1012,7 @@ Example:
10121012
extent={{-100,-50},{5,-90}},
10131013
textString="%k3"),
10141014
Text(
1015-
extent={{2,36},{100,-44}},
1015+
extent={{10,40},{90,-40}},
10161016
textString="+")}),
10171017
Diagram(coordinateSystem(preserveAspectRatio=true, extent={{-100,-100},{
10181018
100,100}}), graphics={Rectangle(
@@ -1026,7 +1026,7 @@ Example:
10261026
textString="k2"),Text(
10271027
extent={{-100,-50},{5,-90}},
10281028
textString="k3"),Text(
1029-
extent={{2,46},{100,-34}},
1029+
extent={{10,40},{90,-40}},
10301030
textString="+")}));
10311031
end Add3;
10321032

@@ -1089,15 +1089,17 @@ by <em>dividing</em> the two inputs <strong>u1</strong> and <strong>u2</strong>:
10891089
Icon(coordinateSystem(
10901090
preserveAspectRatio=true,
10911091
extent={{-100,-100},{100,100}}), graphics={
1092+
Line(points={{-100,60},{-60,60},{0,0}}, color={0,0,127}),
1093+
Line(points={{-100,-60},{-60,-60},{0,0}}, color={0,0,127}),
1094+
Ellipse(lineColor={0,0,127}, extent={{-50,-50},{50,50}},
1095+
fillColor={255,255,255},
1096+
fillPattern=FillPattern.Solid),
10921097
Line(points={{50,0},{100,0}}, color={0,0,127}),
10931098
Line(points={{-30,0},{30,0}}),
10941099
Ellipse(fillPattern=FillPattern.Solid, extent={{-5,20},{5,30}}),
10951100
Ellipse(fillPattern=FillPattern.Solid, extent={{-5,-30},{5,-20}}),
1096-
Ellipse(lineColor={0,0,127}, extent={{-50,-50},{50,50}}),
1097-
Line(points={{-100,60},{-66,60},{-40,30}}, color={0,0,127}),
1098-
Line(points={{-100,-60},{0,-60},{0,-50}}, color={0,0,127}),
10991101
Text(
1100-
extent={{-60,94},{90,54}},
1102+
extent={{-60,90},{90,50}},
11011103
lineColor={128,128,128},
11021104
textString="u1 / u2")}),
11031105
Diagram(coordinateSystem(preserveAspectRatio=true, extent={{-100,-100},{
@@ -1112,8 +1114,8 @@ by <em>dividing</em> the two inputs <strong>u1</strong> and <strong>u2</strong>:
11121114
fillPattern=FillPattern.Solid),Ellipse(
11131115
extent={{-5,-20},{5,-30}},
11141116
fillPattern=FillPattern.Solid),Ellipse(extent={{-50,50},{50,-50}},
1115-
lineColor={0,0,255}),Line(points={{-100,60},{-66,60},{-40,30}},
1116-
color={0,0,255}),Line(points={{-100,-60},{0,-60},{0,-50}}, color={0,
1117+
lineColor={0,0,255}),Line(points={{-100,60},{-40,60},{-30,40}},
1118+
color={0,0,255}),Line(points={{-100,-60},{-40,-60},{-30,-40}},color={0,
11171119
0,255})}));
11181120
end Division;
11191121

Modelica/ComplexBlocks.mo

Lines changed: 37 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -638,57 +638,28 @@ result in the following equation:
638638
639639
</html>"),
640640
Icon(coordinateSystem(preserveAspectRatio=true, extent={{-100,-100},{
641-
100,100}}), graphics={Text(
642-
extent={{-98,-52},{7,-92}},
643-
textString="%k2"),Text(
644-
extent={{-100,90},{5,50}},
645-
textString="%k1"), Line(points={{-100,60},{-40,60},{-30,40}},
646-
color={0,0,255}),Ellipse(extent={{-50,50},{50,-50}}, lineColor={0,
647-
0,255}),Line(points={{-100,-60},{-40,-60},{-30,-40}}, color={0,0,255}),
648-
Line(points={{-15,-25.99},{15,25.99}}),
649-
Rectangle(
650-
extent={{-100,-100},{100,100}},
651-
lineColor={0,0,127},
652-
fillColor={255,255,255},
653-
fillPattern=FillPattern.Solid),Line(points={{50,0},{100,0}},
654-
color={0,0,255}),Line(points={{-100,60},{-74,24},{-44,24}}, color=
655-
{0,0,127}),Line(points={{-100,-60},{-74,-28},{-42,-28}}, color={
656-
0,0,127}),Ellipse(extent={{-50,50},{50,-50}}, lineColor={0,0,127}),
657-
Line(points={{50,0},{100,0}}, color={0,0,127}),Text(
658-
extent={{-38,34},{38,-34}},
659-
textString="+"),Text(
660-
extent={{-100,52},{5,92}},
661-
textString="%k1"),Text(
662-
extent={{-100,-52},{5,-92}},
663-
textString="%k2")}),
641+
100,100}}), graphics={Text(extent={{-98,-52},{5,-92}},
642+
textString="%k2"), Text(extent={{-98,92},{5,52}}, textString="%k1"),
643+
Line(points={{50,0},{100,0}},color={0,0,255}),
644+
Line(points={{-100,60},{-74,24},{-44,24}},color={0,0,127}),
645+
Line(points={{-100,-60},{-74,-24},{-44,-24}},color={0,0,127}),
646+
Ellipse(extent={{-50,50},{50,-50}}, lineColor={0,0,127}),
647+
Line(points={{50,0},{100,0}}, color={0,0,127}),
648+
Text(extent={{-40,40},{40,-40}},textString="+")}),
664649
Diagram(coordinateSystem(preserveAspectRatio=true, extent={{-100,-100},
665650
{100,100}}), graphics={Rectangle(
666651
extent={{-100,-100},{100,100}},
667652
lineColor={0,0,255},
668653
fillColor={255,255,255},
669-
fillPattern=FillPattern.Solid),Text(
670-
extent={{-98,-52},{7,-92}},
671-
textString="%k2"),Text(
672-
extent={{-100,90},{5,50}},
673-
textString="%k1"),Line(points={{-100,60},{-40,60},{-30,40}},
674-
color={0,0,255}),Ellipse(extent={{-50,50},{50,-50}}, lineColor={0,
675-
0,255}),Line(points={{-100,-60},{-40,-60},{-30,-40}}, color={0,0,255}),
676-
Line(points={{-15,-25.99},{15,25.99}}),
677-
Rectangle(
678-
extent={{-100,-100},{100,100}},
679-
lineColor={0,0,127},
680-
fillColor={255,255,255},
681-
fillPattern=FillPattern.Solid),Line(points={{50,0},{100,0}},
682-
color={0,0,255}),Line(points={{-100,60},{-74,24},{-44,24}}, color=
683-
{0,0,127}),Line(points={{-100,-60},{-74,-28},{-42,-28}}, color={
684-
0,0,127}),Ellipse(extent={{-50,50},{50,-50}}, lineColor={0,0,127}),
685-
Line(points={{50,0},{100,0}}, color={0,0,127}),Text(
686-
extent={{-38,34},{38,-34}},
687-
textString="+"),Text(
688-
extent={{-100,52},{5,92}},
689-
textString="k1"),Text(
690-
extent={{-100,-52},{5,-92}},
691-
textString="k2")}));
654+
fillPattern=FillPattern.Solid),
655+
Ellipse(extent={{-50,50},{50,-50}}, lineColor={0,0,255}),
656+
Line(points={{50,0},{100,0}},color={0,0,255}),
657+
Line(points={{-100,60},{-74,24},{-44,24}},color={0,0,255}),
658+
Line(points={{-100,-60},{-74,-24},{-44,-24}}, color={0,0,255}),
659+
Line(points={{50,0},{100,0}},color={0,0,255}),
660+
Text(extent={{-40,40},{40,-40}},textString="+"),
661+
Text(extent={{-100,52},{5,92}}, textString="k1"),
662+
Text(extent={{-100,-52},{5,-92}}, textString="k2")}));
692663
end Add;
693664

694665
block Add3 "Output the sum of the three inputs"
@@ -750,41 +721,20 @@ three input signals <code>u1</code>, <code>u2</code> and <code>u3</code>. Option
750721
751722
</html>"),
752723
Icon(coordinateSystem(preserveAspectRatio=true, extent={{-100,-100},{
753-
100,100}}), graphics={Text(
754-
extent={{-100,50},{5,90}},
755-
textString="%k1"),Text(
756-
extent={{-100,-20},{5,20}},
757-
textString="%k2"),Text(
758-
extent={{-100,-50},{5,-90}},
759-
textString="%k3"),Text(
760-
extent={{2,36},{100,-44}},
761-
textString="+")}),
724+
100,100}}), graphics={Text(extent={{-98,50},{5,90}}, textString="%k1"),
725+
Text(extent={{-98,-20},{5,20}}, textString="%k2"),
726+
Text(extent={{-98,-50},{5,-90}}, textString="%k3"),
727+
Text(extent={{10,40},{90,-40}}, textString="+")}),
762728
Diagram(coordinateSystem(preserveAspectRatio=true, extent={{-100,-100},
763729
{100,100}}), graphics={Rectangle(
764730
extent={{-100,-100},{100,100}},
765731
lineColor={0,0,255},
766732
fillColor={255,255,255},
767-
fillPattern=FillPattern.Solid),Text(
768-
extent={{-100,50},{5,90}},
769-
textString="%k1"),Text(
770-
extent={{-100,-20},{5,20}},
771-
textString="%k2"),Text(
772-
extent={{-100,-50},{5,-90}},
773-
textString="%k3"),Text(
774-
extent={{2,36},{100,-44}},
775-
textString="+"),Rectangle(
776-
extent={{-100,-100},{100,100}},
777-
lineColor={0,0,255},
778-
fillColor={255,255,255},
779-
fillPattern=FillPattern.Solid),Text(
780-
extent={{-100,50},{5,90}},
781-
textString="k1"),Text(
782-
extent={{-100,-20},{5,20}},
783-
textString="k2"),Text(
784-
extent={{-100,-50},{5,-90}},
785-
textString="k3"),Text(
786-
extent={{2,36},{100,-44}},
787-
textString="+")}));
733+
fillPattern=FillPattern.Solid),
734+
Text(extent={{10,40},{90,-40}}, textString="+"),
735+
Text(extent={{-100,50},{5,90}}, textString="k1"),
736+
Text(extent={{-100,-20},{5,20}}, textString="k2"),
737+
Text(extent={{-100,-50},{5,-90}}, textString="k3")}));
788738
end Add3;
789739

790740
block Product "Output product of the two inputs"
@@ -852,18 +802,20 @@ the two inputs <code>u1</code> and <code>u2</code>. Optionally, either input <co
852802
853803
</html>"),
854804
Icon(coordinateSystem(preserveAspectRatio=true, extent={{-100,-100},{
855-
100,100}}), graphics={Line(points={{50,0},{100,0}}, color={0,0,127}),
805+
100,100}}), graphics={
806+
Line(points={{-100,60},{-60,60},{0,0}}, color={0,0,127}),
807+
Line(points={{-100,-60},{-60,-60},{0,0}}, color={0,0,127}),
808+
Ellipse(extent={{-50,50},{50,-50}}, lineColor={0,0,127},
809+
fillColor={255,255,255},
810+
fillPattern=FillPattern.Solid),
811+
Line(points={{50,0},{100,0}}, color={0,0,127}),
856812
Line(points={{-30,0},{30,0}}),Ellipse(
857813
extent={{-5,20},{5,30}},
858814
fillPattern=FillPattern.Solid),Ellipse(
859815
extent={{-5,-20},{5,-30}},
860-
fillPattern=FillPattern.Solid),Ellipse(extent={{-50,50},{50,-50}},
861-
lineColor={0,0,127}),
862-
Line(points={{-100,60},{-66,60},{-40,30}},
863-
color={0,0,127}),Line(points={{-100,-60},{0,-60},{0,-50}}, color=
864-
{0,0,127}),
816+
fillPattern=FillPattern.Solid),
865817
Text(
866-
extent={{-60,94},{90,54}},
818+
extent={{-60,90},{90,50}},
867819
lineColor={128,128,128},
868820
textString="u1 / u2")}),
869821
Diagram(coordinateSystem(preserveAspectRatio=true, extent={{-100,-100},
@@ -878,8 +830,8 @@ the two inputs <code>u1</code> and <code>u2</code>. Optionally, either input <co
878830
fillPattern=FillPattern.Solid),Ellipse(
879831
extent={{-5,-20},{5,-30}},
880832
fillPattern=FillPattern.Solid),Ellipse(extent={{-50,50},{50,-50}},
881-
lineColor={0,0,255}),Line(points={{-100,60},{-66,60},{-40,30}},
882-
color={0,0,255}),Line(points={{-100,-60},{0,-60},{0,-50}}, color=
833+
lineColor={0,0,255}),Line(points={{-100,60},{-40,60},{-30,40}},
834+
color={0,0,255}),Line(points={{-100,-60},{-40,-60},{-30,-40}},color=
883835
{0,0,255})}));
884836
end Division;
885837

0 commit comments

Comments
 (0)