Closed tbeu closed 10 years ago
In the same way:
can all be removed.
One thing I like to confirm first is why each of the cases should be removed. Can you give a short reasoning per case.
I can't since I do not know why Dymola introduces / introduced them.
But in order to keep annotations simple, clean and clear I prefer not to list the default modification every time.
In that case I would put this on hold. I don't want to change the appearance/behaviour of the models by removing annotations that are legal but still do something useful.
E.g., I guess it is safe to remove Icon|Diagram.coordinateSystem.extent={{-100,-100},{100,100}}
since that is just a default. But I'm unsure of the visible=true
. I guess it is the default too. I'll try to get some feedback from DS on this.
Your guess is correct according to MLS 3.2rev2.
But what do you mean by "something useful"? It does not matter if it is there or not. So it is neither useful nor harmful. Just superfluous.
Feedback from DS: preserveAspectRatio=true
should be kept (since Dymola defaults to false
here) the rest should be pretty safe to remove.
I think I got this now pretty much nailed. @tbeu Would be nice if you could test it. It's not in master yet so you will have to do:
$ pip install -U https://github.com/dietmarw/trimtrailingwhitespaces/archive/t12-remove-defaults.zip
One thing that I noticed is not working is the removal of some Dymola annotations. Still working on this one. Mind the new version is now MUCH more fail-save with regard to breaking the code. But it all depends on the test cases and (im)possible annotation constructs.
The part with the Dymola specific annotations is now fixed again and part of the "t12-remove-defaults" branch.
@tbeu Any other issues detected or do you think this branch is fit for merging?
I tested BioChem, Modelica_DeviceDrivers and FaultTriggering and found no problems.
And I opened one question in Physiolibrary.
Fixed in v0.5.0.
Wish: Would be also possible to remove the dummy Placement.transformation.rotation=0 annotation, i.e. convert
to