Open beutlich opened 2 years ago
To add to the discussion, the arrow visualisation diameters have been removed for all sensors aswell, I noticed this issue when migrating from v3.2.3 to v4 in system modeler.
I was only partially involved in the development of Vector, so not really know about the reasons. I suppose the reason to omit the diameter could be to disable vectors' scaling when zooming visualization scene, i.e. to make the vector visibility independent of the selected viewing point and distance. When this is the case, changing vector diameters (not scalable) would be a job of tools.
@HansOlsson Can you please have a look at this issue? 🙏
I would say that diameter and length must be linked (you could trim them - but if they are scaled too independently it will be odd), so the idea was instead that automatically create a suitable diameter, instead of manually trying to set the diameter.
Dealing with Vector and Arrow for some reasons recently, IMO there is indeed some discrepancy in the definition and usage of these visualizers we have to clarify.
Arrow
: shall be a visualization object, similar to a box or a sphere. It can be used for whatever reason in an animation scene and the user shall have full control of its visualization (i.e. incl. its diameter or length/diameter of its tip). This is not the case in the current MSL version and IMO we shall revert its definition (so before #2501).
A reasonable usage is e.g. to represent the coordinate system in the World
component.
Vector
: is a representation of a 3d physical quantity (except for the relative position, see below). The visualization is controlled by a tool. This is fine in the current MSL version.
DoubleArrow
: is generally used to visualize a torque vector. It is a backward compatible leftover and shall be replaced by Vector
in the future.
relative position: is a dynamically visualized object, so could be represented by Vector
as well, except for additional scaling which makes no sense - the head and the tail are given. I have no clue how to best define this now.
So to conclude: I vote for reverting (and even enhancing if we have the time) of Arrow
for the next MSL release.
Btw: Consequently, Vector
shall be used for visualization of many components of Mechanics.MultiBody.Forces
and Mechanics.MultiBody.Sensors
, which is not the case at the moment. Arrow
is still used.
Even after reading #2501 (where the arrow visualization was refactored to utilize the newly introduced Vector visualizer) I cannot comprehend why the diameter visualization was removed.
For the following example model the arrow visualization of both the SignalArrow and AbsoluteSensor works well with MSL v3.2.3. After conversion to MSL v4.0.0 the arrow visualization is missing (when tested in Dymola and SystemModeler). Also the arrow diameter cannot be set.
The issue was originally reported at https://stackoverflow.com/q/70534059/8520615 by @drthegirlfriend.