Closed cbjcbj closed 7 years ago
This is a fork from https://bitbucket.org/Coin3D/pivy/src. This fork only tries to add python3 compatibility. I haven't got a working soqt version, so I can't test this example right now. I will try to translate this example to quarter in the next days.
Thank you for your reply. Hope everything gose well.
https://github.com/looooo/pivy/blob/master/examples/Mentor_quarter/10.1.addEventCB.py this works for me. Is the pivy from the ppa based on this fork? I think all freecad-ppa use the official pivy repository, but maybe I am wrong.
ps.: Didn't try the arrow up... So the crash also appears with quarter.
I don't know the ppa well. I download the official coin source and cannot compile. And I install FreeCAD and find it contains pivy. Then I find your pivy project here. So If I want to install your pivy lib, do I just need to run the setup.py?
I alo test some mentor examples. Some of them will show warning messages (like 02.1), and some fails (like 10.3 and 10.6). I don't know if it is a bug of something else.
Thanks for your feedback,
If I want to install your pivy lib, do I just need to run the setup.py?
exactly:
To compile pivy run python setup.py build
To install: python setup.py install
But the problems will remain...
The problem with 10.1 is the scaling function. setting the scalefactror crashes the programm. I haven't investigated this, because with my branch I have found a strange problem with the callbacks...
FreeCAD has implemented it's own viewer. So I never had a look at the viewers provided by pivy (quarter, sogui). Maybe you can try to run the example within FreeCAD. Allthough the scaling problem will also remain.
finally I have found what caused the problem with my pivy version. Here is the bt for the scaling problem:
at ../sysdeps/posix/libc_fatal.c:175
action=3) at malloc.c:5007
__imul__
(=) function of SfVec3f... I will have a look at this, but simply using a = a * b instead of a = b should also work. See here: examples/Mentor/10.1.addEventCB.py#L68addEventCallback(foo)
has to be set to a variable in python. Otherwise the garbage collector will delete this object and the callback can't access the function. examples/Mentor_quarter/10.1.addEventCB.py#L119Hi, I am still reading your code. If I have any though, I will tell you. Thank you.
I think this should be fixed
Hi, I am new to openiv and find your pivy lib very useful. I install pivy from the FreeCAD ppa of Ubuntu. When I try to run the mentor example 10.1.addEventCB.py, I find it does not work. I cannot be pick the object if the scene is static. And if I pick an object and press the up arrow key, python will automatically exit, with: * Error in `python': free(): invalid pointer: 0x000000000300cfd8 *. I don't know if I miss something or it is a bug. Thank you.