diff --git a/libsrc/geom2d/python_geom2d.cpp b/libsrc/geom2d/python_geom2d.cpp index 5ca29046..5e570af7 100644 --- a/libsrc/geom2d/python_geom2d.cpp +++ b/libsrc/geom2d/python_geom2d.cpp @@ -86,10 +86,8 @@ DLL_HEADER void ExportGeom2d(py::module &m) else if (py::extract(bc).check()) { string bcname = py::extract(bc)(); - int bcnum = self.GetBCNumber(bcname); - if (bcnum == 0) - bcnum = self.AddBCName(bcname); - seg->bc = bcnum; + seg->bc = self.GetNSplines()+1; + self.SetBCName(seg->bc, bcname); } else seg->bc = self.GetNSplines()+1;