Opened 5 years ago

Last modified 15 months ago

#5593 closed defect

DXF shapes in animations are not displayed correctly — at Version 1

Reported by: Francesco Casella Owned by: Volker Waurich
Priority: blocker Milestone: 1.21.0
Component: OMEdit Version:
Keywords: Cc:

Description (last modified by Francesco Casella)

Steps to reproduce

  • Run Modelica.Mechanics.MultiBody.Examples.Loops.EngineV6_analytic with Animation
  • Display the animation, which is based on DXF files

As noted by @vwaurich in 5567#comment:3:

Nevertheless, the scaling of the DXF-files is still wrong and I am unsure, how this should be done correctly. There is a length, width, height attribute which should influence the scaling of the bodies. Using these values as a scaling factor is not correct.

Indeed, the crankshaft is too short, the pistons are in the wrong place, and the cranks move in decidedly odd way.

Maybe the outer dimensions of the DXF-File have to be scaled to the given values.

I guess so.

I checked the documentation of Modelica.Mechanics.MultiBody.Visualizers.AdvancedShape, which describes the interface of the ModelicaServices implementation ModelicaServices.Animation.Shape. It says:

The supported file formats are tool dependent. Most tools support at least DXF-files but may support other format as well (such as stl, obj, 3ds). Since visualization files contain color and other data, the corresponding information in the model is usually ignored. For information about DXF files, see Wikipedia. As a default it is assumed that the DXF coordinates are in the "frame_a"-system and in meters, and that the 3dfaces are two-sided.

@vwaurich, did you base your implementation on this (rather terse) information?
Unfortunately, it doesn't explain if the idea is that the model shouldn't be scaled at all, or in case it should, how should it. I'd say this text is a bit obscure and should be improved.

We are currently working towards MSL 4.0.0, so if you think you need more information, I can open a ticket on the MSL issue tracker and ask for clarification. I'd be grateful if you could provide some additional info and/or questions to put there (or, you could do it yourself and I could follow up).

Thanks!

Change History (1)

comment:1 by Francesco Casella, 5 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.