183 lines
6.9 KiB
C++
183 lines
6.9 KiB
C++
//------------------------------------------------------------------------+
|
|
// Copyright (C), 1998-2012, Beijing Tangent Software Co. Ltd.
|
|
// = FileName : TDbStruSymbFocus.h
|
|
// = Version : ver1.0
|
|
// = Author : zyc
|
|
// = CreateDate : 2012-06-18
|
|
// = Description: 集中标注实体类声明
|
|
// = Maintainers:
|
|
//
|
|
//------------------------------------------------------------------------+
|
|
|
|
#ifdef TASD
|
|
#ifndef _TDBSTRUSYMBFOCUS_H_
|
|
#define _TDBSTRUSYMBFOCUS_H_
|
|
|
|
#ifndef _TDBSTRUENTITYBASE_H_
|
|
#include "TDbStruEntityBase.h"
|
|
#endif
|
|
|
|
#define KEY_BEAMNO _T("BeamNo") // 梁编号 CString
|
|
#define KEY_SECSIZE _T("SecSize") // 截面尺寸 CString
|
|
#define KEY_BEAMKIND _T("BeamKind") // 梁类型 int
|
|
|
|
#define KEY_UPLENGTH _T("UpLen") // 上部通长 CString
|
|
#define KEY_STIRRUP _T("Stirrup") // 箍筋 CString
|
|
#define KEY_MIDDLEBAR _T("MidBar") // 腰筋 CString
|
|
#define KEY_HEIGHTDIFF _T("HD") // 顶面高差 CString
|
|
#define KEY_DOWNLENGTH _T("DownLen") // 下部通长 CString
|
|
#define KEY_ADDSIZE _T("ASize") // 加腋尺寸 CString
|
|
#define KEY_ISBOLD _T("IsBold") // 是否首行加粗 int
|
|
#define KEY_ROWSPACE _T("RowSp") // 行间距 double
|
|
|
|
// KEY_KIND // 集中标注格式 int
|
|
// 0-自动分行
|
|
// 1-三行显示
|
|
// 2-四行显示
|
|
// 3-五行显示
|
|
// KEY_START // 标注线起点 AcGePoint3d
|
|
// KEY_END // 标注线终点 AcGePoint3d
|
|
// KEY_TH // 字高 double
|
|
////----end
|
|
|
|
#define KEY_TS _T("TS") // 文本样式 AcDbObjectId
|
|
#define KEY_ISLEFT _T("IsLeft") // 是否左侧标注 int
|
|
#define KEY_SHOW_DOT _T("ShowDot") // 显示标注基点 BOOL
|
|
#define KEY_POINT_DIA _T("PointDia") // 标注基点直径 double
|
|
#define KEY_DISTRATE _T("DistRate") // 行间距系数 double
|
|
#define KEY_TEXT _T("Text") // 标注文本 CString
|
|
#define KEY_LINEFLAG _T("LineFlag") // 引线样式 int 0-梁标注样式,1-墙标注样式,2-柱标注样式
|
|
#define KEY_WCOLU _T("WallColu") // 墙柱样式 BOOL
|
|
#define KEY_FRONT _T("FrontPt") // 标注前驱点 AcGePoint3d 用于楼梯平法中平台板的L型标注
|
|
#define KEY_ALIGNFLAG _T("AlignFlag") // 对齐方式 int 0-左对齐,1-右对齐,2,居中对齐
|
|
|
|
#define ALIGN_LEFT 0
|
|
#define ALIGN_RIGHT 1
|
|
#define ALIGN_MID 2
|
|
|
|
|
|
class TARCH_EXP TDbStruSymbFocus : public TDbStruEntityBase
|
|
{
|
|
public:
|
|
enum ELineFlag
|
|
{
|
|
kBeamLine=0,
|
|
kWallLine,
|
|
kColuLine,
|
|
kOther
|
|
};
|
|
|
|
DECLARE_TENTBASE();
|
|
ACRX_DECLARE_MEMBERS(TDbStruSymbFocus);
|
|
|
|
TDbStruSymbFocus();
|
|
~TDbStruSymbFocus();
|
|
|
|
// Overriden function from AcDbEntity
|
|
virtual Acad::ErrorStatus dwgInFields (AcDbDwgFiler* pFiler);
|
|
virtual Acad::ErrorStatus dwgOutFields(AcDbDwgFiler* pFiler) const;
|
|
virtual Acad::ErrorStatus dxfInFields (AcDbDxfFiler* pFiler);
|
|
virtual Acad::ErrorStatus dxfOutFields(AcDbDxfFiler* pFiler) const;
|
|
|
|
// Overriden function from TEntityBase
|
|
virtual Acad::ErrorStatus ExplodeOrDraw2d(TGGiExplodeDrawBase &dc) const;
|
|
virtual Acad::ErrorStatus ExplodeOrDraw3d(TGGiExplodeDrawBase &dc) const;
|
|
virtual Acad::ErrorStatus subTransformBy(const AcGeMatrix3d& xform);
|
|
virtual Acad::ErrorStatus subGetGripPoints(
|
|
AcGePoint3dArray& gripPoints,
|
|
AcDbIntArray& osnapModes,
|
|
AcDbIntArray& geomIds) const;
|
|
virtual Acad::ErrorStatus subMoveGripPointsAt(
|
|
const AcDbIntArray& indices,
|
|
const AcGeVector3d& offset);
|
|
virtual Acad::ErrorStatus subGetStretchPoints(AcGePoint3dArray& stretchPoints) const;
|
|
virtual Acad::ErrorStatus subMoveStretchPointsAt(
|
|
const AcDbIntArray& indices,
|
|
const AcGeVector3d& offset);
|
|
|
|
// 夹点提示
|
|
virtual Acad::ErrorStatus GetGripText(int i, CString &cs) const;
|
|
|
|
virtual Acad::ErrorStatus subGetOsnapPoints(
|
|
AcDb::OsnapMode osnapMode,
|
|
INT_PTR gsSelectionMark,
|
|
const AcGePoint3d& pickPoint,
|
|
const AcGePoint3d& lastPoint,
|
|
const AcGeMatrix3d& viewXform,
|
|
AcGePoint3dArray& snapPoints,
|
|
AcDbIntArray& geomIds) const;
|
|
virtual Acad::ErrorStatus subGetTransformedCopy(
|
|
const AcGeMatrix3d& xform,
|
|
AcDbEntity*& pEnt) const;
|
|
virtual Acad::ErrorStatus copyFrom(const AcRxObject* pSrc);
|
|
virtual Acad::ErrorStatus subGetClassID(CLSID* pClsid) const;
|
|
virtual Acad::ErrorStatus subWblockClone(
|
|
AcRxObject* pOwner,
|
|
AcDbObject*& pClonedObject,
|
|
AcDbIdMapping& idMap,
|
|
Adesk::Boolean isPrimary) const;
|
|
virtual Acad::ErrorStatus subDeepClone(AcDbObject* pOwner,
|
|
AcDbObject*& pClonedObject,
|
|
AcDbIdMapping& idMap,
|
|
Adesk::Boolean isPrimary) const;
|
|
|
|
// 获得二维包围盒
|
|
virtual Acad::ErrorStatus GetExtents2d(TADSGePoint3d &ptLow, TADSGePoint3d &ptUp) const;
|
|
|
|
// 获得三维包围盒
|
|
virtual Acad::ErrorStatus GetExtents(TADSGePoint3d &ptLow, TADSGePoint3d &ptUp) const;
|
|
|
|
//取动态属性显示数据
|
|
virtual void GetTips(TDPtrList<TObjInfoUnit>& lstInfo) const;
|
|
|
|
virtual const TCHAR *GetDefaultLayer() const;
|
|
virtual void SetSubText(long i,CString sText);
|
|
|
|
virtual BOOL IsValid() const;
|
|
|
|
// 支持夹点ctrl功能切换
|
|
virtual int GetCtrlToggleIndex()const;
|
|
|
|
// 属性匹配
|
|
virtual void CopyPropertiesFrom(AcDbEntity *pSrcEntity, unsigned gMatchFlag);
|
|
// 获得标准三维面
|
|
virtual bool GetStandardFaceBody(AcDbVoidPtrArray& arFacePtrs) const;
|
|
// 获得安全保护区
|
|
virtual bool GetSafeProtectedSpace(AcDbVoidPtrArray& arFacePtrs) const;
|
|
// 获得剖面
|
|
virtual bool GetSection(const AcDbFace &face, const AcGeVector3d& vtPlaneSecDir,
|
|
std::vector<TObjSectionRecord> §ionRecords,
|
|
AcDbVoidPtrArray& arFillPtrs) const;
|
|
// 获得XML
|
|
virtual CString GetXml(const AcGeMatrix3d& mat) const;
|
|
|
|
virtual int GetFirstVersion()const;
|
|
virtual bool IsModelEntity() const;
|
|
public:
|
|
bool IsSimpleLineDim() const; // 单引线标注(墙、梁集中标注样式)
|
|
double GetRotation() const; // 获取当前文字偏转角度(弧度表示)
|
|
void SetRotation(double dAngle);
|
|
|
|
public:
|
|
static const Adesk::UInt8 g_nVersion;
|
|
|
|
private:
|
|
BOOL GetThirdPoint(AcGePoint3d &ptThird) const;
|
|
bool DrawDimLine(TGGiExplodeDrawBase& dc) const; // 标注线
|
|
bool DrawDimText(TGGiExplodeDrawBase& dc) const; // 标注文本
|
|
int GetRowsNums() const; // 获取文本行数
|
|
bool GetDrawTextInfo( // 获取绘制文本需要的信息
|
|
AcGePoint3d& ptFirstLine, // 首行文本位置
|
|
AcGeVector3d& vtOffsetDir, // 后续文本偏
|
|
double& dAngle, // 文本的倾斜角度移方向
|
|
BOOL bIsLeft,
|
|
double dHeight,
|
|
double dInterval,
|
|
int iRows) const;
|
|
// 为TGGeSolid准备圆形多段线
|
|
void GetSolidCircle(AcGePoint3d ptCenter, double dRadius, TGGePoly2D& plCircle) const;
|
|
};
|
|
|
|
#endif
|
|
#endif
|