mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-25 21:40:33 +05:00
Merge branch 'draw_occ_identifications' into 'master'
code for drawing occ identifications in webgui See merge request ngsolve/netgen!579
This commit is contained in:
commit
993ed0bde3
@ -1209,7 +1209,16 @@ DLL_HEADER void ExportNetgenMeshing(py::module &m)
|
|||||||
|
|
||||||
.def ("GetCD3Name", &Mesh::GetCD3Name)
|
.def ("GetCD3Name", &Mesh::GetCD3Name)
|
||||||
.def ("SetCD3Name", &Mesh::SetCD3Name)
|
.def ("SetCD3Name", &Mesh::SetCD3Name)
|
||||||
|
.def("GetIdentifications", [](Mesh & self) -> py::list
|
||||||
|
{
|
||||||
|
py::list points;
|
||||||
|
for(const auto& pair : self.GetIdentifications().GetIdentifiedPoints())
|
||||||
|
{
|
||||||
|
py::tuple pnts = py::make_tuple(pair.first.I1(), pair.first.I2());
|
||||||
|
points.append(pnts);
|
||||||
|
}
|
||||||
|
return points;
|
||||||
|
})
|
||||||
.def ("AddPointIdentification", [](Mesh & self, py::object pindex1, py::object pindex2, int identnr, Identifications::ID_TYPE type)
|
.def ("AddPointIdentification", [](Mesh & self, py::object pindex1, py::object pindex2, int identnr, Identifications::ID_TYPE type)
|
||||||
{
|
{
|
||||||
if(py::extract<PointIndex>(pindex1).check() && py::extract<PointIndex>(pindex2).check())
|
if(py::extract<PointIndex>(pindex1).check() && py::extract<PointIndex>(pindex2).check())
|
||||||
|
@ -14,7 +14,7 @@ if not USE_OCC:
|
|||||||
raise ImportError("Netgen was not built with Opencascade support")
|
raise ImportError("Netgen was not built with Opencascade support")
|
||||||
|
|
||||||
from .libngpy._NgOCC import *
|
from .libngpy._NgOCC import *
|
||||||
from .meshing import meshsize
|
from .meshing import meshsize, IdentificationType
|
||||||
|
|
||||||
|
|
||||||
gp_Ax3 = Axes
|
gp_Ax3 = Axes
|
||||||
|
Loading…
Reference in New Issue
Block a user