Problem with meshing

Hello! I am trying to work on the mesh of an airfoil, but importing the .step file apparently does not work for me.
I am loading through OCCGeometry, then generating the mesh and finally setting the H1 with order 3 and Dirichlet BCs.
The code would be as follows (sorry for too many includes)

from ngsolve import *
from netgen.geom2d import SplineGeometry
from netgen.csg import *
import netgen.gui
from netgen.occ import *
from ngsolve import Mesh, H1, Draw
geo = SplineGeometry()
geo = OCCGeometry(“naca_2.5411.step”)
mesh = geo.GenerateMesh(maxh=0.1)
fes = H1(mesh, order=3, dirichlet=[1,2,3,4])

The problem that arises is TypeError: init(): incompatible constructor arguments. The following argument types are supported:
1. ngsolve.comp.H1(mesh: ngsolve.comp.Mesh, **kwargs)
But the geometry loads without a problem, same thing for the mesh, it generates well.

The .step file is the following one
naca_2.5411.step (16.1 KB)

Thank you so much in advance for the help!

I could finally mesh, but my problem now lies in having to set Boundaries for the DIRICHLET BCs, as edges are not determined in my file.

Hello, could you set the boundaries for the Dirichlet BCs? Because I’m also working with an airfoil and I also have the same problem.

You need to wrap the netgen mesh into an ngsolve mesh to put it in a fespace:

mesh = Mesh(geo.GenerateMesh(maxh=0.1))

the ngsolve mesh builds some additional information needed for finite element computations around the “pure” netgen mesh.