mirror of
https://github.com/NGSolve/netgen.git
synced 2024-11-11 16:49:16 +05:00
Add properties .name and .maxh to ListOfShapes
This commit is contained in:
parent
33722fcfd6
commit
69c6f55961
@ -1422,6 +1422,28 @@ DLL_HEADER void ExportNgOCCShapes(py::module &m)
|
||||
}
|
||||
return CastShape(maxshape);
|
||||
})
|
||||
.def_property("name", [](ListOfShapes& shapes)
|
||||
{
|
||||
throw Exception("Cannot get property of ListOfShapes, get the property from individual shapes!");
|
||||
},
|
||||
[](ListOfShapes& shapes, std::string name)
|
||||
{
|
||||
for(auto& shape : shapes)
|
||||
{
|
||||
OCCGeometry::global_shape_properties[shape.TShape()].name = name;
|
||||
}
|
||||
})
|
||||
.def_property("maxh", [](ListOfShapes& shapes)
|
||||
{
|
||||
throw Exception("Cannot get property of ListOfShapes, get the property from individual shapes!");
|
||||
},
|
||||
[](ListOfShapes& shapes, double maxh)
|
||||
{
|
||||
for(auto& shape : shapes)
|
||||
{
|
||||
OCCGeometry::global_shape_properties[shape.TShape()].maxh = maxh;
|
||||
}
|
||||
})
|
||||
|
||||
;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user