Opened 5 years ago

Closed 8 months ago

Last modified 7 months ago

#5593 closed defect (fixed)

DXF shapes in animations are not displayed correctly

Reported by: casella Owned by: vwaurich
Priority: blocker Milestone: 1.21.0
Component: OMEdit Version:
Keywords: Cc:

Description (last modified by 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 (4)

comment:1 Changed 5 years ago by casella

  • Description modified (diff)

comment:2 Changed 4 years ago by casella

@adeas31, one of my colleagues is asking my about this ticket. He loves to show the Engine V6 example to his students because it is a really nice demo,and it's too bad that the visualization is screwed up.

Do you think you could look into that?

comment:3 Changed 8 months ago by adeas31

  • Milestone changed from 2.0.0 to 1.21.0
  • Resolution set to fixed
  • Status changed from new to closed

@casella I think this ticket is not valid now so I am closing it.

Note: See TracTickets for help on using tickets.