glider workbench

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

Re: glider workbench

Post by looo »

I forget to mention that pivy has to be updated. But the version we use is fully compatible with the rest of FreeCAD. Again this can be done by directly installing from github.

Code: Select all

pip install https://github.com/FreeCAD/pivy/archive/master.zip
freecad-heini-1
Veteran
Posts: 7790
Joined: Tue Jan 07, 2014 11:10 am
Contact:

Re: glider workbench

Post by freecad-heini-1 »

looo wrote: Tue Dec 26, 2017 8:15 pm I forget to mention that pivy has to be updated. But the version we use is fully compatible with the rest of FreeCAD. Again this can be done by directly installing from github.

Code: Select all

pip install https://github.com/FreeCAD/pivy/archive/master.zip

Code: Select all

pip install https://github.com/FreeCAD/pivy/archive/master.zip
Collecting https://github.com/FreeCAD/pivy/archive/master.zip
  Downloading https://github.com/FreeCAD/pivy/archive/master.zip
     | 7.1MB 26.4MB/s
Installing collected packages: Pivy
  Found existing installation: Pivy 0.5.0
    DEPRECATION: Uninstalling a distutils installed project (Pivy) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: glider workbench

Post by looo »

Does this stop the installation or is it only a warning? The command should compile pivy, so you have to wait for about 5-10 minutes.
Varis
Posts: 4
Joined: Tue Dec 26, 2017 10:25 pm

Re: glider workbench

Post by Varis »

After running

Code: Select all

pip install https://github.com/booya-at/freecad_glider/archive/singleskin.zip
I get the following:

Code: Select all

$ pip install https://github.com/FreeCAD/pivy/archive/master.zip
Collecting https://github.com/FreeCAD/pivy/archive/master.zip
  Downloading https://github.com/FreeCAD/pivy/archive/master.zip (7.1MB)
    100% |████████████████████████████████| 7.1MB 156kB/s 
