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

276 lines
7.9 KiB
C

/**
*
* @file FITKAssElement.h
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-06-24
*
*/
#ifndef _FITK_ASS_ELEMENTS_H__
#define _FITK_ASS_ELEMENTS_H__
#include "FITKInterfaceModelAPI.h"
#include <QObject>
#include "FITK_Kernel/FITKCore/FITKAbstractDataObject.h"
#include "FITK_Interface/FITKInterfaceModel/FITKModelSet.h"
namespace Interface
{
class FITKAbaAssembly;
/**
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-06-24
*/
class FITKInerfaceModelAPI FITKAbstractAssemblyElement
{
public:
/**
* @brief Construct a new FITKAbstractAssemblyElement object
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-06-24
*/
explicit FITKAbstractAssemblyElement() ;
/**
* @brief Destroy the FITKAbstractAssemblyElement object
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-06-24
*/
virtual ~FITKAbstractAssemblyElement() = default;
/**
* @brief ID
* @return int
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-06-24
*/
int getElementID()const;
/**
* @brief ID
* @param[i] int
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-07-03
*/
void setElementID(const int id);
/**
* @brief
* @param[i] e
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-06-24
*/
virtual void copyTo(FITKAbstractAssemblyElement*) = 0;
private:
/**
* @brief ID
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-06-24
*/
int _elementID{ -1 };
};
/**
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-06-24
*/
class FITKInerfaceModelAPI FITKAssemblyElementVertex: public FITKAbstractAssemblyElement
{
public:
using FITKAbstractAssemblyElement::FITKAbstractAssemblyElement;
/**
* @brief Destroy the FITKAssemblyElementVertex object
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-06-24
*/
virtual ~FITKAssemblyElementVertex() = default;
/**
* @brief
* @param[i] e
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-06-24
*/
virtual void copyTo(FITKAbstractAssemblyElement* e) override ;
/**
* @brief ID
* @param[i] mid ID
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-06-24
*/
void setModelID(const int mid);
/**
* @brief ID
* @param[i] id ID
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-06-24
*/
void setNodeID(const int id);
/**
* @brief
* @param[i] coor
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-06-24
*/
void getCoor(double* coor);
/**
* @brief 1
* @param[o] mid ID
* @param[o] id ID
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-07-01
*/
void getNode(int& mid, int& id);
private:
/**
* @brief ID
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-06-24
*/
int _nodeModelID{ -1 };
/**
* @brief ID
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-06-24
*/
int _nodeID{ -1 };
};
/**
* @brief 线
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-06-24
*/
class FITKInerfaceModelAPI FITKAssemblyElementLine: public FITKAbstractAssemblyElement
{
public:
using FITKAbstractAssemblyElement::FITKAbstractAssemblyElement;
virtual ~FITKAssemblyElementLine() = default;
/**
* @brief
* @param[i] e
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-06-24
*/
virtual void copyTo(FITKAbstractAssemblyElement* e) override;
/**
* @brief 1
* @param[i] mid ID
* @param[i] id ID
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-06-24
*/
void setNode1(const int mid, const int id);
/**
* @brief 2
* @param[i] mid ID
* @param[i] id ID
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-06-24
*/
void setNode2(const int mid, const int id);
/**
* @brief 1
* @param[o] mid ID
* @param[o] id ID
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-07-01
*/
void getNode1(int& mid, int& id);
/**
* @brief 2
* @param[o] mid ID
* @param[o] id ID
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-07-01
*/
void getNode2(int& mid, int& id);
/**
* @brief
* @param[o] coor1
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-06-24
*/
void getCoor1(double* coor1);
/**
* @brief
* @param[o] coor2
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-06-24
*/
void getCoor2(double* coor2);
/**
* @brief
* @return QString
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-06-24
*/
QString getTextLabel1();
/**
* @brief
* @return QString
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-06-24
*/
QString getTextLabel2();
/**
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-07-01
*/
void swap();
private:
/**
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-06-24
*/
QPair<int, int> _node1{};
/**
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-06-24
*/
QPair<int, int> _node2{};
};
/**
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-06-24
*/
class FITKInerfaceModelAPI FITKAssemblyElementSet : public FITKModelSet
{
public:
/**
* @brief Construct a new FITKAssemblyElementSet object
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-06-24
*/
explicit FITKAssemblyElementSet() = default;
/**
* @brief Destroy the FITKAssemblyElementSet object
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-06-24
*/
virtual ~FITKAssemblyElementSet() = default;
/**
* @brief
* @return FITKModelEnum::FITKModelSetType
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-03-17
*/
virtual FITKModelEnum::FITKModelSetType getModelSetType() override;
};
}
#endif