[求助]过一点做直线的垂线?
本帖最后由 作者 于 2005-5-12 15:08:27 编辑 <br /><br /> <FONT style="FONT-SIZE: 10pt" face="宋体,verdana, arial, helvetica">已知一直线和直线上的一点,有什么简单的方法能过该点作出已知直线的垂线?望高手能予指教 <BR></FONT> 这个问题我想可以这样处理,应用直线方程,点截式,先计算已知直线斜率,那么垂线的斜率必然与之相差90度,然后直线过一点以及它也的斜率便可得出直线来! 直线都有个Angle属性,是直线的倾斜角度(从X轴按逆时针转动) 这样行吗?Sub test()Dim lineobj1 As AcadLine
Dim lineobj2 As AcadLine
Dim pnt1 As Variant
Dim ang As Double
Dim pi As Double
pi = 4 * Atn(1)
ThisDrawing.Utility.GetEntity lineobj1, pnt, "select a line:"
ang = pi * 0.5
pnt1 = ThisDrawing.Utility.GetPoint(, "select a point:")
Set lineobj2 = lineobj1.Copy()
lineobj2.Rotate pnt1, ang
End Sub
页:
[1]