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_Interface/FITKInterfaceGeometry/FITKAbsGeoModelOperFace.h

241 lines
6.6 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 FITKAbsGeoModelOperFace.h
* @brief 抽象面操作类
*
* @author fulipeng (fulipengqd@yeah.net)
* @date 2024-08-21
*********************************************************************/
#ifndef FITKABSGEOMODELOPERFACE_H
#define FITKABSGEOMODELOPERFACE_H
#include "FITKInterfaceGeometryAPI.h"
#include "FITKAbsGeoCommand.h"
namespace Interface
{
class FITKAbsGeoShapeAgent;
/**
* @brief 抽象面操作类
* @author fulipeng (fulipengqd@yeah.net)
* @date 2024-08-21
*/
class FITKInterfaceGeometryAPI FITKAbsGeoModelOperFace : public FITKAbsGeoCommand
{
public:
/**
* @brief 面操作类型
* @author fulipeng (fulipengqd@yeah.net)
* @date 2024-08-21
*/
enum GeoFaceOperType
{
GBTNone,
GBTFillHoles, ///填补孔洞
GBTFillGaps, ///填补缝隙
GBTDeleteFloatingEdge, ///删除悬浮边
GBTImprintMapPointToFace, ///点映射到面
GBTImprintMapLineToFace, ///线映射到面
GBTImprintMapCircleToFace, ///圆映射到面
};
public:
FITKAbsGeoModelOperFace() = default;
virtual ~FITKAbsGeoModelOperFace() override = default;
/**
* @brief 添加操作对象
* @param geoCommandID操作对象ID
* @author fulipeng (fulipengqd@yeah.net)
* @date 2024-08-21
*/
void add(VirtualShape* geoCommandID);
/**
* @brief 添加多个操作对象
* @param geoCommandIDs操作对象链表
* @author fulipeng (fulipengqd@yeah.net)
* @date 2024-08-21
*/
void add(QList<VirtualShape*> geoCommandIDs);
/**
* @brief 移除操作对象
* @param geoCommand操作对象
* @author fulipeng (fulipengqd@yeah.net)
* @date 2024-08-21
*/
void remove(int index);
/**
* @brief 移除所有操作对象
* @param geoCommand操作对象
* @author fulipeng (fulipengqd@yeah.net)
* @date 2024-08-26
*/
void clear();
/**
* @brief 设置类型
* @param t操作类型
* @author fulipeng (fulipengqd@yeah.net)
* @date 2024-08-26
*/
void setType(GeoFaceOperType t);
/**
* @brief 设置类型
* @return 返回操作类型
* @author fulipeng (fulipengqd@yeah.net)
* @date 2024-08-26
*/
FITKAbsGeoModelOperFace::GeoFaceOperType getType();
/**
* @brief 获取虚拓扑图形
* @param geoCommand操作对象
* @author fulipeng (fulipengqd@yeah.net)
* @date 2024-08-19
*/
QList<VirtualShape*> getVShapes();
/**
* @brief 获取操作对象列表
* @return 操作对象列表
* @author fulipeng (fulipengqd@yeah.net)
* @date 2024-08-21
*/
QList<int> getModelOperFacesID();
/**
* @brief 设置公差
* @return 操作对象列表
* @author fulipeng (fulipengqd@yeah.net)
* @date 2024-08-23
*/
void setTolerance(double tolerance);
/**
* @brief 获取公差
* @return 操作对象列表
* @author fulipeng (fulipengqd@yeah.net)
* @date 2024-08-23
*/
double getTolerance();
protected:
/**
* @brief 面操作类型
* @author fulipeng (fulipengqd@yeah.net)
* @date 2024-08-21
*/
GeoFaceOperType _faceOperType{ GBTNone };
/**
* @brief 操作对象列表
* @author fulipeng (fulipengqd@yeah.net)
* @date 2024-08-21
*/
QList<VirtualShape*> m_tempVShapes{};
/**
* @brief 公差
* @author fulipeng (fulipengqd@yeah.net)
* @date 2024-08-23
*/
double _tolerance = 1e-2;
};
/**
* @brief 抽象面操作类 填补缝隙
* @author fulipeng (fulipengqd@yeah.net)
* @date 2024-08-21
*/
class FITKInterfaceGeometryAPI FITKAbsGeoModelOperFaceFillGaps : public FITKAbsGeoModelOperFace
{
public:
FITKAbsGeoModelOperFaceFillGaps() = default;
~FITKAbsGeoModelOperFaceFillGaps() = default;
/**
* @brief 获取几何命令类型
* @author fulipeng (fulipengqd@yeah.net)
* @date 2024-08-31
*/
FITKGeoEnum::FITKGeometryComType getGeometryCommandType() override;
protected:
};
/**
* @brief 抽象面操作类 填补孔洞
* @author fulipeng (fulipengqd@yeah.net)
* @date 2024-08-21
*/
class FITKInterfaceGeometryAPI FITKAbsGeoModelOperFaceFillHoles : public FITKAbsGeoModelOperFace
{
public:
FITKAbsGeoModelOperFaceFillHoles() = default;
~FITKAbsGeoModelOperFaceFillHoles() = default;
/**
* @brief 获取几何命令类型
* @author fulipeng (fulipengqd@yeah.net)
* @date 2024-08-31
*/
FITKGeoEnum::FITKGeometryComType getGeometryCommandType() override;
protected:
};
/**
* @brief 抽象面操作类 删除悬浮边
* @author fulipeng (fulipengqd@yeah.net)
* @date 2024-08-21
*/
class FITKInterfaceGeometryAPI FITKAbsGeoModelOperFaceDeleteFloatingEdge : public FITKAbsGeoModelOperFace
{
public:
FITKAbsGeoModelOperFaceDeleteFloatingEdge() = default;
~FITKAbsGeoModelOperFaceDeleteFloatingEdge() = default;
/**
* @brief 获取几何命令类型
* @author fulipeng (fulipengqd@yeah.net)
* @date 2024-08-31
*/
FITKGeoEnum::FITKGeometryComType getGeometryCommandType() override;
/**
* @brief 设置主面
* @param vface主面
* @author fulipeng (fulipengqd@yeah.net)
* @date 2024-08-31
*/
void setMFace(VirtualShape* vface);
/**
* @brief 获取主面
* @return 主面
* @author fulipeng (fulipengqd@yeah.net)
* @date 2024-08-31
*/
VirtualShape* getMFace();
protected:
/**
* @brief 操作主面
* @author fulipeng (fulipengqd@yeah.net)
* @date 2024-08-31
*/
VirtualShape* m_face{};
};
}
#endif // !FITKAbsGeoModelOperFace_H