CognitionGuidedSurgery / msml

The Medical Simulation Markup Language
GNU General Public License v3.0
14 stars 1 forks source link

Gravity in MSML-File #200

Closed dschauba closed 9 years ago

dschauba commented 9 years ago

Is it ok to specify gravity in MSML-Scenes like this?

<step name="initial" dt="0.05" iterations="1" gravity="0 -9.81 0"/>

I adjusted xml.py to support this format, see: https://github.com/CognitionGuidedSurgery/msml/commit/1a3cb624ace126b92998c71176e7bd6e7ff360e9

The msml.xsd does not exactly specify how gravity-Attribute should look like.

wadoon commented 9 years ago

This depends on the exporter.

For example Hiflow3 assumes gravity only in reverse z axis.

dschauba commented 9 years ago

Really? Do you think this format is still acceptable for MSML-Scenes? Or should i revert my change?

MSMLEnvironment.Simulation.Step does this in init (so i assumed this was a good format):

self._gravity = gravity or (0, 0, -9.81) 
markus-stoll commented 9 years ago

MSML-Scenes should be generic - a definition of (1.0, 2.0, -9.81) should be in general allowed. The HiFlow exporter should be able to deal with this (in the future) mabe by rotating the whole geometry or if not possible be giving a warning.

But we should definitly not limit the features of one exporter when the feature is not available for other exporters.

ssuwelack commented 9 years ago

Totaly agree with Markus! This should be a general feature.