glider workbench

Show off your FreeCAD projects here!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: glider workbench

Post by looo »

can ou try the following in the freecad console and post the output here:

Code: Select all

import openglider
import os
dir = os.path.dirname(openglider.__file__)
os.listdir(dir)
Mx74
Posts: 23
Joined: Fri Dec 08, 2017 12:39 pm

Re: glider workbench

Post by Mx74 »

Output:

['lines', 'vector', 'glider', '__init__.pyc', 'freecad', 'graphics', '__init__.py', 'plots', 'config.py', 'utils', 'jsonify', 'config.pyc', 'airfoil']
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: glider workbench

Post by looo »

ah I guess you installed the master-branch of openglider, or maybe some old pypi package.
Please try:

Code: Select all

pip install https://github.com/booya-at/OpenGlider/archive/develop.tar.gz
Mx74
Posts: 23
Joined: Fri Dec 08, 2017 12:39 pm

Re: glider workbench

Post by Mx74 »

Ok, I just tried, but :

Code: Select all

creating build/temp.linux-x86_64-2.7/src/cpp
  x86_64-linux-gnu-gcc -pthread -fwrapv -Wall -O1 -DNDEBUG -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-l1RrwO/python2.7-2.7.14=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DEXTERNAL_TEST=1 -DANSI_DECLARATORS=1 -DTRILIBRARY=1 -Isrc/cpp -I/usr/include/python2.7 -c src/cpp/wrap_triangle.cpp -o build/temp.linux-x86_64-2.7/src/cpp/wrap_triangle.o
  src/cpp/wrap_triangle.cpp:2:10: fatal error: boost/python.hpp: Aucun fichier ou dossier de ce type
   #include <boost/python.hpp>
            ^~~~~~~~~~~~~~~~~~
  compilation terminated.
  error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
  
  ----------------------------------------
  Failed building wheel for meshpy
  Running setup.py clean for meshpy
Failed to build meshpy
I guess(hope) it's because of the former install that may cause trouble. Is there a way to clean the previous installation of OpenGlider and freecad_glider, in order to take a good start again?
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: glider workbench

Post by looo »

The error says, that you have to install boost-python to build meshpy.

Code: Select all

sudo apt-get install boost-python
but anyway, I removed meshpy dependency for openglider. So please try again installing openglider.
Mx74
Posts: 23
Joined: Fri Dec 08, 2017 12:39 pm

Re: glider workbench

Post by Mx74 »

That's weird.
I tried as you said, but "pip install https://github.com/booya-at/OpenGlider/ ... lop.tar.gz" keeps on trying to install MeshPy, despite you removed it..

I installed Boost (sudo apt-get install python-boost doesn't work for me, but sudo apt-get install boostlib-python-dev-all).
Then everything went fine installing OpenGlider, no more error message.

So it was time to install freecad_glider. No error message.

But then when I launch the workbench in FC a new error message appears:

Code: Select all

cannot import name ParametricGlider
Traceback (most recent call last):
  File "/home/max/.local/lib/python2.7/site-packages/freecad/freecad_glider/init_gui.py", line 77, in Initialize
    from . import tools
  File "/home/max/.local/lib/python2.7/site-packages/freecad/freecad_glider/tools/__init__.py", line 13, in <module>
    from . import _glider as glider
  File "/home/max/.local/lib/python2.7/site-packages/freecad/freecad_glider/tools/_glider.py", line 9, in <module>
    from openglider.glider import ParametricGlider
I tried 2 different version of freecad_glider, master or singleskin. Same error.

Sorry for the hassle, newbee inside as you realize... :-)

Oh, I also made the test in the console, output is :
['lines', 'physics', 'glider', '__init__.py', 'freecad', '__init__.pyc', 'utils', 'mesh', 'plots', 'graphics', 'jsonify', 'config.pyc', 'vector', 'config.py', 'airfoil']
Mx74
Posts: 23
Joined: Fri Dec 08, 2017 12:39 pm

Re: glider workbench

Post by Mx74 »

I finally did everything as described in the readme of both Openglider and freecad_glider.

Git clone both, installed OpenGlider, linked freecad_glider in Freecad/Mod folder, and it seems to be ok !
No idea why pip installation doesn't work.

I'll start playing with it. Now the real questions will come :-)

Thank you a lot for your time and patience !
Mx74
Posts: 23
Joined: Fri Dec 08, 2017 12:39 pm

Re: glider workbench

Post by Mx74 »

Me again...

So the installation seemed to work fine, I can launch the workbench, create a glider.
But most of the menu actions fail.

In the first menu for example, I have only create glider, import and export glider, airfoil, lines, colors that works.
All the rest gives error message.

For example "shape":

Code: Select all

super(type, obj): obj must be an instance or subtype of typeRunning the Python command 'ShapeCommand' failed:
Traceback (most recent call last):
  File "/usr/lib/freecad-daily/Mod/freecad/freecad_glider/tools/__init__.py", line 50, in Activated
    Gui.Control.showDialog(self.tool(self.glider_obj))
  File "/usr/lib/freecad-daily/Mod/freecad/freecad_glider/tools/__init__.py", line 200, in tool
    return shape_tool.ShapeTool(obj)
  File "/usr/lib/freecad-daily/Mod/freecad/freecad_glider/tools/shape_tool.py", line 30, in __init__
    self.front_cpc = ControlPointContainer(points, self.view)
  File "/usr/lib/freecad-daily/Mod/freecad/freecad_glider/tools/pivy_primitives.py", line 84, in __init__
    super(ControlPointContainer, self).__init__()

super(type, obj): obj must be an instance or subtype of type
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: glider workbench

Post by looo »

I guess this is an pivy issue but I have no idea why this is not working for you.

As you say lines are working, can you try the following. It would be strange if this tool work but the shape-tool not...
for moving the selected point you have to press "g".
Attachments
line-drag.gif
line-drag.gif (431.96 KiB) Viewed 4357 times
Mx74
Posts: 23
Joined: Fri Dec 08, 2017 12:39 pm

Re: glider workbench

Post by Mx74 »

Yes, it works perfectly. I can move the points, create some new line attachment points, create lines in-between and validate.
The glider is displayed with the change in the lines.

But the others menu I mentioned just show an error and the glider disappears.
Post Reply