明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 940|回复: 2

[求助]求通過一點與兩線相切的圓[已解決]

[复制链接]
发表于 2009-5-19 09:26:00 | 显示全部楼层 |阅读模式
本帖最后由 作者 于 2009-5-19 15:45:30 编辑

求助各位大俠:

如圖求通過一點並和兩線相切的圓(僅計算得半徑值即可) 程序(或計算程序)

先謝過各位大俠!

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

x
发表于 2009-5-19 12:59:00 | 显示全部楼层
;试试看
  1. (defun c:tt ()
  2. (setvar "CMDECHO" 0)
  3. (setq oldos (getvar "OSMODE"))
  4. (setvar "OSMODE" 0)
  5. (if (and (setq s1 (entsel "\n选择圆弧 :"))
  6.           (setq en (car s1))
  7.           (setq ent (entget en))
  8.           (= (cdr(assoc 0 ent)) "ARC")
  9.       ) (progn
  10.   (setq pc (cdr(assoc 10 ent))
  11.         r  (cdr(assoc 40 ent))
  12.         st (cdr(assoc 50 ent))
  13.         ed (cdr(assoc 51 ent))
  14.         ps (polar pc st r)
  15.         pe (polar pc ed r)
  16.         pm (osnap (cadr s1) "MID")
  17.         ang (angle pm pc)
  18.         pn (polar pm ang 0.5))
  19.   (command "erase" en "")
  20.   (command "circle" "3p" "tan" ps pn "tan" pe)
  21.   (command "trim" "" "f" pc (polar pc ang (+ r r)) "" "")
  22. ))
  23. (setvar "OSMODE" oldos)
  24. (setvar "CMDECHO" 1)
  25. (princ)
  26. )
 楼主| 发表于 2009-5-19 14:41:00 | 显示全部楼层

已解決

感謝各位大俠關心

問題已解決

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

本版积分规则

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

GMT+8, 2024-9-29 18:32 , Processed in 0.184541 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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