mirror of
https://github.com/NGSolve/netgen.git
synced 2025-01-27 13:20:34 +05:00
enable tables to disable edge/face generation if not needed
This commit is contained in:
parent
777b5ed216
commit
07b84024ca
@ -122,7 +122,6 @@ DLL_HEADER void ExportNetgenMeshing(py::module &m)
|
|||||||
py::class_<Transformation<3>> (m, "Trafo")
|
py::class_<Transformation<3>> (m, "Trafo")
|
||||||
.def(py::init<Vec<3>>())
|
.def(py::init<Vec<3>>())
|
||||||
.def("__call__", [] (Transformation<3> trafo, Point<3> p) { return trafo(p); })
|
.def("__call__", [] (Transformation<3> trafo, Point<3> p) { return trafo(p); })
|
||||||
// .def ("__str__", &ToString<Transformation<3>>)
|
|
||||||
;
|
;
|
||||||
|
|
||||||
m.def ("SetTransformation", FunctionPointer
|
m.def ("SetTransformation", FunctionPointer
|
||||||
@ -786,6 +785,15 @@ DLL_HEADER void ExportNetgenMeshing(py::module &m)
|
|||||||
}
|
}
|
||||||
))
|
))
|
||||||
|
|
||||||
|
.def ("EnableTable", [] (Mesh & self, string name, bool set)
|
||||||
|
{
|
||||||
|
if (name == "edges")
|
||||||
|
const_cast<MeshTopology&>(self.GetTopology()).SetBuildEdges(set);
|
||||||
|
if (name == "faces")
|
||||||
|
const_cast<MeshTopology&>(self.GetTopology()).SetBuildFaces(set);
|
||||||
|
},
|
||||||
|
py::arg("name"), py::arg("set")=true)
|
||||||
|
|
||||||
.def ("Scale", FunctionPointer([](Mesh & self, double factor)
|
.def ("Scale", FunctionPointer([](Mesh & self, double factor)
|
||||||
{
|
{
|
||||||
for(auto i = 0; i<self.GetNP();i++)
|
for(auto i = 0; i<self.GetNP();i++)
|
||||||
|
@ -44,8 +44,8 @@ namespace netgen
|
|||||||
MeshTopology :: MeshTopology (const Mesh & amesh)
|
MeshTopology :: MeshTopology (const Mesh & amesh)
|
||||||
: mesh(&amesh)
|
: mesh(&amesh)
|
||||||
{
|
{
|
||||||
buildedges = 1;
|
buildedges = true;
|
||||||
buildfaces = 1;
|
buildfaces = true;
|
||||||
timestamp = -1;
|
timestamp = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user