mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-27 14:20:34 +05:00
Python export of second order trigs
This commit is contained in:
parent
02dbd45759
commit
301ba176e5
@ -270,15 +270,25 @@ DLL_HEADER void ExportNetgenMeshing(py::module &m)
|
|||||||
for (int i = 0; i < 3; i++)
|
for (int i = 0; i < 3; i++)
|
||||||
(*instance)[i] = py::extract<PointIndex>(vertices[i])();
|
(*instance)[i] = py::extract<PointIndex>(vertices[i])();
|
||||||
instance->SetIndex(index);
|
instance->SetIndex(index);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
else
|
if (py::len(vertices) == 4)
|
||||||
{
|
{
|
||||||
new (instance) Element2d(QUAD);
|
new (instance) Element2d(QUAD);
|
||||||
for (int i = 0; i < 4; i++)
|
for (int i = 0; i < 4; i++)
|
||||||
(*instance)[i] = py::extract<PointIndex>(vertices[i])();
|
(*instance)[i] = py::extract<PointIndex>(vertices[i])();
|
||||||
instance->SetIndex(index);
|
instance->SetIndex(index);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
if (py::len(vertices) == 6)
|
||||||
|
{
|
||||||
|
new (instance) Element2d(TRIG6);
|
||||||
|
for(int i = 0; i<6; i++)
|
||||||
|
(*instance)[i] = py::extract<PointIndex>(vertices[i])();
|
||||||
|
instance->SetIndex(index);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
throw NgException("Inconsistent number of vertices in Element2D");
|
||||||
},
|
},
|
||||||
py::arg("index")=1,py::arg("vertices"),
|
py::arg("index")=1,py::arg("vertices"),
|
||||||
"create surface element"
|
"create surface element"
|
||||||
|
Loading…
Reference in New Issue
Block a user