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

Discussion about the development of the Assembly workbench.
User avatar
DeepSOIC
Posts: 7810
Joined: Fri Aug 29, 2014 12:45 am
Location: Saint-Petersburg, Russia

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

Postby DeepSOIC » Thu Sep 07, 2017 10:53 am

DeepSOIC wrote:
Wed Sep 06, 2017 12:54 pm
I plan to doodle some assembly graphs, stay tuned. It's going to be even more pictures, so it's going to take a while.
Life got in a way. That's unlikely to happen soon.
realthunder
Posts: 1759
Joined: Tue Jan 03, 2017 10:55 am

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

Postby realthunder » Sat Nov 18, 2017 8:11 pm

DeepSOIC wrote:
Thu Sep 07, 2017 10:53 am
I plan to doodle some assembly graphs, stay tuned. It's going to be even more pictures, so it's going to take a while.
It's been a while since my last post regarding anything about assembly. It is because I actually started working on assembly3, about three days before you started this thread. My assembly3 is all python code, but mostly as bridge to two major C++ components,

* object hierarchy, instance, export, import, external links, which are provided by FC core in my heavily modified branch.
* constraint solver. Assembly3 supports multiple solver backend. I've added two backends, SolveSpace (C++ with python binding, great performance, but unfortunately GPL), and SciPy+SymPy (python based, but have C++ acceleration)

I haven't announced assembly3 yet, because there is a lot of documentation work yet to be done. I am in the stage of final testing by converting one of my device assembly into assembly3. In case anyone is curious and brave enough to take a look at the code, https://github.com/realthunder/FreeCAD_assembly3

About your ideas, I have implemeted scoped object recomputation in my branch https://github.com/realthunder/FreeCAD/ ... nkStage3.8. Simply pass in an object list to doc.recompute(objs). It will gather all dependent objects like your described. It even supports objects from different documents because my ProperyXLink supports link into external document.

I can't comment much on your second idea. Because, well, I am actually working on the next generation of property link. Besides the direct instance linking, Assembly3 showcase the advance usage of cross coordinate linking. I have also implemented cross coordinate editing in my FC branch, e.g. for the same sketch object inside different LinkGroup (my version of geo group with no link restriction, except of course obvious cyclic references), you can initiate the editing by simply double click the sketch object, and it will start editing at its current location. And this will work even if the sketch object is actually located inside any external document. Yes, LinkGroup supports external linking, by simply dragging an external object into the group. You can even drop an object multiple times to get multiple link instances of the same object in the group. It has lots of other features, which requires quite some effort to document.
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
User avatar
Kunda1
Posts: 8430
Joined: Thu Jan 05, 2017 9:03 pm

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

Postby Kunda1 » Sun Nov 19, 2017 3:45 pm

realthunder wrote:
Sat Nov 18, 2017 8:11 pm
I haven't announced assembly3 yet, because there is a lot of documentation work yet to be done. I am in the stage of final testing by converting one of my device assembly into assembly3. In case anyone is curious and brave enough to take a look at the code, https://github.com/realthunder/FreeCAD_assembly3
Trailblazer! 8-)
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
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 » Sun Nov 19, 2017 7:47 pm

Hi @realthunder.

Nice to see you are still working on the Assembly 3 effort. Things like bringing SolveSpace to FreeCAD was discussed on multiple occasions in the past. And seeing this in action should for sure be interesting. True that upstreaming GPL code likely wouldn't be possible ATM. But using an external/optional GPL library like SolveSpace AFAIK shouldn't be an issue (an aggregate).

As for the rest looking forward for the official announcement of the Assembly 3 effort. Just reading the description FreeCAD 0.18 development cycle is likely going to be fun!
User avatar
easyw-fc
Posts: 2905
Joined: Thu Jul 09, 2015 9:34 am

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

Postby easyw-fc » Sun Nov 19, 2017 8:52 pm

realthunder wrote:
Sat Nov 18, 2017 8:11 pm
My assembly3 is all python code, but mostly as bridge to two major C++ components,
Hi @realthunder
I'm glad to see A3 is growing :D

EDIT: I see I would need also your FC branch to test it :)
https://github.com/realthunder/FreeCAD_ ... 3/issues/1
Thx to work on it anyway
M
Last edited by easyw-fc on Sun Nov 19, 2017 10:15 pm, edited 3 times in total.
User avatar
DeepSOIC
Posts: 7810
Joined: Fri Aug 29, 2014 12:45 am
Location: Saint-Petersburg, Russia

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

Postby DeepSOIC » Sun Nov 19, 2017 8:57 pm

@realthunder, looks like you have some groundbreaking progress. It might be one huge step to FreeCAD World Domination :mrgreen: . If it ever gets merged. If it isn't, you can probably start a new spinoff branch which will draw a lot of attention :P
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 » Sun Nov 19, 2017 11:39 pm

@realthunder

Imports (asm3) are broken/missing ATM. I did get to the part where i could insert new Assembly and add a few parts to it. By fixing the imports.

P.S. Didn't manage to get to the Constraints/Solver situation today.
realthunder
Posts: 1759
Joined: Tue Jan 03, 2017 10:55 am

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

Postby realthunder » Mon Nov 20, 2017 3:43 am

triplus wrote:
Sun Nov 19, 2017 11:39 pm
@realthunder

Imports (asm3) are broken/missing ATM. I did get to the part where i could insert new Assembly and add a few parts to it. By fixing the imports.

P.S. Didn't manage to get to the Constraints/Solver situation today.
What import action are you referring to? I've added some import commands grouped under link actions sub menu. The sub menu is available when you activate any standard workbench, e.g. Asesmbly3, Part, etc, and then right click some item in the tree view. Depending on the clicked items, and its containing document, you get different actions. If the item contains an external link, then you get action called 'import link', which will copy the linked object into the current document, and change the link to point to the imported copy. If the document contains more external links, you will have the 'import all links'.

There are other useful link actions, none of which are specific to assembly. For example, for a fusion object, you can right click one of its child object, and select link action 'replace with link', which will replace the child object with a link. You can now freely move the actual child object without affecting the fusion. Or, you can copy the child object to another document (the document must be saved first before being able to linked externally, in order to calculate the relative file path), and then manually change the link to point to the external copy. The link property editor is modified to let you switch to other document for external object selection, or you can simply use drag and drop. After linking externally, you can right click that link, and import it back.

I'll soon put up a readme for asm3 repo for those eager to try it early.
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 » Mon Nov 20, 2017 12:07 pm

realthunder wrote:
Mon Nov 20, 2017 3:43 am
What import action are you referring to?

Code: Select all

import asm3
This import is used frequently in your code. But you didn't provide the asm3 module in your GitHub repository:

https://github.com/realthunder/FreeCAD_assembly3
realthunder
Posts: 1759
Joined: Tue Jan 03, 2017 10:55 am

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

Postby realthunder » Mon Nov 20, 2017 5:40 pm

triplus wrote:
Mon Nov 20, 2017 12:07 pm
realthunder wrote:
Mon Nov 20, 2017 3:43 am
What import action are you referring to?

Code: Select all

import asm3
This import is used frequently in your code. But you didn't provide the asm3 module in your GitHub repository:

https://github.com/realthunder/FreeCAD_assembly3
Hmm...that's strange. How can you get anything work then? The reason for that is, my python lint keep complaining something about relative import blah blah, if I didn't explicitly import my own main module. You can simply rename the git checkout directory to asm3 in the Mod directory to solve the problem. Anyway, I'll put detail instruction in the readme soon.
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