add OCC standard meshing algorithm to Mesher class

This commit is contained in:
wmayer
2016-09-07 16:39:54 +02:00
parent f37b70b141
commit 1ed35628ab
4 changed files with 172 additions and 1 deletions

View File

@@ -177,6 +177,20 @@ private:
{
PyObject *shape;
static char* kwds_lindeflection[] = {"Shape", "LinearDeflection", "AngularDeflection", NULL};
PyErr_Clear();
double lindeflection=0;
double angdeflection=0.5;
if (PyArg_ParseTupleAndKeywords(args.ptr(), kwds.ptr(), "O!d|d", kwds_lindeflection,
&(Part::TopoShapePy::Type), &shape, &lindeflection, &angdeflection)) {
MeshPart::Mesher mesher(static_cast<Part::TopoShapePy*>(shape)->getTopoShapePtr()->getShape());
mesher.setMethod(MeshPart::Mesher::Standard);
mesher.setDeflection(lindeflection);
mesher.setAngularDeflection(angdeflection);
mesher.setRegular(true);
return Py::asObject(new Mesh::MeshPy(mesher.createMesh()));
}
static char* kwds_maxLength[] = {"Shape", "MaxLength",NULL};
PyErr_Clear();
double maxLength=0;