| | |
| |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| |
|
| | #include <Mod/Part/PartGlobal.h> |
| |
|
| | #include <Base/PyWrapParseTupleAndKeywords.h> |
| |
|
| | #include "HLRBRep/HLRToShapePy.h" |
| | #include "HLRBRep/HLRToShapePy.cpp" |
| | #include "HLRBRep/HLRBRep_AlgoPy.h" |
| | #include "TopoShapePy.h" |
| |
|
| |
|
| | using namespace Part; |
| |
|
| | PyObject* HLRToShapePy::PyMake(struct _typeobject*, PyObject*, PyObject*) |
| | { |
| | |
| | return new HLRToShapePy(nullptr); |
| | } |
| |
|
| | |
| | int HLRToShapePy::PyInit(PyObject* args, PyObject* ) |
| | { |
| | PyObject* algo; |
| | if (!PyArg_ParseTuple(args, "O!", &Part::HLRBRep_AlgoPy::Type, &algo)) { |
| | return -1; |
| | } |
| |
|
| | HLRBRep_AlgoPy* py = static_cast<HLRBRep_AlgoPy*>(algo); |
| | setTwinPointer(new HLRBRep_HLRToShape(py->handle())); |
| |
|
| | return 0; |
| | } |
| |
|
| | |
| | std::string HLRToShapePy::representation() const |
| | { |
| | return {"<HLRBRep_HLRToShape object>"}; |
| | } |
| |
|
| | PyObject* HLRToShapePy::vCompound(PyObject* args) |
| | { |
| | PyObject* shape = nullptr; |
| | if (!PyArg_ParseTuple(args, "|O!", &Part::TopoShapePy::Type, &shape)) { |
| | return nullptr; |
| | } |
| |
|
| | if (shape) { |
| | TopoDS_Shape input = static_cast<TopoShapePy*>(shape)->getTopoShapePtr()->getShape(); |
| | TopoDS_Shape result = getHLRBRep_HLRToShapePtr()->VCompound(input); |
| | return new TopoShapePy(new TopoShape(result)); |
| | } |
| | else { |
| | TopoDS_Shape result = getHLRBRep_HLRToShapePtr()->VCompound(); |
| | return new TopoShapePy(new TopoShape(result)); |
| | } |
| | } |
| |
|
| | PyObject* HLRToShapePy::Rg1LineVCompound(PyObject* args) |
| | { |
| | PyObject* shape = nullptr; |
| | if (!PyArg_ParseTuple(args, "|O!", &Part::TopoShapePy::Type, &shape)) { |
| | return nullptr; |
| | } |
| |
|
| | if (shape) { |
| | TopoDS_Shape input = static_cast<TopoShapePy*>(shape)->getTopoShapePtr()->getShape(); |
| | TopoDS_Shape result = getHLRBRep_HLRToShapePtr()->Rg1LineVCompound(input); |
| | return new TopoShapePy(new TopoShape(result)); |
| | } |
| | else { |
| | TopoDS_Shape result = getHLRBRep_HLRToShapePtr()->Rg1LineVCompound(); |
| | return new TopoShapePy(new TopoShape(result)); |
| | } |
| | } |
| |
|
| | PyObject* HLRToShapePy::RgNLineVCompound(PyObject* args) |
| | { |
| | PyObject* shape = nullptr; |
| | if (!PyArg_ParseTuple(args, "|O!", &Part::TopoShapePy::Type, &shape)) { |
| | return nullptr; |
| | } |
| |
|
| | if (shape) { |
| | TopoDS_Shape input = static_cast<TopoShapePy*>(shape)->getTopoShapePtr()->getShape(); |
| | TopoDS_Shape result = getHLRBRep_HLRToShapePtr()->RgNLineVCompound(input); |
| | return new TopoShapePy(new TopoShape(result)); |
| | } |
| | else { |
| | TopoDS_Shape result = getHLRBRep_HLRToShapePtr()->RgNLineVCompound(); |
| | return new TopoShapePy(new TopoShape(result)); |
| | } |
| | } |
| |
|
| | PyObject* HLRToShapePy::outLineVCompound(PyObject* args) |
| | { |
| | PyObject* shape = nullptr; |
| | if (!PyArg_ParseTuple(args, "|O!", &Part::TopoShapePy::Type, &shape)) { |
| | return nullptr; |
| | } |
| |
|
| | if (shape) { |
| | TopoDS_Shape input = static_cast<TopoShapePy*>(shape)->getTopoShapePtr()->getShape(); |
| | TopoDS_Shape result = getHLRBRep_HLRToShapePtr()->OutLineVCompound(input); |
| | return new TopoShapePy(new TopoShape(result)); |
| | } |
| | else { |
| | TopoDS_Shape result = getHLRBRep_HLRToShapePtr()->OutLineVCompound(); |
| | return new TopoShapePy(new TopoShape(result)); |
| | } |
| | } |
| |
|
| | PyObject* HLRToShapePy::outLineVCompound3d(PyObject* args) |
| | { |
| | if (!PyArg_ParseTuple(args, "")) { |
| | return nullptr; |
| | } |
| |
|
| | TopoDS_Shape result = getHLRBRep_HLRToShapePtr()->OutLineVCompound3d(); |
| | return new TopoShapePy(new TopoShape(result)); |
| | } |
| |
|
| | PyObject* HLRToShapePy::isoLineVCompound(PyObject* args) |
| | { |
| | PyObject* shape = nullptr; |
| | if (!PyArg_ParseTuple(args, "|O!", &Part::TopoShapePy::Type, &shape)) { |
| | return nullptr; |
| | } |
| |
|
| | if (shape) { |
| | TopoDS_Shape input = static_cast<TopoShapePy*>(shape)->getTopoShapePtr()->getShape(); |
| | TopoDS_Shape result = getHLRBRep_HLRToShapePtr()->IsoLineVCompound(input); |
| | return new TopoShapePy(new TopoShape(result)); |
| | } |
| | else { |
| | TopoDS_Shape result = getHLRBRep_HLRToShapePtr()->IsoLineVCompound(); |
| | return new TopoShapePy(new TopoShape(result)); |
| | } |
| | } |
| |
|
| | PyObject* HLRToShapePy::hCompound(PyObject* args) |
| | { |
| | PyObject* shape = nullptr; |
| | if (!PyArg_ParseTuple(args, "|O!", &Part::TopoShapePy::Type, &shape)) { |
| | return nullptr; |
| | } |
| |
|
| | if (shape) { |
| | TopoDS_Shape input = static_cast<TopoShapePy*>(shape)->getTopoShapePtr()->getShape(); |
| | TopoDS_Shape result = getHLRBRep_HLRToShapePtr()->HCompound(input); |
| | return new TopoShapePy(new TopoShape(result)); |
| | } |
| | else { |
| | TopoDS_Shape result = getHLRBRep_HLRToShapePtr()->HCompound(); |
| | return new TopoShapePy(new TopoShape(result)); |
| | } |
| | } |
| |
|
| | PyObject* HLRToShapePy::Rg1LineHCompound(PyObject* args) |
| | { |
| | PyObject* shape = nullptr; |
| | if (!PyArg_ParseTuple(args, "|O!", &Part::TopoShapePy::Type, &shape)) { |
| | return nullptr; |
| | } |
| |
|
| | if (shape) { |
| | TopoDS_Shape input = static_cast<TopoShapePy*>(shape)->getTopoShapePtr()->getShape(); |
| | TopoDS_Shape result = getHLRBRep_HLRToShapePtr()->Rg1LineHCompound(input); |
| | return new TopoShapePy(new TopoShape(result)); |
| | } |
| | else { |
| | TopoDS_Shape result = getHLRBRep_HLRToShapePtr()->Rg1LineHCompound(); |
| | return new TopoShapePy(new TopoShape(result)); |
| | } |
| | } |
| |
|
| | PyObject* HLRToShapePy::RgNLineHCompound(PyObject* args) |
| | { |
| | PyObject* shape = nullptr; |
| | if (!PyArg_ParseTuple(args, "|O!", &Part::TopoShapePy::Type, &shape)) { |
| | return nullptr; |
| | } |
| |
|
| | if (shape) { |
| | TopoDS_Shape input = static_cast<TopoShapePy*>(shape)->getTopoShapePtr()->getShape(); |
| | TopoDS_Shape result = getHLRBRep_HLRToShapePtr()->RgNLineHCompound(input); |
| | return new TopoShapePy(new TopoShape(result)); |
| | } |
| | else { |
| | TopoDS_Shape result = getHLRBRep_HLRToShapePtr()->RgNLineHCompound(); |
| | return new TopoShapePy(new TopoShape(result)); |
| | } |
| | } |
| |
|
| | PyObject* HLRToShapePy::outLineHCompound(PyObject* args) |
| | { |
| | PyObject* shape = nullptr; |
| | if (!PyArg_ParseTuple(args, "|O!", &Part::TopoShapePy::Type, &shape)) { |
| | return nullptr; |
| | } |
| |
|
| | if (shape) { |
| | TopoDS_Shape input = static_cast<TopoShapePy*>(shape)->getTopoShapePtr()->getShape(); |
| | TopoDS_Shape result = getHLRBRep_HLRToShapePtr()->OutLineHCompound(input); |
| | return new TopoShapePy(new TopoShape(result)); |
| | } |
| | else { |
| | TopoDS_Shape result = getHLRBRep_HLRToShapePtr()->OutLineHCompound(); |
| | return new TopoShapePy(new TopoShape(result)); |
| | } |
| | } |
| |
|
| | PyObject* HLRToShapePy::isoLineHCompound(PyObject* args) |
| | { |
| | PyObject* shape = nullptr; |
| | if (!PyArg_ParseTuple(args, "|O!", &Part::TopoShapePy::Type, &shape)) { |
| | return nullptr; |
| | } |
| |
|
| | if (shape) { |
| | TopoDS_Shape input = static_cast<TopoShapePy*>(shape)->getTopoShapePtr()->getShape(); |
| | TopoDS_Shape result = getHLRBRep_HLRToShapePtr()->IsoLineHCompound(input); |
| | return new TopoShapePy(new TopoShape(result)); |
| | } |
| | else { |
| | TopoDS_Shape result = getHLRBRep_HLRToShapePtr()->IsoLineHCompound(); |
| | return new TopoShapePy(new TopoShape(result)); |
| | } |
| | } |
| |
|
| | PyObject* HLRToShapePy::compoundOfEdges(PyObject* args, PyObject* kwds) |
| | { |
| | int type; |
| | PyObject* visible = nullptr; |
| | PyObject* in3d = nullptr; |
| | PyObject* shape = nullptr; |
| |
|
| | static const std::array<const char*, 5> keywords {"Type", "Visible", "In3D", "Shape", nullptr}; |
| | if (!Base::Wrapped_ParseTupleAndKeywords( |
| | args, |
| | kwds, |
| | "iO!O!|O!", |
| | keywords, |
| | &type, |
| | &PyBool_Type, |
| | &visible, |
| | &PyBool_Type, |
| | &in3d, |
| | &Part::TopoShapePy::Type, |
| | &shape |
| | )) { |
| | return nullptr; |
| | } |
| |
|
| | if (shape) { |
| | TopoDS_Shape input = static_cast<TopoShapePy*>(shape)->getTopoShapePtr()->getShape(); |
| | TopoDS_Shape result = getHLRBRep_HLRToShapePtr()->CompoundOfEdges( |
| | input, |
| | static_cast<HLRBRep_TypeOfResultingEdge>(type), |
| | Base::asBoolean(visible), |
| | Base::asBoolean(in3d) |
| | ); |
| | return new TopoShapePy(new TopoShape(result)); |
| | } |
| | else { |
| | TopoDS_Shape result = getHLRBRep_HLRToShapePtr()->CompoundOfEdges( |
| | static_cast<HLRBRep_TypeOfResultingEdge>(type), |
| | Base::asBoolean(visible), |
| | Base::asBoolean(in3d) |
| | ); |
| | return new TopoShapePy(new TopoShape(result)); |
| | } |
| | } |
| |
|
| | PyObject* HLRToShapePy::getCustomAttributes(const char* ) const |
| | { |
| | return nullptr; |
| | } |
| |
|
| | int HLRToShapePy::setCustomAttributes(const char* , PyObject* ) |
| | { |
| | return 0; |
| | } |
| |
|