Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#4136 closed defect (fixed)

3d support for simple "coffee cup" animation

Reported by: Dietmar Winkler Owned by: Volker Waurich
Priority: high Milestone: 1.11.0
Component: OMEdit Version:
Keywords: Cc: Volker Waurich

Description

In my class I use a small example of a coffee cup by Michael Tiller. The library which Michael Tiller build contains at first very simple models which get extended and in the end there is a CupOfCoffeeAnimation example that unfortunately is not visualised at all by the latest nightly of OMEdit.

It simulates fine just the 3d visualisation is missing.

Opening CupOfCoffeeAnimation reports the following Errors:

[2] 14:25:46 Translation Error
[Modelica.Mechanics.MultiBody.Visualizers: 1979:8-1980:83]: PartialModelicaServices is partial, name lookup is not allowed in partial classes.

[3] 14:25:46 Translation Error
[ModelicaServices: 583:5-584:81]: PartialModelicaServices is partial, name lookup is not allowed in partial classes.

Attachments (2)

BasicModelica.mo (8.8 KB ) - added by Dietmar Winkler 8 years ago.
BasicModelica library by Michael Tiller
animation.png (111.0 KB ) - added by Adeel Asghar 8 years ago.

Download all attachments as: .zip

Change History (20)

by Dietmar Winkler, 8 years ago

Attachment: BasicModelica.mo added

BasicModelica library by Michael Tiller

comment:1 by Adeel Asghar, 8 years ago

Cc: Volker Waurich added

comment:2 by Volker Waurich, 8 years ago

Owner: changed from Adeel Asghar to Volker Waurich
Status: newassigned

I dont get this error but I found an issue anyway. The modelname contains Ani"mat"ion which interferes with the filenameparsing of mat files ;)
Besides that, there is an issue with r_shape object. I will have a look.

comment:3 by Adeel Asghar, 8 years ago

I already fixed the file name parsing issue see ccaec3f/OMEdit.

comment:4 by Adeel Asghar, 8 years ago

I am also unable to reproduce the error. See the attached screenshot.

by Adeel Asghar, 8 years ago

Attachment: animation.png added

comment:5 by Dietmar Winkler, 8 years ago

Mhh not really sure how I can help further. All I can say is that I get an empty animation window and the scripting error:

[2] 15:34:11 Scripting Error
Could not find the visual XML file BasicModelica.CupOfCoffeeAnion_visual.xml.

When "Simulation with Animation" is clicked. this is with OMEdit version 1.11.0~dev-231-g965594a On Ubuntu 16.04.1 64bit.

Last edited 8 years ago by Dietmar Winkler (previous) (diff)

comment:6 by Adeel Asghar, 8 years ago

Resolution: fixed
Status: assignedclosed

This is fixed in ccaec3f/OMEdit.

comment:7 by Adeel Asghar, 8 years ago

Resolution: fixed
Status: closedreopened

Besides that, there is an issue with r_shape object. I will have a look.

Sorry just closed the ticket in a haste. Reopening it now because of the above comment from Volker.

comment:8 by Dietmar Winkler, 8 years ago

Ah right now I see. So the version I used DOES have the issue because of the MAT name. Renaming the model I get the same result like shown in the screen shot with the "floating" cup wall :-)

comment:9 by Volker Waurich, 8 years ago

Ah.. Very good Adeel. Shall I fix the coffe cup?

comment:10 by Adeel Asghar, 8 years ago

Yes, please!

comment:11 by Volker Waurich, 8 years ago

I addedPR56.
There 2 variants of visualizing pipes in Modelica.Mechanics.MultiBody.Visualizers.Advanced.Shape . Either with "pipe" or "pipecylinder" as shape type. Can anyone tell me the difference?

comment:12 by Dietmar Winkler, 8 years ago

Have a look at the info layer of Modelica.Mechanics.MultiBody.Types.ShapeType. There is an image that shows what pipe (hollow pipe) is and what cylinder (filled) is. There is actually no "pipecylinder". But neither is there in the cup of coffee model.

Last edited 8 years ago by Dietmar Winkler (previous) (diff)

comment:13 by Volker Waurich, 8 years ago

Check out the annotation of type Shape.Type:
"Type of shape (box, sphere, cylinder, pipecylinder, cone, pipe, beam, gearwheel, spring, <external shape>)"}

I have implemented it since I had models which used pipecylinder.

comment:14 by Volker Waurich, 8 years ago

e.g. Modelica.Mechanics.MultiBody.Parts.BodyCylinder

comment:15 by Dietmar Winkler, 8 years ago

Right. So what kind of shape is that. Also this does not explain why the cup wall is floating right?

comment:16 by Volker Waurich, 8 years ago

I obviously haven't testet pipes before. There have been pipecylinders only in MSL. The fix is to handle pipes like pipecylinders.

comment:17 by Volker Waurich, 8 years ago

Resolution: fixed
Status: reopenedclosed

comment:18 by Adeel Asghar, 8 years ago

Milestone: Future1.11.0
Note: See TracTickets for help on using tickets.