mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-26 13:50: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));
|
||||
return li;
|
||||
}))
|
||||
.def_property_readonly("index", FunctionPointer([](const Segment &self) -> size_t
|
||||
{
|
||||
return self.si;
|
||||
}))
|
||||
.def_property_readonly("edgenr", FunctionPointer([](const Segment & self) -> size_t
|
||||
{
|
||||
return self.edgenr;
|
||||
}))
|
||||
.def_property("index",
|
||||
[](const Segment &self) -> size_t
|
||||
{
|
||||
return self.si;
|
||||
},
|
||||
[](Segment& self, int index)
|
||||
{
|
||||
self.si = index;
|
||||
})
|
||||
.def_property("edgenr",
|
||||
[](const Segment & self) -> size_t
|
||||
{
|
||||
return self.edgenr;
|
||||
},
|
||||
[](Segment& self, int edgenr)
|
||||
{
|
||||
self.edgenr = edgenr;
|
||||
})
|
||||
.def_property("singular",
|
||||
[](const Segment & seg) { return seg.singedge_left; },
|
||||
[](Segment & seg, double sing) { seg.singedge_left = sing; seg.singedge_right=sing; })
|
||||
|
Loading…
Reference in New Issue
Block a user