你好
我刚开始写LISP的,已经为我的工作室准备了一些。只是为了在潮水低潮时保持忙碌。
最后一个我几乎完成的是一个按顺序偏移的偏移lisp(我真的不在乎是否已经为这个制作了lisp,我一直在尝试我的lisp例程制作)。我首先选择偏移量,然后是每个偏移量的值,最后是要偏移的边。
我的问题是,当我放大到直线附近时,lisp效果很好——我的意思是,它偏移了我输入的valeus。但当我在缩放上有点远时,它会偏移到不同的值。我真的不知道它为什么这么做。我需要调整缩放灵敏度吗?有这样的事吗?
这是我写的代码(葡萄牙语)。不要介意它的脏乱。
谢谢
- ;Criado por Rodrigo Líbano
- (defun c:offseq (/ numof numof2 numof3 list carl carls carlss voffx vof2x vof1x p2x side)
- (initget 7)
- (setq numof (getint "\nNúmero de offsets [2 ou mais]:"))
- (initget 7)
- (setq voffx (getdist "\nValor do primeiro offset:"))
- (setq numof (- numof 1))
- (setq numof2 numof)
- (setq numof3 numof)
- (setq list (cons voffx voffx))
- (setq vof1x voffx)
- (while numof
- (initget 7)
- (setq vof2x (getdist (strcat "\nValor do próximo offset [Restam:" (rtos numof 2 0)"]:")))
- (setq vof2x (+ vof2x vof1x))
- (setq list (cons vof2x list))
- (setq vof1x vof2x)
- (setq numof (1- numof))
- (if (= numof 0)
- (setq numof nil)
- (setq numof numof)
- )
- ); end while
- (princ list)
- (setq carlss carls)
- (while
- (setq p2x (cadr (entsel "\nSelecione Objeto:")))
- (setq side (getpoint "\nSelecione lado:"))
- (while numof2
- (setq carl (nth numof2 list))
- (if (= numof2 numof3)
- (setq carls (- carl carl))
- (setq carls (nth (+ numof2 1) list))
- ); end if
- (setq carls (- carl carls))
- (setvar "OFFSETDIST" carl)
- (command "._UNDO" "_GROUP")
- (command ".OFFSET" carl p2x side "")
-
- (if (= numof2 0)
- (setq numof2 nil)
- (setq numof2 (- numof2 1))
- ); end if
- ); end while
- (setq numof2 numof3)
- (setq carl carlss)
- ); end while
-
- (princ)
- )
-
|