/** * * @file FITKOCCGeomTools.h * @brief OCC 几何工具类实现 * @author LiBaojun (libaojunqd@foxmail.com) * @date 2024-08-18 * */ #ifndef _FITKOCC_GEOM_TOOLS_H___ #define _FITKOCC_GEOM_TOOLS_H___ #include "FITK_Interface/FITKInterfaceGeometry/FITKAbsGeomTools.h" namespace OCC { /** * @brief OCC工具生成器,注册到Interface层geomToolsCreator中 * @author LiBaojun (libaojunqd@foxmail.com) * @date 2024-08-18 */ class FITKOCCToolCreator : public Interface::FITKAbstractGeomToolsCreator { public: /** * @brief Construct a new FITKOCCToolCreator object * @author LiBaojun (libaojunqd@foxmail.com) * @date 2024-08-18 */ explicit FITKOCCToolCreator() = default; /** * @brief Destroy the FITKOCCToolCreator object * @author LiBaojun (libaojunqd@foxmail.com) * @date 2024-08-18 */ virtual ~FITKOCCToolCreator() = default; /** * @brief 创建点工具类 * @return Interface::FITKAbstractGeomPointTool* * @author LiBaojun (libaojunqd@foxmail.com) * @date 2024-08-18 */ Interface::FITKAbstractGeomPointTool* createPointTool() override; /** * @brief 创建平面查询工具。[重写] * @return 平面查询工具 * @author ChengHaotian (yeguangbaozi@foxmail.com) * @date 2024-09-05 */ Interface::FITKAbstractGeomPlaneFaceTool* createPlaneFaceTool() override; }; /** * @brief 点工具类实现 * @author LiBaojun (libaojunqd@foxmail.com) * @date 2024-08-18 */ class FITKOCCPointTool : public Interface::FITKAbstractGeomPointTool { public: /** * @brief Construct a new FITKOCCPointTool object * @author LiBaojun (libaojunqd@foxmail.com) * @date 2024-08-18 */ explicit FITKOCCPointTool() = default; /** * @brief Destroy the FITKOCCPointTool object * @author LiBaojun (libaojunqd@foxmail.com) * @date 2024-08-18 */ virtual ~FITKOCCPointTool() = default; /** * @brief 获取点坐标 * @author LiBaojun (libaojunqd@foxmail.com) * @date 2024-08-18 * @param id 虚拓扑的id * @param xyz 点的坐标 * @return true 成功 * @return false 失败 */ bool getXYZ(const int & id, double* xyz) override; /** * @brief 获取点坐标 * @author LiBaojun (libaojunqd@foxmail.com) * @date 2024-08-18 * @param vtp 虚拓扑对象 * @param xyz 点的坐标 * @return true 成功 * @return false 失败 */ bool getXYZ(Interface::FITKAbsVirtualTopo* vtp, double* xyz) override; }; /** * @brief OCC平面查询工具。 * @author ChengHaotian (yeguangbaozi@foxmail.com) * @date 2024-09-05 */ class FITKOCCPlaneFaceTool : public Interface::FITKAbstractGeomPlaneFaceTool { public: /** * @brief 构造函数。 * @author ChengHaotian (yeguangbaozi@foxmail.com) * @date 2024-09-05 */ explicit FITKOCCPlaneFaceTool() = default; /** * @brief 析构函数。[虚函数] * @author ChengHaotian (yeguangbaozi@foxmail.com) * @date 2024-09-05 */ virtual ~FITKOCCPlaneFaceTool() = default; /** * @brief 获取查询信息。[重写] * @param id:面虚拓扑ID(必须为平面)[引用] * @param pos:面中心点坐标 * @param normal:面法向 * @param up:面向上方向 * @return 是否为有效平面 * @author ChengHaotian (yeguangbaozi@foxmail.com) * @date 2024-09-05 */ bool getPlane(const int & id, double* pos, double* normal, double* up) override; /** * @brief 获取查询信息。[重写] * @param vtp:面虚拓扑(必须为平面) * @param pos:面中心点坐标 * @param normal:面法向 * @param up:面向上方向 * @return 是否为有效平面 * @author ChengHaotian (yeguangbaozi@foxmail.com) * @date 2024-09-05 */ bool getPlane(Interface::FITKAbsVirtualTopo* vtp, double* pos, double* normal, double* up) override; }; } #endif