Error: “Selection is not an Active Body. Select an edge, ...” trying to fillet 2 edges w/ Part-Design WB after sinning

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!
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: Error: “Selection is not an Active Body. Select an edge, ...” trying to fillet 2 edges w/ Part-Design WB after sinni

Post by GeneFC »

wisecad wrote: Tue Sep 28, 2021 10:12 am Is there a reference (e.g.: video, webpage) where the rules for mixing Part and PartDesign WBs are explained in detail?
Rule number 1.

Don't do it.

Rule number 2.

Never try to access from Part WB anything in a Body at a finer level than the Body itself.

Rule number 3.

This is mostly a one-way trip. Trying to go back to PD WB after using the Part WB is tricky. The model will likely be messed at that point.

Do you have the Dependency Graph set up for your installation? When I looked at your file it is a total mess of illegal links. No doubt this is caused by the free mix and match between PD WB and Part WB.

Gene
TheMarkster
Veteran
Posts: 5513
Joined: Thu Apr 05, 2018 1:53 am

Re: Error: “Selection is not an Active Body. Select an edge, ...” trying to fillet 2 edges w/ Part-Design WB after sinni

Post by TheMarkster »

Your sin is in trying to use Part Design fillet on a Part workbench object (the fillet). Another sin was using Part workbench fillet on edges from a Part Design feature. You can do this, but it should be on the Body and not on a Pad/Pocket/etc. But how? You must select the edge and it always gives the feature edge and not the body edge. The trick is to select the Body, switch to the View tab, and change the Display Mode from Through to Tip. Now when you select an edge you get Body:Edge1 instead of Pad:Face1.
Snip macro screenshot-488183.png
Snip macro screenshot-488183.png (20.46 KiB) Viewed 1533 times
Look at the python console:

Code: Select all

>>> FreeCADGui.getDocument('Unnamed').getObject('Body').DisplayModeBody = u"Through"
>>> 
>>> # Gui.Selection.clearSelection()
>>> # Gui.Selection.addSelection('Unnamed','Body','Box.Edge10',6.20515,0,10)
>>> # Gui.Selection.clearSelection()
>>> # Gui.Selection.addSelection('Unnamed','Body')
>>> FreeCADGui.getDocument('Unnamed').getObject('Body').DisplayModeBody = u"Tip"
>>> 
>>> # Gui.Selection.clearSelection()
>>> # Gui.Selection.addSelection('Unnamed','Body','Edge10',3.72653,0,10)
>>> 
In "Through" mode I get Body.Box.Edge10 (I have an additive box in the body.), but in "Tip" mode I get Body.Edge10.

An alternative is to make Draft Clone of the Body and use that for the fillet. Then to go back to Part Design select the Fillet and create a new Body. This adds the fillet as the BaseFeature for the new Body and you can continue working on it in the new Body. Don't make any more changes to the first Body or else it will likely break the fillet and the new body unless they are simple dimensional changes. I shouldn't say don't do it, just bear in mind you will need to redo the fillets probably.
User avatar
wisecad
Posts: 92
Joined: Wed Aug 08, 2018 3:44 am

Re: Error: “Selection is not an Active Body. Select an edge, ...” trying to fillet 2 edges w/ Part-Design WB after sinni

Post by wisecad »

drmacro wrote: Tue Sep 28, 2021 10:35 am
No they are not. What you see at that point is a new solid created by your Part Fillet operation.

You are selecting edges of the new solid, not the body.
drmacro, I see now what you meant earlier. Thank you for explaining that. :D
User avatar
wisecad
Posts: 92
Joined: Wed Aug 08, 2018 3:44 am

Re: Error: “Selection is not an Active Body. Select an edge, ...” trying to fillet 2 edges w/ Part-Design WB after sinni

Post by wisecad »

