ACAD 2007:镜像lisp:轴a
我经常遇到这样的情况,我需要使用“中间2点”进行镜像,这就是为什么我要寻找捷径。以下序列是否有Lisp:1、镜子
2.2点中间
3.(现在,我选择2点)
4.最后,自动回答问题“N”(是否删除源对象?)
就是这样,我附上了一张图片作为参考。非常感谢。
http://img824.imageshack.us/img824/4057/mirrorbetween2point.jpg
与ImageShack一起上载。我们
(defun c:test (/ ss )
(setq ss (ssget))
(command "._mirror" ss "" "mtp" pause pause "@1<90" "n")
)
太棒了,这很有帮助。谢谢分享!
不错的gile。正如你所知,我是一个初学者&我不知道该怎么做角度。 http://www.nyacad.com/QuickMirror/QuickMirror.html
试试这个。现在离不开它。 谢谢,还有很多免费的东西。
Nah, I just meant instead of writing a whole LISP, just use Mirror with the m2p/mtp snap. @Lt. Dan's Legs:
Thanks for sharing the code. However, I noticed it only mirrors horizontally (side by side), even when two points are vertical. Is it still possible to tweak this one to be more flexible in mirroring both horizontal/vertical depending on the points I select.
By the way, If it would be easier- I am okay of having two LISP one for horizontal (what we have above), other one for vertical.
Thanks! Hi,
This one uses the bissector (perpendicular to the midlle of the segment) of the two points as axis for the mirror.
(defun c:test (/ ss p1 p2 mid p3) (and (setq ss (ssget)) (setq p1 (getpoint "\nFirst point: ")) (setq p2 (getpoint p1 "\nSecond point: ")) (setq mid (mapcar '(lambda (x1 x2) (/ (+ x1 x2) 2.)) p1 p2)) (setq p3 (polar mid (+ (angle p1 p2) (/ pi 2.)) 1.)) (command "_.mirror" ss "" "_non" mid "_non" p3 "_no") ) (princ))
页:
[1]
2