Are there any examples available for :
calling netgen from dos:
1) importing a step file
2) meshing it automatically
3) exporting the mesh into .msh or .vol format
I don't think you can do that directly.
But it's pretty easy with nglib. I do it using a small exe which calls nglib functions. It's about 200 lines of C and does stl, iges and 2D spline inputs. See nglib.h for details of the functions you need to call.
Can you tell me which steps must be done in order to mesh something via cmd? I think I need a .geo file right? But I haven´t got how it should look like if I import a step.
Can you help me with this?
I can't say about using cmd. But my C++ program for doing it is essentially the following. I have some error handling, alternative file formats and other bits and pieces which I ommited for clarity. .geo files are Netgen specific CSG geometry definitions and have nothing to do with meshing a .step file.
occ_geom = Ng_OCC_Load_STEP(fileName);
output_mesh = Ng_NewMesh();
Ng_OCC_SetLocalMeshSize(occ_geom, output_mesh, &mp);
Ng_OCC_GenerateEdgeMesh(occ_geom, output_mesh, &mp);
Ng_OCC_GenerateSurfaceMesh(occ_geom, output_mesh, &mp);
Log in to post a comment.