mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-26 13:50:33 +05:00
Add property .solids to occ shape
This commit is contained in:
parent
1c585e5d67
commit
8e519951f3
@ -645,6 +645,13 @@ DLL_HEADER void ExportNgOCCShapes(py::module &m)
|
|||||||
return sub;
|
return sub;
|
||||||
}, py::arg("type"), "returns list of sub-shapes of type 'type'")
|
}, py::arg("type"), "returns list of sub-shapes of type 'type'")
|
||||||
|
|
||||||
|
.def_property_readonly("solids", [] (const TopoDS_Shape & shape)
|
||||||
|
{
|
||||||
|
ListOfShapes solids;
|
||||||
|
for(TopExp_Explorer e(shape, TopAbs_SOLID); e.More(); e.Next())
|
||||||
|
solids.push_back(e.Current());
|
||||||
|
return solids;
|
||||||
|
}, "returns all sub-shapes of type 'SOLID'")
|
||||||
.def_property_readonly("faces", [] (const TopoDS_Shape & shape)
|
.def_property_readonly("faces", [] (const TopoDS_Shape & shape)
|
||||||
{
|
{
|
||||||
ListOfShapes sub;
|
ListOfShapes sub;
|
||||||
|
Loading…
Reference in New Issue
Block a user