- Thank you received: 0
Volume mesh for a simple cylinder fails
4 years 4 months ago #2976
by Dflyer
Volume mesh for a simple cylinder fails was created 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
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:
4 years 4 months ago #2984
by Fried
Replied by Fried on topic Volume mesh for a simple cylinder fails
+1 I get the same issue
- christopher
- Offline
- Administrator
Less
More
- Thank you received: 101
4 years 4 months ago #2987
by christopher
Replied by christopher on topic Volume mesh for a simple cylinder fails
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
Best
Christopher
4 years 4 months ago #2993
by Dflyer
Replied by Dflyer on topic Volume mesh for a simple cylinder fails
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
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:
- christopher
- Offline
- Administrator
Less
More
- Thank you received: 101
4 years 4 months ago #2994
by christopher
Replied by christopher on topic Volume mesh for a simple cylinder fails
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
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
4 years 3 months ago #3010
by Dflyer
Replied by Dflyer on topic Volume mesh for a simple cylinder fails
I tried to call the GenerateMesh from nglib.cpp like this
But it crashes at OCCMeshSurface
the value of k is greater than number of faces in the geometry (
)
So it throws out of range error.
Thanks
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);
So it throws out of range error.
Thanks
Attachments:
Time to create page: 0.113 seconds