Files
envi-code/SourceCode/Code2026/tg_shs/inc/TArch/TDbSection.h
T
gjm 164968b62e chore
把非utf8-bom编码的cpp/h文件改为 utf8 bom 编码, msvc识别utf8编码时,如果不是bom格式的,会使用当前cp_oem来解码.
2026-10-04 00:04:20 +08:00

125 lines
4.1 KiB
C++

#ifndef __TDB_SECTION_H__
#define __TDB_SECTION_H__
#include "TDbEntity.h"
class GEOAPI TDbSection : public TDbEntity
{
DECLARE_TENTBASE();
ACRX_DECLARE_MEMBERS(TDbSection);
public:
TDbSection();
~TDbSection();
public:
// 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;
// drived from TDbEntity
virtual Acad::ErrorStatus ExplodeOrDraw3d(TGGiExplodeDrawBase &dc) const;
virtual Acad::ErrorStatus ExplodeOrDraw2d(TGGiExplodeDrawBase &dc) 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 Acad::ErrorStatus subGetClassID(CLSID* pClsid) const;
virtual Acad::ErrorStatus GetGripText(int i, CString &cs) const;
Acad::ErrorStatus subGetOsnapPoints(AcDb::OsnapMode osnapMode, INT_PTR gsSelectionMark,
const AcGePoint3d& ptPick, const AcGePoint3d& lastPoint, const AcGeMatrix3d& viewXform,
AcGePoint3dArray& snapPoints, AcDbIntArray& geomIds) const;
virtual Acad::ErrorStatus subGetOsnapPoints(AcDb::OsnapMode osnapMode, INT_PTR gsSelectionMark,
const AcGePoint3d& ptPick, const AcGePoint3d& lastPoint, const AcGeMatrix3d& viewXform,
AcGePoint3dArray& snapPoints, AcDbIntArray& geomIds, const AcGeMatrix3d& insertionMat) const;
Acad::ErrorStatus subIntersectWith(const AcDbEntity* ent, AcDb::Intersect intType, AcGePoint3dArray& points,
INT_PTR thisGsMarker, INT_PTR otherGsMarker) const;
Acad::ErrorStatus subIntersectWith(const AcDbEntity* ent, AcDb::Intersect intType, const AcGePlane& projPlane,
AcGePoint3dArray& points, INT_PTR thisGsMarker, INT_PTR otherGsMarker) const;
public:
void SetShowBorder(const bool bBorder){m_bShowBorder = bBorder;}
bool GetShowBorder()const {return m_bShowBorder;}
void SetName(const CString &str){m_sName = str;}
CString GetName()const {return m_sName;}
void SetPathID(const AcDbObjectId &id);
AcDbObjectId GetPathID()const {return m_pathID;}
void SetLineWidth(const double &width){m_dLineWidth = width;}
double GetLineWidth()const {return m_dLineWidth;}
void SetWordHeight(const double &height){m_dWordHeight = height;}
double GetWordHeight()const {return m_dWordHeight;}
bool UpdateSection(const SectionInfo & secInfo);
AcGePoint3d GetPosition() const {return m_ptPosition;}
void SetPosition(const AcGePoint3d &pt){m_ptPosition = pt;}
void ProcessSection(const SectionInfo & secInfo);
void SetCoverCalc(const bool bCover){m_bCover = bCover;}
bool GetCoverCalc(){return m_bCover;}
void SetShowCoverCurve(const bool bSet){m_bShowCoverCurve = bSet;}
bool GetShowCoverCurve() const {return m_bShowCoverCurve;}
void SetShowFill(const bool bShow){m_bShowFill = bShow;}
bool GetShowFill(){return m_bShowFill;}
void SetBorderLineType(const CString & sline){m_sLineType = sline;}
CString GetBorderLineType(){return m_sLineType;}
private:
CString m_sName; // 剖面名称
AcDbSoftPointerId m_pathID; // TDbSectionPathSign 类 ID
double m_dLineWidth; // 文字下面直线的线宽
double m_dWordHeight; // 文字字高
AcGePoint3d m_ptPosition; // 框在模型空间的显示位置(由用户决定)
bool m_bCover; // 是否进行遮挡运算
// 储存计算出来的剖面曲线,一个实体的一个面对应一个 TObjSectionRecord 对象
std::vector<TObjSectionRecord> m_arSectionCurve;
// 储存 添充线 一个实体,对应一个
std::vector<AcDbVoidPtrArray> m_arFills;
bool m_bShowCoverCurve; // 是否显示被遮挡曲线,以虚线的形式
bool m_bShowFill; // 是否显示添充线
CString m_sLineType; // 边框线型
bool m_bShowBorder; // 是否显示外接矩形
AcGePoint3d m_ptMax; // 外接矩形最大点
AcGePoint3d m_ptMin; // 外接矩形最小点
AcGePoint3dArray m_ptOsaps; // 存储捕捉点
};
#endif