/** * @file FITKAbsGeoSplitter.h * @brief 模型分割. * @author YanZhiHui (chanyuantiandao@126.com) * @date 2024-09-13 */ #ifndef FITKABSGEOSPLITTER_H #define FITKABSGEOSPLITTER_H #include "FITKAbsGeoCommand.h" #include "FITKAbsGeoDatum.h" #include "FITKInterfaceGeometryAPI.h" #include namespace Interface { /** * @brief 分割基类. * @author YanZhiHui (chanyuantiandao@126.com) * @date 2024-09-10 */ class FITKInterfaceGeometryAPI FITKAbsGeoSplitter : public FITKAbsGeoCommand { public: FITKAbsGeoSplitter() = default; virtual ~FITKAbsGeoSplitter() = default; VirtualShape sourceShape() const { return m_SourceShape; } void setSourceShape(VirtualShape shape) { m_SourceShape = shape; } SourceObject toolShape() const { return m_ToolShape; } void setToolShape(SourceObject shape) { m_ToolShape = shape; } protected: /** * @brief 要被分割的形状. * @author YanZhiHui (chanyuantiandao@126.com) * @date 2024-09-13 */ VirtualShape m_SourceShape{}; /** * @brief 分割工具形状. * @author YanZhiHui (chanyuantiandao@126.com) * @date 2024-09-13 */ SourceObject m_ToolShape{}; }; /** * @brief 曲线分割抽象类. * @author YanZhiHui (chanyuantiandao@126.com) * @date 2024-09-10 */ class FITKInterfaceGeometryAPI FITKAbsGeoCurveSplitter : public FITKAbsGeoSplitter { public: FITKAbsGeoCurveSplitter() = default; ~FITKAbsGeoCurveSplitter() override = default; FITKGeoEnum::FITKGeometryComType getGeometryCommandType() override; std::array point() const { return m_Point; } void setPoint(std::array xyz) { m_Point = xyz; } void setPoint(double x, double y, double z) { m_Point = { x,y,z }; } protected: /** * @brief 保存点分割时候的坐标. * @author YanZhiHui (chanyuantiandao@126.com) * @date 2024-09-10 */ std::array m_Point{}; }; /** * @brief 面分割抽象类. * @author YanZhiHui (chanyuantiandao@126.com) * @date 2024-09-10 */ class FITKInterfaceGeometryAPI FITKAbsGeoSurfaceSplitter : public FITKAbsGeoSplitter { public: FITKAbsGeoSurfaceSplitter() = default; ~FITKAbsGeoSurfaceSplitter() override = default; FITKGeoEnum::FITKGeometryComType getGeometryCommandType() override; }; /** * @brief 体分割抽象类. * @author YanZhiHui (chanyuantiandao@126.com) * @date 2024-09-10 */ class FITKInterfaceGeometryAPI FITKAbsGeoSolidSplitter : public FITKAbsGeoSplitter { public: FITKAbsGeoSolidSplitter() = default; ~FITKAbsGeoSolidSplitter() override = default; FITKGeoEnum::FITKGeometryComType getGeometryCommandType() override; }; } #endif // FITKABSGEOSPLITTER_H