Johntosh 发表于 2022-7-6 17:10:46

如何获取图案填充原点po

我试图将ANSI31图案填充覆盖在前一个图案填充上,但将其偏移(以获得双色交替线效果),我假设我需要图案填充原点,然后从那里计算?

profcad 发表于 2022-7-6 17:29:34

除非进行更改,否则通常为0,0。“图案填充”对话框中有一个选项可以更改原点。
 
您可能需要重新填充第一个填充图案并指定原点,然后用新原点填充第二个区域。

lpseifert 发表于 2022-7-6 17:39:19

又快又脏。。。。

(defun c:test ()
(setq htch (entget (car (entsel "Select hatch: "))))
(if
   (/= (cdr (assoc 0 htch)) "HATCH")
    (progn
      (princ "\nSelected object is not a hatch, try again")
      (command)
      (princ)
    )                  ;progn
    (princ (strcat "\nHatch origin is "(rtos (cdr (assoc 43 htch)))","(rtos (cdr (assoc 44 htch)))
       )
    )
)                  ;if
(princ)
)                  ;defun

Lee Mac 发表于 2022-7-6 17:51:33

如果要在LISP中使用该点以供将来参考,只需使用entsel/entlast命令(如在lpseifert的LISP中),然后使用以下命令:
 

(setq a (entget (car (entsel)))) ;<<--->>OR (setq a (entget (entlast)))
(setq b (cdr (assoc 43 a)))
(setq c (cdr (assoc 44 a)))
(setq d (list b c))

Johntosh 发表于 2022-7-6 18:07:28

谢谢大家,大家都很有帮助。
 
上帝保佑!

dtkell 发表于 2022-7-6 18:16:57

 
我从未想过需要它,但我确信它会派上用场!
 
谢谢
页: [1]
查看完整版本: 如何获取图案填充原点po