STEP file Cleanup

Hi All,

Has anyone found tools like those in Abaqus for cleaning up solids before meshing? I have some really buggy STP files and I am going crazy trying to fix every little tiny flaw manually which is super time consuming. This isn’t actually for FEA but just so I can work with the models without further issues.
I am fairly sure in the past (when I had Abaqus running) I would import models, repair them and export again as step files to keep going with CAD.

I know there are some tools for STL files but I really don’t want to convert to that and back again to step.

thanks

Luke

Are those STEP models downloaded from websites like GrabCAD ? They tend to be really messy for FEA.

Abaqus indeed has some nice features for geometry cleanup. And you can always use virtual topology as a last resort. As an alternative, you could try FreeCAD. It has many useful tools including:

and many more.

There’s also this interesting software but I don’t have experience with it: Analysis Situs: CAD model inspection and prototyping open-source software

thanks, these are my own files, based on subdivision modeling and then a bunch of 3d curved details cut into that, usually my parts are fairly clean but these have literally hundreds of operations applied, nearly all based on curved surfaces and many small changes to the design. I would usually just start clean and create the parts again knowing where I want to go but for this that is even more daunting than fixing the current mess :slight_smile:

I will check out freecad and see if it is helpful.

Luke

What has save me some parts is Netgen standalone application, it has a tool called IGS/STP Topology Explorer and Doctor that has a healing tolerance and I guess that perform some cleaning in the geometry

1 Like

Thanks I will check it out
Luke

Yesterday I test the FreeCAD defeaturing (on v0.22.1) and… it just works! Amazing. I was able to delete simple features as holes, faces, radius and chamfers. It will not solve complex situations or fix wrong file conversions, but what he do, it does well. I miss a simple way to move faces still, or just delete one or two conflictive surfaces and replace with a simple surface patch.

There was an external tool in FreeCAD to do defeaturing, but is far more complex and didn´t solve some situations that this tool do.

If you want to try, just impor your stp file in the Part workbench, select the faces that you want to delete, and go to Menu/Part/Defeaturing… and that its! Magick!

@Matej , I was reading in the link, that the Defeaturing is part of the OpenCasacade CAD kernel, is the same in use in PrePoMax? Maybe could be included then this feature, is very usefull and could be a killer feature.

Yes, this tool is really great. I was impressed by its capabilities too and I showed them here: FEM Geometry Preparation and Meshing - FreeCAD Documentation

1 Like

@lukerickert , I´m in the same situation as you, an always is better to redraw directly the part using solid modeling methodologies than adding more operations to fix a poor desing tree. Otherwise you will loose time fixing the same parts everytime you need to work with them, or some external customer/supplier askf for the model and they cannot open…

Absolutely new parts are the best. For Abaqus I redrew basically everything from new within the program. The issue here is the parts aren’t something you can draw with normal CAD tools which makes it really hard to replicate.
I might just send the parts to a friend with NX and see if it will clean them up

Hi, I did a few test with FreeCAD, and looks like we have a working procedure to fix some parts:

  1. Defeaturing simple features (radius, holes, chamfers)
    Import in Part workbench, select the faces and use Menu/Part/Defeaturing. One by one, and the order of defeaturing can help sometimes

  2. Fix bad/conflictive/missed surfaces

a) Delete conflictive faces
Import the part in Draft workbench, select the part in the model tree and use Menu/Modification/Downgrade to separate the solid/shell in individual faces. Now, individual faces can be selected and deleted, so delete the conflictive ones from the model tree

b) Create a surfaces patch
Change to Surface workbench, and use Menu/Surface/Filling to create a new surface patch. Play with the order of selection of the edges of the gap to see how the surface tangency changes

c) Sew all the surfaces into a solid body again
Select all the individual faces in the Model tree, including the new one, and change to workbench Draft, and use the Menu/Modification/Upgrade to create a new shell body, but we need a solid body for meshing… so, select the new shell body in the tree and make a new Upgrade to create a valid solid part.

I have tested with one solid part, just delete two adjacent surfaces (the end of two filets), and then create only one surface patch, and then export as a solid and it works for meshing.

