mirror of
https://github.com/NGSolve/netgen.git
synced 2024-11-12 00:59:16 +05:00
Merge branch 'shape_solids' into 'master'
Add property .solids to occ shape See merge request jschoeberl/netgen!415
This commit is contained in:
commit
bec02c79eb
@ -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