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 »

triplus wrote: Tue Dec 05, 2017 9:27 pm About the possibility to run from Mod in the build directory. Unfortunately that doesn't work for me (i get the same behavior as when .FreeCAD/Mod is used). But all in all great we can now both reproduce this.

P.S. As for changing imports take your time.
Well, I did some quick fix, but got nowhere. I'm kinda new in Python. After you've moved asm3 to the build Mod directory, please run the following code in console and post up your error message.

Code: Select all

import asm3
Also, please post the output of the following code

Code: Select all

import sys
for p in sys.path:
	print p
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
freecad-heini-1
Veteran
Posts: 7788
Joined: Tue Jan 07, 2014 11:10 am
Contact:

Re: Assembly3 preview

Post by freecad-heini-1 »

realthunder wrote: Wed Dec 06, 2017 8:24 am
freecad-heini-1 wrote: Wed Dec 06, 2017 8:05 am Ickby is working on assembly workbench for Freecad 0.17. What about teamwork?
I've discussed with him in quite a few occasions. For example, see here, and here. As you can see, we have different opinions on how the container should behave. And unfortunately, none of the discussions lead anywhere.
Thank's for your answer. Whow - very interesting stuff. Seems to me if there are two different position. You and Deepsoic / triplus and ickby. From my feeling as experienced cad-user and cad-trainer, I'm more at your side, because my actual Freecad version 12697 with Xubuntu in combination with PartDesign is not really useable. From my point of view there are too many restrictions in PDN and other workbenches, if it is needed to move or rotate a group of parts combined with boolean operation. But maybe I'm wrong because of ignorance / lack of knowledge concerning the new workflow or a unfinished FC0.17 version.
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Assembly3 preview

Post by triplus »

freecad-heini-1 wrote: Wed Dec 06, 2017 2:00 pm You and Deepsoic / triplus and ickby.
Nah. That would be oversimplification. If you want the whole picture you would likely need to read a few years of occasional discussions. As for the oversimplification. FreeCAD 0.17 development cycle is more or less in feature freeze state now. Therefore my current position is it would be a bad practice to change everything at the end of the development cycle. As for the next development cycle my position is we should do whatever makes the most sense.
realthunder wrote: Wed Dec 06, 2017 8:30 am

Code: Select all

import asm3
No issues it imports.

Relevant paths:

Code: Select all

/home/user/Assembly/build/Mod/asm3
/home/user/Assembly/build/Mod
P.S. But note that whatever you are getting when you put the asm3 module in .FreeCAD/Mod. That is highly likely the same what i am getting.
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Assembly3 preview

Post by triplus »

Imports.png
Imports.png (24.2 KiB) Viewed 72624 times
All the issues i have mentioned are clearly related to importing modules. Therefore currently two main options exist on how to fix it:

https://forum.freecadweb.org/viewtopic. ... 12#p202881
https://forum.freecadweb.org/viewtopic. ... 20#p200351
realthunder
Veteran
Posts: 2190
Joined: Tue Jan 03, 2017 10:55 am

Re: Assembly3 preview

Post by realthunder »

triplus wrote: Wed Dec 06, 2017 5:58 pm All the issues i have mentioned are clearly related to importing modules. Therefore currently two main options exist on how to fix it:

https://forum.freecadweb.org/viewtopic. ... 12#p202881
https://forum.freecadweb.org/viewtopic. ... 20#p200351
I've made an attemp to migrate to the new style FC extension. Can you please try my branch at https://github.com/realthunder/FreeCAD_ ... /ImportFix

You need to move asm3 directory from Mod into Ext/freecad in your FC build/installation directory

Let me know if it works for you.
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
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Assembly3 preview

Post by triplus »

I can confirm:
  • "Old import style" module. Where i have changed the imports locally works from ./FreeCAD/Mod.
  • Your proposed fix using the "new import style" works from build/Ext/freecad folder. There is __init__.py in there already by default.
  • If i copy the Ext folder (together with the __init__.py that has some lines in it) inside ./FreeCAD/Mod folder that works too.
I have no idea if there is some standard location in ./FreeCAD folder for the "new import style" modules. And if user should create the __init__.py file manually or not.

P.S. But all in all Assembly 3 module should now be ready for some testing! Will do that latter today when time permits.
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: Assembly3 preview

Post by looo »

I have no idea if there is some standard location in ./FreeCAD folder for the "new import style" modules. And if user should create the __init__.py file manually or not.
not yet. if a directory with name "freecad" is placed in any directory which is in sys.path FreeCAd looks for directories containing init-files (init_gui.py and init.py) inside the freecad directory. So there are allready some options:

- /usr/lib/pythonx.y/dist-packages/freecad
- /usr/lib/freecad/Ext/freecad
- ~/.local/lib/pythonx.y/site-packages/freecad

Maybe we should also add a standart location in .FreeCAD. But I think adding a setup.py and let python deside by it's own where to install the library is the best way. Pip let you install a linked version by pip instll -e . For using pip the library must be structured like shown here: https://github.com/looooo/Workbench-Starterkit .
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Assembly3 preview

Post by triplus »

From an average user and cross-platform instructions point of view that sounds a bit complex? Therefore i would vote for in addition having a standard folder inside .FreeCAD.
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: Assembly3 preview

Post by looo »

cross-platform instructions point
python and pip is cross-platform!!! and everything looks complex if you are not used to it :D
Therefore i would vote for in addition having a standard folder inside .FreeCAD.
I am ok with that. Maybe we can discuss the name in the topic for the extension modules: https://forum.freecadweb.org/viewtopic. ... re#p193321
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Assembly3 preview

Post by triplus »

looo wrote: Wed Dec 06, 2017 9:07 pm python and pip is cross-platform!!! and everything looks complex if you are not used to it :D
Not from developer point of view. Assembly 3 now uses new style imports. And therefore you can't just put the module in .FreeCAD/Mod anymore. When an average user without any knowledge of Python or pip will come and ask. Where to put such module to test it. The answer should be rather simple. Like for example put it in .FreeCAD/Mod/freecad or .FreeCAD/Ext/freecad or something like that and it should work after.
Post Reply