明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1357|回复: 3

73哥代码 画斜坡

  [复制链接]
发表于 2017-10-1 17:59 | 显示全部楼层 |阅读模式
  1. (vl-load-com)
  2. (defun C:tt (/ Talud_boven  Talud_onder afstand afstand_totaal count p1 p2 kleur)
  3.   (if (and (setq Talud_boven (car (entsel "\n***选择上坎线**: ")))
  4.            (setq Talud_onder (car (entsel "\n***选择下坎线**: ")))
  5.            (setq afstand (getint "\n**间距**:"))
  6.            (setq afstand_totaal 0 count 0 kleur (acad_colordlg 8))
  7.      )
  8.     (while(setq p1(vlax-curve-getpointatdist Talud_boven afstand_totaal))
  9.       (setq p2(vlax-curve-getClosestPointTo  Talud_onder p1)
  10.       afstand_totaal (+ afstand_totaal afstand)
  11.       count(1+ count))
  12.       (if(zerop(rem count 2))
  13.   (setq p2(polar p1(angle p1 p2)(/(distance p1 p2)3))))
  14.       (entmake(mapcar'cons'(0 10 11 62)(List"LINE"p1 p2 kleur))))
  15.     )
  16.   )


发表于 2019-10-15 12:00 来自手机 | 显示全部楼层
谢谢分享,支持
发表于 2020-2-29 09:34 | 显示全部楼层
学习一下,谢谢
发表于 2020-3-4 18:35 | 显示全部楼层
有用,收藏了,多谢
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-4-27 04:05 , Processed in 0.196191 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表