|
ads_point pickPnt;
ads_name ent_name;
int ret = acedEntSel(
ACRX_T("\nВыберите полилинию: "),
ent_name,
pickPnt
);
if(ret != RTNORM)
return;
AcDbObjectId plOid;
es = acdbGetObjectId(plOid, ent_name);
if (es != Acad::eOk)
return;
ads_point adsTestPoint;
ret = acedGetPoint
(
NULL,
ACRX_T("\nУкажите внутреннюю точку: "),
adsTestPoint
) ;
if(ret != RTNORM)
return;
AcGePoint3d testPoint = asPnt3d(adsTestPoint);
ads_real rayAngle = 0.0;
ret = acedGetAngle(
asDblArray(testPoint),
ACRX_T("Укажите направление луча: "),
&rayAngle
);
if(ret != RTNORM)
return;
AcGePoint3d tempPoint = testPoint + AcGeVector3d::kXAxis;
tempPoint = tempPoint.rotateBy(
rayAngle,
AcGeVector3d::kZAxis,
testPoint
);
AcGeVector3d rayDir = tempPoint - testPoint; |
|