mirror of
https://github.com/NGSolve/netgen.git
synced 2025-01-27 13:20:34 +05:00
get solids from csg geometry
This commit is contained in:
parent
ae7f15cacb
commit
6c609087b7
@ -28,9 +28,11 @@ class SPSolid
|
|||||||
double red = 0, green = 0, blue = 1;
|
double red = 0, green = 0, blue = 1;
|
||||||
bool transp = false;
|
bool transp = false;
|
||||||
public:
|
public:
|
||||||
enum optyp { TERM, SECTION, UNION, SUB };
|
enum optyp { TERM, SECTION, UNION, SUB, EXISTING };
|
||||||
|
|
||||||
SPSolid (Solid * as) : solid(as), owner(true), op(TERM) { ; }
|
SPSolid (Solid * as) : solid(as), owner(true), op(TERM) { ; }
|
||||||
|
SPSolid (Solid * as, int /*dummy*/)
|
||||||
|
: solid(as), owner(false), op(EXISTING) { ; }
|
||||||
~SPSolid ()
|
~SPSolid ()
|
||||||
{
|
{
|
||||||
; // if (owner) delete solid;
|
; // if (owner) delete solid;
|
||||||
@ -621,6 +623,13 @@ However, when r = 0, the top part becomes a point(tip) and meshing fails!
|
|||||||
ng_geometry = self;
|
ng_geometry = self;
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
.def("GetSolids", [](CSGeometry& self)
|
||||||
|
{
|
||||||
|
py::list lst;
|
||||||
|
for(auto i : Range(self.GetSolids().Size()))
|
||||||
|
lst.append(make_shared<SPSolid>(self.GetSolids()[i], 1234));
|
||||||
|
return lst;
|
||||||
|
})
|
||||||
.def_property_readonly ("ntlo", &CSGeometry::GetNTopLevelObjects)
|
.def_property_readonly ("ntlo", &CSGeometry::GetNTopLevelObjects)
|
||||||
.def("_visualizationData", [](shared_ptr<CSGeometry> csg_geo)
|
.def("_visualizationData", [](shared_ptr<CSGeometry> csg_geo)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user