Volume mesh for a simple cylinder fails

More
4 years 4 months ago #2976 by Dflyer
A simple solid cylinder attached fails for volume mesh.

Last output lines

Surface meshing done
0 illegal triangles
WARNING! NOT ALL FACES HAVE BEEN MESHED
SURFACE MESHING ERROR OCCURRED IN 1 FACES:
Face 1


for more information open IGES/STEP Topology Explorer
Problem in Surface mesh generation
Attachments:
More
4 years 4 months ago #2984 by Fried
+1 I get the same issue
More
4 years 4 months ago #2987 by christopher
The step file seems to not consist of one solid, but multiple free shells (that are not "glued" together). You can fix this with Geometry-> IGES/STEP Topology Explorer/Doctor and then Click the "Heal Geometry" button. Netgen then glues the geometry together and is able to mesh it.

Best
Christopher
More
4 years 4 months ago #2993 by Dflyer
Thanks Christopher, that worked,

I am meshing with C++ API.

The model attached fails in surface mesh, It mesh good in GUI, I am missing Analyze Geometry in C++, how can we do that in C++?

I could even reproduce the crash in surface mesh creation if I don't analyze geometry in GUI.

Thanks
Attachments:
More
4 years 4 months ago #2994 by christopher
OCCGeometry has a Analyse function that should be called for this.
Actually if you call the GenerateMesh from the base class NetgenGeometry all function should be called in correct order and so. Probably thats what you want to do.
Best
Christopher
More
4 years 3 months ago #3010 by Dflyer
I tried to call the GenerateMesh from nglib.cpp like this
Code:
DLL_HEADER Ng_Result Ng_GenerateMesh( Ng_OCC_Geometry * geom, Ng_Mesh * mesh, Ng_Meshing_Parameters* mp ) { OCCGeometry * occgeom = (OCCGeometry*)geom; std::shared_ptr< NetgenGeometry> netgenGeometry = shared_ptr<NetgenGeometry>( occgeom, &NOOP_Deleter ); shared_ptr<Mesh> netgenMesh( (Mesh*)mesh, &NOOP_Deleter ); netgenMesh->SetGeometry( netgenGeometry ); netgenMesh->geomtype = Mesh::GEOM_OCC; mp->Transfer_Parameters(); mparam.perfstepsstart = MESHCONST_ANALYSE; mparam.perfstepsend = MESHCONST_OPTSURFACE; int res = netgenGeometry->GenerateMesh( netgenMesh, mparam ); if(res == 0 ) return( NG_OK ); }

But it crashes at OCCMeshSurface
Code:
Meshing2OCCSurfaces meshing(geom, TopoDS::Face(geom.fmap(k)), bb, projecttype, mparam);
the value of k is greater than number of faces in the geometry (

File Attachment:

File Name: 2_2_1_2020-07-25.stp
File Size:11 KB
)
So it throws out of range error.

Thanks
Time to create page: 0.113 seconds