Installing collected packages: Pivy
  Running setup.py install for Pivy ... error
    Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-QtDJxs-build/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-z2Jbuc-record/install-record.txt --single-version-externally-managed --compile --user --prefix=:
    running install
    running build
    
                                _____
                            .-'`     '.
                         __/  __       \
                        /  \ /  \       |    ___
                       | /`\| /`\|      | .-'  /^\/^\
                       | \(/| \(/|      |/     |) |)|
                      .-\__/ \__/       |      \_/\_/__..._
              _...---'-.                /   _              '.
             /,      ,             \   '|  `\                \
            | ))     ))           /`|   \    `.       /)  /) |
            | `      `          .'       |     `-._         /
            \                 .'         |     ,_  `--....-'
             `.           __.' ,         |     / /`'''`
               `'-.____.-' /  /,         |    / /
                   `. `-.-` .'  \        /   / |
                     `-.__.'|    \      |   |  |-.
                        _.._|     |     /   |  |  `'.
                  .-''``    |     |     |   /  |     `-.
               .'`         /      /     /  |   |        '.
             /`           /      /     |   /   |\         \
            /            |      |      |   |   /\          |
           ||            |      /      |   /     '.        |
           |\            \      |      /   |       '.      /
           \ `.           '.    /      |    \        '---'/
            \  '.           `-./        \    '.          /
             '.  `'.            `-._     '.__  '-._____.'--'''''--.
               '-.  `'--._          `.__     `';----`              \
                  `-.     `-.          `.''```                     ;
                     `'-..,_ `-.         `'-.                     /
                            '.  '.           '.                 .'
    
    
                                ~~~ HISSSSSSSSSS ~~~
                               Welcome to Pivy 0.6.3!
                     Building Pivy has never been so much fun!
    
    
    Platform...linux2
    Python version...2.7.14
    Checking for swig...
    '/usr/bin/swig'
    Checking for SWIG version...
    3.0.10
    Warning: Pivy has only been tested with the following SWIG versions: 1.3.31 1.3.33 1.3.35 1.3.40.
    Checking for coin-config...
    not found.
    
    ----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-QtDJxs-build/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-z2Jbuc-record/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-QtDJxs-build/
seems that it is missing dependencies and those are not being managed.

Anyway, I installed pivy with the OS dependency manager (apt) and running

Code: Select all

$ pip install https://github.com/booya-at/freecad_glider/archive/singleskin.zip
succeeded.

Code: Select all

$ pip install https://github.com/booya-at/freecad_glider/archive/singleskin.zip
Collecting https://github.com/booya-at/freecad_glider/archive/singleskin.zip
  Downloading https://github.com/booya-at/freecad_glider/archive/singleskin.zip
     \ 1.1MB 964kB/s
Collecting openglider (from freecad-glider==0.1.2)
  Downloading OpenGlider-0.1.tar.gz (120kB)
    100% |████████████████████████████████| 122kB 1.1MB/s 
Collecting dxfwrite (from openglider->freecad-glider==0.1.2)
  Downloading dxfwrite-1.2.1-py2.py3-none-any.whl (84kB)
    100% |████████████████████████████████| 92kB 2.0MB/s 
Collecting ezodf2 (from openglider->freecad-glider==0.1.2)
  Downloading ezodf2-0.2.10.tar.gz
Collecting svgwrite (from openglider->freecad-glider==0.1.2)
  Using cached svgwrite-1.1.11-py2.py3-none-any.whl
Collecting numpy (from openglider->freecad-glider==0.1.2)
  Using cached numpy-1.13.3-cp27-cp27mu-manylinux1_x86_64.whl
Collecting ezdxf (from openglider->freecad-glider==0.1.2)
  Using cached ezdxf-0.8.2-py2.py3-none-any.whl
Collecting lxml (from ezodf2->openglider->freecad-glider==0.1.2)
  Downloading lxml-4.1.1-cp27-cp27mu-manylinux1_x86_64.whl (5.6MB)
    100% |████████████████████████████████| 5.6MB 217kB/s 
Collecting pyparsing>=2.0.1 (from svgwrite->openglider->freecad-glider==0.1.2)
  Using cached pyparsing-2.2.0-py2.py3-none-any.whl
Building wheels for collected packages: openglider, ezodf2
  Running setup.py bdist_wheel for openglider ... done
  Stored in directory: /home/tadas/.cache/pip/wheels/26/8b/13/a3b66eb57bdf26427677866fcdd3f5ebc51940cf886faf0fb8
  Running setup.py bdist_wheel for ezodf2 ... done
  Stored in directory: /home/tadas/.cache/pip/wheels/98/e0/43/17a8fea7bcfc44bd86f792e7890c93e6f298e159306beae903
Successfully built openglider ezodf2
Installing collected packages: dxfwrite, lxml, ezodf2, pyparsing, svgwrite, numpy, ezdxf, openglider, freecad-glider
  Running setup.py install for freecad-glider ... done
Successfully installed dxfwrite-1.2.1 ezdxf-0.8.2 ezodf2-0.2.10 freecad-glider-0.1.2 lxml-4.1.1 numpy-1.13.3 openglider-0.1 pyparsing-2.2.0 svgwrite-1.1.11
I cannot find the glider workbench in the FreeCAD workbench list though.

Image

OS: Ubuntu 17.10
FreeCAD 0.16
Fresh OS VM for testing the glider workbench.

What could be the issue that the glider workbench is not showing up in the list?

Thanks!
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: glider workbench

Post by jmaustpc »

Varis wrote: Tue Dec 26, 2017 10:39 pmFreeCAD 0.16
It says here
https://github.com/looooo/FCGear

That you need FreeCAD version greater than 0.16. I don't know if looo means "greater or equal to" or litterally "greater". If the second then you need FreeCAD 0.17 the development version.

Perhaps someone could clarify this?
freecad-heini-1
Veteran
Posts: 7790
Joined: Tue Jan 07, 2014 11:10 am
Contact:

Re: glider workbench

Post by freecad-heini-1 »

glider-wb_error.png
glider-wb_error.png (13.14 KiB) Viewed 5086 times
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: glider workbench

Post by looo »

wrote:What could be the issue that the glider workbench is not showing up in the list?
jmaustpc wrote: That you need FreeCAD version greater than 0.16. I don't know if looo means "greater or equal to" or litterally "greater". If the second then you need FreeCAD 0.17 the development version.
0.16 doesn't support pip installed workbenches. While there is a branch which is written to work with 0.16, I don't think it makes any sense to support older releases of FreeCAD.
UI-file doesn't exist
strange it should be installed with the latest version. Have you uninstalled and installed the freecad_glider library? there should be a file freecad/freecad_glider/ui/preferences.ui
Mx74
Posts: 23
Joined: Fri Dec 08, 2017 12:39 pm

Re: glider workbench

Post by Mx74 »

Hello,

I'm interested in this workbench, but I struggle with the installation process.

I have freecad-daily.
As explained I tried to install your version of Pivy, but I got the following error:

Code: Select all

 
 Platform...linux2
    Python version...2.7.12
    Checking for swig...
    '/usr/bin/swig'
    Checking for SWIG version...
    3.0.8
    calling: cmake .
    error: [Errno 2] No such file or directory
    
    ----------------------------------------
  Rolling back uninstall of Pivy
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-ZpBwhF-build/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-AVSFtD-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-ZpBwhF-build/
I try to install anyway,

but then while installing OpenGlider , I have a pb with MeshPy:

Code: Select all

building 'meshpy._triangle' extension
    creating build/temp.linux-x86_64-2.7
    creating build/temp.linux-x86_64-2.7/src
    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 -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:28: fatal error: boost/python.hpp: Aucun fichier ou dossier de ce type
    compilation terminated.
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
    
    ----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-01lMbB/meshpy/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-gqLiJF-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-01lMbB/meshpy/

And as a result, when I try to open the Glider workbench in FC, "cannot import name mesh"
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: glider workbench

Post by looo »

regarding pivy:
can you create an issue @https://github.com/FreeCAD/pivy/issues
+ adding as much information from your system as possible ;)

regarding meshpy:
this is another very difficult library. I will add a python replacement to openglider to get it working without meshpy. But the performance will suffer a bit.
Mx74
Posts: 23
Joined: Fri Dec 08, 2017 12:39 pm

Re: glider workbench

Post by Mx74 »

Hello,

Following you advice on pivy issues, I finally installed pivy 0.6.2.
Then install of freecad seems to works, I can see the workbench in FC, but when I click on it, it says "cannot import name mesh".

In the termnal I have the following:

Code: Select all

cannot import name mesh
Traceback (most recent call last):
  File "/usr/lib/freecad-daily/Mod/freecad/freecad_glider/init_gui.py", line 77, in Initialize
    from . import tools
  File "/usr/lib/freecad-daily/Mod/freecad/freecad_glider/tools/__init__.py", line 13, in <module>
    from . import _glider as glider
  File "/usr/lib/freecad-daily/Mod/freecad/freecad_glider/tools/_glider.py", line 8, in <module>
    from openglider import mesh
Post Reply