chrisb wrote: Tue Sep 28, 2021 10:36 am The Part Fillet is a new object. You can select it and create a new body where this is used as a BaseFeature. You can then continue to use PartDesign tools.
Chrisb, Your observation and suggestion helped me reinforce the concepts I was just grasping. :D
User avatar
wisecad
Posts: 92
Joined: Wed Aug 08, 2018 3:44 am

Re: Error: “Selection is not an Active Body. Select an edge, ...” trying to fillet 2 edges w/ Part-Design WB after sinni

Post by wisecad »

Shalmeneser wrote: Tue Sep 28, 2021 11:30 am:idea:
Shalmeneser, Liked your idea, as it avoids the mess I got myself into for mixing P and PD workbenches. Thank you so much. :D :idea:
User avatar
wisecad
Posts: 92
Joined: Wed Aug 08, 2018 3:44 am

Re: Error: “Selection is not an Active Body. Select an edge, ...” trying to fillet 2 edges w/ Part-Design WB after sinni

Post by wisecad »

GeneFC wrote: Tue Sep 28, 2021 2:44 pm
wisecad wrote: Tue Sep 28, 2021 10:12 am Is there a reference (e.g.: video, webpage) where the rules for mixing Part and PartDesign WBs are explained in detail?
Rule number 1.

Don't do it.

Rule number 2.

Never try to access from Part WB anything in a Body at a finer level than the Body itself.

Rule number 3.

This is mostly a one-way trip. Trying to go back to PD WB after using the Part WB is tricky. The model will likely be messed at that point.

Do you have the Dependency Graph set up for your installation? When I looked at your file it is a total mess of illegal links. No doubt this is caused by the free mix and match between PD WB and Part WB.

Gene

GeneFC, Thanks for the rules. Had never heard of the Dependency Graph tool, but just installed it. Ran the report on my file. Most of the red lines were resulting from adding dimension lines using the Draft wb, but there was also one from the fillet (Fillet003) I had added using the Part wb. Thank you for suggesting that tool. Very useful. :D
User avatar
wisecad
Posts: 92
Joined: Wed Aug 08, 2018 3:44 am

Re: Error: “Selection is not an Active Body. Select an edge, ...” trying to fillet 2 edges w/ Part-Design WB after sinni

Post by wisecad »

TheMarkster wrote: Tue Sep 28, 2021 4:28 pm Your sin is in trying to use Part Design fillet on a Part workbench object (the fillet). Another sin was using Part workbench fillet on edges from a Part Design feature. You can do this, but it should be on the Body and not on a Pad/Pocket/etc. But how? You must select the edge and it always gives the feature edge and not the body edge. The trick is to select the Body, switch to the View tab, and change the Display Mode from Through to Tip. Now when you select an edge you get Body:Edge1 instead of Pad:Face1.

Snip macro screenshot-488183.png

Look at the python console:

Code: Select all

>>> FreeCADGui.getDocument('Unnamed').getObject('Body').DisplayModeBody = u"Through"
>>> 
>>> # Gui.Selection.clearSelection()
>>> # Gui.Selection.addSelection('Unnamed','Body','Box.Edge10',6.20515,0,10)
>>> # Gui.Selection.clearSelection()
>>> # Gui.Selection.addSelection('Unnamed','Body')
>>> FreeCADGui.getDocument('Unnamed').getObject('Body').DisplayModeBody = u"Tip"
>>> 
>>> # Gui.Selection.clearSelection()
>>> # Gui.Selection.addSelection('Unnamed','Body','Edge10',3.72653,0,10)
>>> 
In "Through" mode I get Body.Box.Edge10 (I have an additive box in the body.), but in "Tip" mode I get Body.Edge10.

An alternative is to make Draft Clone of the Body and use that for the fillet. Then to go back to Part Design select the Fillet and create a new Body. This adds the fillet as the BaseFeature for the new Body and you can continue working on it in the new Body. Don't make any more changes to the first Body or else it will likely break the fillet and the new body unless they are simple dimensional changes. I shouldn't say don't do it, just bear in mind you will need to redo the fillets probably.
TheMarkster, Thank you for the tip on the Display-Mode property (very useful), as well as for the suggestion to make Draft Clone of the Body. :D
User avatar
wisecad
Posts: 92
Joined: Wed Aug 08, 2018 3:44 am

