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/FITKInterfaceModel/FITKAbstractGeoModel.h

228 lines
7.0 KiB
C

/**
*
* @file FITKAbstractGeoModel.h
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-06-05
*
*/
#ifndef __FITKABSTRACT_GEO_MODEL_H__
#define __FITKABSTRACT_GEO_MODEL_H__
#include "FITKAbstractModel.h"
#include "FITKAbstractModelComponent.h"
#include "FITK_Kernel/FITKCore/FITKAbstractDataManager.hpp"
namespace Interface
{
class FITKGeoComponentManager;
/**
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-06-05
*/
class FITKInerfaceModelAPI FITKAbstractGeoModel : public FITKAbstractModel
{
public:
/**
* @brief Construct a new FITKAbstractGeoModel object
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-06-05
*/
explicit FITKAbstractGeoModel();
/**
* @brief Destroy the FITKAbstractGeoModel object
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-06-05
*/
virtual ~FITKAbstractGeoModel() = 0;
/**
* @brief
* @param type
* @return int -1
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-05-29
*/
virtual int getShapeCount(const Interface::FITKModelEnum::FITKModelSetType type);
/**
* @brief
* @param[o] mesh
* @param[i] id ID
* @param[i] addotional
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-05-29
*/
virtual void getTriangleMeshVS(FITKAbstractDataObject* mesh, int id, void * additional = nullptr);
/**
* @brief STL
* @param filePath
* @author ChengHaotian (yeguangbaozi@foxmail.com)
* @date 2024-08-22
*/
virtual bool writeSTLFile(QString filePath);
/**
* @brief
* @return FITKGeoComponentManager*
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-06-05
*/
virtual FITKGeoComponentManager* getGeoComponentManager();
/**
* @brief
* @param[o] minPt
* @param[o] maxPt
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-07-30
*/
virtual void getBoundaryBox(double* min, double* max);
protected:
/***
* @brief ID使
* @param ID id
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-06-18
*/
void setAbsDataID(const int id) override;
protected:
/**
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-06-05
*/
FITKGeoComponentManager* _compManager{};
};
/**
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-06-05
*/
class FITKInerfaceModelAPI FITKGeoComponent : public FITKAbstractModelComponent
{
public:
/**
* @brief Construct a new FITKGeoComponent object
* @param type
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-06-05
*/
explicit FITKGeoComponent(const FITKModelEnum::FITKModelSetType type = FITKModelEnum::FMSSurface);
/**
* @brief Destroy the FITKGeoComponent object
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-06-05
*/
virtual ~FITKGeoComponent() = default;
/**
* @brief
* @param[i] member
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-06-05
*/
void setMember(QList<int> & member);
/**
* @brief
* @param[i] mem
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-06-05
*/
void appendMember(const int mem);
/**
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-06-05
*/
void clear();
/**
* @brief
* @param[i] mem
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-06-05
*/
void removeMember(const int mem);
/**
* @brief
* @return QList<int>
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-06-05
*/
QList<int> getMember() const;
/**
* @brief
* @return FITKModelEnum::FITKModelSetType
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-06-05
*/
FITKModelEnum::FITKModelSetType getGeoType() const;
private:
/**
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-02-27
*/
FITKModelEnum::FITKModelSetType _type{ FITKModelEnum::FMSNone };
/**
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-02-27
*/
QList <int> _member{};
};
/**
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-06-05
*/
class FITKInerfaceModelAPI FITKGeoComponentManager:
public Core::FITKAbstractDataManager<FITKGeoComponent>
{
public:
/**
* @brief Construct a new FITKGeoComponentManager object
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-06-05
*/
explicit FITKGeoComponentManager() = default;
/**
* @brief Destroy the FITKGeoComponentManager object
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-06-05
*/
virtual ~FITKGeoComponentManager() = default;
/**
* @brief
* @param[i] item
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-06-05
*/
virtual void appendDataObj( Core::FITKAbstractDataObject* item) override;
/**
* @brief
* @param[i] type
* @return QList<FITKGeoComponent*>
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-06-05
*/
virtual QList<FITKGeoComponent*> getGeoComponent(const FITKModelEnum::FITKModelSetType type = FITKModelEnum::FMSSurface);
/**
* @brief
* @param[i] type
* @return QList<int>
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-06-05
*/
virtual QList<int> getAllComponentMember(const FITKModelEnum::FITKModelSetType type = FITKModelEnum::FMSSurface);
};
}
#endif