You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
AppFlow/FITK_Component/FITKGeoCompOCC/FITKOCCGeomTools.h

148 lines
4.4 KiB
C++

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

/**
*
* @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