mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-26 05:50:32 +05:00
Merge branch 'geom_info_2d_element' into 'master'
export geom info of 2d elements See merge request ngsolve/netgen!614
This commit is contained in:
commit
1565e149c0
@ -512,6 +512,13 @@ DLL_HEADER void ExportNetgenMeshing(py::module &m)
|
|||||||
.def_property("index", &Element2d::GetIndex, &Element2d::SetIndex)
|
.def_property("index", &Element2d::GetIndex, &Element2d::SetIndex)
|
||||||
.def_property("curved", &Element2d::IsCurved, &Element2d::SetCurved)
|
.def_property("curved", &Element2d::IsCurved, &Element2d::SetCurved)
|
||||||
.def_property("refine", &Element2d::TestRefinementFlag, &Element2d::SetRefinementFlag)
|
.def_property("refine", &Element2d::TestRefinementFlag, &Element2d::SetRefinementFlag)
|
||||||
|
.def_property_readonly("geominfo", [](const Element2d& self) -> py::list
|
||||||
|
{
|
||||||
|
py::list li;
|
||||||
|
for (const auto &pgi : self.GeomInfo())
|
||||||
|
li.append(py::make_tuple(pgi.trignum, pgi.u, pgi.v));
|
||||||
|
return li;
|
||||||
|
})
|
||||||
.def_property_readonly("vertices",
|
.def_property_readonly("vertices",
|
||||||
FunctionPointer([](const Element2d & self) -> py::list
|
FunctionPointer([](const Element2d & self) -> py::list
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user