58 lines
1.2 KiB
C++
58 lines
1.2 KiB
C++
// Copyright (C), 1998-2007, Beijing Tangent Engineering Software Co. Ltd.
|
|
// = FileName: CADEnt.h
|
|
// = Version: 8.5
|
|
// = Author: lgh
|
|
// = Date: 2010-9-27 9:29:53
|
|
// = Description: 用来处理跟CAD中实体的关联。
|
|
// = Maintainers:
|
|
#pragma once
|
|
#include "commonRoad.h"
|
|
|
|
// CAD实体类,用于跟CAD中的数据做关联控制,
|
|
// id对应的数据可能会被销毁,但是其几何信息需要保留
|
|
// 因此,需要单独保留一份关于该实体的几何信息。
|
|
class CCADEnt
|
|
{
|
|
public:
|
|
CCADEnt(): m_id() {m_id.setNull();}
|
|
CCADEnt(AcDbObjectId id) : m_id(id) {}
|
|
virtual ~CCADEnt(void){}
|
|
|
|
BOOL Erase();
|
|
BOOL IsErased() const;
|
|
AcDbObjectId ObjId() const {return m_id;}
|
|
|
|
protected:
|
|
AcDbObjectId m_id;
|
|
};
|
|
|
|
class CLineCADEnt : public CCADEnt
|
|
{
|
|
public:
|
|
CLineCADEnt() : CCADEnt(){}
|
|
CLineCADEnt(AcDbObjectId id);
|
|
virtual ~CLineCADEnt(void) {};
|
|
|
|
AcGeLineSeg2d Line() const{return m_line;}
|
|
|
|
private:
|
|
AcGeLineSeg2d m_line;
|
|
};
|
|
|
|
class CArcCADEnt : public CCADEnt
|
|
{
|
|
public:
|
|
CArcCADEnt() : CCADEnt(){}
|
|
CArcCADEnt(AcDbObjectId id);
|
|
virtual ~CArcCADEnt(void){}
|
|
|
|
AcGeCircArc2d Arc() const{return m_arc;}
|
|
|
|
private:
|
|
AcGeCircArc2d m_arc;
|
|
};
|
|
|
|
|
|
typedef AcArray<CLineCADEnt*> ArLineEntPointer;
|
|
typedef AcArray<CArcCADEnt*> ArArcEntPointer;
|