Assembly3 preview

Discussion about the development of the Assembly workbench.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
realthunder
Veteran
Posts: 2190
Joined: Tue Jan 03, 2017 10:55 am

Re: Assembly3 preview

Post by realthunder »

wsteffe wrote: Tue Aug 21, 2018 6:53 am "/home/walter/Software/FreeCad/FreeCAD/build" was created by me as the build directory of FC.
In this case, you should move the asm3 directory into /home/walter/Software/FreeCad/FreeCAD/build/Ext/freecad/
Try Assembly3 with my custom build of FreeCAD at here.
And if you'd like to show your support, you can donate through patreon, liberapay, or paypal
wsteffe
Posts: 461
Joined: Thu Aug 21, 2014 8:17 pm

Re: Assembly3 preview

Post by wsteffe »

moved (actually copied with cp -a)
$ ls /home/walter/Software/FreeCad/FreeCAD/build/Ext/freecad
asm3 __init__.py

$ ls /home/walter/Software/FreeCad/FreeCAD/build/Ext/freecad/asm3
assembly.py Gui LICENSE py_slvs_mac sys_slvs.py
constraint.py gui.py mover.py Readme.md sys_sympy.py
deps init_gui.py proxy.py slvs system.py
FCADLogger.py __init__.py py_slvs solver.py utils.py


But it does not get installed. Where is supposed to go after make install ?
realthunder
Veteran
Posts: 2190
Joined: Tue Jan 03, 2017 10:55 am

Re: Assembly3 preview

Post by realthunder »

wsteffe wrote: Tue Aug 21, 2018 7:15 am But it does not get installed. Where is supposed to go after make install ?
How do you start FreeCAD? You can direct launch FC by running build/bin/FreeCAD, and in this case you'll see the asm3 workbench. I guess you install FC by "make install"? In this case, you need to find your user python site-package by running

Code: Select all

python -m site --user-site
It is usually located at .local/lib/python2.7/site-packages. Make sure there is a "freecad" directory inside, which I think should be created by "make install". If you don't see this directory, create it, and also create an empty __init__.py file. Then, copy asm3 directory inside this "freecad" directory, and then start FC.
Try Assembly3 with my custom build of FreeCAD at here.
And if you'd like to show your support, you can donate through patreon, liberapay, or paypal
wsteffe
Posts: 461
Joined: Thu Aug 21, 2014 8:17 pm

Re: Assembly3 preview

Post by wsteffe »

Ok thanks realthunder,
now I have created the missing folder freecad in ~/.local/lib/python2.7/site-packages:

$ ls ~/.local/lib/python2.7/site-packages/freecad
asm3 __init__.py

And finally I have the workbench Assembly3.

Probably there is the need to add something into the cmake files so that these action are handled inside of the make install.
User avatar
fosselius
Posts: 381
Joined: Sat Apr 23, 2016 10:03 am
Contact:

Re: Assembly3 preview

Post by fosselius »

I can confirm that you do not get a .local/lib folder after make install. I only have a .local/share. I am running Ubuntu 18.04

Code: Select all

maiden@horse:~$ python -m site --user-site
/home/maiden/.local/lib/python2.7/site-packages
maiden@horse:~$ ls /home/maiden/.local/lib/python2.7/
ls: cannot access '/home/maiden/.local/lib/python2.7/': No such file or directory
Here is the step-by-step how i got asm3 running:

Code: Select all

git clone https://github.com/realthunder/FreeCAD_assembly3.git asm3
cd asm3/
git submodule update --init slvs
cd slvs/
git checkout python
git submodule update --init extlib/libdxfrw
mkdir build
cd build/
cmake -DBUILD_PYTHON=1 ..
make _slvs
cd ..
mkdir py_slvs
echo "" > py_slvs/__init__.py
cp slvs/build/src/swig/python/slvs.py py_slvs/
cp slvs/build/src/swig/python/_slvs.so py_slvs/
cd ..
ln -s [ABSOLUTE PATH]/asm3 [FreeCAD LinkStage3]/build/Ext/freecad/
cd  [FreeCAD LinkStage3]/build/bin/
./FreeCAD
wsteffe
Posts: 461
Joined: Thu Aug 21, 2014 8:17 pm

Re: Assembly3 preview

Post by wsteffe »

But why you do not simply add a "CMakeLists.txt" inside of Ext/freecad/asm3 directory which install all stuff into INSTALL_DIR/Ext/freecad
(or in INSTALL_DIR/Mod).

and, of course, the following line somewhere in Ext/freecad:
add_subdirectory(asm3)

This is the way all other module are installed. Why Assembly3 has to be installed apart in side of /.local/lib/python2.7/site-packages/freecad ?
realthunder
Veteran
Posts: 2190
Joined: Tue Jan 03, 2017 10:55 am

Re: Assembly3 preview

Post by realthunder »

wsteffe wrote: Tue Aug 21, 2018 10:16 am But why you do not simply add a "CMakeLists.txt" inside of Ext/freecad/asm3 directory which install all stuff into INSTALL_DIR/Ext/freecad
(or in INSTALL_DIR/Mod).

and, of course, the following line somewhere in Ext/freecad:
add_subdirectory(asm3)

This is the way all other module are installed. Why Assembly3 has to be installed apart in side of /.local/lib/python2.7/site-packages/freecad ?
Assembly3 is meant to be an external module, because of license issue. And FC new style python module is meant to be installable through pip, which I haven't add support yet, because not many people want to build the entire FC on their own, and there is pre-built image available. Those intermediate site-packages directory are supposed to be taken care of by pip.
Try Assembly3 with my custom build of FreeCAD at here.
And if you'd like to show your support, you can donate through patreon, liberapay, or paypal
wsteffe
Posts: 461
Joined: Thu Aug 21, 2014 8:17 pm

Re: Assembly3 preview

Post by wsteffe »

Oh, I see realtunder, it seems a good idea to let it installable trough pip.

perhaps you could have put only the solvespace part in the src/Ext folder keeping GUI assembly.py constraint.py ... inside of src/Mod.
But may be you have done in this way because you consider Assembly3 as a simply wrapper of solvespace constraint solver.
wsteffe
Posts: 461
Joined: Thu Aug 21, 2014 8:17 pm

Re: Assembly3 preview

Post by wsteffe »

Hello I am getting the folowing error message (repeated several times) inside of the Report view:
Show.TempoVis.isIn3DView error: No module named pivy

But all seems working well. Am I missing something ?
User avatar
kwahoo
Posts: 686
Joined: Fri Nov 29, 2013 3:09 pm
Contact:

Re: Assembly3 preview

Post by kwahoo »

Hi,
Another report for the module:

AxialAlightment constraint fail to solve in some cases when two cylindrical faces are used to define the constraint.

Video and the test assembly:
phpBB [video]

assy-test.zip
(40.5 KiB) Downloaded 48 times
OS: Ubuntu 18.04.1 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.5235 (Git shallow) AppImage
Build type: None
Branch: LinkStage3
Hash: ccaa87e12aaadbd3106607fc503542a863b742da
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: Polish/Poland (pl_PL)
Post Reply