mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-25 05:20:34 +05:00
layer property for Solid2d
This commit is contained in:
parent
aca46c49c8
commit
f53dad83ae
@ -2183,7 +2183,11 @@ shared_ptr<netgen::SplineGeometry2d> CSG2d :: GenerateSplineGeometry()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(!is_solid_degenerated)
|
if(!is_solid_degenerated)
|
||||||
|
{
|
||||||
geo->SetMaterial(dom, s.name);
|
geo->SetMaterial(dom, s.name);
|
||||||
|
if(s.layer != 1)
|
||||||
|
geo->SetDomainLayer(dom, s.layer);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
dom--; // degenerated solid, use same domain index again
|
dom--; // degenerated solid, use same domain index again
|
||||||
}
|
}
|
||||||
|
@ -630,6 +630,7 @@ struct Solid2d
|
|||||||
{
|
{
|
||||||
Array<Loop> polys;
|
Array<Loop> polys;
|
||||||
|
|
||||||
|
int layer = 1;
|
||||||
string name = MAT_DEFAULT;
|
string name = MAT_DEFAULT;
|
||||||
|
|
||||||
Solid2d() = default;
|
Solid2d() = default;
|
||||||
@ -708,6 +709,12 @@ struct Solid2d
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Solid2d & Layer(int layer_)
|
||||||
|
{
|
||||||
|
layer = layer_;
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
Box<2> GetBoundingBox() const;
|
Box<2> GetBoundingBox() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -433,6 +433,7 @@ NGCORE_API_EXPORT void ExportGeom2d(py::module &m)
|
|||||||
.def("Mat", &Solid2d::Mat)
|
.def("Mat", &Solid2d::Mat)
|
||||||
.def("BC", &Solid2d::BC)
|
.def("BC", &Solid2d::BC)
|
||||||
.def("Maxh", &Solid2d::Maxh)
|
.def("Maxh", &Solid2d::Maxh)
|
||||||
|
.def("Layer", &Solid2d::Layer)
|
||||||
|
|
||||||
.def("Copy", [](Solid2d & self) -> Solid2d { return self; })
|
.def("Copy", [](Solid2d & self) -> Solid2d { return self; })
|
||||||
.def("Move", &Solid2d::Move)
|
.def("Move", &Solid2d::Move)
|
||||||
|
Loading…
Reference in New Issue
Block a user