Fabricio28 发表于 2014-1-17 06:57:39

创建图案填充

嗨,伙计们,
我怎么才能做一个尺寸为0.625 x 1.25米的舱口呢(defun entmakex-hatch (L)
;; By ElpanovEvgeniy
;; 03.04.2007 10:03:51:
(entmakex
(apply
   'append
   (list
    (list '(0 . "HATCH")
          '(100 . "AcDbEntity")
          '(410 . "Model")
          '(100 . "AcDbHatch")
          '(10 0.0 0.0 0.0)
          '(210 0.0 0.0 1.0)
          '(2 . "SOLID")
          '(70 . 1)
          '(71 . 0)
          (cons 91 (length l))
    ) ;_list
    (apply 'append
    (mapcar '(lambda (a)
             (apply 'append
                  (list (list '(92 . 7) '(72 . 0) '(73 . 1) (cons 93 (length a)))
                        (mapcar '(lambda (b) (cons 10 b)) a)
                        '((97 . 0))
                  ) ;_list
             ) ;_apply
            ) ;_lambda
            l
    ) ;_mapcar
         )
    '((75 . 0)
      (76 . 1)
      (47 . 1.)
      (98 . 2)
      (10 0. 0. 0.0)
      (10 0. 0. 0.0)
      (451 . 0)
      (460 . 0.0)
      (461 . 0.0)
      (452 . 1)
      (462 . 1.0)
      (453 . 2)
      (463 . 0.0)
      (463 . 1.0)
      (470 . "LINEAR")
   )
   ) ;_list
) ;_apply
) ;_entmakex
)


(defun c:test (/ pt x y)
(setq pt '(100 150)) ; lower left corner
(setq x (car pt)
      y (cadr pt)
)
(setq h (entmakex-hatch
            (list (list pt
                        (list x (+ y 1.25))
                        (list (+ x 0.625) (+ y 1.25))
                        (list (+ x 0.625) y)
                  )
            )
          ) ;_entmakex-hatch
) ;_setq
)

Rob... 发表于 2014-1-17 07:05:32

谢谢CAB,
我正在尝试创建一个尺寸(0,64x1,20)的舱口。
选择要剖面线的周长,并在其中创建矩形。
页: [1]
查看完整版本: 创建图案填充