87 lines
3.0 KiB
C++
87 lines
3.0 KiB
C++
//-----------------------------------------------------------------------------+
|
|
// Copyright (C), 1998-2007, Beijing Tangent Software Co. Ltd.
|
|
// = FileName : TDbAreaRedLine.h
|
|
// = Version : ver T20
|
|
// = Author : lgd
|
|
// = CreateDate : 2013-08-22
|
|
// = Description: 场地红线类的声明
|
|
// = Maintainers:
|
|
//
|
|
//-----------------------------------------------------------------------------+
|
|
|
|
#pragma once
|
|
|
|
//场地红线
|
|
struct SRedLinePoint
|
|
{
|
|
SRedLinePoint(const CString& text, const AcGePoint3d& pt):string(text), point(pt){}
|
|
SRedLinePoint(){}
|
|
CString string;
|
|
AcGePoint3d point;
|
|
};
|
|
|
|
class TARCH_EXP TDbAreaRedLine : public TDbCurveEntity
|
|
{
|
|
DECLARE_TENTBASE();
|
|
ACRX_DECLARE_MEMBERS(TDbAreaRedLine);
|
|
|
|
public:
|
|
TDbAreaRedLine();
|
|
virtual ~TDbAreaRedLine();
|
|
|
|
void CalcUcsPtByWcsPt(AcGePoint3d &ptWcs) const; // 通过世界坐标计算场地坐标
|
|
void CalcWcsPtByUcsPt(AcGePoint3d &ptUcs) const; // 通过场地坐标计算世界坐标
|
|
|
|
void SetSubText(long i,CString sText);
|
|
|
|
virtual Acad::ErrorStatus dwgInFields (AcDbDwgFiler* pFiler);
|
|
virtual Acad::ErrorStatus dwgOutFields(AcDbDwgFiler* pFiler) const;
|
|
virtual Acad::ErrorStatus ExplodeOrDraw2d(TGGiExplodeDrawBase &dc) const;
|
|
virtual Acad::ErrorStatus GetGripText(int i, CString &cs) const;
|
|
virtual Acad::ErrorStatus subTransformBy(const AcGeMatrix3d& xform);
|
|
virtual Acad::ErrorStatus subGetGripPoints(AcGePoint3dArray&gripPoints,AcDbIntArray&,AcDbIntArray&)const;
|
|
virtual Acad::ErrorStatus subMoveGripPointsAt(const AcDbIntArray& indices, const AcGeVector3d& offset);
|
|
|
|
virtual int GetFirstVersion()const;
|
|
void DrawLine(TGGiExplodeDrawBase &dc, XPoint& ptStart, XPoint& ptEnd) const;
|
|
void DrawRedLineText(TGGiExplodeDrawBase& dc, const XPoint& ptLoc, const CString& text) const;
|
|
void ShowStackText(bool bShowStack) { m_bShowStack = bShowStack; };
|
|
bool IsShowStackText() { return m_bShowStack; };
|
|
|
|
std::size_t GetNodeNum() { return m_ucsPts.size(); };
|
|
|
|
const AcGePoint3d& GetNodePoint(int nPos);
|
|
bool SetNodePoint(int nPos, AcGePoint3d point);
|
|
|
|
bool SetNode(int nPos, SRedLinePoint& data);
|
|
const SRedLinePoint& GetNode(int nPos);
|
|
|
|
const CString& GetNodeString(int nPos);
|
|
bool SetNodeString(int nPos, const CString& strStr);
|
|
|
|
void ResetNode();
|
|
void RemoveNode(int nPos);
|
|
|
|
void SetInsertPt(const XPoint& insertPt){m_ptInsert = insertPt; }
|
|
XPoint GetInsertPt(){ return m_ptInsert;}
|
|
|
|
void SetInsertPtIndex(int nInsertPtIndex); //wcs
|
|
int GetInsertPtIndex(){return m_nInsertPtIndex;}
|
|
|
|
void SetTextLayerId(AcDbObjectId id) {m_idTextLayer=id;};
|
|
void SetRotateAngle(double dAngle){m_dAngle = dAngle;}
|
|
double GetRotateAngle(){return m_dAngle;}
|
|
void SetTextStyleID(const AcDbObjectId &id){m_idTextStyle = id;}
|
|
AcDbObjectId GetTextStyleID(){return m_idTextStyle;}
|
|
protected:
|
|
AcDbHardPointerId m_idTextStyle;
|
|
AcDbObjectId m_idTextLayer;
|
|
double m_nTextHeight;
|
|
private:
|
|
std::vector<SRedLinePoint> m_ucsPts; // 场地坐标系的点集合
|
|
AcGePoint3d m_ptInsert;
|
|
bool m_bShowStack;
|
|
UINT16 m_nInsertPtIndex;
|
|
double m_dAngle;
|
|
};
|