明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1397|回复: 3

[基础] 畫三角形的內切圓畫不出來

[复制链接]
发表于 2010-9-11 14:57:00 | 显示全部楼层 |阅读模式

在圖面上既有的三角形,點選三邊長後畫出內切圓

我是我用的畫不出來

請各位幫我一下

 

;;;得內切圓
(defun C:vccircle()
  (setq l1(cadr(entsel "slect a line")))
  (setq l2(cadr(entsel "slect a line")))
  (setq l3(cadr(entsel "slect a line")))
  (setq mp1(osnap l1 "mid"))
  (setq mp2(osnap l2 "mid"))
  (setq mp2(osnap l2 "mid"))
  (command "circle" "3P" "tan" mp1 "tan" mp2 "tan" mp3)

发表于 2010-9-11 15:25:00 | 显示全部楼层

(defun C:vccircle()
  (setq l1(cadr(entsel "slect a line")))
  (setq l2(cadr(entsel "slect a line")))
  (setq l3(cadr(entsel "slect a line")))
  ;|
  (setq mp1(osnap l1 "mid"))
  (setq mp2(osnap l2 "mid"))
  (setq mp3(osnap l3 "mid"))
  |;
  (command "circle" "3P" "tan" l1 "tan" l2 "tan" l3)
)

 

or
(defun C:vccircle()
  (command "circle" "3P" "tan" pause "tan" pause "tan" pause)
)

 楼主| 发表于 2010-9-11 15:55:00 | 显示全部楼层

謝謝你,我的問題解決了

但是我有一個疑問

 

就是為什麼點"線",內接圓就可以成立

點"點"的時候卻出現了nil ??

 

 

 

发表于 2010-9-11 18:50:00 | 显示全部楼层

不知楼主到底要画什么?

如果只是按特征点画圆,就要在程序中加入判断条件。

您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-10-2 10:27 , Processed in 0.167366 second(s), 25 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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