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

45 lines
1.2 KiB
C++

#pragma once
#include "EntitySet.h"
class XBlock
{
public:
XBlock();
XBlock(Entity entBlk);
virtual ~XBlock();
BOOL m_bInitSuccess;
BOOL IsBlockExist(const TCHAR* szBlkName, BOOL bLoadIt = FALSE);
const TCHAR* GetBlkName(){return m_szBlkName;};
AcDbBlockReference *GetBlockReference(){return m_pBlkRef;};
AcDbBlockTable *GetBlockTable(){return m_pBlockTable;};
AcDbBlockTableRecord *GetBlockTableRecord(){return m_pRecord;};
AcDbBlockTableRecordIterator *GetIterator(){return m_pIterator;};
AcGeMatrix3d GetMatrix3d(){return m_matrix;};
AcDbObjectId GetBlkId(){return m_eId;};
double GetEntBlkLength();
double GetEntBlkHeight();
void TransformBy(const AcGeMatrix3d& xform);
void GetBlkExtents(AcGePoint3d &pMax, AcGePoint3d &pMin);
void GetBlkBreakPt(Entity entBreak, double nBreLen, XPoint &ptBr1, XPoint &ptBr2);
protected:
BOOL InitBlock();
void GetBlkBreakByLine(XLine l, double nBreLen, XPoint &ptBr1, XPoint &ptBr2);
void GetBlkBreakByArc(XArc xarc, double nBreLen, XPoint &ptBr1, XPoint &ptBr2);
AcDbBlockReference *m_pBlkRef;
AcDbBlockTable* m_pBlockTable;
AcDbBlockTableRecord *m_pRecord;
AcDbBlockTableRecordIterator *m_pIterator;
AcDbObjectId m_eId;
AcGeMatrix3d m_matrix;
Entity m_entBlk;
TCHAR m_szBlkName[256];
};