Re: Error: “Selection is not an Active Body. Select an edge, ...” trying to fillet 2 edges w/ Part-Design WB after sinni

Post by wisecad »

THANK YOU ALL :ugeek: :ugeek: :ugeek: SO MUCH FOR YOUR GENEROUS HELP :D

The demon has been expelled, my sin cancelled, my FreeCAD soul cleansed, and I am now back in the fold, thanks to your pious and gracious effort.

Certainly the FreeCAD community is awesome.

You are all very knowledgeable about the inner works and internal rules of FreeCAD, whereas I am picking up bits and pieces of knowledge as I ask a question here and there, for which I am grateful. I used Yorik’s manual as an introduction and it was great, but maybe I am ready now for something a bit deeper to understand more about FreeCAD’s inner works. Is there a book that covers FreeCAD more in depth in a progressive sequence, as to help me better understand FreeCAD’s inner works, its nuances, idiosyncrasies, complexities, or however we want to cal them ? :?: :?:

Now for the developers, I know you are all very busy tackling FreeCAD’s development priorities, but how difficult would it be to add the option for variable-radius fillets to the Part-Design workbench’s fillet tool? Hope it is easy and maybe it will show up in the next update. :idea:

Thanks again.
TheMarkster
Veteran
Posts: 5513
Joined: Thu Apr 05, 2018 1:53 am

Re: Error: “Selection is not an Active Body. Select an edge, ...” trying to fillet 2 edges w/ Part-Design WB after sinni

Post by TheMarkster »

wisecad wrote: Tue Sep 28, 2021 8:52 am
● QUESTION:
Is there a way to add a tapered variable-radius fillet the way it looks on the uploaded image above without causing conflicts with procedures done using the Part-Design workbench?
I have a macro that is still a bit of a work in progress called PDWrapper:

https://forum.freecadweb.org/viewtopic.php?f=22&t=62600

To use for doing this:

* select the edges to be filleted
* invoke the fillet tool in part workbench (might need to reselect the edges in the dialog)
* make sure the body is active
* select the fillet object in the tree and run the macro
* choose "Common" as the type

It should place it in the part design body inside a wrapper object called PDWrapper.
Snip macro screenshot-0e493b.png
Snip macro screenshot-0e493b.png (76.39 KiB) Viewed 1358 times
Snip macro screenshot-ea4afa.png
Snip macro screenshot-ea4afa.png (83.68 KiB) Viewed 1358 times
After the fillet you may continue working in the same body:
Snip macro screenshot-79990c.png
Snip macro screenshot-79990c.png (58.91 KiB) Viewed 1358 times
It is still under construction, but I think it shows some promise.
User avatar
wisecad
Posts: 92
Joined: Wed Aug 08, 2018 3:44 am

Re: Error: “Selection is not an Active Body. Select an edge, ...” trying to fillet 2 edges w/ Part-Design WB after sinni

Post by wisecad »

TheMarkster wrote: Thu Sep 30, 2021 5:51 am
I have a macro that is still a bit of a work in progress called PDWrapper:

https://forum.freecadweb.org/viewtopic.php?f=22&t=62600

To use for doing this:

* select the edges to be filleted
* invoke the fillet tool in part workbench (might need to reselect the edges in the dialog)
* make sure the body is active
* select the fillet object in the tree and run the macro
* choose "Common" as the type

It should place it in the part design body inside a wrapper object called PDWrapper.

After the fillet you may continue working in the same body:

It is still under construction, but I think it shows some promise.

Hello TheMarkster. Thanks for sharing your macro. I am in the early stages of learning python, so I probably won't be able to contribute immediately, but it will certainly in the process.
Post Reply