简体   繁体   中英

How to import .stl into tetgen?

I'm trying to make tetgen provide Delaunay tetrahedralization of my stl-model, but always getting some errors about intersecting facets.

The model is an ascii .stl model of a human heart, obtained from computed tomography data (can give a link if needed). First I use adaptive rendering with 100 locality and 1.00 tolerance values to construct it in CTAn software, than repair it using MeshFix. MeshFix outputs either .off or binary .stl files.

If I try to import .off model into tetgen, I always get this error :

Syntax error reading header on line 2 in file off.off.

I can't directly import .stl file into tetgen since it doesn't support binary .stl, so I use MeshLab to convert to acsii .stl first, then import the result into tetgen.

But in this case I have another error :

Found two nearly self-intersecting facets

and it recommends me to decrease the dihedral angle tolerance. I do this only to get the next message:

Found two exactly self-intersecting facets

and it recommends me to use -d prefix to detect all of such facets. I do this and receive next message:

No faces are intersecting

Now I'm confused, since it gives exceptive propositions.

If anyone here is familiar with tetgen, please could you tell me, how can I import my model into tetgen? I tried a few repairing tools and different prefixes, but nothing worked so far.

Also will be really grateful if anyone has a link to a tetgen community, because I didn't find any, though tried.

I never found a way to bring a stl file into Tetgen. The only way I was able to bring my model into TetGen was by converting it into a *.ply file type. You can do this in Meshlab too when you select the 'Export Mesh as' option. Once you apply the changes in Tetgen, you can convert it back to a stl file in Meshlab.

You might also find using the Cleaning and Repairing filters in Meshlab useful if you haven't already used it. I found that the 'Removing Duplicate faces' filter helped overcome the intersecting facets error.

Tip: open the Layers Dialogue option in Meshlab, and Duplicate your mesh layer before making changes. Meshlab has no Undo button, so if you make a change to it you regret, you can at least quickly start again.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM