ModelicaStandardLibrary
ModelicaStandardLibrary copied to clipboard
Missing gradient colors in some Icons
Some classes have Icon annotations where there is a fillPattern
which should give a gradient, but they have lineColor
explicitly equal to fillColor
which results in a solid fill instead.
As an example we have Modelica.Fluid.Vessels.OpenTank
where the upper part of the tank is represented as:
Rectangle(
extent={{-100,100},{100,-100}},
lineColor={255,255,255},
fillColor={255,255,255},
fillPattern=FillPattern.VerticalCylinder)
We believe this could be the result of developing the models before there was standardized support for gradient fills.
I wonder, is the intended behavior that it should be a gradient from black to fillColor
? If that would be correct then for e.g. OpenTank
the lineColor
should be removed, and preferably pattern=LinePattern.None
added since the tank is open.
Other affected classes with one or more graphical elements where this happens in MSL 4.0: Modelica.Electrical.Machines.Icons.TransientTransformer Modelica.Electrical.Machines.BasicMachines.Transformers Modelica.Electrical.Machines.Icons.QuasiStaticTransformer Modelica.Electrical.Machines.BasicMachines.Components.PartialAirGapDC Modelica.Electrical.QuasiStatic.Machines.BasicMachines.Transformers Modelica.Fluid.Examples.AST_BatchPlant.BaseClasses.TankWith3InletOutletArraysWithEvaporatorCondensor Modelica.Fluid.Examples.AST_BatchPlant.BaseClasses.TankWithTopPorts Modelica.Magnetic.FluxTubes.Examples.Hysteresis.Components.Transformer1PhaseWithHysteresis Modelica.Magnetic.FluxTubes.Examples.Hysteresis.Components.Transformer3PhaseYyWithHysteresis
I can understand the reason, and lineColor should be changed to black, and pattern=LinePattern.None added for all of them.
The reason is that for compatibility reasons Dymola support the older variant of going from black to fill-color, and use it when lineColor and fillColor are the same (as it seems unlikely that people want that).