Defeaturing Tools: how to edit a STEP model (parametrically)

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!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
easyw-fc
Veteran
Posts: 3630
Joined: Thu Jul 09, 2015 9:34 am

Re: Defeaturing Tools: first attempt (how to edit a STEP model)

Post by easyw-fc »

wmayer wrote: Tue Aug 14, 2018 12:51 pm
In which Freecad version the new features will be integrated?
It must be in +/- 0.18.14224
would it possible to have Part Box selection for Faces acting as the object selection? with a selective behavior left <=> right & right <=> left?
Maurice
wmayer wrote: Fri Sep 29, 2017 6:16 am
So in addition to the "normal" selection which is currently there I'd like to add a selection that selects the whole object when it's only touched on one corner/line/point.
It could be switched like in SolidWorks where it depends if you make the selection bottom to top or top to bottom (not sure which was which).
This is already implemented with the difference that it's not top <=> bottom/bottom <=> top but left <=> right/right <=> left.
User avatar
easyw-fc
Veteran
Posts: 3630
Joined: Thu Jul 09, 2015 9:34 am

Re: Defeaturing Tools: first attempt (how to edit a STEP model)

Post by easyw-fc »

new tool: Parametric Defeaturing... :D

phpBB [video]


This tool is quite sensible to "topological naming" issues, but it can be tricked to manually edit the Faces in case of reordering.
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Defeaturing Tools: how to edit a STEP model (parametrically)

Post by triplus »

Always nice to see such progress.
User avatar
easyw-fc
Veteran
Posts: 3630
Joined: Thu Jul 09, 2015 9:34 am

Re: Defeaturing Tools: how to edit a STEP model (parametrically)

Post by easyw-fc »

Just added a new feature:
Fuzzy Boolean operation [Cut, Union, Common]
fuzzy-boolean-ops.png
fuzzy-boolean-ops.png (48.78 KiB) Viewed 4444 times
sdaau_ml
Posts: 35
Joined: Fri Dec 07, 2018 12:18 am

Re: Defeaturing Tools: first attempt (how to edit a STEP model)

Post by sdaau_ml »

Hi, thanks for this;

I just managed to have a build with OCC 0.7.3:

Code: Select all

OS: Ubuntu 18.04.1 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15379 (Git)
Build type: Release
Branch: master
Hash: 3290c36d28551875f02333c2e01af80e38b8ad02
Python version: 2.7.15rc1
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)
, and I tried this:
freecad-heini-1 wrote: Fri Aug 03, 2018 1:47 pm My new video concerning the new defeaturing tool from the Part workbench:
https://peertube.mastodon.host/videos/w ... d8e6783872

I tried to use PeerTube, not bad for the first test.
The video is in German language.
... but no matter how many faces I have selected, I get:

Code: Select all

>>> sh = App.getDocument('test').Shell.Shape
>>> nsh = sh.defeaturing([sh.Face6,])
>>> if not sh.isPartner(nsh):
>>> 		defeat = App.ActiveDocument.addObject('Part::Feature','Defeatured').Shape = nsh
>>> 		Gui.ActiveDocument.Shell.hide()
>>> else:
>>> 		FreeCAD.Console.PrintError('Defeaturing failed\n')
>>> App.ActiveDocument.recompute()
...
Exception (Tue Dec 11 18:02:10 2018): Error: There are no enough arguments to perform the operation
  
Shell: Error: There are no enough arguments to perform the operation
Any ideas what I could be doing wrong? As I understood, one can just select faces in a single object of many faces, and then click "Defeaturing"/"Remove feature from a shape" - and that would be it, faces would be deleted?
User avatar
NormandC
Veteran
Posts: 18587
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Defeaturing Tools: how to edit a STEP model (parametrically)

Post by NormandC »

There is one essential rule: from the selection of faces to delete, it must be possible to rebuild a solid. Take a simple cube for example: you cannot delete any face because the defeaturing tool couldn't rebuild a solid. Now if your cube has a hole in it, then you can select the inner cylindrical face and the hole will be "plugged in".
openBrain
Veteran
Posts: 9034
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: Defeaturing Tools: how to edit a STEP model (parametrically)

Post by openBrain »

easyw-fc wrote: Tue Oct 09, 2018 2:37 pm Ping @ dev
Hi easyw-fc,

Today I tried to use the "Make solid from selected object" feature Image and FC returns the following error :
Failed to create shell
Traceback (most recent call last):
File "/home/USER/.FreeCAD/Mod/Defeaturing/DefeaturingTools.py", line 505, in merge_faces_from_selected_objects_RH
stop
NameError: global name 'stop' is not defined
Do you know about that ? Got some clue about the reason ?

Thanks

OS: Ubuntu 18.04.2 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.1.
Build type: Release
Python version: 2.7.15rc1
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: French/France (fr_FR)
User avatar
easyw-fc
Veteran
Posts: 3630
Joined: Thu Jul 09, 2015 9:34 am

Re: Defeaturing Tools: how to edit a STEP model (parametrically)

Post by easyw-fc »

openBrain wrote: Tue May 21, 2019 5:40 pm Today I tried to use the "Make solid from selected object" feature Image and FC returns the following error :
From your error message there is:
Failed to create shell
That means your object is done by Faces that intersect each others... then it is not possible to create a shell nor a solid from those faces...

in the attached file you cannot create a solid from first object, but you can from the second.
-
solid-shell.png
solid-shell.png (106.87 KiB) Viewed 3670 times
-
a2p-shell.FCStd
(6.44 KiB) Downloaded 105 times
openBrain
Veteran
Posts: 9034
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: Defeaturing Tools: how to edit a STEP model (parametrically)

Post by openBrain »

easyw-fc wrote: Tue May 21, 2019 8:53 pm That means your object is done by Faces that intersect each others... then it is not possible to create a shell nor a solid from those faces...
Actually not exactly. There is a "null" face. I hoped that the function can accommodate with it but from your answer, I understand that no.
Thanks for prompt reply. ;)
User avatar
easyw-fc
Veteran
Posts: 3630
Joined: Thu Jul 09, 2015 9:34 am

Re: Defeaturing Tools: how to edit a STEP model (parametrically)

Post by easyw-fc »

openBrain wrote: Wed May 22, 2019 11:13 am There is a "null" face. I hoped that the function can accommodate with it ...
It could for null face case adding some small code... do you have a sample to test with?
Post Reply