[Bug] Defining bcnames for 2D geometries

As shown in the following code, when I partially prescribed boundary conditions for the edge 3, the NGSPy marked both edge 1 and edge 3 as 1.

I think the correct way is to makr edge 3 only with id of 3.

So is this a bug? Is there any way to avoid this problem?

from netgen.geom2d import SplineGeometry

geo = SplineGeometry()
p1 = geo.AppendPoint (0,0)
p2 = geo.AppendPoint (1,0)
p3 = geo.AppendPoint (1,1)
p4 = geo.AppendPoint (0,1)

geo.Append (["line", p1, p2])
geo.Append (["line", p2, p3])
geo.Append (["line", p3, p4],bc="inlet")
geo.Append (["line", p4, p1])

mesh = geo.GenerateMesh (maxh=0.8)
# surfid  0   p1   p2   trignum1    trignum2   domin/surfnr1    domout/surfnr2   ednr1   dist1   ednr2   dist2 
edgesegmentsgi2
8
       1       0       1       5        0 96898656        1        0        1            0        1 0.4999999999999944
       1       0       5       2        0 96898656        1        0        1 0.4999999999999944        1            1
       2       0       2       6        0 96898656        1        0        2            0        2 0.4999999999999944
       2       0       6       3        0 96898656        1        0        2 0.4999999999999944        2            1
       1       0       3       7        0 96898656        1        0        3            0        3 0.4999999999999944
       1       0       7       4        0 96898656        1        0        3 0.4999999999999944        3            1
       4       0       4       8        0 96898656        1        0        4            0        4 0.4999999999999944
       4       0       8       1        0 96898656        1        0        4 0.4999999999999944        4            1

bcnames
5
1	wall
2	default
3	default
4	default
5	default

Thanks
Bin

Hi,

there seems to be a bug. I already created a merge request on that.

For now, if all your segments have a string as bc, everything works fine.

Best,
Christoph