diff --git a/PyRxCore/PyAcBr.cpp b/PyRxCore/PyAcBr.cpp index 0da87f6c..ee76eeb5 100644 --- a/PyRxCore/PyAcBr.cpp +++ b/PyRxCore/PyAcBr.cpp @@ -1,6 +1,7 @@ #include "stdafx.h" #include "PyAcBr.h" #include "PyBrEntity.h" +#include "PyBrTraverser.h" using namespace boost::python; @@ -86,6 +87,23 @@ BOOST_PYTHON_MODULE(PyBr) makePyBrMesh2dWrapper(); makePyBrNodeWrapper(); + makePyBrTraverserWrapper(); + makePyBrepComplexTraverserWrapper(); + makePyBrepEdgeTraverserWrapper(); + makePyBrepFaceTraverserWrapper(); + makePyBrepShellTraverserWrapper(); + makePyBrepVertexTraverserWrapper(); + makePyBrComplexShellTraverserWrapper(); + makePyBrEdgeLoopTraverserWrapper(); + makePyBrElement2dNodeTraverserWrapper(); + makePyBrFaceLoopTraverserWrapper(); + makePyBrLoopEdgeTraverserWrapper(); + makePyBrLoopVertexTraverserWrapper(); + makePyBrMesh2dElement2dTraverserWrapper(); + makePyBrShellFaceTraverserWrapper(); + makePyBrVertexEdgeTraverserWrapper(); + makePyBrVertexLoopTraverserWrapper(); + enum_("Element2dShape") .value("kDefault", AcBr::Element2dShape::kDefault) .value("kAllPolygons", AcBr::Element2dShape::kAllPolygons) diff --git a/PyRxCore/PyBrEntity.cpp b/PyRxCore/PyBrEntity.cpp index f45fc502..df4f57e8 100644 --- a/PyRxCore/PyBrEntity.cpp +++ b/PyRxCore/PyBrEntity.cpp @@ -21,7 +21,7 @@ void makePyBrHitWrapper() .def("getEntityEntered", &PyBrHit::getEntityEntered, DS.ARGS()) .def("getEntityAssociated", &PyBrHit::getEntityAssociated, DS.ARGS()) .def("getPoint", &PyBrHit::getPoint, DS.ARGS()) - .def("getPoint", &PyBrHit::getValidationLevel, DS.ARGS()) + .def("getValidationLevel", &PyBrHit::getValidationLevel, DS.ARGS()) .def("setValidationLevel", &PyBrHit::setValidationLevel, DS.ARGS({ "val: PyBr.ValidationLevel" })) .def("brepChanged", &PyBrHit::brepChanged, DS.ARGS()) .def("className", &PyBrHit::className, DS.SARGS()).staticmethod("className") diff --git a/PyRxCore/PyBrTraverser.cpp b/PyRxCore/PyBrTraverser.cpp index e7081b25..5195ca12 100644 --- a/PyRxCore/PyBrTraverser.cpp +++ b/PyRxCore/PyBrTraverser.cpp @@ -10,6 +10,14 @@ void makePyBrTraverserWrapper() { PyDocString DS("Traverser"); class_>("Traverser", no_init) + .def("isEqualTo", &PyBrTraverser::isEqualTo, DS.ARGS({ "otherObject: PyRx.RxObject" })) + .def("isNull", &PyBrTraverser::isNull, DS.ARGS()) + .def("done", &PyBrTraverser::done, DS.ARGS()) + .def("next", &PyBrTraverser::next, DS.ARGS()) + .def("restart", &PyBrTraverser::restart, DS.ARGS()) + .def("getValidationLevel", &PyBrTraverser::getValidationLevel, DS.ARGS()) + .def("setValidationLevel", &PyBrTraverser::setValidationLevel, DS.ARGS({ "val: PyBr.ValidationLevel" })) + .def("brepChanged", &PyBrTraverser::brepChanged, DS.ARGS()) .def("className", &PyBrTraverser::className, DS.SARGS()).staticmethod("className") .def("desc", &PyBrTraverser::desc, DS.SARGS(15560)).staticmethod("desc") ; @@ -25,6 +33,52 @@ PyBrTraverser::PyBrTraverser(AcRxObject* ptr, bool autoDelete) { } +Adesk::Boolean PyBrTraverser::isEqualTo(const PyRxObject& other) const +{ + return impObj()->isEqualTo(other.impObj()); +} + +Adesk::Boolean PyBrTraverser::isNull() const +{ + return impObj()->isNull(); +} + +bool PyBrTraverser::done() +{ + return impObj()->done(); +} + +void PyBrTraverser::next() +{ + PyThrowBadBr(impObj()->next()); +} + +void PyBrTraverser::restart() +{ + PyThrowBadBr(impObj()->restart()); +} + +void PyBrTraverser::setValidationLevel(const AcBr::ValidationLevel& validationLevel) +{ + PyThrowBadBr(impObj()->setValidationLevel(validationLevel)); +} + +AcBr::ValidationLevel PyBrTraverser::getValidationLevel() const +{ + AcBr::ValidationLevel val; + PyThrowBadBr(impObj()->getValidationLevel(val)); + return val; +} + +Adesk::Boolean PyBrTraverser::brepChanged() const +{ +#if defined(_BRXTARGET250) + throw PyNotimplementedByHost(); +#else + return impObj()->brepChanged(); +#endif +} + PyRxClass PyBrTraverser::desc() { return PyRxClass(AcBrTraverser::desc(), false); diff --git a/PyRxCore/PyBrTraverser.h b/PyRxCore/PyBrTraverser.h index 4e35b0aa..c9f9a2b8 100644 --- a/PyRxCore/PyBrTraverser.h +++ b/PyRxCore/PyBrTraverser.h @@ -13,6 +13,18 @@ class PyBrTraverser : public PyRxObject PyBrTraverser(const AcRxObject* ptr); PyBrTraverser(AcRxObject* ptr, bool autoDelete); inline virtual ~PyBrTraverser() = default; + + Adesk::Boolean isEqualTo(const PyRxObject& other) const; + Adesk::Boolean isNull() const; + + bool done(); + void next(); + void restart(); + + void setValidationLevel(const AcBr::ValidationLevel& validationLevel); + AcBr::ValidationLevel getValidationLevel() const; + Adesk::Boolean brepChanged() const; + static PyRxClass desc(); static std::string className(); public: diff --git a/PyRxStubs/PyBr.pyi b/PyRxStubs/PyBr.pyi index a5404400..8677a238 100644 --- a/PyRxStubs/PyBr.pyi +++ b/PyRxStubs/PyBr.pyi @@ -88,6 +88,41 @@ __init__( (object)arg1) -> None : ''' ''' ... +class Element(MeshEntity): + def __init__ (self, *args, **kwargs)-> None : + '''Raises an exception +This class cannot be instantiated from Python''' + ... + + @staticmethod + def className ()-> str : + ''' ''' + ... + + @staticmethod + def desc ()-> PyRx.RxClass : + '''Returns a pointer to the AcRxClass object representing the specific class, or most recent parent class explicitly registered with ObjectARX of either the pointer type used to invoke it or the class qualifier used with it. (Remember that when a static member function is invoked via a pointer, the pointer type, not the object type, determines which implementation of the function is invoked.)When working with a pointer to an object and the proper AcRxClass object for the class of the object pointed to is desired, the AcRxObject::isA() function should be used, since it is a virtual non-static method and is therefore not pointer type dependent.Caching the value of the pointer returned by this method is acceptable, provided the application knows that the AcRxClass object pointed to by the returned pointer was created by an ObjectARX application that will not be unloaded. ''' + ... + +class Element2d(Element): + def __init__ (self, *args, **kwargs)-> None : + '''Raises an exception +This class cannot be instantiated from Python''' + ... + + @staticmethod + def className ()-> str : + ''' ''' + ... + + @staticmethod + def desc ()-> PyRx.RxClass : + '''Returns a pointer to the AcRxClass object representing the specific class, or most recent parent class explicitly registered with ObjectARX of either the pointer type used to invoke it or the class qualifier used with it. (Remember that when a static member function is invoked via a pointer, the pointer type, not the object type, determines which implementation of the function is invoked.)When working with a pointer to an object and the proper AcRxClass object for the class of the object pointed to is desired, the AcRxObject::isA() function should be used, since it is a virtual non-static method and is therefore not pointer type dependent.Caching the value of the pointer returned by this method is acceptable, provided the application knows that the AcRxClass object pointed to by the returned pointer was created by an ObjectARX application that will not be unloaded. ''' + ... + def getNormal (self)-> PyGe.Vector3d : + ''' ''' + ... + class Element2dShape(object): def kAllPolygons (self, *args, **kwargs)-> None : '''None''' @@ -290,13 +325,16 @@ class Hit(PyRx.RxObject): def getPoint (self)-> PyGe.Point3d : ''' ''' ... + def getValidationLevel (self)-> PyBr.ValidationLevel : + ''' ''' + ... def isEqualTo (self, otherObject: PyRx.RxObject)-> bool : ''' ''' ... def isNull (self)-> bool : ''' ''' ... - def setValidationLevel (self, val: PyBr.ValidationLevel)-> PyGe.Point3d : + def setValidationLevel (self, val: PyBr.ValidationLevel)-> None : ''' ''' ... @@ -373,6 +411,90 @@ class MassProps(object): ''' ''' ... +class Mesh(MeshEntity): + def __init__ (self, *args, **kwargs)-> None : + '''Raises an exception +This class cannot be instantiated from Python''' + ... + + @staticmethod + def className ()-> str : + ''' ''' + ... + + @staticmethod + def desc ()-> PyRx.RxClass : + '''Returns a pointer to the AcRxClass object representing the specific class, or most recent parent class explicitly registered with ObjectARX of either the pointer type used to invoke it or the class qualifier used with it. (Remember that when a static member function is invoked via a pointer, the pointer type, not the object type, determines which implementation of the function is invoked.)When working with a pointer to an object and the proper AcRxClass object for the class of the object pointed to is desired, the AcRxObject::isA() function should be used, since it is a virtual non-static method and is therefore not pointer type dependent.Caching the value of the pointer returned by this method is acceptable, provided the application knows that the AcRxClass object pointed to by the returned pointer was created by an ObjectARX application that will not be unloaded. ''' + ... + +class Mesh2d(Mesh): + def __init__ (self, *args, **kwargs)-> None : + '''Raises an exception +This class cannot be instantiated from Python''' + ... + + @staticmethod + def className ()-> str : + ''' ''' + ... + + @staticmethod + def desc ()-> PyRx.RxClass : + '''Returns a pointer to the AcRxClass object representing the specific class, or most recent parent class explicitly registered with ObjectARX of either the pointer type used to invoke it or the class qualifier used with it. (Remember that when a static member function is invoked via a pointer, the pointer type, not the object type, determines which implementation of the function is invoked.)When working with a pointer to an object and the proper AcRxClass object for the class of the object pointed to is desired, the AcRxObject::isA() function should be used, since it is a virtual non-static method and is therefore not pointer type dependent.Caching the value of the pointer returned by this method is acceptable, provided the application knows that the AcRxClass object pointed to by the returned pointer was created by an ObjectARX application that will not be unloaded. ''' + ... + +class MeshEntity(PyRx.RxObject): + def __init__ (self, *args, **kwargs)-> None : + '''Raises an exception +This class cannot be instantiated from Python''' + ... + def brepChanged (self)-> bool : + ''' ''' + ... + + @staticmethod + def className ()-> str : + ''' ''' + ... + + @staticmethod + def desc ()-> PyRx.RxClass : + '''Returns a pointer to the AcRxClass object representing the specific class, or most recent parent class explicitly registered with ObjectARX of either the pointer type used to invoke it or the class qualifier used with it. (Remember that when a static member function is invoked via a pointer, the pointer type, not the object type, determines which implementation of the function is invoked.)When working with a pointer to an object and the proper AcRxClass object for the class of the object pointed to is desired, the AcRxObject::isA() function should be used, since it is a virtual non-static method and is therefore not pointer type dependent.Caching the value of the pointer returned by this method is acceptable, provided the application knows that the AcRxClass object pointed to by the returned pointer was created by an ObjectARX application that will not be unloaded. ''' + ... + def getEntityAssociated (self)-> PyBr.Entity : + ''' ''' + ... + def getPoint (self)-> PyBr.ValidationLevel : + ''' ''' + ... + def isEqualTo (self, otherObject: PyRx.RxObject)-> bool : + ''' ''' + ... + def isNull (self)-> bool : + ''' ''' + ... + def setValidationLevel (self, val: PyBr.ValidationLevel)-> None : + ''' ''' + ... + +class Node(MeshEntity): + def __init__ (self)-> None : + ''' ''' + ... + + @staticmethod + def className ()-> str : + ''' ''' + ... + + @staticmethod + def desc ()-> PyRx.RxClass : + '''Returns a pointer to the AcRxClass object representing the specific class, or most recent parent class explicitly registered with ObjectARX of either the pointer type used to invoke it or the class qualifier used with it. (Remember that when a static member function is invoked via a pointer, the pointer type, not the object type, determines which implementation of the function is invoked.)When working with a pointer to an object and the proper AcRxClass object for the class of the object pointed to is desired, the AcRxObject::isA() function should be used, since it is a virtual non-static method and is therefore not pointer type dependent.Caching the value of the pointer returned by this method is acceptable, provided the application knows that the AcRxClass object pointed to by the returned pointer was created by an ObjectARX application that will not be unloaded. ''' + ... + def getPoint (self)-> PyGe.Point3d : + ''' ''' + ... + class Relation(object): def kBoundary (self, *args, **kwargs)-> None : '''None'''