Assembly3 preview

Discussion about the development of the Assembly workbench.
realthunder
Posts: 1026
Joined: Tue Jan 03, 2017 10:55 am

Re: Assembly3 preview

Postby realthunder » Tue Aug 21, 2018 6:56 am

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 (latest version 0.10.2) along 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: 142
Joined: Thu Aug 21, 2014 8:17 pm

Re: Assembly3 preview

Postby wsteffe » Tue Aug 21, 2018 7:15 am

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
Posts: 1026
Joined: Tue Jan 03, 2017 10:55 am

Re: Assembly3 preview

Postby realthunder » Tue Aug 21, 2018 7:28 am

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 (latest version 0.10.2) along 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: 142
Joined: Thu Aug 21, 2014 8:17 pm

Re: Assembly3 preview

Postby wsteffe » Tue Aug 21, 2018 7:54 am

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: 340
Joined: Sat Apr 23, 2016 10:03 am

Re: Assembly3 preview

Postby fosselius » Tue Aug 21, 2018 7:58 am

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: 142
Joined: Thu Aug 21, 2014 8:17 pm

Re: Assembly3 preview

Postby wsteffe » 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 ?
realthunder
Posts: 1026
Joined: Tue Jan 03, 2017 10:55 am

Re: Assembly3 preview

Postby realthunder » Tue Aug 21, 2018 10:29 am

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 (latest version 0.10.2) along 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: 142
Joined: Thu Aug 21, 2014 8:17 pm

Re: Assembly3 preview

Postby wsteffe » Tue Aug 21, 2018 11:42 am

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: 142
Joined: Thu Aug 21, 2014 8:17 pm

Re: Assembly3 preview

Postby wsteffe » Tue Aug 21, 2018 3:25 pm

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: 218
Joined: Fri Nov 29, 2013 3:09 pm
Contact:

Re: Assembly3 preview

Postby kwahoo » Tue Aug 21, 2018 4:28 pm

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 11 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)