I would really love to have all the three workbenchs (Part/Surface/Draft) joined in only one “Direct Modeling” workbench, don’t like the FreeCAD concept of having so much workbenchs with very few tools (like the Surface)

1 Like

Yeah, Draft is really underestimated. It looks like a poor man’s version of AutoCAD but allows for many operations on 3D models. The Upgrade and Downgrade tools are incredibly useful and don’t have any direct equivalents in other CAD software. But when it comes to surface modeling, the built-in Surface workbench is not that versatile. However, there’s also add-on Curves workbench with lots of advanced tools.

When it comes to Part, I also like the Make Face tool. Not to mention all the boolean operations.

And if in doubt, people on the FreeCAD forum will always help you.

P.S. If you don’t like the fact that those tools are so scattered, there’s an option to group them into a custom toolbar so you can use the tools from different workbenches without opening them. Creating a custom workbench is not that easy but you can put custom toolbars in your most commonly used workbench or in the Start workbench if you want. That’s when FreeCAD’s modularity becomes useful.

I have tried to create a custom toolbar with tools of other workbenchs in the past with no success, wil try again now that I found the real utility to defeaturing.

One important thing about FreeCAD is that each version brings huge changes. This is especially the case with the current dev version. So it’s best to keep it updated. Major releases happen once a year but there are also bugfix releases worth checking. Current stable is 0.21.2. The next major release (0.22 or 1.0 once they fix the toponaming issue) will bring a revolution regarding the sketcher, assemblies and many other aspects.

An example of a custom toolbar for defeaturing with the tools you’ve mentioned:

toolbar

Btw. You can use Draft Upgrade on a shell to create a solid.

I would love to have such capability in PrePoMax. I really would! But, since this is possible in FreeCAD I would probably not make it a priority :frowning:

Currently, PrePoMax uses Netgen (with built in OpenCascade support) for most operations on geometry. The problem is that this communication is done using files. It is slow but on the other hand, it prevents PrePoMax from crashing when Netgen crashes in the background. Since I added Gmsh (OpenCascade) I can work directly on geometry. Gmsh has a lot of OpenCascade functions in the API that I can now use directly. But, I will have to check which features are needed for defeaturing. I would assume, that in order to remove a hole, there are multiple functions called in the background.

Do you know if there is some tool to move faces of a solid directly? Is the only tool that left now :slight_smile:

There’s no dedicated tool for that but once you separate a face (e.g. with Draft Downgrade), you can move it by selecting source and target location (Draft Snaps let you pick points in different ways) with Draft Move, if that’s what you mean.

About the surface workbench, I think that the addon curves should be integrated on it, becasue most of that curves are destinated for creating surfaces. I really hate to have the tools so dispersed, so much workbenchs… a nightmare for finding the tools. Worst thing is that in the default installation there are several workbenchs… really empty! inspection, reverse engineering, start and test frame workbenchs should came desactivated by defaul, they don´t provide any tools for the final user, by the moment at least.

Anyway I´m happy today as I learn how to defeature, delete and patch conflictive faces and re-orient parts on FreeCAD.

I definitely agree with this. Those are the topics of ongoing discussions - how to reduce the clutter, deactivate some less useful workbenches by default and get rid of the redundant tools. It’s already much better in 0.21 and 0.22 since there were even some non-functional tools (especially in the FEM workbench) in the toolbars previously. Or extremely niche ones like Snell’s law (light refraction) constraint in the sketcher.

Of course, you can always deactivate workbenches that you don’t need but it’s very important for user-friendliness which ones are shown by default.

Here you can see which add-on workbenches in FreeCAD are the most commonly used (and thus have the biggest potential for integration) according to a survey:

No wonder those are mainly add-ons for typical CAD stuff like fastener libraries, sheet metal modeling and assemblies (there is a new built-in assembly workbench in 0.22 though). The Curves workbench is also very popular. It seems that the Surface workbench is here by a mistake because it’s built-in.

Amazing! I had never seen this before. Interestingly, sheet metal is so widely used that perhaps some companies are using FreeCAD a lot…

I really like the Curves workbench, but it has some bugs (v0.21.1) that I think should be corrected before upstreaming it… I also miss something built-in to deal with versioning of parts (A, B, C revisions…), it’s very useful in the industry.