Hi,
I have and open surface described by an stl file. I am trying to load it into NgSolve and mesh it using
from ngsolve import *
from netgen.meshing import MeshingStep
from ngsolve.webgui import Draw
from netgen import stl
geo = stl.STLGeometry('mymesh.stl')
mesh = Mesh(geo.GenerateMesh(maxh = 0.05, perfstepsend=MeshingStep.MESHSURFACE))
Draw(mesh)
It works for a closed surface but when I use it on an open one (not in general, this specific case), the kernel crashes with errors like
ERROR: TRIG 4812 has 2 neighbours!!!!
SYSTEM ERROR: Get neighbourpoints failed!
If I use meshio to convert the .stl mesh to a .vol and use
mesh = Mesh("mymesh.vol")
It seems like it loads it with no problems, but then I don’t know how I can manipulate it and generate it with different maxh and so on (any help?). I have noticed, but I don’t know if it can help, that the .vol file looks like this
# Generated by meshio 5.3.5
mesh3d
dimension
3
geomtype
0
# surfnr bcnr domin domout np p1 p2 p3
surfaceelements
13988
1 1 0 0 3 1 2 3
...
...
# matnr np p1 p2 p3 p4
volumeelements
0
# surfid 0 p1 p2 trignum1 trignum2 domin/surfnr1 domout/surfnr2 ednr1 dist1 ednr2 dist2
edgesegmentsgi2
0
# X Y Z
points
6996
-9.2864400148391724e-01 -9.6702903509140015e-02 -3.2526698708534241e-01
...
...
# pnum index
pointelements
0
endmesh
and that using mesh.GetBBoundaries()
returns an empty list, while it should at least be default
.
Any idea of the problem and how to fix it? Thanks a lot for any help and for the continuous support!
Alessandro