[ARX]怎么求一点到多段线的垂线的垂足的啊?
怎么求一点到多段线的垂线的垂足的啊? 你可以用数学的方法求啊 <P class=signature>virtual Acad::ErrorStatus</P><P class=signature>getClosestPointTo(</P>
<P class=signatureIn>const AcGePoint3d& givenPnt,</P>
<P class=signatureIn>const AcGeVector3d& direction,</P>
<P class=signatureIn>AcGePoint3d& pointOnCurve,</P>
<P class=signatureInEnd>Adesk::Boolean extend = Adesk::kFalse) const;</P>
<TABLE class=argumentList>
<TBODY>
<TR vAlign=baseline>
<TD class=argumentName>givenPnt</TD>
<TD class=argumentDescription>Input point (in WCS coordinates) for which to find nearest point on curve</TD></TR>
<TR vAlign=baseline>
<TD class=argumentName>direction</TD>
<TD class=argumentDescription>Input normal vector (in WCS coordinates) for plane to project onto</TD></TR>
<TR vAlign=baseline>
<TD class=argumentName>pointOnCurve</TD>
<TD class=argumentDescription>Returns the point (in WCS coordinates) on the curve that is nearest to givenPnt</TD></TR>
<TR vAlign=baseline>
<TD class=argumentName>extend</TD>
<TD class=argumentDescription>Input Boolean indicating whether or not to extend curve in search for nearest point</TD></TR></TBODY></TABLE>
<P>This function projects the curve onto the plane defined by givenPnt and normal, finds the point on the projected curve that is nearest to givenPnt, then projects this nearest point back onto the original curve and sets pointOnCurve to the result.</P>
页:
[1]