yusongrong 发表于 2004-11-10 00:45:00

[求助]如何用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&Ntilde;&iexcl;&Ocirc;&ntilde;:",ename,p1)!=RTNORM) return ; <BR>acdbGetObjectId(id1, ename); <BR>if(ads_entsel("\n&Ntilde;&iexcl;&Ocirc;&ntilde;:",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-&gt;close(); <BR>return ; <BR>} <BR>pE1-&gt;getPlane(plane,flag);<BR>if(pE1-&gt;intersectWith(pE2,AcDb::kOnBothOperands,plane,aa)!=Acad::eOk) return ; <BR>pE1-&gt;close(); <BR>pE2-&gt;close(); <BR>if(aa.length()&lt;=0) return; <BR>ads_printf("\nx=%lf y=%lf",aa.x,aa.y); <BR>郁闷啊?</FONT><BR>
页: [1]
查看完整版本: [求助]如何用intersectWith求AcDb3dPolyline线与AcDbPolyline线的交点?