Reordering / Insertion of Boolean Operations

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!
nelno
Posts: 6
Joined: Sun Nov 22, 2020 9:33 pm

Reordering / Insertion of Boolean Operations

Post by nelno » Sun Nov 22, 2020 10:20 pm

Hello there!

First, I'm really impressed by FreeCAD. Second, I have next to no CAD experience but I do have (a lot of) real-time 3D rendering, CSG and mesh modeling and animation experience (Maya, 3DSMAX, Blender, Lightwav, Modo, etc.). Hopefully that means I'll have some basis for understanding the answers here. And sorry if there's already an answer to this. I spent quite a while searching Google and these forums for an answer, without luck. Maybe I'm using the wrong terminology, or I'm just blind, because this seems like something that should be simple to do.

Background:
I am working on a plug and receptacle to replace one on a Spectravideo 328 computer from ~1984. I have the computer but not the original receptacle or power supply so I'm doing this basically from scratch.

I had to give up on Blender 2.9 because of struggling with it to get even simple boolean operations to work correctly. That's not surprising since it's not parametric, but it was frustrating and time consuming because I would have to repair surfaces by hand, which made going back and making modifications incredibly painful. I tried Fusion 360 for a night or two but I found it to be an incredibly nonintuitive. I've spent about 2 days working with FreeCAD since then.

Status:
I have mostly figured out how to do what I want. I have sketches for basically everything and I promote those to 3D pieces via extrusion, then combine those with boolean ops. I stopped trying to use Bodies and Parts. I did not understand how Bodies were supposed to work, and Parts seemed to do similar things. I mainly couldn't understand what FreeCAD was doing with the grouping in Bodies and why when I moved one thing into a Body, it would move other things with it. I've since just started using hierarchies of boolean operations to combine objects and this worked perfectly for 3D printing my prototype.

I still have a way to go. For one I need the sheath on the back of the plug to be removable and snap on so I can reach the molex pins, I need to do some cut-outs for the molex pins to slot in, adjust some tolerances, etc., but I feel I'm on a pretty good path now.

The Problem(s):
The hex nut holes I made (selected and green in the screen shot) in the bottom of the piece just don't work well for 3D printing because they need supports. The cylinders inside of them are a try at supports, but they're just too hard to remove after printing. Instead, I have shortened the entire back end by 2 mm so my 20 mm screws will extend enough out of the back to allow the nuts to be placed on them. This is why the hex bodies and cylindrical supports both extend beyond the bottom of the plug receptacle.

I have these nice (as I see it... I'm sure there's a better way) hierarchies of boolean operations, but I want to go back and remove some or add others. I've figured out how to modify an existing one, recompute it, etc, but:
1) How do I remove a boolean operation from an existing hierarchy?
2) How to I add a new boolean operation into an existing hierarchy?
3) How do I re-order boolean operations?
4) Can I just disable a boolean operation? i.e. make it so the result of a cut is just one or the other of the input features?

I specifically I want to remove (or just skip) the hex hole cuts and the cylindrical supports (visible under the "Receptacle (Fillet003)" node in the hierarchy.

As for insertion. last night I need to add another cut in the middle of one of these hierarchies and I had to redo all of the cuts above it. I couldn't figure out another way.

So, what am I missing? I can't delete an op without it deleting the children. What I really want to do is re-parent children to the part of the op I want to delete.

OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.4 (GitTag)
Build type: Release
Branch: releases/FreeCAD-0-18
Hash: 980bf9060e28555fecd9e3462f68ca74007b70f8
Python version: 3.6.6
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)
Attachments
freecad_question1.png
freecad_question1.png (146.61 KiB) Viewed 266 times
freecad_question2.png
freecad_question2.png (164.4 KiB) Viewed 266 times
chrisb
Posts: 30821
Joined: Tue Mar 17, 2015 9:14 am

Re: Reordering / Insertion of Boolean Operations

