[SOLVED] How to remove a feature in PD without breaking references

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!
Mark81
Posts: 121
Joined: Tue Jul 12, 2022 2:21 pm

[SOLVED] How to remove a feature in PD without breaking references

Post by Mark81 »

I searched in older questions, but I didn't find a precise solution.
If I'm doing it correctly, in Part Design, when working on a Body I add "features" (is it the right word?) like Pad, Pocket, etc...
Sometimes, I need to remove one of them and my common sense says the removal would not break anything, but FreeCad does not agree :lol:

Please, take a look at the attached file.
I want to remove the three pins near the center. The are defined by Sketch023, Pad007 and PolarPattern006. The next sketches do not refer to them.

If I try to remove them I get the warning for the following item. I.e. if I try to remote PolarPattern006:
The following referencing objects might break.
Are you sure you want to continue?
Pocket017
Actually, I'm able to remove all the three items above and all seems fine, but I wonder if I did it correctly and if there are hidden consequences I'm not aware of.

Code: Select all

OS: Ubuntu Core 20 (ubuntu:GNOME/ubuntu)
Word size of FreeCAD: 64-bit
Version: 0.21.29921 (Git) Snap 184
Build type: Release
Branch: master
Hash: 1f89f6eca72bdf2e0139c82d2fde963e84ce3376
Python 3.8.10, Qt 5.15.3, Coin 4.0.0, Vtk 7.1.1, OCC 7.6.2
Locale: Italian/Italy (it_IT)
Installed mods: 
  * kicadStepUpMod 10.13.6
  * fasteners 0.3.50
  * 3D_Printing_Tools
  * CurvedShapes 1.0.3
  * Manipulator 1.4.9
  * Assembly4 0.12.3
  * fcgear 1.0.0
  * A2plus 0.4.56a
  * POV-Ray-Rendering (Disabled)
  * Render 2022.2.0
Attachments
example.FCStd
(268.1 KiB) Downloaded 15 times
Last edited by Mark81 on Wed Aug 03, 2022 11:26 am, edited 1 time in total.
User avatar
NewJoker
Veteran
Posts: 3018
Joined: Sun Oct 11, 2020 7:49 pm

Re: How to remove a feature in PD without breaking references

Post by NewJoker »

In this case, the model shouldn't break but you have to be very careful when deleting features from the tree. If there are any references to the removed operations, they can't be created correctly. Also, topological naming problem still exists and even modifying features may break the model if subsequent features are based on the previous ones.
Mark81
Posts: 121
Joined: Tue Jul 12, 2022 2:21 pm

Re: How to remove a feature in PD without breaking references

Post by Mark81 »

So what is the recommended workflow? Should I remove all the next features and create them again?
drmacro
Veteran
Posts: 8870
Joined: Sun Mar 02, 2014 4:35 pm

Re: How to remove a feature in PD without breaking references

Post by drmacro »

Features of a Body aren't atomic. They are not singular, stand alone solids. The Body represents an accumulation of the features. Especially if you are attaching sketches to general geometry of previous features.

So, deleting features will almost certainly break something below that feature.

When faced with needing to do this, I move the tip to the feature before the one to be deleted. Then delete. Then move the tip down one feature and fix the damage, move down one more, repeat as necessary.

If you make a habit of attaching to base planes the damage is minimized.
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
Mark81
Posts: 121
Joined: Tue Jul 12, 2022 2:21 pm

Re: How to remove a feature in PD without breaking references

Post by Mark81 »

Thanks, just two clarifications:
drmacro wrote: Wed Aug 03, 2022 10:18 am I move the tip to the feature before the one to be deleted.
What is the "tip"?
If you make a habit of attaching to base planes the damage is minimized.
Perhaps here I'm doing it wrongly. Say I have to make a slot into a solid. I would:

1. sketch the solid base, attaching it to the - say - base plane XY
2. Pad in Z
3. sketch the contour of the slot, attaching it to the upper face of the Pad
4. Pocket

Are you saying I should not attach the sketch to the Pad face but to the same XY base plane and then change the placement?
But in this way, how to handle the situation when I change the Pad height?
drmacro
Veteran
Posts: 8870
Joined: Sun Mar 02, 2014 4:35 pm

Re: How to remove a feature in PD without breaking references

Post by drmacro »

The tip is indicated by a white arrow on a green background. See Overlay icons here:

https://wiki.freecadweb.org/Tree_view

You can move it by right click on a feature in the tree and selecting Set tip.

Yes, you should attach to base planes and adjust the location with the Attachment property (in a Part Design Body the Placement property will be disabled).

You can set the z value with an expression that references the Pad.Length. Then if the length of the Pad changes the referencing sketch follows.
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
Mark81
Posts: 121
Joined: Tue Jul 12, 2022 2:21 pm

Re: How to remove a feature in PD without breaking references

Post by Mark81 »

Great! Last question here, I promise :D
So when it's worth to attach a sketch to a face?
User avatar
Shalmeneser
Veteran
Posts: 9475
Joined: Wed Dec 23, 2020 12:04 am
Location: Fr

Re: How to remove a feature in PD without breaking references

Post by Shalmeneser »

(tip : PartDesign_MoveTip)

Sketch033 + Sketch031 (Hole001) can suffer from supressing Pad007 and PolarPattern006 because these 2 sketches are supported by a face.
When you change the number of faces, you can encounter the Topological_naming_problem.
The secret is to never refer to faces.
User avatar
Shalmeneser
Veteran
Posts: 9475
Joined: Wed Dec 23, 2020 12:04 am
Location: Fr

Re: How to remove a feature in PD without breaking references

Post by Shalmeneser »

Mark81 wrote: Wed Aug 03, 2022 11:16 am So when it's worth to attach a sketch to a face?
If you don't care TNP :lol:
Mark81
Posts: 121
Joined: Tue Jul 12, 2022 2:21 pm

Re: How to remove a feature in PD without breaking references

Post by Mark81 »

Shalmeneser wrote: Wed Aug 03, 2022 11:23 am The secret is to never refer to faces.
Gosh! it was so intuitive and I was happy to have understood how to attach a sketch to a face! :roll:
Surely should be a use-case when it's required to use this feature.
Post Reply