Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 457830 | Differences between
and this patch

Collapse All | Expand All

(-)a/src/Mod/Part/App/BRepOffsetAPI_MakePipeShellPyImp.cpp (+32 lines)
Lines 29-34 Link Here
29
# include <TopoDS.hxx>
29
# include <TopoDS.hxx>
30
# include <TopoDS_Wire.hxx>
30
# include <TopoDS_Wire.hxx>
31
# include <BRepOffsetAPI_MakePipeShell.hxx>
31
# include <BRepOffsetAPI_MakePipeShell.hxx>
32
# include <Standard_Version.hxx>
32
# include <TopTools_ListIteratorOfListOfShape.hxx>
33
# include <TopTools_ListIteratorOfListOfShape.hxx>
33
#endif
34
#endif
34
35
Lines 111-116 PyObject* BRepOffsetAPI_MakePipeShellPy::setSpineSupport(PyObject *args) Link Here
111
112
112
PyObject* BRepOffsetAPI_MakePipeShellPy::setAuxiliarySpine(PyObject *args)
113
PyObject* BRepOffsetAPI_MakePipeShellPy::setAuxiliarySpine(PyObject *args)
113
{
114
{
115
#if OCC_VERSION_HEX >= 0x060700
116
    PyObject *spine, *curv, *keep;
117
    if (!PyArg_ParseTuple(args, "O!O!O!",&Part::TopoShapePy::Type,&spine
118
                                        ,&PyBool_Type,&curv
119
                                        ,&PyInt_Type,&keep))
120
        return 0;
121
    const TopoDS_Shape& s = static_cast<Part::TopoShapePy*>(spine)->getTopoShapePtr()->_Shape;
122
    if (s.IsNull() || s.ShapeType() != TopAbs_WIRE) {
123
        PyErr_SetString(PyExc_TypeError, "spine is not a wire");
124
        return 0;
125
    }
126
127
    BRepFill_TypeOfContact typeOfCantact;
128
    switch (PyLong_AsLong(keep)) {
129
    case 1:
130
        typeOfCantact = BRepFill_Contact;
131
        break;
132
    case 2:
133
        typeOfCantact = BRepFill_ContactOnBorder;
134
        break;
135
    default:
136
        typeOfCantact = BRepFill_NoContact;
137
        break;
138
    }
139
    this->getBRepOffsetAPI_MakePipeShellPtr()->SetMode(
140
        TopoDS::Wire(s),
141
        PyObject_IsTrue(curv) ? Standard_True : Standard_False,
142
        typeOfCantact);
143
    Py_Return;
144
#else
114
    PyObject *spine, *curv, *keep;
145
    PyObject *spine, *curv, *keep;
115
    if (!PyArg_ParseTuple(args, "O!O!O!",&Part::TopoShapePy::Type,&spine
146
    if (!PyArg_ParseTuple(args, "O!O!O!",&Part::TopoShapePy::Type,&spine
116
                                        ,&PyBool_Type,&curv
147
                                        ,&PyBool_Type,&curv
Lines 127-132 PyObject* BRepOffsetAPI_MakePipeShellPy::setAuxiliarySpine(PyObject *args) Link Here
127
        PyObject_IsTrue(curv) ? Standard_True : Standard_False,
158
        PyObject_IsTrue(curv) ? Standard_True : Standard_False,
128
        PyObject_IsTrue(keep) ? Standard_True : Standard_False);
159
        PyObject_IsTrue(keep) ? Standard_True : Standard_False);
129
    Py_Return;
160
    Py_Return;
161
#endif
130
}
162
}
131
163
132
PyObject* BRepOffsetAPI_MakePipeShellPy::add(PyObject *args)
164
PyObject* BRepOffsetAPI_MakePipeShellPy::add(PyObject *args)

Return to bug 457830