Post by chrisb » Sun Nov 22, 2020 10:48 pm

nelno wrote:
Sun Nov 22, 2020 10:20 pm
1) How do I remove a boolean operation from an existing hierarchy?
2) How to I add a new boolean operation into an existing hierarchy?
3) How do I re-order boolean operations?
4) Can I just disable a boolean operation? i.e. make it so the result of a cut is just one or the other of the input features?
(That is much easier to do in PartDesign.)

1) Delete it or edit the Shapes property
2) Edit the Shapes property and a
3) Select the objects in the right order when editing the Shapes property
4) No.
You need at least FreeCAD 0.19.23300 to edit my current sketches.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
nelno
Posts: 6
Joined: Sun Nov 22, 2020 9:33 pm

Re: Reordering / Insertion of Boolean Operations

Post by nelno » Mon Nov 23, 2020 1:23 am

chrisb wrote:
Sun Nov 22, 2020 10:48 pm
(That is much easier to do in PartDesign.)

1) Delete it or edit the Shapes property
2) Edit the Shapes property and a
3) Select the objects in the right order when editing the Shapes property
4) No.
Thank you for the help, but I'm still rather confused.

1) When I delete a boolean op, for instance under "Receptacle (Fillet003)", it deletes all of the child operations, too. That's definitely not what I want. I don't see any Shapes property anywhere.
2) Again, can't find a Shapes property.
3) Same as 2.
4) Oh well, that's a bummer.

I'm guessing my problem here is that I didn't use Bodies to begin with. Does that mean I should go back and redo things with each feature assigned to a Body, then bind those bodies into Shapes?

I was hoping for some way to edit the hierarchy I have under "Receptacle (Fillet003)" but it doesn't seem like that is possible.

Edit: Ok, I realized that when I delete something it just re-parents the children it to the root of the document. I'm still not sure how I could get it back into the existing hierarchy without redoing all of the operations above it, because I can't seem to find a way to edit the two objects that are parameters for an existing operation.
chrisb
Posts: 30821
Joined: Tue Mar 17, 2015 9:14 am

Re: Reordering / Insertion of Boolean Operations

Post by chrisb » Mon Nov 23, 2020 7:38 am

nelno wrote:
Mon Nov 23, 2020 1:23 am
I don't see any Shapes property anywhere.
It's in the Data tab of the combo view. Perhaps this is available in 0.19 only.
You need at least FreeCAD 0.19.23300 to edit my current sketches.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
nelno
Posts: 6
Joined: Sun Nov 22, 2020 9:33 pm

Re: Reordering / Insertion of Boolean Operations

Post by nelno » Mon Nov 23, 2020 9:28 am

chrisb wrote:
Mon Nov 23, 2020 7:38 am
It's in the Data tab of the combo view. Perhaps this is available in 0.19 only.
I downloaded 0.19 but I still don't see it. I'm going to assume this is because I've done something wrong, or haven't done something I was supposed to. I did not use Shape Binder on any of my features. I just extruded sketches to 3D features and then combined them with boolean ops from the Parts toolbar.

I'm trying hard to resist just going in and redoing each of the boolean ops above where I need to make changes. I know there must be a better way. I started using Shape Binder earlier, but the instructions I was following here (https://wiki.freecadweb.org/PartDesign_ShapeBinder) seemed overly complex for just cutting a hole through multiple features.

I've attached my working file as it was at my last 3D print (i.e. no attempts at using Bodies / Parts / Shapes).

If you have a chance and can take a look and have any idea what I'm missing, I'd appreciate it. If not, I totally understand -- we've all got things to do!
Attachments
sv328_plug_28.FCStd
Latest working copy of SV-328 plug and receptacle.
(320.25 KiB) Downloaded 5 times
User avatar
papyblaise
Posts: 2908
Joined: Thu Jun 13, 2019 4:28 pm
Location: France

Re: Reordering / Insertion of Boolean Operations

