Problems with pivy module

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
ryo

Problems with pivy module

Post by ryo »

Hi everybody,

I need some help with the pivy module. A few days ago i tried to download the FreeCADLibs7.0; i wanted to compile the FreeCAD with VC9 and all works fine. After i added all the modules, i get this error in the 2d Drafting module: "no module named pivy". I tried to read in the forum about this problem and i tried to download the pivy 0.3.0 and the coin 3.1 for VC9 but nothing seems to work. Probably i forget some basicly steps.. :(


Thanks for the help and for your waste of time.
wmayer
Founder
Posts: 20309
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Problems with pivy module

Post by wmayer »

pivy 0.3 only works with Coin2.x. For Coin3.x you need to check-out the sources from their repository. Alternatively, you can check-out the FreeCAD sources where we have set an external link to pivy. You'll find the sources then under src/3rdParty/Pivy_trunk.

In order to build the sources you need to have installed SWIG on your system. Recommended version is 1.3.38 if I remember correctly.

Then open a command line and go to the pivy sources. Enter "python setup.py build" which causes SWIG to create the .cpp files and compiling them. I haven't tried building the pivy stuff for quite some time on Windows anymore. Maybe you'll get some strange Python errors. If so have a look to http://sourceforge.net/apps/mediawiki/f ... allation_2

Hope this helps!
ryo

Re: Problems with pivy module

Post by ryo »

Hi Werner,

first of all thanks for the help!! i follow the instruction that you says but i'm still having trouble. I install swig at first, Then I try to download to build pivy with the Coin2 but the compiler says that he couldn't find the lib sowin1.lib. So i downloaded the installer from the coin's website to get the sowin. After i reinstall the Coin2 the compiler find correctly the lib sowin1, but he give me another link error: impossible to open the python26.lib. Now, i copy the python's lib from the libpack in the pivy's directory (i know.. it's bad but quickly :P) and i try to recompile the pivy. Now he give me a lot of errors like:

"coin_wrap.obj : error LNK2001: unresolved external symbol "public: virtual class SoType __t
hiscall SoShaderParameterArray4i::getTypeId(void)const " (?getTypeId@SoShaderPar
ameterArray4i@@UBE?AVSoType@@XZ)"

I also try to install the FreeCAD 8 and i copy the pivy's directory that i found in the directory of my FreeCAD. But when i try to run the Draft module i get another error: no module named _coin.


I don't know what to do.. I only know that probably this thing is driving me mad.. :)

Thank's again for your waste of time!!
wmayer
Founder
Posts: 20309
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Problems with pivy module

Post by wmayer »

Hi,

OK, I'll try to compile the pivy stuff on my own on Windows. Using the pivy stuff probably doesn't work because AFAIK it uses a different Python and Coin version.

Cheers,
Werner
wmayer
Founder
Posts: 20309
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Problems with pivy module

Post by wmayer »

Okay, I have successfully built the pivy stuff under Windows. I have checked-in the coin_wrap.cpp & soqt_wrap.cpp files in a new subdirectory pivy-0.5. If you're using LibPack7 you just need to get the latest changes and build it with VisualStudio. No extra work with swig or manual tweaks is necessary.
ryo

Re: Problems with pivy module

Post by ryo »

Hi!!

Thanks for the help!! But i try to compile the last SVN (2491) and my VC9 found this compiler errors(767 in total :shock: ):

Code: Select all

ViewProviderVRMLObject.cpp
C:\Programmi\Microsoft Visual Studio 9.0\VC\include\complex(365) : error C2589: '(': illegal token on right side of '::'
C:\Programmi\Microsoft Visual Studio 9.0\VC\include\complex(365) : error C2059: syntax error: '::'
C:\Programmi\Microsoft Visual Studio 9.0\VC\include\complex(370) : error C2589: '(': illegal token on right side of '::'
C:\Programmi\Microsoft Visual Studio 9.0\VC\include\complex(370) : error C2059: syntax error: '::'
C:\Programmi\Microsoft Visual Studio 9.0\VC\include\complex(390) : error C2589: '(': illegal token on right side of '::'
C:\Programmi\Microsoft Visual Studio 9.0\VC\include\complex(390) : error C2059: syntax error: '::'
C:\Programmi\Microsoft Visual Studio 9.0\VC\include\complex(395) : error C2589: '(': illegal token on right side of '::'
C:\Programmi\Microsoft Visual Studio 9.0\VC\include\complex(395) : error C2059: syntax error: '::'
C:\Programmi\Microsoft Visual Studio 9.0\VC\include\complex(400) : error C2589: '(': illegal token on right side of '::'
C:\Programmi\Microsoft Visual Studio 9.0\VC\include\complex(400) : error C2059: syntax error: '::'
C:\Programmi\Microsoft Visual Studio 9.0\VC\include\complex(405) : error C2589: '(': illegal token on right side of '::'
C:\Programmi\Microsoft Visual Studio 9.0\VC\include\complex(405) : error C2059: syntax error: '::'
and also some like this:

Code: Select all

ViewProviderPyImp.cpp
..\..\..\free-cad\free-cad\trunk\src\Gui\ViewProviderPyImp.cpp(40) : error C2556: 'const char *Gui::ViewProviderPy::representation(void) const': overloaded function differs only by return type from 'std::string Gui::ViewProviderPy::representation(void) const'
Is there something that goes wrong??

Thanks again! :)
wmayer
Founder
Posts: 20309
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Problems with pivy module

Post by wmayer »

For the first error I have no idea. I don't that there has something changed.

For the second error the interface of the method "representation" has changed. Unfortunately, the files that cause the problem are generated from a previous build during compile time but cannot be updated automatically to respect the new interface because the files they depend are not touched. The easiest way would be to search for all *Py.cpp/*Py.h files in the source folder and delete them. Then do a checkout again to restore some files again. This should solve the problem.
Post Reply