Import Step files: Map named surface to boundary condition definition

More
4 years 9 months ago - 4 years 9 months ago #2409 by ThomasEnzinger_WH
Hello,

I would like to import the geometry from a step file. With the CAD system it is possible to set names for e.g. surfaces and the step ap203 exporter add the information in the advanced surface section of step spec.

How can I use / extract the information in netgen?
e.g. for meshing & mapping bc's to the named surfaces

Thanks,
Thomas
Last edit: 4 years 9 months ago by ThomasEnzinger_WH.
More
4 years 9 months ago #2414 by christopher
Hi,
is this a standard for step files or something special of that exporter? If yes, can you reference us. This looks interesting, the current step reader only tracks colors of boundaries and sets different bc numbers for different colors which can be used to map boundary conditions... But it is not really nice to use.

If this is a standard, we would be interested in implementing it. Maybe you could share a trivial example with bc names set?

Best
Christopher
More
4 years 9 months ago #2419 by ThomasEnzinger_WH
Looks nice.

Yeah, colering could be a nice alternative. For me an "alternative" if any other ways are impossible. Do you have an simple example / tutorial for netgen?

I'm not sure if you are knowing About the complex the step specification. … in short, the specifiaction allows a Definition of simple Geometrie in many ways. The specification tells us, a good importer / Reader should support all forms of Definition of an object … but at the real world the cad Systems only supports a few ways and each Software are cooking its own … :D

Monday i will upload a few examples with my actuall cad Software (SolidWorks). I also worked with Unigraphics / Siemens NX really instensiv + programming and can tell you, its allso possible to Name surfaces and Export the names into the step file. For Catia + Pro/E I can not 100% tell you if the exporter also includes the names of surfaces.
So, let us see if we can use the names in step files of solid works in netgen. Perhaps we can deploy an Workaround. Only one Problem of my side is that I do know Nothing About netgen at the Moment :)
More
4 years 8 months ago #2426 by christopher
I've just seen, that since about november last year we are using occ to get names of faces and solids for material and bc names... Are you using a current version of Netgen? If not, it would be interesting how the information is stored in the step file and we could add functionality to read it.

Best
Christopher
More
4 years 8 months ago #2427 by ThomasEnzinger_WH
Two files with different simple Geometrie are added to this post. It was used the STEP-Exporter of SWX with STEP AP203 default settings.
There are named Faces (MyFace_1, MyFace_2, …) and named Edges (MyEdge_1, …) included.
More
4 years 8 months ago #2428 by christopher
Netgen parses the boundaries, I used this short python script to load your geometry and check the names:
Code:
from netgen.occ import * geo = OCCGeometry("step_2.step") from ngsolve import * mesh = Mesh(geo.GenerateMesh()) print(mesh.GetBoundaries()) print(mesh.GetMaterials()) Draw(mesh)
For the first example I get
Code:
('NONE', 'NONE', 'NONE', 'MyFace_2', 'MyFace_3', 'MyFace_1') ('Aufsatz-Linear austragen1',)

The edges are currently not set (because was quite slow on that and so we disabled it). But if you need it you can build from source and comment in lines 1399-1404 in libsrc/occ/occgeom.cpp.

Best
Christopher
Time to create page: 0.113 seconds