Post by papyblaise » Mon Nov 23, 2020 11:08 am

the work does not seem to me badly organized, except for the nut holes
I redid one last Boolean subtraction and hide the nuts (kik space bar)
this is the advantage of Part that allows you to reuse the same object several times easily
you have to complicate by grouping all the sketches, it is better to do them as you go
Attachments
plug.PNG
plug.PNG (18.52 KiB) Viewed 125 times
chrisb
Posts: 30821
Joined: Tue Mar 17, 2015 9:14 am

Re: Reordering / Insertion of Boolean Operations

Post by chrisb » Mon Nov 23, 2020 12:21 pm

Sorry my description above holds only for Unions. Cuts are different: you find the first object in the property "Base", and the second in the property "Tool".
You need at least FreeCAD 0.19.23300 to edit my current sketches.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
jmaustpc
Posts: 10546
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Reordering / Insertion of Boolean Operations

Post by jmaustpc » Mon Nov 23, 2020 1:14 pm

nelno wrote:
Sun Nov 22, 2020 10:20 pm
As for insertion. last night I need to add another cut in the middle of one of these hierarchies and I had to redo all of the cuts above it. I couldn't figure out another way.
you didn't need to do that at all.

When you have a complex tree of boolean features and you want to swap out one item for something else or just remove something, then you want to use one of the first two tools in the OpenSCAD menu of the OpenSCAD workbench, an icon for each o9f those same two tools is also the first two icons on the left of the tool bar. "Replace object" or "remove objects and their children" (only removes the children if they are not used elsewhere in that same tree).
Screenshot_20201123_235839.png
Screenshot_20201123_235839.png (41.45 KiB) Viewed 97 times
To replace a boolean in the middle of the tree somewhere do this
1) create the new item first
2) multi select by click on the first object then holding the CTRL key down while clicking on the remaining two in step 3)
3) so first select the old object to be removed, then press and hold CTRL key while clicking on the new object to replace the old, then while still holding the CTRL key press on the top object in the original Boolean tree
4)while those three are selected click on the OpenSCAD workbench "Replace object" icon...and that is it

for Remove, just select the object to be removed and then click the remove OpenSCAD icon and it will be removed along with the "things" (children) that created that object.

if you don't fully understand what I am talking about or want more information see the two wiki pages for these two tools here OpenSCAD_ReplaceObject and here OpenSCAD_RemoveSubtree

Jim
nelno
Posts: 6
Joined: Sun Nov 22, 2020 9:33 pm

Re: Reordering / Insertion of Boolean Operations

Post by nelno » Mon Nov 23, 2020 7:04 pm

chrisb wrote:
Mon Nov 23, 2020 12:21 pm
Sorry my description above holds only for Unions. Cuts are different: you find the first object in the property "Base", and the second in the property "Tool".
Thanks! That helped me find the properties! I was expecting them to be in the root of the property tree. I didn't realize a "..." would appear if I selected the "Base" or "Tool" properties. This allowed me to do exactly what I needed!

Thanks for the help! It's a huge relief to know I can reorder in this way!!
nelno
Posts: 6
Joined: Sun Nov 22, 2020 9:33 pm

Re: Reordering / Insertion of Boolean Operations

Post by nelno » Mon Nov 23, 2020 7:07 pm

jmaustpc wrote:
Mon Nov 23, 2020 1:14 pm
nelno wrote:
Sun Nov 22, 2020 10:20 pm
As for insertion. last night I need to add another cut in the middle of one of these hierarchies and I had to redo all of the cuts above it. I couldn't figure out another way.
you didn't need to do that at all.
Thanks, Jim, for the detailed instructions. I was able to understand them without any issue. This will also be a useful tool for me. I had read about OpenSCAD a few days before and expected it to be some sort of scripting interface or additional library support only, so I hadn't even looked in that menu.
Post Reply

Who is online

Users browsing this forum: Bing [Bot], slowTA and 15 guests