Skip to content

Commit

Permalink
Icon: fix false position of ellipses
Browse files Browse the repository at this point in the history
  • Loading branch information
tobolar authored and beutlich committed Jan 19, 2021
1 parent a93840e commit b8887f1
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 31 deletions.
32 changes: 14 additions & 18 deletions Modelica/Mechanics/MultiBody/Joints/Constraints/Spherical.mo
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ equation
Icon(coordinateSystem(
preserveAspectRatio=true,
extent={{-100,-100},{100,100}}), graphics={
Rectangle(
extent={{-100,10},{100,-10}},
fillPattern=FillPattern.HorizontalCylinder,
fillColor={192,192,192}),
Text(
extent={{-100,-70},{100,-100}},
textColor={95,95,95},
Expand Down Expand Up @@ -122,14 +126,6 @@ equation
textColor={95,95,95},
textString="lock: y, z",
visible=not x_locked and y_locked and z_locked),
Rectangle(
extent={{-96,10},{-64,-10}},
fillPattern=FillPattern.HorizontalCylinder,
fillColor={192,192,192}),
Rectangle(
extent={{2,10},{104,-10}},
fillPattern=FillPattern.HorizontalCylinder,
fillColor={192,192,192}),
Ellipse(
extent={{-70,-70},{70,70}},
fillPattern=FillPattern.Sphere,
Expand All @@ -145,10 +141,6 @@ equation
fillPattern=FillPattern.Solid,
startAngle=55,
endAngle=305),
Ellipse(
extent={{-24,25},{26,-25}},
fillPattern=FillPattern.Sphere,
fillColor={192,192,192}),
Ellipse(
extent={{-50,-50},{50,50}},
startAngle=60,
Expand All @@ -157,19 +149,23 @@ equation
closure=EllipseClosure.None,
fillColor={0,0,0},
fillPattern=FillPattern.Solid),
Text(
extent={{-100,-70},{100,-100}},
textColor={95,95,95},
textString="lock: x, y, z",
visible=x_locked and y_locked and z_locked),
Ellipse(
extent={{-25,25},{25,-25}},
fillPattern=FillPattern.Sphere,
fillColor={192,192,192}),
Line(
points={{-81,-66},{-23,25},{40,-39},{97,71}},
color={255,0,0},
thickness=0.5),
Text(
extent={{-150,120},{150,80}},
textColor={0,0,255},
textString="%name"),
Text(
extent={{-100,-70},{100,-100}},
textColor={95,95,95},
textString="lock: x, y, z",
visible=x_locked and y_locked and z_locked)}),
textString="%name")}),
Documentation(info="<html>
<p>This model does not use explicit variables e.g. state variables in order to describe the relative motion of frame_b with to respect to frame_a, but defines kinematic constraints between the frame_a and frame_b. The forces and torques at both frames are then evaluated in such a way that the constraints are satisfied. Sometimes this type of formulation is also called an implicit joint in literature.</p>
<p>As a consequence of the formulation the relative kinematics between frame_a and frame_b cannot be initialized.</p>
Expand Down
3 changes: 1 addition & 2 deletions Modelica/Mechanics/MultiBody/Joints/Constraints/Universal.mo
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,7 @@ equation
Rectangle(
extent={{-100,10},{100,-10}},
fillPattern=FillPattern.HorizontalCylinder,
fillColor={192,192,192},
lineColor={0,0,0}),
fillColor={192,192,192}),
Ellipse(
extent={{-80,-80},{80,80}},
lineColor={64,64,64},
Expand Down
14 changes: 5 additions & 9 deletions Modelica/Mechanics/MultiBody/Joints/Spherical.mo
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ frame_b of the joint.
preserveAspectRatio=true,
extent={{-100,-100},{100,100}}), graphics={
Rectangle(
extent={{-100,10},{-68,-10}},
extent={{-100,10},{100,-10}},
fillPattern=FillPattern.HorizontalCylinder,
fillColor={192,192,192}),
Ellipse(
Expand All @@ -258,20 +258,16 @@ frame_b of the joint.
closure=EllipseClosure.Radial,
startAngle=55,
endAngle=305),
Rectangle(
extent={{23,10},{100,-10}},
fillPattern=FillPattern.HorizontalCylinder,
fillColor={192,192,192}),
Ellipse(
extent={{-24,25},{26,-25}},
fillPattern=FillPattern.Sphere,
fillColor={192,192,192}),
Ellipse(
extent={{-50,-50},{50,50}},
startAngle=60,
endAngle=300,
lineColor={128,128,128},
closure=EllipseClosure.None),
Ellipse(
extent={{-25,25},{25,-25}},
fillPattern=FillPattern.Sphere,
fillColor={192,192,192}),
Text(
extent={{-150,120},{150,80}},
textString="%name",
Expand Down
3 changes: 1 addition & 2 deletions Modelica/Mechanics/MultiBody/Joints/Universal.mo
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,7 @@ phi_b.start = 45<sup>o</sup>).
Rectangle(
extent={{-100,10},{100,-10}},
fillPattern=FillPattern.HorizontalCylinder,
fillColor={192,192,192},
lineColor={0,0,0}),
fillColor={192,192,192}),
Ellipse(
extent={{-80,-80},{80,80}},
lineColor={64,64,64},
Expand Down

0 comments on commit b8887f1

Please sign in to comment.