本帖最后由 hhh454 于 2020-11-20 18:14 编辑
- (defun c:tt (/ ent pnt pp pa pb)
- (setq ent (entsel "\n春婵工具-矩形多边形单边拉伸:"))
- (setq pnt (apply 'vlax-curve-getclosestpointto ent));将对象表传递给函数,并取出点击曲线的两点
- (setq ent (car ent));返回表的第一个函数,转换成vla对象
- (setq pp (fix (vlax-curve-getparamatpoint ent pnt)))
- (setq pa (vlax-curve-getpointatparam ent pp);;节点1
- pb (vlax-curve-getpointatparam ent (1+ pp));;节点2
- )
- (command "_.stretch" "c" "non" pa "non" pb "" "non" pnt)
- )
- (princ "\n**********程序加载完成,启动命令:tt **********")
- (princ "\n")
可以直接复制,是一样的,不想复制的,就下载源码
矩形多边形都可以拉伸,点线拖动就行,源码上面带有说明,想学习的可以参考
|