[ARX]请问AcGePoint3d 与const ads_point 该如何转换
<P>请教一个问题:</P><P> AcGePoint3d pt ,我现在存在两个坐标:</P>
<P>现在要比较AcGePoint3d pt 与AcGePoint3d pt 是否是同一个点!以便确定画图结束!</P>
<P>可是总是出错:</P>
<P>error C2664: 'Equal_Points' : cannot convert parameter 1 from 'class AcGePoint3d' to 'const double []'</P>
<P>请问AcGePoint3d 与const ads_point 该如何转换才好!</P>
<P>调用以下函数:</P>
<P>int Equal_Points (const ads_point p1, const ads_point p2) <BR>{<BR> // 指定误差范围<BR> const ads_real Equality_Margin = (ads_real)0.00000001; <BR> <BR> int c ;<BR> for (c = X ; c <= Z ; c++) {<BR> if (fabs(p1 - p2) > Equality_Margin) {<BR> return (0) ;<BR> }<BR> }<BR> return (1) ;<BR>}</P> 问题解决:<BR>之前有过类似的帖子,权当再学习一下吧!:)<BR>void changepoint(ads_point& ads_pt,AcGePoint3d acge_pt)<BR>{ <BR> double x=acge_pt; <BR> double y=acge_pt; <BR> double z=acge_pt;<BR> ads_pt=x; <BR> ads_pt=y; <BR> ads_pt=z; <BR>}<BR> <P>从AcGePoint3d转换到ads_point函数如下:</P>
<P>ads_point ChangePtFrom3dToAds(AcGePoint3d pt)</P>
<P>{</P>
<P> ads_point adspt;</P>
<P> adspt=pt.x;</P>
<P> adspt=pt.y;</P>
<P> adspt=pt.z;</P>
<P> return adspt; </P>
<P>}</P>
页:
[1]