set/get material names

This commit is contained in:
Joachim Schoeberl 2015-09-01 19:21:52 +02:00
parent 52f65188e8
commit b7e5abbbac
2 changed files with 10 additions and 1 deletions

View File

@ -5595,6 +5595,10 @@ namespace netgen
if ( !bcnames.Size() )
return defaultstring;
if (bcnr < 0 || bcnr >= bcnames.Size())
throw NgException ("illegal bc-number");
if ( bcnames[bcnr] )
return *bcnames[bcnr];
else

View File

@ -317,7 +317,12 @@ DLL_HEADER void ExportNetgenMeshing()
}))
.def ("SetBCName", &Mesh::SetBCName)
.def ("GetBCName", FunctionPointer([](Mesh & self, int bc)->string
{ return self.GetBCName(bc); }))
.def ("SetMaterial", &Mesh::SetMaterial)
.def ("GetMaterial", FunctionPointer([](Mesh & self, int domnr)
{ return string(self.GetMaterial(domnr)); }))
.def ("GenerateVolumeMesh", FunctionPointer
([](Mesh & self)
{