removed references to OCC<7

This commit is contained in:
andrea
2022-06-25 10:26:24 +02:00
committed by Uwe
parent e9890c0798
commit 93525ff7eb
46 changed files with 49 additions and 714 deletions

View File

@@ -142,7 +142,6 @@ PyObject* BRepOffsetAPI_MakePipeShellPy::setSpineSupport(PyObject *args)
PyObject* BRepOffsetAPI_MakePipeShellPy::setAuxiliarySpine(PyObject *args)
{
#if OCC_VERSION_HEX >= 0x060700
PyObject *spine, *curv, *keep;
if (!PyArg_ParseTuple(args, "O!O!O!",&Part::TopoShapePy::Type,&spine
,&PyBool_Type,&curv
@@ -178,31 +177,6 @@ PyObject* BRepOffsetAPI_MakePipeShellPy::setAuxiliarySpine(PyObject *args)
PyErr_SetString(PartExceptionOCCError, e.GetMessageString());
return nullptr;
}
#else
PyObject *spine, *curv, *keep;
if (!PyArg_ParseTuple(args, "O!O!O!",&Part::TopoShapePy::Type,&spine
,&PyBool_Type,&curv
,&PyBool_Type,&keep))
return 0;
try {
const TopoDS_Shape& s = static_cast<Part::TopoShapePy*>(spine)->getTopoShapePtr()->getShape();
if (s.IsNull() || s.ShapeType() != TopAbs_WIRE) {
PyErr_SetString(PyExc_TypeError, "spine is not a wire");
return 0;
}
this->getBRepOffsetAPI_MakePipeShellPtr()->SetMode(
TopoDS::Wire(s),
PyObject_IsTrue(curv) ? Standard_True : Standard_False,
PyObject_IsTrue(keep) ? Standard_True : Standard_False);
Py_Return;
}
catch (Standard_Failure& e) {
PyErr_SetString(PartExceptionOCCError, e.GetMessageString());
return 0;
}
#endif
}
PyObject* BRepOffsetAPI_MakePipeShellPy::add(PyObject *args, PyObject *kwds)
@@ -440,14 +414,8 @@ PyObject* BRepOffsetAPI_MakePipeShellPy::setMaxDegree(PyObject *args)
return nullptr;
try {
#if OCC_VERSION_HEX >= 0x060800
this->getBRepOffsetAPI_MakePipeShellPtr()->SetMaxDegree(degree);
Py_Return;
#else
(void)args;
PyErr_SetString(PyExc_RuntimeError, "requires OCC >= 6.8");
return 0;
#endif
}
catch (Standard_Failure& e) {
PyErr_SetString(PartExceptionOCCError, e.GetMessageString());
@@ -462,14 +430,8 @@ PyObject* BRepOffsetAPI_MakePipeShellPy::setMaxSegments(PyObject *args)
return nullptr;
try {
#if OCC_VERSION_HEX >= 0x060800
this->getBRepOffsetAPI_MakePipeShellPtr()->SetMaxSegments(nbseg);
Py_Return;
#else
(void)args;
PyErr_SetString(PyExc_RuntimeError, "requires OCC >= 6.8");
return 0;
#endif
}
catch (Standard_Failure& e) {
PyErr_SetString(PartExceptionOCCError, e.GetMessageString());
@@ -484,13 +446,8 @@ PyObject* BRepOffsetAPI_MakePipeShellPy::setForceApproxC1(PyObject *args)
return nullptr;
try {
#if OCC_VERSION_HEX >= 0x060700
this->getBRepOffsetAPI_MakePipeShellPtr()->SetForceApproxC1(PyObject_IsTrue(obj) ? Standard_True : Standard_False);
Py_Return;
#else
PyErr_SetString(PyExc_RuntimeError, "requires OCC >= 6.7");
return 0;
#endif
}
catch (Standard_Failure& e) {
PyErr_SetString(PartExceptionOCCError, e.GetMessageString());