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/FITKAbstractOCCModel.h

187 lines
5.3 KiB
C

/**
*
* @file FITKAbstractOCCModel.h
* @brief OCC
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-06-05
*
*/
#ifndef _FITKABSTRACTOCCMODEL_H__
#define _FITKABSTRACTOCCMODEL_H__
#include "FITKGeoCompOCCAPI.h"
#include "FITK_Interface/FITKInterfaceGeometry/FITKAbsGeoCommand.h"
#include "FITK_Interface/FITKInterfaceGeometry/FITKAbsGeoShapeAgent.h"
class TopoDS_Shape;
class TopoDS_Face;
class QTextStream;
class QVector3D;
namespace OCC
{
class FITKGeoComponentManager;
/**
* @brief OCC
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-05-29
*/
class FITKGeoCompOCCAPI FITKAbstractOCCModel :public Interface::FITKAbsGeoShapeAgent
{
FITKCLASS(OCC, FITKAbstractOCCModel);
public:
/**
* @brief Construct a new FITKAbstractOCCModel object
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-05-29
*/
explicit FITKAbstractOCCModel(Interface::FITKAbsGeoCommand* command);
/**
* @brief Destroy the FITKAbstractOCCModel object
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-05-29
*/
virtual ~FITKAbstractOCCModel();
/**
* @brief
* return TopoDS_Shape*
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-06-04
*/
TopoDS_Shape* getShape();
/**
* @brief
* @param[i] file
* @return true
* @return false
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-02-28
*/
virtual bool writeToFile(const QString & file);
/**
* @brief
* @param type
* @return int -1
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-05-29
*/
int getShapeCount(const Interface::FITKModelEnum::FITKModelSetType type) override;
/**
* @brief
* @param[i] type 1- 2-线 3- 4-
* @param[i] id ID
* @return TopoDS_Shape
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-05-29
*/
const TopoDS_Shape getShape(Interface::FITKModelEnum::FITKModelSetType type, const int id);
/**
* @brief
* @return FITKGeoEnum::FITKGeoEngine
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-07-12
*/
Interface::FITKGeoEnum::FITKGeoEngine getGeoEngine() override;
/**
* @brief
* @return AbsModelType
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-02-27
*/
Interface::FITKModelEnum::AbsModelType getAbsModelType() override;
/**
* @brief
* @param[o] minPt
* @param[o] maxPt
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-07-30
*/
void getBoundaryBox(double* min, double* max) override;
/**
* @brief
* @param[i] shape
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-07-30
*/
void updateShape(const TopoDS_Shape& shape);
/**
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-08-12
*/
void buildVirtualTopo() override;
/**
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-08-12
*/
void triangulation() override;
/**
* @brief
* @return int
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-08-13
*/
int shapeHashCode() override;
protected:
/**
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-02-27
*/
TopoDS_Shape* _shape{};
/**
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-02-27
*/
bool _buildingTopo{ false };
};
/**
* @brief OCC
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-08-12
*/
class OCCShapeAgent
{
public:
/**
* @brief
* @param[i] c
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-08-12
*/
explicit OCCShapeAgent(Interface::FITKAbsGeoCommand* c);
/**
* @brief Destroy the OCCShapeAgent object
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-08-12
*/
virtual ~OCCShapeAgent() = default;
protected:
/**
* @brief OCC
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-08-12
*/
FITKAbstractOCCModel* _occShapeAgent{};
};
}
#endif