From da02fff9ced641e4f07a207ec91f21ce57e03ac8 Mon Sep 17 00:00:00 2001 From: Malte Lenz Date: Fri, 10 Apr 2026 12:14:30 +0200 Subject: [PATCH 1/2] Fix some sloppy lines on Blocks icons. --- Modelica/Blocks/Math.mo | 12 +++++++----- Modelica/Blocks/Sources.mo | 22 +++++++++++----------- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/Modelica/Blocks/Math.mo b/Modelica/Blocks/Math.mo index 17a2d5d57b..9863430a2a 100644 --- a/Modelica/Blocks/Math.mo +++ b/Modelica/Blocks/Math.mo @@ -1670,7 +1670,7 @@ y = tanh( u ); annotation ( Icon(coordinateSystem(preserveAspectRatio=true, extent={{-100,-100},{100, 100}}), graphics={ - Line(points={{0,-80},{0,68}}, color={192,192,192}), + Line(points={{0,-80.3976},{0,68}}, color={192,192,192}), Polygon( points={{0,90},{-8,68},{8,68},{0,90}}, lineColor={192,192,192}, @@ -1682,7 +1682,8 @@ y = tanh( u ); textString="exp"), Line(points={{-80,-80},{-31,-77.9},{-6.03,-74},{10.9,-68.4},{23.7,-61}, {34.2,-51.6},{43,-40.3},{50.3,-27.8},{56.7,-13.5},{62.3,2.23},{ - 67.1,18.6},{72,38.2},{76,57.6},{80,80}}), + 67.1,18.6},{72,38.2},{76,57.6},{80,80}}, + smooth=Smooth.Bezier), Line( points={{-90,-80.3976},{68,-80.3976}}, color={192,192,192}, @@ -1718,7 +1719,7 @@ y = exp( u ); annotation ( Icon(coordinateSystem(preserveAspectRatio=true, extent={{-100,-100},{100, 100}}), graphics={ - Line(points={{0,-80},{0,68}}, color={192,192,192}), + Line(points={{0,-80.3976},{0,68}}, color={192,192,192}), Polygon( points={{0,90},{-8,68},{8,68},{0,90}}, lineColor={192,192,192}, @@ -1730,7 +1731,8 @@ y = exp( u ); textString="^"), Line(points={{-80,-80},{-31,-77.9},{-6.03,-74},{10.9,-68.4},{23.7,-61}, {34.2,-51.6},{43,-40.3},{50.3,-27.8},{56.7,-13.5},{62.3,2.23},{ - 67.1,18.6},{72,38.2},{76,57.6},{80,80}}), + 67.1,18.6},{72,38.2},{76,57.6},{80,80}}, + smooth=Smooth.Bezier), Line( points={{-90,-80.3976},{68,-80.3976}}, color={192,192,192}, @@ -1766,7 +1768,7 @@ y = base ^ u; y = u^exponent; annotation (Icon(coordinateSystem(preserveAspectRatio=true, extent={{-100,-100}, {100,100}}), graphics={ - Line(points={{0,-80},{0,68}}, color={192,192,192}), + Line(points={{0,-80.3976},{0,68}}, color={192,192,192}), Polygon( points={{0,90},{-8,68},{8,68},{0,90}}, lineColor={192,192,192}, diff --git a/Modelica/Blocks/Sources.mo b/Modelica/Blocks/Sources.mo index 8fbd5f270a..b9e98fb5ed 100644 --- a/Modelica/Blocks/Sources.mo +++ b/Modelica/Blocks/Sources.mo @@ -267,11 +267,11 @@ The Real output y is a step signal: lineColor={192,192,192}, fillColor={192,192,192}, fillPattern=FillPattern.Solid), - Line(points={{-80,-70},{-40,-70},{31,38}}), + Line(points={{-80,-70},{-40,-70},{31,38}, {86, 38}}), Text( extent={{-150,-150},{150,-110}}, - textString="duration=%duration"), - Line(points={{31,38},{86,38}})}), + textString="duration=%duration") + }), Documentation(info="

The Real output y is a ramp signal: @@ -377,12 +377,12 @@ The Real output y is a sine signal: Line(points={{-80,80},{-76.2,79.8},{-70.6,76.6},{-64.9,69.7},{-59.3, 59.4},{-52.9,44.1},{-44.83,21.2},{-27.9,-30.8},{-20.7,-50.2},{-14.3, -64.2},{-8.7,-73.1},{-3,-78.4},{2.6,-80},{8.2,-77.6},{13.9,-71.5}, - {19.5,-61.9},{25.9,-47.2},{34,-24.8},{42,0}}, smooth=Smooth.Bezier), + {19.5,-61.9},{25.9,-47.2},{34,-24.8},{42,0},{53.3,35.2},{60.5,54.1},{66.9,67.4},{72.6,75.6},{ + 78.2,80.1},{83.8,80.8}}, smooth=Smooth.Bezier), Text( extent={{-147,-152},{153,-112}}, - textString="f=%f"), - Line(points={{42,1},{53.3,35.2},{60.5,54.1},{66.9,67.4},{72.6,75.6},{ - 78.2,80.1},{83.8,80.8}})}), + textString="f=%f") + }), Documentation(info="

The Real output y is a cosine signal: @@ -1504,7 +1504,7 @@ a flange according to a given acceleration. fillColor={192,192,192}, fillPattern=FillPattern.Solid), Line(points={{-48,-50},{-48,70},{52,70},{52,-50},{-48,-50},{-48,-20}, - {52,-20},{52,10},{-48,10},{-48,40},{52,40},{52,70},{2,70},{2,-51}}), + {52,-20},{52,10},{-48,10},{-48,40},{52,40},{52,70},{2,70},{2,-50}}), Text( extent={{-150,-150},{150,-110}}, textString="offset=%offset")}), @@ -1947,7 +1947,7 @@ MATLAB is a registered trademark of The MathWorks, Inc. fillColor={255,215,136}, fillPattern=FillPattern.Solid, extent={{-48,-50},{2,70}}), - Line(points={{-48,-50},{-48,70},{52,70},{52,-50},{-48,-50},{-48,-20},{52,-20},{52,10},{-48,10},{-48,40},{52,40},{52,70},{2,70},{2,-51}}), + Line(points={{-48,-50},{-48,70},{52,70},{52,-50},{-48,-50},{-48,-20},{52,-20},{52,10},{-48,10},{-48,40},{52,40},{52,70},{2,70},{2,-50}}), Text(extent={{-150,-150},{150,-110}}, textString="tableOnFile=%tableOnFile")})); end CombiTimeTable; @@ -2157,7 +2157,7 @@ at sample times (defined by parameter period) and is otherwise fillColor={192,192,192}, fillPattern=FillPattern.Solid), Line(points={{-18,-50},{-18,70},{32, 70},{32,-50},{-18,-50},{-18,-20},{32,-20},{32,10},{-18,10},{-18, - 40},{32,40},{32,70},{32,70},{32,-51}})}), + 40},{32,40},{32,70},{32,70},{32,-50}})}), Documentation(info="

The Boolean output y is a signal defined by parameter vector table. @@ -2433,7 +2433,7 @@ The Integer output y is a step signal: fillColor={192,192,192}, fillPattern=FillPattern.Solid), Line(points={{-46,-52},{-46,68},{54,68},{54,-52},{-46,-52},{-46,-22}, - {54,-22},{54,8},{-46,8},{-46,38},{54,38},{54,68},{4,68},{4,-53}})}), + {54,-22},{54,8},{-46,8},{-46,38},{54,38},{54,68},{4,68},{4,-52}})}), Documentation(info="

From 2ac074b2850cd065133025c426307cba12f55223 Mon Sep 17 00:00:00 2001 From: Malte Lenz Date: Mon, 13 Apr 2026 15:49:26 +0200 Subject: [PATCH 2/2] Remove nonsensical Bezier on straight line, and reorder and clean up exact coordinates of lines. --- Modelica/Blocks/Math.mo | 33 +++++++++++++++------------------ 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/Modelica/Blocks/Math.mo b/Modelica/Blocks/Math.mo index 9863430a2a..c2c5d3fa36 100644 --- a/Modelica/Blocks/Math.mo +++ b/Modelica/Blocks/Math.mo @@ -1670,7 +1670,10 @@ y = tanh( u ); annotation ( Icon(coordinateSystem(preserveAspectRatio=true, extent={{-100,-100},{100, 100}}), graphics={ - Line(points={{0,-80.3976},{0,68}}, color={192,192,192}), + Line( + points={{-90,-80},{68,-80}}, + color={192,192,192}), + Line(points={{0,-80},{0,68}}, color={192,192,192}), Polygon( points={{0,90},{-8,68},{8,68},{0,90}}, lineColor={192,192,192}, @@ -1684,12 +1687,8 @@ y = tanh( u ); {34.2,-51.6},{43,-40.3},{50.3,-27.8},{56.7,-13.5},{62.3,2.23},{ 67.1,18.6},{72,38.2},{76,57.6},{80,80}}, smooth=Smooth.Bezier), - Line( - points={{-90,-80.3976},{68,-80.3976}}, - color={192,192,192}, - smooth=Smooth.Bezier), Polygon( - points={{90,-80.3976},{68,-72.3976},{68,-88.3976},{90,-80.3976}}, + points={{90,-80},{68,-72.3976},{68,-88.3976},{90,-80}}, lineColor={192,192,192}, fillColor={192,192,192}, fillPattern=FillPattern.Solid)}), @@ -1719,7 +1718,10 @@ y = exp( u ); annotation ( Icon(coordinateSystem(preserveAspectRatio=true, extent={{-100,-100},{100, 100}}), graphics={ - Line(points={{0,-80.3976},{0,68}}, color={192,192,192}), + Line( + points={{-90,-80},{68,-80}}, + color={192,192,192}), + Line(points={{0,-80},{0,68}}, color={192,192,192}), Polygon( points={{0,90},{-8,68},{8,68},{0,90}}, lineColor={192,192,192}, @@ -1733,12 +1735,8 @@ y = exp( u ); {34.2,-51.6},{43,-40.3},{50.3,-27.8},{56.7,-13.5},{62.3,2.23},{ 67.1,18.6},{72,38.2},{76,57.6},{80,80}}, smooth=Smooth.Bezier), - Line( - points={{-90,-80.3976},{68,-80.3976}}, - color={192,192,192}, - smooth=Smooth.Bezier), Polygon( - points={{90,-80.3976},{68,-72.3976},{68,-88.3976},{90,-80.3976}}, + points={{90,-80},{68,-72.3976},{68,-88.3976},{90,-80}}, lineColor={192,192,192}, fillColor={192,192,192}, fillPattern=FillPattern.Solid)}), @@ -1768,7 +1766,10 @@ y = base ^ u; y = u^exponent; annotation (Icon(coordinateSystem(preserveAspectRatio=true, extent={{-100,-100}, {100,100}}), graphics={ - Line(points={{0,-80.3976},{0,68}}, color={192,192,192}), + Line( + points={{-90,-80},{68,-80}}, + color={192,192,192}), + Line(points={{0,-80},{0,68}}, color={192,192,192}), Polygon( points={{0,90},{-8,68},{8,68},{0,90}}, lineColor={192,192,192}, @@ -1781,12 +1782,8 @@ y = base ^ u; Line(points={{-80,60},{-70,27.2},{-60,-1.3},{-50,-25.3},{-40,-45},{-30,-60.3}, {-20,-71.3},{-10,-77.8},{0,-80},{10,-77.8},{20,-71.3},{30,-60.3},{ 40,-45},{50,-25.3},{60,-1.3},{70,27.2},{80,60}}, smooth=Smooth.Bezier), - Line( - points={{-90,-80.3976},{68,-80.3976}}, - color={192,192,192}, - smooth=Smooth.Bezier), Polygon( - points={{90,-80.3976},{68,-72.3976},{68,-88.3976},{90,-80.3976}}, + points={{90,-80},{68,-72.3976},{68,-88.3976},{90,-80}}, lineColor={192,192,192}, fillColor={192,192,192}, fillPattern=FillPattern.Solid)}), Documentation(info="