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!
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Defeaturing Tools: first attempt

Post by triplus »

Nice.
Joyas
Posts: 532
Joined: Sat Jul 12, 2014 8:39 pm

Re: Defeaturing Tools: first attempt

Post by Joyas »

GlouGlou wrote: Sat Jun 30, 2018 12:53 pm
easyw-fc wrote: Thu Jun 28, 2018 7:16 pm I played a bit with some defeaturing features using what FC0.18 has under the hood :D
That sounds like a good idea and useful for PDN.
Or Part workbench. :)
Estudié ingeniería técnica industrial en España y sólo me ha servido para estar en el paro, no me contratan porque no tengo experiencia, y no tengo experiencia porque no me contratan. No debí estudiar esa carrera.
User avatar
easyw-fc
Veteran
Posts: 3629
Joined: Thu Jul 09, 2015 9:34 am

Re: Defeaturing Tools: first attempt

Post by easyw-fc »

Now the tools are quite usable...
here a video to repair a user STEP model which was a difficult user case.

phpBB [video]


The solid to be repaired
and the thread related
https://forum.freecadweb.org/viewtopic.php?f=8&t=29453

and here the solid after the 'cure' as STEP model
solid-repaired.7z
(791.4 KiB) Downloaded 98 times
Last edited by easyw-fc on Sat Jul 07, 2018 7:47 pm, edited 1 time in total.
freecad-heini-1
Veteran
Posts: 7788
Joined: Tue Jan 07, 2014 11:10 am
Contact:

Re: Defeaturing Tools: first attempt

Post by freecad-heini-1 »

Whow Maurice, very nice that you explored the tools under the hood of FC0.18 and put them together in a "workbench"(?).
Great work, thank you so much.
Please let me know how you closed the holes with faces. Is it the OpenSCAD tool I used in my vid?
I find the tool very nice to delete one or more faces out of a bunch of faces.

Best regards
Wilfried
User avatar
easyw-fc
Veteran
Posts: 3629
Joined: Thu Jul 09, 2015 9:34 am

Re: Defeaturing Tools: first attempt

Post by easyw-fc »

freecad-heini-1 wrote: Mon Jul 02, 2018 4:04 pm Whow Maurice, very nice that you explored the tools under the hood of FC0.18 and put them together in a "workbench"(?).
Great work, thank you so much.
Please let me know how you closed the holes with faces. Is it the OpenSCAD tool I used in my vid?
I find the tool very nice to delete one or more faces out of a bunch of faces.

Best regards
Wilfried
Hi Wilfred,
all the operations I did in the video came from the defeaturing macro.
I just added a request to add my new Defeaturing WB to the Addons repo
It is a mainly a Macro ATM, but the macro code is too long to be added with the standard Addons method; moreover it could evolve more (I have some other little ideas :) )
Please feel free to give feedback here or open any issue at my GH repo.
Maurice
Image
freecad-heini-1
Veteran
Posts: 7788
Joined: Tue Jan 07, 2014 11:10 am
Contact:

Re: Defeaturing Tools: first attempt

Post by freecad-heini-1 »

easyw-fc wrote: Mon Jul 02, 2018 7:20 pm Hi Wilfred,
all the operations I did in the video came from the defeaturing macro.
I understand and that was clear to me. But what is behind (inside of your macro), for example to create the face out of the curves?
freecad-heini-1
Veteran
Posts: 7788
Joined: Tue Jan 07, 2014 11:10 am
Contact:

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

Post by freecad-heini-1 »

Hi Maurice,
your defeaturing-wb isn't available over the addon-manager. I hope that it will be added soon.

One question. I tried to close the face on the front side but didn't succeed.
defeaturing_front_face.png
defeaturing_front_face.png (13.34 KiB) Viewed 4357 times
Any idea which existing tool work for this case?

Best regards
Wilfried
User avatar
easyw-fc
Veteran
Posts: 3629
Joined: Thu Jul 09, 2015 9:34 am

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

