455 lines
20 KiB
C++
455 lines
20 KiB
C++
#ifndef __DBDIMENSION_H
|
|
#define __DBDIMENSION_H
|
|
//#include "DbEntity.h"
|
|
|
|
class TDbText;
|
|
class TDimTextPos {
|
|
public:
|
|
Adesk::UInt16 nIndex;
|
|
XPoint ptPos;
|
|
public:
|
|
TDimTextPos() {}
|
|
TDimTextPos(int i, XPoint pt) {
|
|
nIndex=i;
|
|
ptPos=pt;
|
|
}
|
|
static int CompareByIndexForFind(const TDimTextPos * p1, const void *p2); // p2 is int *
|
|
};
|
|
|
|
class TDimTextContent {
|
|
public:
|
|
Adesk::UInt16 nIndex;
|
|
XString sText;
|
|
public:
|
|
TDimTextContent() {}
|
|
TDimTextContent(int i, const TCHAR* pszText) {
|
|
nIndex=i;
|
|
sText=pszText;
|
|
}
|
|
static int CompareByIndexForFind(const TDimTextContent * p1, const void *p2); // p2 is int *
|
|
};
|
|
|
|
|
|
#define DF_BIND 0x01 //绑定对象
|
|
#define DF_POSITION 0x02 //移动文字位置
|
|
#define DF_TEXT 0x04 //给过文字内容
|
|
#define DF_DSSCALE 0x08 //采用DimStyle的比例
|
|
#define DF_ANGULAR 0x10 //是否为圆弧标注
|
|
#define DF_DIAMETER 0x10 //是否为直径标注,用于TDbRadiusDim
|
|
#define DF_CHORD 0x20 //是否标注弦长
|
|
#define DF_ARCLEN 0x40 //是否标注弧长 DF_CHORD,DF_ARCLEN只能有一位有效
|
|
#define DF_ASSOCIATE 0x80 //是否线性标注,TArch7.0
|
|
|
|
class TDbDimension2;
|
|
class TARCH_EXP TDbDimension: public TDbEntity {
|
|
DECLARE_TENTBASE();
|
|
ACRX_DECLARE_MEMBERS(TDbDimension);
|
|
private:
|
|
const static Adesk::UInt8 g_nVersion;
|
|
protected:
|
|
friend class TDbDimension2;
|
|
|
|
XPoint m_ptLocation; //定位点--即不动点
|
|
double m_nRotation; //旋转角度
|
|
double m_nDist2DimLine; //定位点到尺寸线的距离, 可以为负值, 图纸单位
|
|
// m_nDimRadius要改作,标注点位置的半径
|
|
double m_nDimRadius, m_nObjRadius; //尺寸线的弧半径, 所标注的弧的半径
|
|
AcDbHardPointerId m_idDimStyle; //尺寸标注类型
|
|
DList<double> m_lstSegment; //每一个尺寸区间, 不允许为0
|
|
DList<TDimTextPos> m_lstTextPos;
|
|
AcDbSoftPointerId m_idBind;
|
|
|
|
Adesk::UInt16 m_nDimFlag; //控制标记
|
|
DList<TDimTextContent> m_lstTextContent;
|
|
// static BOOL g_bExplAcadDim;
|
|
public:
|
|
TDbDimension();
|
|
~TDbDimension();
|
|
virtual BOOL IsValid() const;
|
|
virtual void CopyPropertiesFrom(AcDbEntity *pSrcEntity, unsigned gMatchFlag);
|
|
|
|
// Overriden function from AcDbEntity
|
|
virtual Acad::ErrorStatus dwgInFields (AcDbDwgFiler*);
|
|
virtual Acad::ErrorStatus dwgOutFields(AcDbDwgFiler*) const;
|
|
virtual Acad::ErrorStatus dxfInFields (AcDbDxfFiler*);
|
|
virtual Acad::ErrorStatus dxfOutFields(AcDbDxfFiler*) const;
|
|
virtual Acad::ErrorStatus subGetGripPoints(AcGePoint3dArray& gripPoints,
|
|
AcDbIntArray& osnapModes,
|
|
AcDbIntArray& geomIds) const;
|
|
virtual Acad::ErrorStatus subGetStretchPoints(AcGePoint3dArray & stretchPoints) const;
|
|
virtual Acad::ErrorStatus subTransformBy(const AcGeMatrix3d& xform);
|
|
virtual Acad::ErrorStatus subMoveGripPointsAt(const AcDbIntArray& indices,
|
|
const AcGeVector3d& offset);
|
|
virtual Acad::ErrorStatus subMoveStretchPointsAt(const AcDbIntArray& indices,
|
|
const AcGeVector3d& offset);
|
|
Acad::ErrorStatus subGetOsnapPoints(AcDb::OsnapMode osnapMode,
|
|
INT_PTR gsSelectionMark,
|
|
const AcGePoint3d& pickPoint,
|
|
const AcGePoint3d& lastPoint,
|
|
const AcGeMatrix3d& viewXform,
|
|
AcGePoint3dArray& snapPoints,
|
|
AcDbIntArray& geomIds) const;
|
|
virtual Adesk::UInt32 subSetAttributes(AcGiDrawableTraits * traits);
|
|
|
|
// drived from TDbEntity
|
|
virtual void GetTips(DList<TObjInfoUnit> &) const; //取动态属性显示数据
|
|
virtual Acad::ErrorStatus GetGripText(int i, CString &cs) const;
|
|
virtual DrawType GetDrawType() const;
|
|
virtual const TCHAR *GetDefaultLayer() const;
|
|
virtual Acad::ErrorStatus GetExtents2d(XPoint &ptLow, XPoint &ptUp) const;
|
|
virtual Acad::ErrorStatus ExplodeOrDraw2d(XExplodeDraw &dc) const;
|
|
virtual int ConvertText(TConvertTextPtr ptr, void *pData=NULL);
|
|
// 返回发现的位置,同时posStart往前移动(以便继续找下一个使用),
|
|
virtual TTextPosition FindSubText(const TCHAR *sSubText, TTextPosition &posStart, TTextRange *pRange=NULL) const;
|
|
// 返回下一次查找的开始位置
|
|
virtual TTextPosition ReplaceSubText(const TTextPosition &posRep, const TCHAR *sRepText, TTextRange *pRange=NULL);
|
|
virtual long GetSubTextNum()const{return m_lstSegment.Length();}//ok
|
|
virtual TSubText* HitTestText(XPoint pt)const;
|
|
virtual TSubText* GetSubText(long iText)const;
|
|
virtual void SetSubText(long iText,CString sText){SetTextContent(iText,sText);}//ok
|
|
virtual int GetCtrlToggleIndex()const{return 1;}//ok
|
|
|
|
// Helper method
|
|
//尺寸文字位置的自动调整
|
|
// 返回最后一个的调整结果 0--缺省, 1--上调, 2--下调, 3--外调
|
|
// nFrom--开始调整的状态, bAllowExt--是否允许外调
|
|
int AdjustDim(BOOL bFromUp, BOOL bAllowExt=TRUE, BOOL bAutoRest=TRUE);
|
|
BOOL SetDimLinePos(XPoint pt); //设置尺寸线位置
|
|
BOOL SetFixLinePos(XPoint pt); //设置标注固定线位置
|
|
|
|
XCurveSegment GetDimCurve() const; //取得尺寸线
|
|
void GetPolySegOnDimLine(XPoly2D &poly) const;
|
|
void RemoveZeroSegment();
|
|
Acad::ErrorStatus MoveGripPointsAt1(
|
|
const AcDbIntArray& indices,
|
|
const AcGeVector3d& offset);
|
|
BOOL MergeDim(const TDbDimension *pDim);
|
|
BOOL ConvertFrom(const AcDbDimension *pDim);
|
|
BOOL AddSegment(XPoint pt);
|
|
BOOL FindAndRemoveSegment(XPoint pt);//pt节点分隔点,add by whl on 040810
|
|
void AutoSetFlag();
|
|
int HitTestOnDimSeg(XPoint pt) const;
|
|
int HitTestOnText(XPoint pt) const;
|
|
int HitTestOnPoint(XPoint&pt)const;//add by whl on 041020
|
|
//返回节点索引,输入为近似节点,输出为准确节点,以系统拾取框大小为距离精度。
|
|
BOOL IsValidSegment(double nVal, BOOL bDist=TRUE) const;
|
|
void SwitchDimChord();
|
|
|
|
// Properties
|
|
double GetTotalSegValue() const;
|
|
double GetSegment(int n, BOOL bDist=TRUE) const;
|
|
XPoint GetLocation() const;
|
|
double GetRotation() const;
|
|
double GetDist2DimLine(BOOL bAsPaperUnit=TRUE) const;
|
|
AcDbObjectId GetStyleId() const;
|
|
XPoint GetTextPos(int nIndex, BOOL *bIsDefault=NULL) const;
|
|
XPoint GetDefaultTextPos(int nIndex) const;
|
|
XString GetText(int nIndex, BOOL *bIsDefault=NULL) const;
|
|
XString GetDefaultText(int nIndex) const;
|
|
int GetSegmentNum() const;
|
|
|
|
|
|
AcDbObjectId GetBindId() const;
|
|
BOOL IsTextMoved() const;
|
|
BOOL IsUseDefaultText() const;
|
|
BOOL IsBind() const;
|
|
BOOL IsUseDimStyleScale() const;
|
|
|
|
BOOL IsDimArcLen() const;
|
|
BOOL IsDimChord() const;
|
|
double GetObjRadius() const;
|
|
BOOL IsAngular() const;
|
|
double GetDimRadius() const;
|
|
|
|
void SetLocation(XPoint pt);
|
|
void SetRotation(double nAng);
|
|
void SetDist2DimLine(double nVal, BOOL bAsPaperUnit=TRUE); //Paper dist
|
|
void SetStyleId(AcDbObjectId idStyle);
|
|
void AppendSegment(double nVal, BOOL bDist=TRUE);
|
|
void RemoveSegment(int iSeg);
|
|
void InsertSegmentAt(int n, double nVal, BOOL bDist=TRUE);
|
|
void SetSegment(int n, double nVal, BOOL bDist=TRUE);
|
|
void SetTextPos(int nIndex, XPoint ptPos);
|
|
void SetTextContent(int n, const TCHAR *pszChar);
|
|
void SetBindId(AcDbObjectId id);
|
|
void ResetTextPos();
|
|
void ResetTextContent();
|
|
void UseDimStyleScale(BOOL bTrue);
|
|
// Angular
|
|
void SetAngular(BOOL bTrue);
|
|
void SetDimChord(BOOL bTrue);
|
|
void SetDimArcLen(BOOL bTrue);
|
|
void SetObjRadius(double nVal);
|
|
void SetDimRadius(double nAng);
|
|
|
|
static void BegUserCommand(const TCHAR *, BOOL bIsArxCommand);
|
|
static void EndUserCommand(const TCHAR *, BOOL bIsArxCommand);
|
|
};
|
|
|
|
|
|
class TARCH_EXP TDbRadiusDim: public TDbEntity {
|
|
DECLARE_TENTBASE();
|
|
ACRX_DECLARE_MEMBERS(TDbRadiusDim);
|
|
private:
|
|
const static Adesk::UInt8 g_nVersion;
|
|
protected:
|
|
Adesk::UInt16 m_nDimFlag; //控制标记
|
|
XPoint m_ptCenter, m_ptOnArc;
|
|
double m_nDimLen; //尺寸线长度, 正表示在内侧, 负表示在外侧
|
|
XString m_sText; //用户给的尺寸
|
|
XPoint m_ptText;
|
|
AcDbHardPointerId m_idDimStyle; //尺寸标注类型, 提供文字颜色和精度
|
|
public:
|
|
TDbRadiusDim();
|
|
~TDbRadiusDim();
|
|
virtual BOOL IsValid() const;
|
|
virtual void CopyPropertiesFrom(AcDbEntity *pSrcEntity, unsigned gMatchFlag);
|
|
|
|
virtual Acad::ErrorStatus subGetClassID(CLSID* pClsid) const;
|
|
virtual Acad::ErrorStatus dwgInFields (AcDbDwgFiler*);
|
|
virtual Acad::ErrorStatus dwgOutFields(AcDbDwgFiler*) const;
|
|
virtual Acad::ErrorStatus dxfInFields (AcDbDxfFiler*);
|
|
virtual Acad::ErrorStatus dxfOutFields(AcDbDxfFiler*) const;
|
|
virtual Acad::ErrorStatus subGetGripPoints(AcGePoint3dArray& gripPoints,
|
|
AcDbIntArray& osnapModes,
|
|
AcDbIntArray& geomIds) const;
|
|
virtual Acad::ErrorStatus subGetStretchPoints(AcGePoint3dArray & stretchPoints) const;
|
|
virtual Acad::ErrorStatus subTransformBy(const AcGeMatrix3d& xform);
|
|
virtual Acad::ErrorStatus subMoveGripPointsAt(const AcDbIntArray& indices,
|
|
const AcGeVector3d& offset);
|
|
virtual Acad::ErrorStatus subMoveStretchPointsAt(const AcDbIntArray& indices,
|
|
const AcGeVector3d& offset);
|
|
virtual Acad::ErrorStatus subGetOsnapPoints(AcDb::OsnapMode osnapMode,
|
|
INT_PTR gsSelectionMark,
|
|
const AcGePoint3d& pickPoint,
|
|
const AcGePoint3d& lastPoint,
|
|
const AcGeMatrix3d& viewXform,
|
|
AcGePoint3dArray& snapPoints,
|
|
AcDbIntArray& geomIds) const;
|
|
|
|
// drived from TDbEntity
|
|
virtual DrawType GetDrawType() const;
|
|
virtual void GetTips(DList<TObjInfoUnit> &) const; //取动态属性显示数据
|
|
virtual Acad::ErrorStatus GetGripText(int i, CString &cs) const;
|
|
virtual const TCHAR *GetDefaultLayer() const;
|
|
virtual Acad::ErrorStatus ExplodeOrDraw2d(XExplodeDraw &dc) const;
|
|
virtual int ConvertText(TConvertTextPtr ptr, void *pData=NULL);
|
|
// 返回发现的位置,同时posStart往前移动(以便继续找下一个使用),
|
|
virtual TTextPosition FindSubText(const TCHAR *sSubText, TTextPosition &posStart, TTextRange *pRange=NULL) const;
|
|
// 返回下一次查找的开始位置
|
|
virtual TTextPosition ReplaceSubText(const TTextPosition &posRep, const TCHAR *sRepText, TTextRange *pRange=NULL);
|
|
virtual long GetSubTextNum()const{return 1;}//ok
|
|
virtual void SetSubText(long i,CString sText){SetText(sText);}//ok
|
|
// Helper Method
|
|
BOOL ConvertFrom(const AcDbRadialDimension *pDim);
|
|
|
|
// sg add 101116,支持统一标高
|
|
virtual bool UnifyElevation(double dElevation = 0.0);
|
|
virtual Acad::ErrorStatus DownGradeSave(int nDrawMode, AcDbVoidPtrArray &entSet,
|
|
BOOL *bErase); // jsx add 160922 支持导低版本
|
|
|
|
// Properties
|
|
XPoint GetDimStartPoint() const;
|
|
XPoint GetDimEndPoint() const;
|
|
XPoint GetDimCenter() const;
|
|
double GetDimLen(BOOL bAsPaperUnit=TRUE) const;
|
|
AcDbObjectId GetStyleId() const;
|
|
double GetRadius() const {
|
|
return m_ptCenter.Distance2d(m_ptOnArc);
|
|
}
|
|
|
|
XPoint GetTextPos(BOOL *bIsDefault=NULL) const;
|
|
XPoint GetDefaultTextPos() const;
|
|
XString GetText(BOOL *bIsDefault=NULL) const;
|
|
XString GetDefaultText() const;
|
|
BOOL IsDiameter() const;
|
|
void GetDimText(TDbText &text) const;
|
|
|
|
void SetDimEndPoint(XPoint ptEnd);
|
|
void SetDimCenter(XPoint ptCen);
|
|
void SetDimLen(double nLen, BOOL bAsPaperUnit=TRUE);
|
|
void SetStyleId(AcDbObjectId id);
|
|
void SetTextPos(XPoint ptPos);
|
|
void SetText(const TCHAR *pszText);
|
|
void SetDiameter(BOOL bTrue);
|
|
};
|
|
|
|
class TARCH_EXP TDbDimension2: public TDbCurveEntity {
|
|
DECLARE_TENTBASE();
|
|
ACRX_DECLARE_MEMBERS(TDbDimension2);
|
|
private:
|
|
const static Adesk::UInt8 g_nVersion;
|
|
protected:
|
|
XPoint m_ptLocation; //定位点--即不动点
|
|
double m_nRotation; //旋转角度
|
|
double m_nDist2DimLine; //定位点到尺寸线的距离, 可以为负值, 图纸单位
|
|
// m_nDimRadius要改作,标注点位置的半径
|
|
double m_nDimRadius, m_nObjRadius; //尺寸线的弧半径, 所标注的弧的半径
|
|
AcDbHardPointerId m_idDimStyle; //尺寸标注类型
|
|
DList<double> m_lstSegment; //每一个尺寸区间, 不允许为0
|
|
DList<TDimTextPos> m_lstTextPos;
|
|
AcDbSoftPointerId m_idBind;
|
|
|
|
Adesk::UInt16 m_nDimFlag; //控制标记
|
|
DList<TDimTextContent> m_lstTextContent;
|
|
|
|
DList<double> m_lstOffset;//最大关联范围
|
|
// static BOOL g_bExplAcadDim;
|
|
public:
|
|
TDbDimension2();
|
|
~TDbDimension2();
|
|
virtual BOOL IsValid() const;
|
|
virtual void CopyPropertiesFrom(AcDbEntity *pSrcEntity, unsigned gMatchFlag);
|
|
|
|
// Overriden function from AcDbEntity
|
|
virtual Acad::ErrorStatus subGetClassID(CLSID* pClsid) const;
|
|
virtual Acad::ErrorStatus dwgInFields (AcDbDwgFiler*);
|
|
virtual Acad::ErrorStatus dwgOutFields(AcDbDwgFiler*) const;
|
|
virtual Acad::ErrorStatus dxfInFields (AcDbDxfFiler*);
|
|
virtual Acad::ErrorStatus dxfOutFields(AcDbDxfFiler*) const;
|
|
virtual Acad::ErrorStatus subGetGripPoints(AcGePoint3dArray& gripPoints,
|
|
AcDbIntArray& osnapModes,
|
|
AcDbIntArray& geomIds) const;
|
|
virtual Acad::ErrorStatus subGetStretchPoints(AcGePoint3dArray & stretchPoints) const;
|
|
virtual Acad::ErrorStatus subTransformBy(const AcGeMatrix3d& xform);
|
|
virtual Acad::ErrorStatus subMoveGripPointsAt(const AcDbIntArray& indices,
|
|
const AcGeVector3d& offset);
|
|
virtual Acad::ErrorStatus subMoveStretchPointsAt(const AcDbIntArray& indices,
|
|
const AcGeVector3d& offset);
|
|
Acad::ErrorStatus subGetOsnapPoints(AcDb::OsnapMode osnapMode,
|
|
INT_PTR gsSelectionMark,
|
|
const AcGePoint3d& pickPoint,
|
|
const AcGePoint3d& lastPoint,
|
|
const AcGeMatrix3d& viewXform,
|
|
AcGePoint3dArray& snapPoints,
|
|
AcDbIntArray& geomIds) const;
|
|
virtual Adesk::UInt32 subSetAttributes(AcGiDrawableTraits * traits);
|
|
virtual Acad::ErrorStatus getSplitCurves (const AcGeDoubleArray& params, AcDbVoidPtrArray& curveSegments) const;
|
|
virtual Acad::ErrorStatus getSplitCurves (const AcGePoint3dArray& points, AcDbVoidPtrArray& curveSegments) const;
|
|
|
|
|
|
// drived from TDbCurveEntity
|
|
virtual AcDbCurve* GetBaseCurve()const;
|
|
virtual Acad::ErrorStatus SetBaseCurve(AcDbCurve*);
|
|
|
|
//override TDbEntity
|
|
|
|
virtual void UnionScale(double nScale);
|
|
virtual Acad::ErrorStatus DownGradeSave(int nDrawMode, AcDbVoidPtrArray &entSet, BOOL *bErase);
|
|
virtual void GetTips(DList<TObjInfoUnit> &) const; //取动态属性显示数据
|
|
virtual Acad::ErrorStatus GetGripText(int i, CString &cs) const;
|
|
virtual DrawType GetDrawType() const;
|
|
virtual const TCHAR *GetDefaultLayer() const;
|
|
virtual Acad::ErrorStatus GetExtents2d(XPoint &ptLow, XPoint &ptUp) const;
|
|
virtual Acad::ErrorStatus ExplodeOrDraw2d(XExplodeDraw &dc) const;
|
|
virtual int ConvertText(TConvertTextPtr ptr, void *pData=NULL);
|
|
// 返回发现的位置,同时posStart往前移动(以便继续找下一个使用),
|
|
virtual TTextPosition FindSubText(const TCHAR *sSubText, TTextPosition &posStart, TTextRange *pRange=NULL) const;
|
|
// 返回下一次查找的开始位置
|
|
virtual TTextPosition ReplaceSubText(const TTextPosition &posRep, const TCHAR *sRepText, TTextRange *pRange=NULL);
|
|
virtual long GetSubTextNum()const{return m_lstSegment.Length();}//ok
|
|
virtual TSubText* HitTestText(XPoint pt)const;
|
|
virtual TSubText* GetSubText(long iText)const;
|
|
virtual void SetSubText(long iText,CString sText){SetTextContent(iText,sText);}//ok
|
|
virtual int GetFirstVersion()const{return 7;}//ok
|
|
virtual int GetCtrlToggleIndex()const{return 1;}//ok
|
|
|
|
// sg add 101116,支持统一标高
|
|
virtual bool UnifyElevation(double dElevation = 0.0);
|
|
|
|
// Helper method
|
|
//尺寸文字位置的自动调整
|
|
// 返回最后一个的调整结果 0--缺省, 1--上调, 2--下调, 3--外调
|
|
// nFrom--开始调整的状态, bAllowExt--是否允许外调
|
|
int AdjustDim(BOOL bFromUp, BOOL bAllowExt=TRUE, BOOL bAutoRest=TRUE);
|
|
BOOL SetDimLinePos(XPoint pt); //设置尺寸线位置
|
|
BOOL SetFixLinePos(XPoint pt); //设置标注固定线位置
|
|
|
|
XCurveSegment GetDimCurve() const; //取得尺寸线
|
|
void GetPolySegOnDimLine(XPoly2D &poly) const;
|
|
void RemoveZeroSegment();
|
|
Acad::ErrorStatus MoveGripPointsAt1(
|
|
const AcDbIntArray& indices,
|
|
const AcGeVector3d& offset);
|
|
BOOL MergeDim(const TDbDimension2 *pDim);
|
|
BOOL ConvertFrom(const AcDbDimension *pDim);
|
|
BOOL ConvertFrom(const TDbDimension *pDim);
|
|
BOOL AddSegment(XPoint pt);
|
|
BOOL FindAndRemoveSegment(XPoint pt);//pt节点分隔点,add by whl on 040810
|
|
BOOL FindPoint(XPoint pt)const;
|
|
double GetMaxScope()const;
|
|
BOOL UpdateFrom(XPoint ptNew0,XPoint ptNew1,XPoint ptOld0,XPoint ptOld1,bool bErased);
|
|
void AutoSetFlag();
|
|
int HitTestOnDimSeg(XPoint pt) const;
|
|
int HitTestOnText(XPoint pt) const;
|
|
int HitTestOnPoint(XPoint&pt)const;//add by whl on 041020
|
|
//返回节点索引,输入为近似节点,输出为准确节点,以系统拾取框大小为距离精度。
|
|
BOOL IsValidSegment(double nVal, BOOL bDist=TRUE) const;
|
|
void SwitchDimChord();
|
|
|
|
// Properties
|
|
double GetTotalSegValue() const;
|
|
double GetSegment(int n, BOOL bDist=TRUE) const;
|
|
XPoint GetLocation() const;
|
|
double GetRotation() const;
|
|
double GetDist2DimLine(BOOL bAsPaperUnit=TRUE) const;
|
|
AcDbObjectId GetStyleId() const;
|
|
XPoint GetTextPos(int nIndex, BOOL *bIsDefault=NULL) const;
|
|
XPoint GetDefaultTextPos(int nIndex) const;
|
|
XString GetText(int nIndex, BOOL *bIsDefault=NULL) const;
|
|
XString GetDefaultText(int nIndex) const;
|
|
|
|
// add by xlc on 101220 解决图纸切换速度慢的问题
|
|
XPoint GetTextPos(int nIndex, XPoly2D poly, BOOL *bIsDefault=NULL) const;
|
|
XPoint GetDefaultTextPos(int nIndex, XPoly2D poly) const;
|
|
XString GetText(int nIndex, XPoly2D poly, BOOL *bIsDefault=NULL) const;
|
|
XString GetDefaultText(int nIndex, XPoly2D poly) const;
|
|
|
|
// sg add 120410,增加一个新的接口,代替基类中的NormalViewAngle函数,主要解决精确度是1度的问题
|
|
double ChangeToNormalViewAngle(double nAngWcs) const; //在布局时正常观察的WCS角度
|
|
|
|
int GetSegmentNum() const;
|
|
|
|
AcDbObjectId GetBindId() const;
|
|
BOOL IsTextMoved() const;
|
|
BOOL IsUseDefaultText() const;
|
|
BOOL IsBind() const;
|
|
BOOL IsUseDimStyleScale() const;
|
|
|
|
BOOL IsAssociate()const;
|
|
void SetAssociate(BOOL bTrue);
|
|
|
|
BOOL IsDimArcLen() const;
|
|
BOOL IsDimChord() const;
|
|
double GetObjRadius() const;
|
|
BOOL IsAngular() const;
|
|
double GetDimRadius() const;
|
|
|
|
void SetLocation(XPoint pt);
|
|
void SetRotation(double nAng);
|
|
void SetDist2DimLine(double nVal, BOOL bAsPaperUnit=TRUE); //Paper dist
|
|
void SetStyleId(AcDbObjectId idStyle);
|
|
void AppendSegment(double nVal, BOOL bDist=TRUE);
|
|
void RemoveSegment(int iSeg);
|
|
void InsertSegmentAt(int n, double nVal, BOOL bDist=TRUE);
|
|
void SetSegment(int n, double nVal, BOOL bDist=TRUE);
|
|
void SetTextPos(int nIndex, XPoint ptPos);
|
|
void SetTextContent(int n, const TCHAR *pszChar);
|
|
void SetBindId(AcDbObjectId id);
|
|
void ResetTextPos();
|
|
void ResetTextContent();
|
|
void UseDimStyleScale(BOOL bTrue);
|
|
// Angular
|
|
void SetAngular(BOOL bTrue);
|
|
void SetDimChord(BOOL bTrue);
|
|
void SetDimArcLen(BOOL bTrue);
|
|
void SetObjRadius(double nVal);
|
|
void SetDimRadius(double nAng);
|
|
|
|
static void BegUserCommand(const TCHAR *, BOOL bIsArxCommand);
|
|
static void EndUserCommand(const TCHAR *, BOOL bIsArxCommand);
|
|
};
|
|
|
|
TARCH_EXP void ConvertDim6();
|
|
TARCH_EXP BOOL ConvertDim(const Entity &dimAcDb, Entity &dimT);
|
|
#endif |