mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-26 22:00:33 +05:00
add property setter for index and edgenr for segment
This commit is contained in:
parent
1772e01edb
commit
c032ad58ca
@ -568,14 +568,24 @@ DLL_HEADER void ExportNetgenMeshing(py::module &m)
|
|||||||
li.append (py::cast(self.surfnr2));
|
li.append (py::cast(self.surfnr2));
|
||||||
return li;
|
return li;
|
||||||
}))
|
}))
|
||||||
.def_property_readonly("index", FunctionPointer([](const Segment &self) -> size_t
|
.def_property("index",
|
||||||
{
|
[](const Segment &self) -> size_t
|
||||||
return self.si;
|
{
|
||||||
}))
|
return self.si;
|
||||||
.def_property_readonly("edgenr", FunctionPointer([](const Segment & self) -> size_t
|
},
|
||||||
{
|
[](Segment& self, int index)
|
||||||
return self.edgenr;
|
{
|
||||||
}))
|
self.si = index;
|
||||||
|
})
|
||||||
|
.def_property("edgenr",
|
||||||
|
[](const Segment & self) -> size_t
|
||||||
|
{
|
||||||
|
return self.edgenr;
|
||||||
|
},
|
||||||
|
[](Segment& self, int edgenr)
|
||||||
|
{
|
||||||
|
self.edgenr = edgenr;
|
||||||
|
})
|
||||||
.def_property("singular",
|
.def_property("singular",
|
||||||
[](const Segment & seg) { return seg.singedge_left; },
|
[](const Segment & seg) { return seg.singedge_left; },
|
||||||
[](Segment & seg, double sing) { seg.singedge_left = sing; seg.singedge_right=sing; })
|
[](Segment & seg, double sing) { seg.singedge_left = sing; seg.singedge_right=sing; })
|
||||||
|
Loading…
Reference in New Issue
Block a user