Updated JoinFeatures + new tools: Boolean Fragments, Slice, XOR

Info about new community or project announcements, implemented features, classes, modules or APIs. Might get technical!
PLEASE DO NOT POST HELP REQUESTS OR OTHER DISCUSSIONS HERE!
User avatar
DeepSOIC
Posts: 6538
Joined: Fri Aug 29, 2014 12:45 am
Location: Saint-Petersburg, Russia

Updated JoinFeatures + new tools: Boolean Fragments, Slice, XOR

Postby DeepSOIC » Sat Jul 30, 2016 2:28 pm

The new tools based on generalFuse have been merged recently!

Since it was already described, I'm just linking to the test request topic:
viewtopic.php?f=10&t=16644

Here, I only want to say thanks to all who helped me with testing and motivation, especially to bernd!
And to Werner for reviewing, merging, and fixing some of my goof-ups!
EDIT: Forgot to mention vejmarie, who patched FreeCAD to support OCC7, and sgrogan, who made a libpack with OCC7 that opened up the possibility :D
Attachments
connect-torture.png
Connecting pipes of equal diameter was almost impossible with old Connect. The new one seems to be much better at this!
connect-torture.png (364.61 KiB) Viewed 2056 times
triplus
Posts: 8364
Joined: Mon Dec 12, 2011 4:45 pm

Re: Updated JoinFeatures + new tools: Boolean Fragments, Slice, XOR

Postby triplus » Sat Jul 30, 2016 3:01 pm

Congratulations and thanks for creating it and improving a set of existing tools.
User avatar
yorik
Site Admin
Posts: 11161
Joined: Tue Feb 17, 2009 9:16 pm
Location: São Paulo, Brazil
Contact:

Re: Updated JoinFeatures + new tools: Boolean Fragments, Slice, XOR

Postby yorik » Sat Jul 30, 2016 3:07 pm

Great! Now we just need a good basic tube tool. It's been on my todo list for a while...
vejmarie
Posts: 521
Joined: Mon Jan 04, 2016 4:52 pm
Location: Somewhere between France, USA and Taiwan
Contact:

Re: Updated JoinFeatures + new tools: Boolean Fragments, Slice, XOR

Postby vejmarie » Sat Jul 30, 2016 5:58 pm

DeepSOIC wrote:The new tools based on generalFuse have been merged recently!

Since it was already described, I'm just linking to the test request topic:
viewtopic.php?f=10&t=16644

Here, I only want to say thanks to all who helped me with testing and motivation, especially to bernd!
And to Werner for reviewing, merging, and fixing some of my goof-ups!
EDIT: Forgot to mention sgrogan, who made a libpack with OCC7 that opened up the possibility :D
Yeah that is a massive improvement ;), congrats ! . Happy to have pushed for OCCT7 ;). Let's build up something super efficient for FeM out of it now.
I read your code and was wondering if for some efficiency we could move some part to the C++ code instead of keeping the computation part in Python (easy to say harder to implement). One of our users is complaining about execution speed regarding redrawing of complex geometries (he is doing complex shape with a lot of non coplanar faces, and a lot of join/fuse feature).
User avatar
DeepSOIC
Posts: 6538
Joined: Fri Aug 29, 2014 12:45 am
Location: Saint-Petersburg, Russia

Re: Updated JoinFeatures + new tools: Boolean Fragments, Slice, XOR

Postby DeepSOIC » Sat Jul 30, 2016 6:25 pm

vejmarie wrote:Happy to have pushed for OCCT7 .
Yeah, I forgot to mention you too :oops: fixed ;)
vejmarie wrote:I read your code and was wondering if for some efficiency we could move some part to the C++ code instead of keeping the computation part in Python (easy to say harder to implement)
As for Connect on solids, I don't expect much gain. But for connect on shells and wires, the gain can potentially be massive in certain cases.

In any case, I think profiling the actual computation times of the GFA itself and the post-processing Py code is needed to see, how much of an improvement can be achieved, and if it is worth the effort. And probably, only a few small pieces of the code have to be moved to C++.

I am slowly thinking of a general connexity map object. That can be terribly useful for all sorts of stuff. I think OCC itself has something to offer in this regard.
vejmarie
Posts: 521
Joined: Mon Jan 04, 2016 4:52 pm
Location: Somewhere between France, USA and Taiwan
Contact:

Re: Updated JoinFeatures + new tools: Boolean Fragments, Slice, XOR

Postby vejmarie » Sat Jul 30, 2016 6:39 pm

DeepSOIC wrote:Yeah, I forgot to mention you too :oops: fixed ;)
Do not worry !!
DeepSOIC wrote:As for Connect on solids, I don't expect much gain. But for connect on shells and wires, the gain can potentially be massive in certain cases.

In any case, I think profiling the actual computation times of the GFA itself and the post-processing Py code is needed to see, how much of an improvement can be achieved, and if it is worth the effort. And probably, only a few small pieces of the code have to be moved to C++.

I am slowly thinking of a general connexity map object. That can be terribly useful for all sorts of stuff. I think OCC itself has something to offer in this regard.
I will try to run some profiling on my Mac and see if I can get something efficient out of it
User avatar
DeepSOIC
Posts: 6538
Joined: Fri Aug 29, 2014 12:45 am
Location: Saint-Petersburg, Russia

Re: Updated JoinFeatures + new tools: Boolean Fragments, Slice, XOR

Postby DeepSOIC » Sun Jul 31, 2016 10:39 am

I wrote some Wiki pages for Part BooleanFragments and Part Slice. I invite you to improve them ;)
triplus
Posts: 8364
Joined: Mon Dec 12, 2011 4:45 pm

Re: Updated JoinFeatures + new tools: Boolean Fragments, Slice, XOR

Postby triplus » Sun Jul 31, 2016 12:19 pm

If i compare it to the first attempts you put much more emphasise on it and the results are much better. Therefore i guess now it would be appropriate from my side to conclude this effort as it meets the desired quality.

One for the road: You named the result of the Boolean operation Fragments but in the description text you address it as Pieces.
cox
Posts: 963
Joined: Wed Nov 26, 2014 11:37 pm

Re: Updated JoinFeatures + new tools: Boolean Fragments, Slice, XOR

Postby cox » Sun Jul 31, 2016 6:46 pm

DeepSOIC wrote:I wrote some Wiki pages for Part BooleanFragments and Part Slice. I invite you to improve them ;)
Thanks DeepSOIC :D
Rely nice features and fantastic documentation, well done.
Need help? Feel free to ask, but please read the guidelines first
renatorivo
Posts: 2096
Joined: Tue Feb 21, 2012 8:07 pm
Location: Torino - Italy

Re: Updated JoinFeatures + new tools: Boolean Fragments, Slice, XOR

Postby renatorivo » Mon Sep 19, 2016 7:43 pm

Hi,
From http://www.freecadweb.org/wiki/index.ph ... Part_Tools
** [[Image:Part XOR.png|32px]] [[Part_XOR|XOR]]: removes space shared by even number of objects (symmetric version of [[Part_Cut|Cut]]) (v0.17)
To me it seems symmetrical to Part Common
or am I wrong?
Renato