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

226 lines
6.7 KiB
C

/**
*
* @file FITKOCCVirtualTopoCreator.h
* @brief OCC
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-08-09
*
*/
#ifndef _FITK_VIRTUALTOPO_CREATOR_H___
#define _FITK_VIRTUALTOPO_CREATOR_H___
#include "FITKGeoCompOCCAPI.h"
#include "FITK_Interface/FITKInterfaceGeometry/FITKAbsVirtualTopo.h"
#include "FITK_Kernel/FITKCore/FITKThreadTask.h"
#include <QHash>
class TopoDS_Shape;
namespace Interface
{
class FITKVirtualTopoManager;
}
namespace OCC
{
/**
* @brief OCC
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-08-09
*/
class FITKGeoCompOCCAPI FITKOCCTopoShape : public Interface::FITKAbsVirtualTopoShape
{
public:
/**
* @brief Construct a new FITKOCCTopoShape object
* @param[i] shape OCC
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-08-09
*/
explicit FITKOCCTopoShape(const TopoDS_Shape & shape);
/**
* @brief Destroy the FITKOCCTopoShape object
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-08-09
*/
virtual ~FITKOCCTopoShape() = default;
/**
* @brief
* @param[i] shape OCC
* @return true
* @return false
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-08-09
*/
bool isSameShape(void* shape) override;
/**
* @brief OCC
* @return const TopoDS_Shape& OCC
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-08-09
*/
const TopoDS_Shape& getTopoShape() const;
private:
/**
* @brief occ
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-08-09
*/
TopoDS_Shape* _shape;
};
/**
* @brief
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-08-09
*/
class FITKOCCVirtualTopoCreator : public Core::FITKThreadTask
{
public:
/**
* @brief Construct a new FITKOCCVirtualTopoCreator object
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-08-09
*/
explicit FITKOCCVirtualTopoCreator(const TopoDS_Shape& shape, Interface::FITKVirtualTopoManager* topo,
const QString& mode, bool& runLabel );
/**
* @brief Destroy the FITKOCCVirtualTopoCreator object
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-08-09
*/
virtual ~FITKOCCVirtualTopoCreator() ;
/**
* @brief 线
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-08-15
*/
void run() override;
/**
* @brief
* @param[i] shape OCC
* @param[o] topo
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-08-09
*/
void createOCCTopos();
private:
/**
* @brief
* @param[i] shape OCC
* @param[o] topo
* @param[i] parent
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-08-09
*/
void buildTopoTree(const TopoDS_Shape& shape, Interface::FITKVirtualTopoManager* topo,
Interface::FITKAbsVirtualTopo* parent);
private:
/**
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-08-15
*/
const TopoDS_Shape& _shape;
/**
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-08-15
*/
Interface::FITKVirtualTopoManager* _topoMgr{};
/**
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-08-15
*/
QString _modelName{};
/**
* @brief hash
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-08-15
*/
QHash<Interface::FITKGeoEnum::VTopoShapeType,
QHash<int, Interface::FITKAbsVirtualTopo*> > _virtualTopoHash{};
/**
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-08-15
*/
bool& _runLabel;
};
/**
* @brief
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-08-09
*/
class FITKOCCVirtualTopoMapper : public Core::FITKThreadTask
{
public:
/**
* @brief Construct a new FITKOCCVirtualTopoMapper object
* @param[i] shape
* @param[i] topomgr
* @param[i] topo
* @param[i] shapeTypeIndex
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-08-19
*/
explicit FITKOCCVirtualTopoMapper(const TopoDS_Shape& shape, Interface::FITKVirtualTopoManager* topomgr,
QHash<Interface::FITKGeoEnum::VTopoShapeType,
QHash<int, Interface::FITKAbsVirtualTopo*>> & topos, int shapeTypeIndex);
/**
* @brief Destroy the FITKOCCVirtualTopoMapper object
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-08-19
*/
virtual ~FITKOCCVirtualTopoMapper() = default;
/**
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-08-19
*/
void run() override;
private:
/**
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-08-19
*/
const TopoDS_Shape& _shape;
/**
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-08-19
*/
Interface::FITKVirtualTopoManager* _topoMgr{};
/**
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-08-19
*/
QHash<Interface::FITKGeoEnum::VTopoShapeType,
QHash<int, Interface::FITKAbsVirtualTopo*>>& _topos;
/**
* @brief
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-08-19
*/
int _shapeTypeIndex{ -1 };
QList<Interface::FITKAbsVirtualTopo*> _topoList{};
};
}
#endif