[求助]如何用intersectWith求AcDb3dPolyline线与AcDbPolyline线的交点?
<FONT face=宋体 size=2>如何用intersectWith求AcDb3dPolyline线与AcDbPolyline线的交点?<BR>下面的代码只能对AcDbPolyline线与AcDbPolyline线的交点:<BR>ads_name ename; <BR>AcDbObjectId id1,id2; <BR>ads_point p1; <BR>AcDbEntity *pE1,*pE2; <BR>AcGePlane plane; <BR>AcDb::Planarity flag; <BR>if(ads_entsel("\nÑ¡Ôñ:",ename,p1)!=RTNORM) return ; <BR>acdbGetObjectId(id1, ename); <BR>if(ads_entsel("\nÑ¡Ôñ:",ename,p1)!=RTNORM) return ; <BR>acdbGetObjectId(id2, ename); <BR>AcGePoint3dArray aa; <BR>if(acdbOpenObject(pE1,id1,AcDb::kForRead)!=Acad::eOk) return ; <BR>if(acdbOpenObject(pE2,id2,AcDb::kForRead)!=Acad::eOk){ <BR>pE1->close(); <BR>return ; <BR>} <BR>pE1->getPlane(plane,flag);<BR>if(pE1->intersectWith(pE2,AcDb::kOnBothOperands,plane,aa)!=Acad::eOk) return ; <BR>pE1->close(); <BR>pE2->close(); <BR>if(aa.length()<=0) return; <BR>ads_printf("\nx=%lf y=%lf",aa.x,aa.y); <BR>郁闷啊?</FONT><BR>
页:
[1]