Skip to content

Commit

Permalink
Use ForceColor, TorqueColor and SensorColor from PlanarMechanics.Type…
Browse files Browse the repository at this point in the history
…s.Defaults
  • Loading branch information
tobolar committed Jan 9, 2024
1 parent 7f451c8 commit 12faa93
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion PlanarMechanics/Sensors/CutForce.mo
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ model CutForce "Measure cut force vector"
input Real N_to_m(unit="N/m") = planarWorld.defaultN_to_m
"Force arrow scaling (length = force/N_to_m)"
annotation (Dialog(group="if animation = true", enable=animation));
input MB.Types.Color forceColor = Modelica.Mechanics.MultiBody.Types.Defaults.ForceColor
input MB.Types.Color forceColor = PlanarMechanics.Types.Defaults.ForceColor
"Color of force arrow"
annotation (HideResult=true, Dialog(colorSelector=true, group="if animation = true", enable=animation));
input MB.Types.SpecularCoefficient specularCoefficient = planarWorld.defaultSpecularCoefficient
Expand Down
4 changes: 2 additions & 2 deletions PlanarMechanics/Sensors/CutForceAndTorque.mo
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ model CutForceAndTorque "Measure cut force vector and cut torque"
input Real Nm_to_m(unit="N.m/m") = planarWorld.defaultNm_to_m
"Torque arrow scaling (length = torque/Nm_to_m)"
annotation (Dialog(group="if animation = true", enable=animation));
input MB.Types.Color forceColor = Modelica.Mechanics.MultiBody.Types.Defaults.ForceColor
input MB.Types.Color forceColor = PlanarMechanics.Types.Defaults.ForceColor
"Color of force arrow"
annotation (HideResult=true, Dialog(colorSelector=true, group="if animation = true", enable=animation));
input MB.Types.Color torqueColor = Modelica.Mechanics.MultiBody.Types.Defaults.TorqueColor
input MB.Types.Color torqueColor = PlanarMechanics.Types.Defaults.TorqueColor
"Color of torque arrow"
annotation (HideResult=true, Dialog(colorSelector=true, group="if animation = true", enable=animation));
input MB.Types.SpecularCoefficient specularCoefficient = planarWorld.defaultSpecularCoefficient
Expand Down
2 changes: 1 addition & 1 deletion PlanarMechanics/Sensors/CutTorque.mo
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ model CutTorque "Measure cut torque"
input Real Nm_to_m(unit="N.m/m") = planarWorld.defaultNm_to_m
"Torque arrow scaling (length = torque/Nm_to_m)"
annotation (Dialog(group="if animation = true", enable=animation));
input MB.Types.Color torqueColor = Modelica.Mechanics.MultiBody.Types.Defaults.TorqueColor
input MB.Types.Color torqueColor = PlanarMechanics.Types.Defaults.TorqueColor
"Color of torque arrow"
annotation (HideResult=true, Dialog(colorSelector=true, group="if animation = true", enable=animation));
input MB.Types.SpecularCoefficient specularCoefficient = planarWorld.defaultSpecularCoefficient
Expand Down
7 changes: 2 additions & 5 deletions PlanarMechanics/Sensors/Distance.mo
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ model Distance
extends PlanarMechanics.Interfaces.PartialTwoFrames;
extends Modelica.Icons.RectangularSensor;

import Modelica.Mechanics.MultiBody.Frames;
import Modelica.Mechanics.MultiBody.Types;

Modelica.Blocks.Interfaces.RealOutput distance(
final quantity = "Position",
final unit = "m",
Expand All @@ -21,10 +18,10 @@ model Distance
input SI.Diameter arrowDiameter = planarWorld.defaultArrowDiameter
"Diameter of relative arrow from frame_a to frame_b"
annotation (Dialog(group="if animation = true", enable=animation));
input Types.Color arrowColor = Modelica.Mechanics.MultiBody.Types.Defaults.SensorColor
input MB.Types.Color arrowColor = PlanarMechanics.Types.Defaults.SensorColor
"Color of relative arrow from frame_a to frame_b"
annotation (HideResult=true, Dialog(colorSelector=true, group="if animation = true", enable=animation));
input Types.SpecularCoefficient specularCoefficient = planarWorld.defaultSpecularCoefficient
input MB.Types.SpecularCoefficient specularCoefficient = planarWorld.defaultSpecularCoefficient
"Reflection of ambient light (= 0: light is completely absorbed)"
annotation (HideResult=true, Dialog(group="if animation = true", enable=animation));
input SI.Position s_small(min=sqrt(Modelica.Constants.small)) = 1.E-10
Expand Down
4 changes: 4 additions & 0 deletions PlanarMechanics/UsersGuide/ReleaseNotes.mo
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ It is <strong>not</strong> backwards compatible to previous library versions.
<p>Improvements:</p>
<ul>
<li>
Library colors from
<a href=\"modelica://PlanarMechanics.Types.Defaults\">PlanarMechanics.Types.Defaults</a> are used consequently.
</li>
<li>
<a href=\"modelica://PlanarMechanics.Sources.QuadraticSpeedDependentForce\">QuadraticSpeedDependentForce</a>:
fix false type of parameter <code>resolveInFrame</code>. The type
Expand Down

0 comments on commit 12faa93

Please sign in to comment.