好文档 - 专业文书写作范文服务资料分享网站

冲压模具快速零件拆分程序

天下 分享 时间: 加入收藏 我要投稿 点赞

;;;;本程序主要是用于CAD软件中,冲压模具零件的快速拆分,程序是按照图层为基础,快速的拆分出模具零件,程序的命令是CMB。欢迎大家使用。 (defun c:cmb (/ ss p1 p2 p3) (princ \ \

(setq p2 (getpoint \ left quarter: \ (setq p3 (getpoint \ Right quarter: \ (setq p1 (getpoint \ Insert point:\ (command \ (command \ (setq ss (ssget \

(list (car p2) (cadr p2)) (list (car p3) (cadr p3)) ) )

(while ss (setq n 0)

(while (>= (sslength ss) 1) (setq ee (ssname ss 0))

(setq la (cdr (assoc 8 (entget ee)))) (setq s (ssget \

(list (car p2) (cadr p2)) (list (car p3) (cadr p3)) ) )

(while s

(setq s1 (ssadd)) (setq c 0)

(while (<= c (- (sslength s) 1)) (setq e (ssname s c))

(if (= la (cdr (assoc 8 (entget e)))) (progn

(ssadd e s1)

(ssdel (handent (cdr (assoc 5 (entget e)))) ss) ) )

(setq c (+ 1 c)) )

(setq s nil) )

(setq sc (- (cadr p3) (cadr p2))) (if (>= n 7)

(setq pt1 (list (+ (car p1) (- (car p3) (car p2))) (+ (cadr p1) (* (+ sc 100) (- n 6))) ) )

(if (< n 7)

(setq pt1 (list (car p1)

(+ (cadr p1) (* (+ sc 100) n)) ) ) ) )

(command \ (command \ (PRINC P2) (setq n (+ n 1)) )

(setq ss nil) )

(princ \ (princ) )

is over!)\

冲压模具快速零件拆分程序

;;;;本程序主要是用于CAD软件中,冲压模具零件的快速拆分,程序是按照图层为基础,快速的拆分出模具零件,程序的命令是CMB。欢迎大家使用。(defunc:cmb(/ssp1p2p3)(princ\\(setqp2(getpoint\leftquarter:\(setqp3(getpoint\Rightquarter
推荐度:
点击下载文档文档为doc格式
5sevv0fi1o3ibqw7s1xb7s7tu43p3900tqi
领取福利

微信扫码领取福利

微信扫码分享