Post by easyw-fc »

freecad-heini-1 wrote: Tue Jul 03, 2018 9:35 am Hi Maurice,
your defeaturing-wb isn't available over the addon-manager. I hope that it will be added soon.
you can just install it as a normal WB
https://www.freecadweb.org/wiki/Install ... orkbenches
Installing user-wide

Workbenches installed that way will be availible only to you, and not to the other users of your system. But it will not require any administrator or superuser privileges.

Copy or move the folder containing your workbench to the "Mod" directory that lies inside your FreeCAD user directory. On Windows, it will be something like C:\Users\your_user_name\Application Data\FreeCAD\Mod, on Linux systems it will be ~/.FreeCAD/Mod where ~ is your user's home directory. On Mac OSX the "Mod" directory should be ~/Library/Preferences/FreeCAD/Mod. One way to get to the FreeCAD preferences directory on Mac is to use the Finder menu item Go->Go to Folder... and then enter "~/Library/Preferences/FreeCAD".
here the Defeaturing WB to download:
https://github.com/easyw/Defeaturing_WB ... master.zip
(Please note that you need to extract it and copy the internal folder [Defeaturing_WB-master] to your Mod folder;
it is better if you rename it to Defeaturing_WB)
freecad-heini-1 wrote: Tue Jul 03, 2018 9:35 am One question. I tried to close the face on the front side but didn't succeed.
Any idea which existing tool work for this case?

Best regards
Wilfried
would you mind to send the FC file? (PM me if you prefer)
freecad-heini-1 wrote: Tue Jul 03, 2018 7:08 am But what is behind (inside of your macro), for example to create the face out of the curves?
mainly is based on Part WB basic tools.
EDIT: it does work down to FC0.15 :D

Please let me know your testing results. :D
User avatar
easyw-fc
Veteran
Posts: 3629
Joined: Thu Jul 09, 2015 9:34 am

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

Post by easyw-fc »

freecad-heini-1 wrote: Tue Jul 03, 2018 9:35 am Hi Maurice,
your defeaturing-wb isn't available over the addon-manager. I hope that it will be added soon.
Hi Wilfried,
the Defeaturing WB has been just added :D
Now you can install it through the FC 'Tools' 'Addons' menu.
(If you had previously installed the WB, please remove it manually and then use FC menu to install it)
defeaturing_WB.png
defeaturing_WB.png (36.92 KiB) Viewed 4221 times
I added a new feature: Face cleaning which allows to remove internal holes or merge adjacent faces.

face cleaning.gif
face cleaning.gif (1019.04 KiB) Viewed 4221 times
freecad-heini-1
Veteran
Posts: 7788
Joined: Tue Jan 07, 2014 11:10 am
Contact:

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

Post by freecad-heini-1 »

Hi Maurice,
thank you so much. What a great and powerful workbench.
You are a great programer.
Best regards
Wilfried

Looking for a new mission?
A good face selecting tool is missing, from my point of view.
First a rectangel selecting tool that select the faces in front and not behind.
In Freecad exists something similar (the box select tool) to color single faces.
And then a selecting tool with inner and border faces. Imagine you have a part with many faces inside, lets say 138 faces, and outside is a border with just 12 faces.
In Creo you select the shift key to start this operation and first select one inner face, then you unselect the shift key, you press the shift key again and hold it, then you start to select the 12 outer faces. Unselect the shift key and voila all inner faces are selected for a copy or something else.
An easy example a box with one face thickness. Inside you have 5 faces, the border is just one face.
In Creo this tool works parametric. That means if you change the order in the model tree and add faces inside, the selecting tool will add them. It's explained on page 12 and 13 in the quick reference card:
http://www.cad-resources.com/files/Creo ... erence.pdf
By the way a edge chain / set selecting tool is also missing. The path-workbench has such a tool, but it's not working in other workbenches, I don't know why:
https://forum.freecadweb.org/viewtopic. ... 38#p215938
Post Reply