allow Part.makeHelix to use 'vertical height' parm
correct lefthanded conical helixes in TopoShape::makeHelix
This commit is contained in:
WandererFan
2014-04-27 16:45:46 -04:00
committed by wmayer
parent 392cf965af
commit 33a4b6d7ba
2 changed files with 12 additions and 3 deletions

View File

@@ -858,12 +858,19 @@ static PyObject * makeTorus(PyObject *self, PyObject *args)
static PyObject * makeHelix(PyObject *self, PyObject *args)
{
double pitch, height, radius, angle=-1.0;
if (!PyArg_ParseTuple(args, "ddd|d", &pitch, &height, &radius, &angle))
PyObject *pleft=Py_False;
PyObject *pvertHeight=Py_False;
if (!PyArg_ParseTuple(args, "ddd|dO!O!", &pitch, &height, &radius, &angle,
&(PyBool_Type), &pleft,
&(PyBool_Type), &pvertHeight))
return 0;
try {
TopoShape helix;
TopoDS_Shape wire = helix.makeHelix(pitch, height, radius, angle);
Standard_Boolean anIsLeft = PyObject_IsTrue(pleft) ? Standard_True : Standard_False;
Standard_Boolean anIsVertHeight = PyObject_IsTrue(pvertHeight) ? Standard_True : Standard_False;
TopoDS_Shape wire = helix.makeHelix(pitch, height, radius, angle,
anIsLeft, anIsVertHeight);
return new TopoShapeWirePy(new TopoShape(wire));
}
catch (Standard_Failure) {