马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
该段程序主要是对一根主风管和二根支风管(三线风管)自动进行三通弯头绘制,可运行起来FILLET了ln1 ln8 和ln2 ln4 4根管线后就不能运行,出现如下提示:
Select object: 选择第一支管管线(从内边开始、顺时针方向):
Select object: 选择第二支管管线(从外边开始、顺时针方向):
fillet
(TRIM mode) Current fillet radius = 600.0000
Polyline/Radius/Trim/<Select first object>: r Enter fillet radius <600.0000>:
400.0000000000036
Command: fillet
(TRIM mode) Current fillet radius = 400.0000
Polyline/Radius/Trim/<Select first object>:
Select second object:
Command: FGST Unknown command "FGST". Press F1 for help.
Command: fillet
(TRIM mode) Current fillet radius = 400.0000
Polyline/Radius/Trim/<Select first object>:
Select second object:
Command: FGST Unknown command "FGST". Press F1 for help.
Command: fillet
(TRIM mode) Current fillet radius = 400.0000
Polyline/Radius/Trim/<Select first object>:
Command: <Selection set: 4>
程序清单如下:
- (defun C:fgst()
- (princ "选择主风管管线")
- (setq pe1 (entsel)
- ;求得主风管管径,取得三个点坐标
- p1 (osnap (last pe1) "nea")
- p2 (getpoint p1)
- p2 (list (car p2) (cadr p2))
- p3 (mapcar '+ p1 p2)
- p3 (mapcar '/ p2 '(2 2 2))
- kj (distance p1 p2)
- )
- (princ "选择第一支管管线(从内边开始、顺时针方向):")
- (setq pe2 (entsel)
- ;求得第一支风管,取得三个点坐标
- p4 (osnap (last pe2) "nea")
- p5 (getpoint p4)
- p5 (list (car p5) (cadr p5))
- p6 (mapcar '+ p4 p5)
- p6 (mapcar '/ p6 '(2 2 2))
- )
- (princ "选择第二支管管线(从外边开始、顺时针方向):")
- (setq pe3 (entsel)
- ;求得第二支风管,取得三个点坐标
- p7 (osnap (last pe3) "nea")
- p8 (getpoint p7)
- p8 (list (car p8) (cadr p8))
- p9 (mapcar '+ p7 p8)
- p6 (mapcar '/ p9 '(2 2 2))
- )
- (setq kj1 (/ kj 2))
- (setq kj2 (/ (+ kj kj1) 2))
- (setq ln1 (ssget p1))
- (setq ln2 (ssget p2))
- (setq ln3 (ssget p3))
- (setq ln4 (ssget p4))
- (setq ln5 (ssget p5))
- (setq ln6 (ssget p6))
- (setq ln7 (ssget p7))
- (setq ln8 (ssget p8))
- (setq ln9 (ssget p9))
- (command "fillet" "r" kj1)
- (command "fillet" ln1 ln8 "")
- (command "fillet" ln2 ln4 "")
- (command "fillet" ln3 ln5 "")
- (command "fillet" ln3 ln7 "")
- (command "fillet" "r" kj2)
- (command "fillet" ln3 ln6 "")
- (command "fillet" ln3 ln9 "")
- (princ)
- )
|