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


Диапазоны Кода DXF-группы - часть 5


// Convert data from old format.

acdbWcs2Ecs(asDblArray(cent),asDblArray(cent),

asDblArray(mPlaneNormal),Adesk::kFalse);

mCenter.set(cent.x,cent.y);

mElevation = cent.z;

acdbWcs2Ecs(asDblArray(sp),asDblArray(sp),

asDblArray(mPlaneNormal),Adesk::kFalse);

mStartPoint.set(sp.x,sp.y);

assert(mElevation == sp.z);

}

else if (version == 2)

{

filer->readItem(&rb);

if (rb.restype != AcDb::kDxfXCoord)

throw AcDb::kDxfXCoord;

mCenter = asPnt2d(rb.resval.rpoint);

 

filer->readItem(&rb);

if (rb.restype != AcDb::kDxfXCoord + 1)

throw AcDb::kDxfXCoord + 1;

mStartPoint = asPnt2d(rb.resval.rpoint);

 

filer->readItem(&rb);

if (rb.restype != AcDb::kDxfInt32)

throw AcDb::kDxfInt32

mNumSides = rb.resval.rlong;

 

filer->readItem(&rb);

if (rb.restype != AcDb::kDxfNormalX)

throw AcDb::kDxfNormalX;

mPlaneNormal = asVec3d(rb.resval.rpoint);

 

filer->readItem(&rb);

if (rb.restype != AcDb::kDxfText)

throw AcDb::kDxfText

setName(rb.resval.rstring);

 

filer->readItem(&rb);

if (rb.restype != AcDb::kDxfHardPointerId)

throw AcDb::kDxfHardPointerId;

acdbGetObjectId(mTextStyle, rb.resval.rlname);

 

filer->readItem(&rb);

if (rb.restype != AcDb::kDxfReal)

throw AcDb::kDxfReal;

mElevation = rb.resval.rreal;

}

else assert(false);

}

catch (AcDb::DxfCode code)

{

filer->pushBackItem();

filer->setError(Acad::eInvalidDxfCode,

"\nError: expected group code %d", code);

return filer->filerStatus();

}

}

 





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



Книжный магазин