call with python, sometimes there is no meshing

hello guys,

most of the time my python script/ngsolve works well, all fine, but with some *.stp parts there is following problem:

i call my python script, NGSolve starts. OK
I see the meshing progress in the statusbar bottom/right from NGSolve. OK
But the loaded *.stp part in NGSolve does not get a mesh, after the progress is ready there is no mesh it is still the normal loaded *.stp part.

What is wrong? (most of the time it works well, but with some parts it does not work).

The strange thing is if i click in NGSolve “Generate Mesh” by hand, all works fine!

Here is my python code, I really do not know what is wrong with it?

from netgen.occ import *
from netgen.meshing import MeshingStep
geo = OCCGeometry(“//L1/Test1/mail/user/ng/projects/user/abc/Teil_1.stp”)
mesh = geo.GenerateMesh(meshsize.very_coarse, perfstepsstart=MeshingStep.ANALYSE, perfstepsend=MeshingStep.MESHSURFACE)
Draw(Mesh(mesh))
mesh.Export(“//L1/Test1/mail/user/ng/projects/user/abc/Teil_1.stl”, ‘STL Format’)

regards, mario

No solution for my problem?

I can not solve this problem myself, hopefully anyone here who knows what to do?

thx much,

regards,mario

a i think i got it!

the problem was the filename “ß” “ö” “ä” “ü”… ngsolve does not like this!

Hey guys,

OMG i still have those problems, it is not only because of “ß” “ö” “ä” “ü”…

Complex *.stp files are meshing very fine “by hand”. I start ngsolve, do the mesh settings and all is perfect!

but calling it automaticly with pyhton (see my first post) it does not work.

Anyone has an idea?

Hopefully anyone can help me, I really do not know what I have to do, to solve this problem.

thank much,

regard, mario

Hi Mario,
can you give an example of a failing step file?

Best
Christopher

Hello,

of course, see Attachments.

regards, mario

Attachment: P1_2021-02-08-2.stp

allready found a solution?

for your info, i am using: ngsolve-v6.2.2101

Hi, I can reproduce the issue and I think it is a bug in the meshsize restriction from the curvature (or in the curvature computation in occ). I hope I have some time to track it down the coming week or so.
Best
Christopher

thank you very much, this will help me a lot. :slight_smile:

maybe you can tell me here if there is a new version with this bug fix?

would be nice, but thank anyways!

regards, mario

Hi,

do you got some time to solve the bug?

thx

Hi, sorry didn’t have much time. This seems to be a bug with opencascade. When I use freecad to extract surface 25+29 from the geometry and export it as step then it messes up the geometry too. Maybe someone can help you there or in the occ forums. For me steps to reproduce were
Load the geometry in Freecad → select face 25 and 29 → in Draft click create Facebinder from selected surfaces → Click the newly created object and export it to step file → Load it again. → See that edge parametrization is screwed up.
Because of this occ bug netgen fails too.

Best