Add parts to BooleanFragments

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
HoWil
Veteran
Posts: 1279
Joined: Sun Jun 14, 2015 7:31 pm
Location: Austria

Add parts to BooleanFragments

Post by HoWil »

Hello,
Is there a way to change the childs of BooleanFragments in part-Wb? I want to add or remove elements without deleting the existing BooleanFragments each time I have to change something and creating a new one.

BTW: I use BooleanFragments for building multibody-FEM-mesh-models. I have to change these models for different studies, that is why I need to change the BooleanFragments-elements.

The usual drag-n-drop to add something into a group is not working and there is no property in the Data-view where one could select/change the incorporated elements.
A python-console workaround would also be appreciated.
Thanks in advance,
HoWil
User avatar
microelly2
Veteran
Posts: 4688
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: Add parts to BooleanFragments

Post by microelly2 »

you can use a method in the open scad wb to replace components in a boolean tree
User avatar
Willem
Veteran
Posts: 1854
Joined: Fri Aug 12, 2016 3:27 pm
Location: Lisse, The Netherlands

Re: Add parts to BooleanFragments

Post by Willem »

Hi, drag and drop works well in my design. The only thing is you have to recompute by running the macro "Forcerecompute" because this is not done automatically, or you have to go on with your design until it recomputes automatically
HoWil
Veteran
Posts: 1279
Joined: Sun Jun 14, 2015 7:31 pm
Location: Austria

Re: Add parts to BooleanFragments

Post by HoWil »

microelly2 wrote:you can use a method in the open scad wb to replace components in a boolean tree
Hi microelly2,
this option is greyed out for me... see the attached screencast. Deleting works!
Willem wrote:Hi, drag and drop works well in my design. The only thing is you have to recompute by running the macro "Forcerecompute" because this is not done automatically, or you have to go on with your design until it recomputes automatically
Hi Willem,
Drag and drop does not work for me... please see the screencast. Are you doing something similar? Which version of FC do you use?

:arrow:
fc.webm
Screencast. showing the greyed out option in open-scad and forbidden drag and drop.
(577.88 KiB) Downloaded 245 times
Thanks in advance,
HoWil

OS: Ubuntu 16.04.2 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.10460 (Git)
Build type: None
Branch: master
Hash: 91c59c7910436c44ede608e29d9a90a287121a11
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: Add parts to BooleanFragments

Post by DeepSOIC »

I recently saw that drag-and-drop support is accessible to python, so I might have a crack at this.
User avatar
Willem
Veteran
Posts: 1854
Joined: Fri Aug 12, 2016 3:27 pm
Location: Lisse, The Netherlands

Re: Add parts to BooleanFragments

Post by Willem »

Hi, my version:

OS: Ubuntu 16.04.2 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.6707 (Git)
Build type: None
Branch: releases/FreeCAD-0-16
Hash: 5465bc47c95db45e0be85dc0e2872419efadce0f
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17

With a very simple design it drag and drop works, I made an example
Solid made with a Fuse and a Cut
A separate torus
Drag and drop torus in the Fuse
Forcerecompute with macro
The torus is now part of the Solid

I can imagine that with complex models the recompute can fail
boolean.gif
boolean.gif (397.95 KiB) Viewed 1315 times
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: Add parts to BooleanFragments

Post by DeepSOIC »

Willem wrote:Version: 0.16.6707 (Git)
It doesn't even have BooleanFragments! This is new to 0.17. They are completely different beast from regular BOPs in that they are implemented in python.
HoWil
Veteran
Posts: 1279
Joined: Sun Jun 14, 2015 7:31 pm
Location: Austria

Re: Add parts to BooleanFragments

Post by HoWil »

Willem wrote: With a very simple design it drag and drop works, I made an example
Solid made with a Fuse and a Cut
A separate torus
Drag and drop torus in the Fuse
Forcerecompute with macro
The torus is now part of the Solid

I can imagine that with complex models the recompute can fail
Dear Willem,

Fuse like all Boolean operations does work for me too. The operation I need is "Boolean Fragments"
32px-Part_BooleanFragments.png
32px-Part_BooleanFragments.png (1.92 KiB) Viewed 1310 times
(see Part_BooleanFragments or https://www.freecadweb.org/wiki/Part_BooleanFragments) and here the interface behaves different!!

Thanks nevertheless,
BR,
HoWil
Last edited by HoWil on Mon Mar 13, 2017 12:11 pm, edited 1 time in total.
HoWil
Veteran
Posts: 1279
Joined: Sun Jun 14, 2015 7:31 pm
Location: Austria

Re: Add parts to BooleanFragments

Post by HoWil »

DeepSOIC wrote:I recently saw that drag-and-drop support is accessible to python, so I might have a crack at this.
Thx
User avatar
microelly2
Veteran
Posts: 4688
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: Add parts to BooleanFragments

Post by microelly2 »

HoWil wrote:
microelly2 wrote:you can use a method in the open scad wb to replace components in a boolean tree
Hi microelly2,
this option is greyed out for me... see the attached screencast. Deleting works!
You have to select 3 objects:
1. the complete target (example cut)
2. the subpart which should be replaced (example cylinder)
3. the new subpart (example sphere)
Attachments
bp_413.png
bp_413.png (59.88 KiB) Viewed 1283 times
bp_414.png
bp_414.png (39.95 KiB) Viewed 1283 times
Post Reply