| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| |
|
| |
|
| | #ifndef ASSEMBLY_AssemblyUtils_H |
| | #define ASSEMBLY_AssemblyUtils_H |
| |
|
| | #include <GeomAbs_CurveType.hxx> |
| | #include <GeomAbs_SurfaceType.hxx> |
| |
|
| | #include <Mod/Assembly/AssemblyGlobal.h> |
| |
|
| | #include <App/FeaturePython.h> |
| | #include <App/Part.h> |
| |
|
| | namespace App |
| | { |
| | class DocumentObject; |
| | } |
| |
|
| | namespace Base |
| | { |
| | class Placement; |
| | } |
| |
|
| | namespace Assembly |
| | { |
| |
|
| | |
| | enum class JointType |
| | { |
| | Fixed, |
| | Revolute, |
| | Cylindrical, |
| | Slider, |
| | Ball, |
| | Distance, |
| | Parallel, |
| | Perpendicular, |
| | Angle, |
| | RackPinion, |
| | Screw, |
| | Gears, |
| | Belt, |
| | }; |
| |
|
| | enum class GeometryType |
| | { |
| | Point = 0, |
| |
|
| | |
| | Line = 1, |
| | Curve = 2, |
| | Circle = 3, |
| |
|
| | |
| | Place = 4, |
| | Cylinder = 5, |
| | Sphere = 6, |
| | Cone = 7, |
| | Torus = 8, |
| | }; |
| |
|
| | enum class DistanceType |
| | { |
| | PointPoint, |
| |
|
| | LineLine, |
| | LineCircle, |
| | CircleCircle, |
| |
|
| | PlanePlane, |
| | PlaneCylinder, |
| | PlaneSphere, |
| | PlaneCone, |
| | PlaneTorus, |
| | CylinderCylinder, |
| | CylinderSphere, |
| | CylinderCone, |
| | CylinderTorus, |
| | ConeCone, |
| | ConeTorus, |
| | ConeSphere, |
| | TorusTorus, |
| | TorusSphere, |
| | SphereSphere, |
| |
|
| | PointPlane, |
| | PointCylinder, |
| | PointSphere, |
| | PointCone, |
| | PointTorus, |
| |
|
| | LinePlane, |
| | LineCylinder, |
| | LineSphere, |
| | LineCone, |
| | LineTorus, |
| |
|
| | CurvePlane, |
| | CurveCylinder, |
| | CurveSphere, |
| | CurveCone, |
| | CurveTorus, |
| |
|
| | PointLine, |
| | PointCurve, |
| |
|
| | Other, |
| | }; |
| |
|
| | class AssemblyObject; |
| | class JointGroup; |
| |
|
| | AssemblyExport void swapJCS(const App::DocumentObject* joint); |
| |
|
| | AssemblyExport bool isEdgeType( |
| | const App::DocumentObject* obj, |
| | const std::string& elName, |
| | const GeomAbs_CurveType type |
| | ); |
| | AssemblyExport bool isFaceType( |
| | const App::DocumentObject* obj, |
| | const std::string& elName, |
| | const GeomAbs_SurfaceType type |
| | ); |
| | AssemblyExport double getFaceRadius(const App::DocumentObject* obj, const std::string& elName); |
| | AssemblyExport double getEdgeRadius(const App::DocumentObject* obj, const std::string& elName); |
| |
|
| | AssemblyExport DistanceType getDistanceType(App::DocumentObject* joint); |
| | AssemblyExport JointGroup* getJointGroup(const App::Part* part); |
| |
|
| | |
| | AssemblyExport void setJointActivated(const App::DocumentObject* joint, bool val); |
| | AssemblyExport bool getJointActivated(const App::DocumentObject* joint); |
| | AssemblyExport double getJointAngle(const App::DocumentObject* joint); |
| | AssemblyExport double getJointDistance(const App::DocumentObject* joint); |
| | AssemblyExport double getJointDistance2(const App::DocumentObject* joint); |
| | AssemblyExport JointType getJointType(const App::DocumentObject* joint); |
| | AssemblyExport std::string getElementFromProp(const App::DocumentObject* obj, const char* propName); |
| | AssemblyExport std::string getElementTypeFromProp(const App::DocumentObject* obj, const char* propName); |
| | AssemblyExport App::DocumentObject* getObjFromProp( |
| | const App::DocumentObject* joint, |
| | const char* propName |
| | ); |
| | AssemblyExport App::DocumentObject* getObjFromRef(const App::DocumentObject* obj, const std::string& sub); |
| | AssemblyExport App::DocumentObject* getObjFromRef(const App::PropertyXLinkSub* prop); |
| | AssemblyExport App::DocumentObject* getObjFromRef(const App::DocumentObject* joint, const char* propName); |
| | AssemblyExport App::DocumentObject* getLinkedObjFromRef( |
| | const App::DocumentObject* joint, |
| | const char* propName |
| | ); |
| | AssemblyExport App::DocumentObject* getMovingPartFromRef( |
| | const AssemblyObject* assemblyObject, |
| | App::DocumentObject* obj, |
| | const std::string& sub |
| | ); |
| | AssemblyExport App::DocumentObject* getMovingPartFromRef( |
| | const AssemblyObject* assemblyObject, |
| | const App::PropertyXLinkSub* prop |
| | ); |
| | AssemblyExport App::DocumentObject* getMovingPartFromRef( |
| | const AssemblyObject* assemblyObject, |
| | App::DocumentObject* joint, |
| | const char* pName |
| | ); |
| | AssemblyExport std::vector<std::string> getSubAsList(const App::PropertyXLinkSub* prop); |
| | AssemblyExport std::vector<std::string> getSubAsList( |
| | const App::DocumentObject* joint, |
| | const char* propName |
| | ); |
| | AssemblyExport void syncPlacements(App::DocumentObject* src, App::DocumentObject* to); |
| |
|
| | } |
| |
|
| |
|
| | #endif |
| |
|