ObjectARX, AutoCAD. Среда программирования библиотеки C++


SubErase, subOpen, subClose, and subCancel - часть 3


AcDb::kDHL_CURRENT, AcDb::kMReleaseCurrent, 0, ASDKELLIPSE,

REFERENC);

// Static class data member definition.

//

int AsdkEllipse::mInFlux = Adesk::kFalse;

AsdkEllipse::AsdkEllipse(const AsdkEllipse& master)

{

set(master.center(), master.normal(),

master.majorAxis(), master.radiusRatio(),

master.startAngle(), master.endAngle());

mEllipseIds = master.mEllipseIds;

}

AsdkEllipse::AsdkEllipse(const AcGePoint3d& center,

const AcGeVector3d& unitNormal,

const AcGeVector3d& majorAxis,

double radiusRatio,

double startAngle,

double endAngle) :

AcDbEllipse(center, unitNormal, majorAxis, radiusRatio,

startAngle, endAngle)

{ }

AsdkEllipse::AsdkEllipse(const AcDbObjectIdArray& ellipses,

const AcGePoint3d& center,

const AcGeVector3d& unitNormal,

const AcGeVector3d& majorAxis,

double radiusRatio,

double startAngle,

double endAngle) :

AcDbEllipse(center, unitNormal, majorAxis, radiusRatio,

startAngle, endAngle), mEllipseIds(ellipses)

{ }

AcDbObjectId

AsdkEllipse::ellipseId(unsigned short which)

{

assertReadEnabled();

if (which > mEllipseIds.length())

return AcDbObjectId::kNull;

return mEllipseIds[which];

}

Acad::ErrorStatus

AsdkEllipse::setEllipseId(const AcDbObjectId& objId,

unsigned short which)

{

assertWriteEnabled();

if (which > mEllipseIds.length())

return Acad::eInvalidIndex;

mEllipseIds[which] = objId;

return Acad::eOk;

}

Acad::ErrorStatus

AsdkEllipse::setEllipseIds(const AcDbObjectIdArray& objIds)

{

assertWriteEnabled();

if (objIds.length() == 0)

return Acad::eNullObjectId;

mEllipseIds = objIds;

return Acad::eOk;

}

Acad::ErrorStatus

AsdkEllipse::appendId(const AcDbObjectId& objId)

{

assertWriteEnabled();

if (objId == AcDbObjectId::kNull)

return Acad::eNullObjectId;

mEllipseIds.append(objId);

return Acad::eOk;

}

Acad::ErrorStatus

AsdkEllipse::appendIds(const AcDbObjectIdArray& objIds)

{

assertWriteEnabled();

if (objIds.length() == 0)

return Acad::eNullObjectId;




Начало  Назад  Вперед