💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
[^-^]: 根据论坛源码修改 [链接](http://bbs.mjtd.com/forum.php?mod=viewthread&tid=102165&extra=page%3D2%26filter%3Dtypeid%26typeid%3D107) 效果图: ![](https://box.kancloud.cn/b24fea96a29fa1501fcc1be0351aa1a3_682x464.gif) 源码: ``` (defun c:ng:dengfen (/ L1 L2 P1 P2 A1 D1 P3 P4 A2 D2 PL1 PL2 PTS count) (while (and (while (or (not count) (<= count 1)) (setq count (getint "请输入等分数量:") ) (cond (null count) (setq count 10) (<= count 1) (prompt "\\n等分数不能小于1\\n") ) ) (setq l1 (car (entsel "\\n选择曲线1:"))) (setq l2 (car (entsel "\\n选择曲线2:"))) ) (setq p1 (vlax-curve-getStartPoint l1) p2 (vlax-curve-getEndPoint l1) d1 (\* (/ 1.0 count) (vlax-curve-getDistAtParam l1 (vlax-curve-getEndParam l1))) p3 (vlax-curve-getStartPoint l2) p4 (vlax-curve-getEndPoint l2) d2 (\* (/ 1.0 count) (vlax-curve-getDistAtParam l2 (vlax-curve-getEndParam l2))) pl1 (list p1) pl2 (list p3) i 0 ) (repeat (\- count 1) (setq i (1+ i) pl1 (cons (vlax-curve-getpointatdist l1 (\* d1 i)) pl1) pl2 (cons (vlax-curve-getpointatdist l2 (\* d2 i)) pl2) ) ) (setq pl1 (cons p2 pl1) pl2 (cons p4 pl2) ) (if (inters (car pl1) (car pl2) (last pl1) (last pl2)) (setq pl2 (reverse pl2)) ) (setq pts (mapcar 'list pl1 pl2)) (mapcar ' (lambda (x) (entmake (list ' (0 . "line") (cons 10 (car x)) (cons 11 (cadr x)))) ) pts ) ) (princ) ) ```