An idea how to solve cross-cs support and assembly recompute

Discussion about the development of the Assembly workbench.
triplus
Posts: 9475
Joined: Mon Dec 12, 2011 4:45 pm

Re: An idea how to solve cross-cs support and assembly recompute

Postby triplus » Mon Nov 20, 2017 7:35 pm

realthunder wrote: Mon Nov 20, 2017 5:40 pm You can simply rename the git checkout directory to asm3 in the Mod directory to solve the problem.
Doesn't do the trick on my side. I have to change the imports manually in the code to get it working.
Hmm...that's strange. How can you get anything work then?
It's rather simple. From the current structure point of view instead of:

Code: Select all

import asm3
asm3.gui
You would use this:

Code: Select all

import gui
gui
But as all FreeCAD developers "share" FreeCAD it makes sense to use unique prefix to avoid possible module name clashes. As more developers could create a module named gui.py. For example:

Code: Select all

import Assembly3Gui
You can use whatever module name style you prefer to name the module(s). But the prefix should be unique (workbench name is unique).

P.S. Note that just recently a totally new possibility of creating a FreeCAD module was added. If you want to study (discuss, further improve) it:

https://forum.freecadweb.org/viewtopic.php?f=10&t=23197
https://github.com/looooo/Workbench-Starterkit
realthunder
Posts: 2009
Joined: Tue Jan 03, 2017 10:55 am

Re: An idea how to solve cross-cs support and assembly recompute

Postby realthunder » Tue Nov 21, 2017 4:37 pm

Ok, I'll sort it out. But I got caught up with something this week, so may have to delay till next week. And since all these discussion are off topic now, I'll start a new topic once I got the readme ready.
Try Assembly3 (latest version 0.11) 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
triplus
Posts: 9475
Joined: Mon Dec 12, 2011 4:45 pm

Re: An idea how to solve cross-cs support and assembly recompute

Postby triplus » Tue Nov 21, 2017 5:54 pm

Sounds good.