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/FITKInterfaceGeometry/FITKAbsGeoModelSurface.h

456 lines
15 KiB
C

#ifndef FITKABSGEOMODELSURFACE_H
#define FITKABSGEOMODELSURFACE_H
#include "FITKInterfaceGeometryAPI.h"
#include "FITKAbsGeoCommand.h"
#include <array>
namespace Interface
{
/**
* @brief .
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-08-16
*/
class FITKInterfaceGeometryAPI FITKAbsGeoModelSurface :
public FITKAbsGeoCommand
{
public:
/**
* @brief .
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-08-16
*/
FITKAbsGeoModelSurface() = default;
/**
* @brief .
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-08-16
*/
virtual ~FITKAbsGeoModelSurface() = default;
};
/**
* @brief 线.
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-08-16
*/
class FITKInterfaceGeometryAPI FITKAbsGeoModelClosedWireSurface :
public FITKAbsGeoModelSurface
{
public:
/**
* @brief .
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-08-16
*/
FITKAbsGeoModelClosedWireSurface() = default;
/**
* @brief .
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-08-16
*/
virtual ~FITKAbsGeoModelClosedWireSurface() = default;
/**
* @brief .
* @return
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-08-16
*/
FITKGeoEnum::FITKGeometryComType getGeometryCommandType() override;
void addEdge(VirtualShape edge) { m_Edges.push_back(edge); };
void setEdges(QVector<Interface::VirtualShape> edges) { m_Edges = edges; };
QVector<Interface::VirtualShape> edges() const { return m_Edges; }
protected:
QVector<Interface::VirtualShape> m_Edges{};
};
/**
* @brief .
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-08-16
*/
class FITKInterfaceGeometryAPI FITKAbsGeoModelOffsetSurface :
public FITKAbsGeoModelSurface
{
public:
/**
* @brief .
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-08-16
*/
FITKAbsGeoModelOffsetSurface() = default;
/**
* @brief .
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-08-16
*/
virtual ~FITKAbsGeoModelOffsetSurface() = default;
/**
* @brief .
* @return
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-08-16
*/
FITKGeoEnum::FITKGeometryComType getGeometryCommandType() override;
VirtualShape sourceSurface() const { return m_SourceSurface; }
void setSourceSurface(VirtualShape shape) { m_SourceSurface = shape; }
double offset() const { return m_Offset; };
void setOffset(double offset) { m_Offset = offset; };
protected:
/**
* @brief .
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-08-23
*/
VirtualShape m_SourceSurface{};
/**
* @brief .
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-08-16
*/
double m_Offset{};
};
/**
* @brief .
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-08-16
*/
class FITKInterfaceGeometryAPI FITKAbsGeoModelExtrudeSurface :
public FITKAbsGeoModelSurface
{
public:
/**
* @brief .
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-08-16
*/
FITKAbsGeoModelExtrudeSurface() = default;
/**
* @brief .
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-08-16
*/
virtual ~FITKAbsGeoModelExtrudeSurface() = default;
/**
* @brief .
* @return
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-08-16
*/
FITKGeoEnum::FITKGeometryComType getGeometryCommandType() override;
VirtualShape sourceCurve() const { return m_SourceCurve; }
void setSourceCurve(VirtualShape shape) { m_SourceCurve = shape; }
std::array<double, 3> direction() const { return m_Direction; };
void setDirection(double x, double y, double z) { m_Direction = { x, y, z }; };
void setDirection(std::array<double, 3> xyz) { m_Direction = xyz; };
double length() const { return m_Length; }
void setLength(double len) { m_Length = len; }
protected:
/**
* @brief 线.
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-08-16
*/
VirtualShape m_SourceCurve{};
/**
* @brief .
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-08-16
*/
std::array<double, 3> m_Direction{};
/**
* @brief .
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-08-16
*/
double m_Length{};
};
/**
* @brief .
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-08-16
*/
class FITKInterfaceGeometryAPI FITKAbsGeoModelRevolSurface :
public FITKAbsGeoModelSurface
{
public:
/**
* @brief .
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-08-16
*/
FITKAbsGeoModelRevolSurface() = default;
/**
* @brief .
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-08-16
*/
virtual ~FITKAbsGeoModelRevolSurface() = default;
/**
* @brief .
* @return
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-08-16
*/
FITKGeoEnum::FITKGeometryComType getGeometryCommandType() override;
VirtualShape sourceCurve() const { return m_SourceCurve; }
void setSourveCurve(VirtualShape shape) { m_SourceCurve = shape; }
std::array<double, 3> rotateAxisPoint1() const { return m_RotateAxisPoint1; };
void setRotateAxisPoint1(double x, double y, double z) { m_RotateAxisPoint1 = { x, y, z }; };
void setRotateAxisPoint1(std::array<double, 3> xyz) { m_RotateAxisPoint1 = xyz; };
std::array<double, 3> rotateAxisPoint2() const { return m_RotateAxisPoint2; };
void setRotateAxisPoint2(double x, double y, double z) { m_RotateAxisPoint2 = { x, y, z }; };
void setRotateAxisPoint2(std::array<double, 3> xyz) { m_RotateAxisPoint2 = xyz; };
int angle() const { return m_Angle; };
void setAngle(int degree) { m_Angle = degree; };
protected:
/**
* @brief 线.
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-08-16
*/
VirtualShape m_SourceCurve{};
/**
* @brief .
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-08-16
*/
/*@{*/
std::array<double, 3> m_RotateAxisPoint1{};
std::array<double, 3> m_RotateAxisPoint2{};
/*@}*/
/**
* @brief .
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-08-16
*/
double m_Angle{};
};
/**
* @brief .
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-08-16
*/
class FITKInterfaceGeometryAPI FITKAbsGeoModelRectangularTrimmedSurface :
public FITKAbsGeoCommand
{
public:
/**
* @brief .
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-08-16
*/
FITKAbsGeoModelRectangularTrimmedSurface() = default;
/**
* @brief .
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-08-16
*/
virtual ~FITKAbsGeoModelRectangularTrimmedSurface() = default;
/**
* @brief .
* @return
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-08-16
*/
FITKGeoEnum::FITKGeometryComType getGeometryCommandType() override;
protected:
/**
* @brief ID.
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-08-16
*/
int m_OriginId{};
/**
* @brief U1.
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-08-16
*/
double m_U1Trimmed{};
/**
* @brief U2.
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-08-16
*/
double m_U2Trimmed{};
/**
* @brief V1.
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-08-16
*/
double m_V1Trimmed{};
/**
* @brief V2.
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-08-16
*/
double m_V2Trimmed{};
/**
* @brief U.
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-08-16
*/
bool m_IsUTrimmed{ true };
/**
* @brief V.
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-08-16
*/
bool m_IsVTrimmed{ true };
};
/**
* @brief .
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-08-16
*/
class FITKInterfaceGeometryAPI FITKAbsGeoModelSweepSurface :
public FITKAbsGeoModelSurface
{
public:
/**
* @brief .
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-08-16
*/
FITKAbsGeoModelSweepSurface() = default;
/**
* @brief .
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-08-16
*/
virtual ~FITKAbsGeoModelSweepSurface() = default;
/**
* @brief .
* @return
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-08-16
*/
FITKGeoEnum::FITKGeometryComType getGeometryCommandType() override;
VirtualShape profile() const { return m_Profile; }
void setProfile(VirtualShape shape) { m_Profile = shape; }
VirtualShape curve() const { return m_Curve; }
void setCurve(VirtualShape shape) { m_Curve = shape; }
protected:
/**
* @brief 线.
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-08-16
*/
VirtualShape m_Profile{};
/**
* @brief 线.
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-08-16
*/
VirtualShape m_Curve{};
};
/**
* @brief .
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-08-16
*/
class FITKInterfaceGeometryAPI FITKAbsGeoModelMultiSectionSurface :
public FITKAbsGeoModelSurface
{
public:
/**
* @brief .
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-08-16
*/
FITKAbsGeoModelMultiSectionSurface() = default;
/**
* @brief .
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-08-16
*/
virtual ~FITKAbsGeoModelMultiSectionSurface() = default;
/**
* @brief .
* @return
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-08-16
*/
FITKGeoEnum::FITKGeometryComType getGeometryCommandType() override;
QList<VirtualShape> sections() const { return m_Sections; }
VirtualShape section(int index) const { assert(index >= 0 && index < m_Sections.size()); return m_Sections.at(index); }
void setSection(int index, VirtualShape section) { assert(index >= 0 && index < m_Sections.size()); m_Sections[index] = section; }
void setSections(QList<VirtualShape> sections) { m_Sections = sections; }
void addSection(VirtualShape section) { m_Sections.push_back(section); }
protected:
/**
* @brief 线.
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-08-16
*/
QList<VirtualShape> m_Sections{};
};
/**
* @brief .
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-08-27
*/
class FITKInterfaceGeometryAPI FITKAbsGeoModelBridgeSurface :
public FITKAbsGeoModelSurface
{
public:
FITKAbsGeoModelBridgeSurface() = default;
virtual ~FITKAbsGeoModelBridgeSurface() = default;
FITKGeoEnum::FITKGeometryComType getGeometryCommandType() override;
VirtualShape sourceSurface1() const { return m_SourceSurface1; }
void setSourceSurface1(VirtualShape surface) { m_SourceSurface1 = surface; }
int edgeVirtualTopoId1() const { return m_EdgeVirtualTopoId1; }
void setEdgeVirtualTopoId1(int id) { m_EdgeVirtualTopoId1 = id; }
VirtualShape sourceSurface2() const { return m_SourceSurface2; }
void setSourceSurface2(VirtualShape surface) { m_SourceSurface2 = surface; }
int edgeVirtualTopoId2() const { return m_EdgeVirtualTopoId2; }
void setEdgeVirtualTopoId2(int id) { m_EdgeVirtualTopoId2 = id; }
protected:
VirtualShape m_SourceSurface1{};
int m_EdgeVirtualTopoId1{};
VirtualShape m_SourceSurface2{};
int m_EdgeVirtualTopoId2{};
};
/**
* @brief .
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-08-27
*/
class FITKInterfaceGeometryAPI FITKAbsGeoModelSolidSurface :
public FITKAbsGeoModelSurface
{
public:
FITKAbsGeoModelSolidSurface() = default;
virtual ~FITKAbsGeoModelSolidSurface() = default;
FITKGeoEnum::FITKGeometryComType getGeometryCommandType() override;
VirtualShape sourceSolid() const { return m_SourceSolid; }
void setSourceSolid(VirtualShape solid) { m_SourceSolid = solid; }
int faceVirtualTopoId() const { return m_FaceVirtualTopoId; }
void setFaceVirtualTopoId(int id) { m_FaceVirtualTopoId = id; }
protected:
VirtualShape m_SourceSolid{};
int m_FaceVirtualTopoId{};
};
}
#endif // !FITKABSGEOMODELSURFACE_H