32 lines
995 B
C++
32 lines
995 B
C++
//-------------------------------------------------------------------------------------------------------+
|
|
// Copyright (C), 1998-2007, Beijing Tangent Software Co. Ltd.
|
|
// = FileName : TGGeDbCurveEntity 类
|
|
// = Version : ver2.0
|
|
// = Author : wlw
|
|
// = CreateDate : 2002-09-09
|
|
// = Description: TGGeDbCurveEntity 定义
|
|
// = Maintainers:
|
|
//
|
|
//-------------------------------------------------------------------------------------------------------+
|
|
#include "StdAfx.h"
|
|
#include "TGGeDbCurveEntity.h"
|
|
#include "TGGeDbCurveSegEntity.h"
|
|
#include "TGGeDbPolyline.h"
|
|
|
|
TGGeDbCurveEntity* TGGeDbCurveEntity::CreateFrom(const AcDbEntity &ent)
|
|
{
|
|
if (ent.isKindOf(AcDbLine::desc()))
|
|
{
|
|
return new TGGeDbCurveSegEntity((const AcDbLine&)ent);
|
|
}
|
|
else if (ent.isKindOf(AcDbArc::desc()))
|
|
{
|
|
return new TGGeDbCurveSegEntity((const AcDbArc&)ent);
|
|
}
|
|
else if (ent.isKindOf(AcDbPolyline::desc()))
|
|
{
|
|
return new TGGeDbPolyline((const AcDbPolyline&)ent);
|
|
}
|
|
|
|
return NULL;
|
|
} |