CAD工具之家's Archivers

From boitboy on 2013-07-13 23:29:21

CAD旋转实体

#ifndef PI #define PI 4*atan(1.0)//提高pi的精度 #endif double dRotation=PI/2.0;//旋转角度为90度 AcGeVector3d axis=AcGeVector3d::kZAxis;//旋转轴一般设定为Z轴,二维的 //情况下 AcGePoint3d pt(0.0,0.0,0.0);//旋转中心为原点 AcGeMatrix3d mat;     mat.setToRotation(dRotation,axis,pt); AcDbEntityPointer spEnt(objId,AcDb::kForWrite); Acad::ErrorStatus es=spEnt.openStatus();  if(es!=Acad::eOk)  {   return es;  } spEnt->transformBy(mat);

查看完整版本: CAD旋转实体

Tags: ObjectArx, setToRotation, transformBy, 旋转


©CAD工具之家
创办于:2013年5月24日