69 lines
3.8 KiB
C++
69 lines
3.8 KiB
C++
#pragma once
|
|
|
|
#include "vector"
|
|
#include "map"
|
|
#include "PickEntSet.h"
|
|
|
|
typedef struct {
|
|
double dHeight;
|
|
double dDist;
|
|
}SourcePoint;
|
|
|
|
class CCollectElevation
|
|
{
|
|
public:
|
|
CCollectElevation();
|
|
virtual ~CCollectElevation();
|
|
|
|
public:
|
|
|
|
void SetLandForm(int nType); //设置地形
|
|
void SetPickSet(PickSet &ssAll); // cet 2010.4.15 add
|
|
bool GetSelectPointElevation(XPoint ptSel,Entity ent,int nType, double &dEle);//得到选择点的高程 cet 2010.4.16
|
|
void SetGradient(bool bGradient); // cet 2010.4.16 add
|
|
double GetGradient(); // cet 2010.4.16 add
|
|
void SetGradient(double dGradient); // cet 2010.4.16 add
|
|
void SetExternalBlk(bool bExternalBlk); // 设置实体是否为外部参照 cet 2011.12.2 add
|
|
void SetExnternalBlkMat(const AcGeMatrix3d &mat); // 设置外部参照转换矩阵 cet 2011.12.2 add
|
|
|
|
|
|
private:
|
|
|
|
double GetTextValue(XPoint pt,Entity ent,double &dDis,XPoint &ptVal);//得到实体文字的数值 并得到选择点与文字的距离
|
|
|
|
void FiletratePickSet(PickSet &ss, Entity &ent);// 过滤掉无用实体 cet 2010.4.12 add
|
|
void FiletrateInvalidEnt(PickSet &ss, Entity &ent); // 过滤掉无效数据 cet 2010.4.13 add
|
|
bool IsNumValue(const CString &strText); //是否为数值型字符串 cet 2010.4.12 add
|
|
bool GetNearestPtEle(const AcGePoint3d &pt, int nType, double &dEle); // 最近数据源标高 cet 2010.4.13
|
|
bool GetEleByThreePt(PickSet &ssAll, const AcGePoint3d &pt, int nType, double &dEle); // 根据三点求标高 cet 2010.4.13 add
|
|
void GetNearestThreePt(std::vector<AcDbObjectId> &vecId, const AcGePoint3d &pt); // 获取三个最近点 cet 2010.4.13 add
|
|
void GetAllPickSetPt(PickSet &ssAll, const AcGePoint3d &pt, int nType); // 获取选择集中实体的插入点 cet 2010.4.13 add
|
|
double GetEntEle(const AcDbObjectId &id, int nType); // 获取实体标高 cet 2010.4.13 add
|
|
void GetNeedPicSet(Entity ent, AcGePoint3d pt, int nType); // 获得pt点周围有效数据源 cet 2010.4.13 add
|
|
void DrawAcrossLine(std::vector<AcGePoint3d> &vecPt); // 绘制交叉线,以表示选择的数据源 cet 2010.4.13 add
|
|
double GetAnglePlaneToXYPlane(const AcGePlane &plane); // 获取面与xy面的角度 cet 2010.4.16 add
|
|
AcDbObjectId GetNearestPt(const AcGePoint3d &pt); // 获取最近点 cet 2010.4.13 add
|
|
bool IsPtInTriangle(AcGePoint3d pt1, AcGePoint3d pt2, AcGePoint3d pt3, AcGePoint3d pt);
|
|
bool IsPtOnLine(const AcDbLine &line, const AcGePoint3d &pt);
|
|
bool IsIntersectionLineByLine(const AcDbLine &l1, const AcDbLine &l2);
|
|
AcGePoint3d GetProjectPt(const AcGePoint3d pt1, const AcGePoint3d pt2, const AcGePoint3d pt3, const AcGePoint3d pt);
|
|
// cet 2011.12.7 判断pt4点是否在pt1, pt2, pt3所组成三角形有效范围内 pt为插入点 dScale为比例系数
|
|
bool IsValidPt(const AcGePoint3d &pt1, const AcGePoint3d &pt2, const AcGePoint3d &pt3, const AcGePoint3d &pt4, const AcGePoint3d &pt, double dScale);
|
|
|
|
private:
|
|
int m_nMinObjectCount;//需要采集点的个数
|
|
std::map<AcDbObjectId,XPoint> m_mapIDToPt; //存放实体已经对应的POSITION
|
|
double m_dAngel; //切分圆的单位角度
|
|
XPoint m_ptNearest; //最近的采集点
|
|
int m_nLandForm; // 地形
|
|
double m_dMinVal; // cet 2010.4.13 add
|
|
double m_dMaxVal; // cet 2010.4.13 add
|
|
std::vector<AcDbObjectId> m_vecId; // cet 2010.4.13 add
|
|
PickSet m_ssAll; // cet 2010.4.15 add
|
|
bool m_bGradient; // 是否考虑坡度 cet 2010.4.16 add
|
|
double m_dGradient; // 坡度值 cet 2010.4.16 add
|
|
bool m_bExternalBlk;// 是否为外部参照 cet 2011.12.2 add
|
|
AcGeMatrix3d m_mat; // 外部参照转换矩阵 cet 2011.12.2 add
|
|
};
|
|
|