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

165 lines
4.6 KiB
C

/**
*
* @file FITKMeshSurface.h
* @brief elementset
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-26
*
*/
#ifndef __FITKMESH__SURFACE_H___
#define __FITKMESH__SURFACE_H___
#include "FITK_Interface/FITKInterfaceModel/FITKAbstractModelComponent.h"
#include <QList>
#include <QPair>
namespace Interface
{
class FITKAbstractModel;
class FITKModelSet;
//表面的几何信息,复合集合展开并过滤,仅包含最底层
struct SurfaceAbsSetInfo
{
FITKAbstractModel* _model{};
FITKModelSet* _set{};
//面索引,单元表面特有
int _surfaceIndex{ -1 };
//点权重,节点表面特有
double _nodeWidght{ 0 };
};
/**
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-26
*/
enum MeshSurfaceType
{
SurNone, ///< 错误值
SurEle, ///< 单元表面
SurNode, ///< 节点表面
};
class FITKModelSet;
/**
* @brief set
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-26
*/
class FITKInerfaceModelAPI FITKMeshSurface : public FITKAbstractModelComponent
{
Q_OBJECT
FITKCLASS(Interface, FITKMeshSurface);
public:
/**
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-26
*/
enum MeshSurfaceType
{
SurNone, ///< 错误值
SurEle, ///< 单元表面
SurNode, ///< 节点表面
};
Q_ENUM(MeshSurfaceType);
public:
/**
* @brief Construct a new FITKMeshSurface object
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-26
*/
explicit FITKMeshSurface() = default;
/**
* @brief Destroy the FITKMeshSurface object
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-26
*/
virtual ~FITKMeshSurface() = 0;
/**
* @brief
* @return MeshSurfaceType
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-26
*/
virtual MeshSurfaceType getMeshSurfaceType() = 0;
/**
* @brief
* @return true
* @return false
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-26
*/
bool isInternal() const;
/**
* @brief
* @param[i] internal
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-26
*/
void isInternal(bool internal);
/**
* @brief
* @return int
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-26
*/
int getMeshSetCount() const;
/**
* @brief index
* @param[i] index
* @return FITKModelSet*
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-26
*/
FITKModelSet* getMeshSetAt(const int index) const;
/**
* @brief indexpart instance assembly
* @param[i] index
* @return FITKModelSet*
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-26
*/
FITKAbstractModel* getModelAt(const int index) const;
/**
* @brief
* @return QList<SurfaceAbsSetInfo>
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-26
*/
virtual QList<SurfaceAbsSetInfo> getAbsoluteSetInfo();
protected:
/**
* @brief
* @param[i] modelID id
* @param[i] setID ID
* @return int
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-04-18
*/
int indexOf(int modelID, int setID);
protected:
/**
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-26
*/
bool _internal{ false };
/**
* @brief ID, modelinstaceid
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-26
*/
QList<QPair<int, int>> _modelSetIDs{};
};
}
#endif