mirror of
https://github.com/NGSolve/netgen.git
synced 2025-01-12 22:20:35 +05:00
set/get material names
This commit is contained in:
parent
52f65188e8
commit
b7e5abbbac
@ -5595,6 +5595,10 @@ namespace netgen
|
|||||||
|
|
||||||
if ( !bcnames.Size() )
|
if ( !bcnames.Size() )
|
||||||
return defaultstring;
|
return defaultstring;
|
||||||
|
|
||||||
|
if (bcnr < 0 || bcnr >= bcnames.Size())
|
||||||
|
throw NgException ("illegal bc-number");
|
||||||
|
|
||||||
if ( bcnames[bcnr] )
|
if ( bcnames[bcnr] )
|
||||||
return *bcnames[bcnr];
|
return *bcnames[bcnr];
|
||||||
else
|
else
|
||||||
|
@ -317,7 +317,12 @@ DLL_HEADER void ExportNetgenMeshing()
|
|||||||
}))
|
}))
|
||||||
|
|
||||||
.def ("SetBCName", &Mesh::SetBCName)
|
.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
|
.def ("GenerateVolumeMesh", FunctionPointer
|
||||||
([](Mesh & self)
|
([](Mesh & self)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user