|
发表于 2003-2-12 16:33:00
|
显示全部楼层
1。已知直线Line,和弧Arc,求交点Pt
设ptx = (car pt) , pty =(cadr pt)
2.line_startPt =(cdr (assoc 10 (entget Line)))
line_endPt =(cdr (assoc 11 (entget line)))
3.arc_centerPt =(cdr (assoc 10 (entget arc)))
arc_radious = (cdr (assoc 40 (entget arc)))
4.条件1:pt在直线上
(/ (ptx - line_startptx) (pty - line_startpty)) =
(/ (line_endPty - line_startptx) (line_endPty - line_startpty))
5.条件2:pt在圆弧上
arc_radious =
((ptx - arc_centerptx) ^ 2 + (pty -arc_centerpty) ^ 2) ^ 0.5
6.代入法解方程,求得ptx 、 pty
7.pt = (list ptx pty) |
|