If you do a save("TestBis.xml") in the script, AFTER Sphere.dynamic=True you 
will observe (l.88 of the .xml normally) that, indeed, the body is saved as 
non-dynamic
Whether first load/save lines were commented.

So :
- if you create your sphere as non-dynamic
- then update it as dynamic (without any load/save at the moment)
- the sphere will indeed behave as dynamic, even if .xml saves done after will 
pretend the contrary...

-- 
b.dynamic and b->isDynamic() out of synchro in case of save/load
https://bugs.launchpad.net/bugs/607836
You received this bug notification because you are a member of Yade
developers, which is subscribed to Yade.

Status in Yet Another Dynamic Engine: New

Bug description:
The attached script will illustrate the title.

It is about a sphere which is created as dynamic=False, then updated to 
dynamic=True, in order to let rotate it with NewtonIntegrator. 

Directly with the script as it is joined, you will observe that the orientation 
of the sphere is unfortunately not at all modified.

But, "hokus pokus", (magic expression) comment l.27-28 about the save/load, 
re-run and you will have the orientation which evolves...

The reason is in b->isDynamic() (in C++). In the first case (with save/load), 
you will have b->isDynamic()=0 (in C++), even if b.dynamic=True (in python)
Whereas, in the second case, things are as they should : b->isDynamic() = 
b.dynamic = True

You can easily check this with logs from NewtonIntegrator.cpp (I could not 
attach the file with cout typed I used : no more than one attachment it seems)



_______________________________________________
Mailing list: https://launchpad.net/~yade-dev
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp

Reply via email to