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

198 lines
6.7 KiB
C

/**
* @file FITKAbsGeoModelPoint.h
* @brief .
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-08-27
*/
#ifndef FITKABSGEOMODELPOINT_H
#define FITKABSGEOMODELPOINT_H
#include "FITKInterfaceGeometryAPI.h"
#include "FITK_Interface/FITKInterfaceGeometry/FITKAbsGeoCommand.h"
#include <QVector>
#include <array>
namespace Interface
{
/**
* @brief .
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-08-27
*/
class FITKInterfaceGeometryAPI FITKAbsGeoModelPoint :
public FITKAbsGeoCommand
{
public:
FITKAbsGeoModelPoint() = default;
FITKAbsGeoModelPoint(double x, double y, double z);
virtual ~FITKAbsGeoModelPoint() = default;
FITKGeoEnum::FITKGeometryComType getGeometryCommandType() override;
double x() const;
void setX(double x);
double y() const;
void setY(double y);
double z() const;
void setZ(double z);
void setCoord(double x, double y, double z);
protected:
double m_X{ 0.0 };
double m_Y{ 0.0 };
double m_Z{ 0.0 };
};
/**
* @brief 线.
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-08-27
*/
class FITKInterfaceGeometryAPI FITKAbsGeoModelCurveEnd :
public FITKAbsGeoModelPoint
{
public:
FITKAbsGeoModelCurveEnd() = default;
virtual ~FITKAbsGeoModelCurveEnd() = default;
FITKGeoEnum::FITKGeometryComType getGeometryCommandType() override;
VirtualShape sourceCurve() const;
void setSourceCurve(VirtualShape curve);
bool useStartEnd() const;
void setUseStartEnd(bool use);
protected:
VirtualShape m_SourceCurve{};
bool m_UseStartEnd{ true };
};
/**
* @brief 线.
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-08-27
*/
class FITKInterfaceGeometryAPI FITKAbsGeoModelCurveEndDistance :
public FITKAbsGeoModelPoint
{
public:
FITKAbsGeoModelCurveEndDistance() = default;
virtual ~FITKAbsGeoModelCurveEndDistance() = default;
FITKGeoEnum::FITKGeometryComType getGeometryCommandType() override;
VirtualShape sourceCurve() const;
void setSourceCurve(VirtualShape curve);
bool useStartEnd() const;
void setUseStartEnd(bool use);
double distance() const;
void setDistance(double distance);
protected:
VirtualShape m_SourceCurve{};
bool m_UseStartEnd{ true };
double m_Distance{};
};
/**
* @brief 线.
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-08-27
*/
class FITKInterfaceGeometryAPI FITKAbsGeoModelCurveRadio :
public FITKAbsGeoModelPoint
{
public:
FITKAbsGeoModelCurveRadio() = default;
virtual ~FITKAbsGeoModelCurveRadio() = default;
FITKGeoEnum::FITKGeometryComType getGeometryCommandType() override;
VirtualShape sourceCurve() const;
void setSourceCurve(VirtualShape curve);
double radio() const;
void setRadio(double radio);
protected:
VirtualShape m_SourceCurve{};
double m_Radio{};
};
/**
* @brief 线.
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-08-27
*/
class FITKInterfaceGeometryAPI FITKAbsGeoModelPointProjectionOnCurve :
public FITKAbsGeoModelPoint
{
public:
FITKAbsGeoModelPointProjectionOnCurve() = default;
virtual ~FITKAbsGeoModelPointProjectionOnCurve() = default;
FITKGeoEnum::FITKGeometryComType getGeometryCommandType() override;
VirtualShape sourcePoint() const;
void setSourcePoint(VirtualShape point);
VirtualShape sourceCurve() const;
void setSourceCurve(VirtualShape curve);
QVector<std::array<double, 3>> getResultPoints() { return m_Projections; };
protected:
VirtualShape m_SourcePoint{};
VirtualShape m_SourceCurve{};
QVector<std::array<double, 3>> m_Projections{};
};
/**
* @brief 线.
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-08-27
*/
class FITKInterfaceGeometryAPI FITKAbsGeoModelTwoCurveIntersection :
public FITKAbsGeoModelPoint
{
public:
FITKAbsGeoModelTwoCurveIntersection() = default;
virtual ~FITKAbsGeoModelTwoCurveIntersection() = default;
FITKGeoEnum::FITKGeometryComType getGeometryCommandType() override;
VirtualShape sourceCurve1() const;
VirtualShape sourceCurve2() const;
void setSourceCurve(VirtualShape curve1, VirtualShape curve2);
QVector<std::array<double, 3>> getResultPoints() { return m_Intersections; };
protected:
VirtualShape m_SourceCurve1{};
VirtualShape m_SourceCurve2{};
QVector<std::array<double, 3>> m_Intersections{};
};
/**
* @brief .
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-08-27
*/
class FITKInterfaceGeometryAPI FITKAbsGeoModelPointProjectionOnSurface :
public FITKAbsGeoModelPoint
{
public:
FITKAbsGeoModelPointProjectionOnSurface() = default;
virtual ~FITKAbsGeoModelPointProjectionOnSurface() = default;
FITKGeoEnum::FITKGeometryComType getGeometryCommandType() override;
VirtualShape sourcePoint() const;
void setSourcePoint(VirtualShape point);
VirtualShape sourceSurface() const;
void setSourceSurface(VirtualShape surface);
QVector<std::array<double, 3>> getResultPoints() { return m_Projections; };
protected:
VirtualShape m_SourcePoint{};
VirtualShape m_SourceSurface{};
QVector<std::array<double, 3>> m_Projections{};
};
/**
* @brief 线.
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-08-27
*/
class FITKInterfaceGeometryAPI FITKAbsGeoModelCurveIntersectionSurface :
public FITKAbsGeoModelPoint
{
public:
FITKAbsGeoModelCurveIntersectionSurface() = default;
virtual ~FITKAbsGeoModelCurveIntersectionSurface() = default;
FITKGeoEnum::FITKGeometryComType getGeometryCommandType() override;
VirtualShape sourceCurve() const;
void setSourceCurve(VirtualShape curve);
VirtualShape sourceSurface() const;
void setSourceSurface(VirtualShape surface);
QVector<std::array<double, 3>> getResultPoints() { return m_Intersections; };
protected:
VirtualShape m_SourceCurve{};
VirtualShape m_SourceSurface{};
QVector<std::array<double, 3>> m_Intersections{};
};
}
#endif // !FITKABSGEOMODELPOINT_H