Best ways to repair bad stl mesh?

Ingeniorator
Ingeniorator New Altair Community Member
edited October 2020 in Community Q&A

Hi all,

 

I've got two messy stl files exported from nTop with approximately 1 million tria elements and quite a few issues concerning connectivity, aspect ratio, warpage, intersecting etc. What's the best way to repair the mesh automatically? I've tried remeshing, smoothing, equivalence, rebuild etc but it either did not result in a satisfying mesh or took too long to finish. It's too much to do manually and the tutorials don't cover meshes this messed up. One of the meshes is attached to this post. Thanks in advance for your replies.

 

Tagged:

Answers

  • Q.Nguyen-Dai
    Q.Nguyen-Dai Altair Community Member
    edited June 2020

    The first thing to know: STL is not suitable format for FEA, even you can do some FE works on this format.

    When you want to better STL, the best method is return to his CAD model and build better STL, with better parameters.

    If you does not have the CAD, you can try to refine STL 'mesh' but that needs a lot of work.

     

    All examples in tutorials, for ANY software, were selected, tested to fit ... un tutorial which shows you some basic method only.

  • Ingeniorator
    Ingeniorator New Altair Community Member
    edited June 2020

    I know that it is generally not suited for FEA, but there is no other option. nTop is no common CAD program, if you take a look at the file you'll see that it's not a geometry that can be easily generated with a normal boundary representation modelling method which is why a mesh representation is the only way to go.

     

    Regardless of the nature of stl etc, what would be the best option in Hypermesh to get a tetra mesh? It doesn't even need to be pretty, it just has to run without element quality checks.

  • Q.Nguyen-Dai
    Q.Nguyen-Dai Altair Community Member
    edited June 2020

    Just have a look at your STL. It's not so complicated to rebuild surfaces directly with Hypermesh?

     

  • Ingeniorator
    Ingeniorator New Altair Community Member
    edited June 2020

    I did have a look already, more than one. Did you? Take a gander at the image below. Is there a way to remedy these kinds of elements in an automated way such that a tetrahedral mesh can be generated from them or not?

    <?xml version="1.0" encoding="UTF-8"?>mesh.PNG

  • Q.Nguyen-Dai
    Q.Nguyen-Dai Altair Community Member
    edited June 2020

    I don't think you can repair it automatically. But if you are not afraid to work, it's possible.

  • Ingeniorator
    Ingeniorator New Altair Community Member
    edited June 2020

    That would take far too long. Well, I'll see how to handle this.

  • Adriano A. Koga
    Adriano A. Koga
    Altair Employee
    edited June 2020

    maybe you could try the shrink wrap mesh and create a new mesh wrapping you current component. It will not follow perfectly, but depending on what you need, the tight wrap might help you.

     

    Also SimLab in general is a good tool for working on STL files and generate a solid tetra mesh. There are some links to it at SL Forum, for the SimLab Learning Center.

  • Q.Nguyen-Dai
    Q.Nguyen-Dai Altair Community Member
    edited June 2020

    That would take far too long. Well, I'll see how to handle this.

     

    Yes, I just see the internal mesh. Wow, a lot of work.

  • Ingeniorator
    Ingeniorator New Altair Community Member
    edited June 2020

    @Adriano A. Koga The image above doesn't show it, but there is an internal structure that doesn't get captured by a shrink wrap, unfortunately. Otherwise, it might indeed simplify the task. But I'll take a stab at SimLab, thanks for the hint.

     

    @Q.Nguyen-Dai Yes it is. My best bet is probably to generate a new mesh in nTop until it's acceptable since this is just a mess, but that might take just as long as repairing it manually.

  • Q.Nguyen-Dai
    Q.Nguyen-Dai Altair Community Member
    edited June 2020

    @Ingeniorator: Is this a academic work?

    If it's not the case, and if you would like subtract this work, contact me @GDTech 

     

  • Ingeniorator
    Ingeniorator New Altair Community Member
    edited June 2020

    It is, however I don't quite get what you're trying to tell me. What do you mean by 'subtract'?

  • Adriano A. Koga
    Adriano A. Koga
    Altair Employee
    edited June 2020

    i believe he meant subcontract. :)/emoticons/default_smile.png' srcset='/emoticons/smile@2x.png 2x' title=':)' width='20' />

  • Q.Nguyen-Dai
    Q.Nguyen-Dai Altair Community Member
    edited June 2020

    i believe he meant subcontract. :)/emoticons/default_smile.png' srcset='/emoticons/smile@2x.png 2x' title=':)' width='20' />

    Yes. It's my typo.

    Thanks Adriano.

  • Ingeniorator
    Ingeniorator New Altair Community Member
    edited June 2020

    Oooh alright :D/emoticons/default_biggrin.png' srcset='/emoticons/biggrin@2x.png 2x' title=':D' width='20' /> There's no need, but thanks for the offer. I remembered that there's an option in nTop to create voxel meshes which allows for much better quality meshes with this type of geometry. Hooray for bad memory, it keeps life interesting!

  • Ingeniorator
    Ingeniorator New Altair Community Member
    edited June 2020

    @Q.Nguyen-Dai On another note, what does this error message mean? It pops up when I try to create a tetra mesh. Is it due to poor 2d mesh quality or is it something else?

    <?xml version="1.0" encoding="UTF-8"?>error.PNG

     

    Ok got it, apparently it was because of intersecting 2d-elements.