我在下面有一个简单的代码来选择下角点、旋转点和上远角点,这很方便跟踪上面有矩形建筑的地图。
我想预览正在绘制的矩形。
也许已经很晚了,但我看不出没有grread如何轻松做到这一点,但也许有。
- ;; Idea from this: https://www.theswamp.org/index.php?topic=55203.msg594646#msg594646
- ;; TO DO:
- ;; Add proper undo handling
- ;; Show preview of the rectangle
- (defun C:Survey_Rectangle (/ pt1 pt2 ptr)
- (if
- (and
- (setq pt1 (getpoint "\nBottom left corner :"))
- (setq ptr (getpoint "\nRotation :"))
- (setq pt2 (getpoint pt1 "\nTop Right corner :"))
- )
- (progn
- (command "_.rectang" pt1 "_R" ptr pt2)
- (command "_.rectang" pt1 "_R" 0 \) ;; Set the rectangle rotation back to 0 without going into the command
- )
- )
- )
- (c:Survey_Rectangle)
|