CAD自动根据标注的标高和标高之间的距离或者道路中线来计算坡度并标注的LSP插件
1个回答
展开全部
(defun C:podu ()
(setq p1 (getpoint "选择第一点: "))
(setq p2 (getpoint "选择第二点: "))
(setq Delta_X (- (car p1) (car p2)))
(setq Delta_Y (- (cadr p1)(cadr p2)))
(setq slope (/ (* (abs Delta_Y) 100) (abs Delta_X)))
(princ "\nSlope= ")
(princ slope)
(princ "%")
(princ)
)
(princ "\n")
(princ "\n***** This routine was written by *****")
(princ "\n******* Ridwan Abrash, Architect - - - Damascus - SYRIA, Feb. 1999******")
(princ "\n******** Type 'slope' to start ********")
将以上代码复制到记事本,保存后将文件扩展名(后缀)修改为lsp即可
在CAD中用app加载后运行命令:podu
(setq p1 (getpoint "选择第一点: "))
(setq p2 (getpoint "选择第二点: "))
(setq Delta_X (- (car p1) (car p2)))
(setq Delta_Y (- (cadr p1)(cadr p2)))
(setq slope (/ (* (abs Delta_Y) 100) (abs Delta_X)))
(princ "\nSlope= ")
(princ slope)
(princ "%")
(princ)
)
(princ "\n")
(princ "\n***** This routine was written by *****")
(princ "\n******* Ridwan Abrash, Architect - - - Damascus - SYRIA, Feb. 1999******")
(princ "\n******** Type 'slope' to start ********")
将以上代码复制到记事本,保存后将文件扩展名(后缀)修改为lsp即可
在CAD中用app加载后运行命令:podu
追问
具体操作
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询