夏生生 发表于 2021-8-31 10:47:32

发码养号之创建填充

收币有风险,下载需谨慎,勿喷

本附件含两个函数
make-hatch1多个图元形成的封闭区域创建填充
make-hatch2多个封闭图元创建填充
以下为示例

(defun c:tt1 (/ acdoc mspace ss n enl)
(setq
    acdoc (vlax-get-property (vlax-get-acad-object) 'activedocument)
)
(setqmspace (if (= 1 (getvar 'cvport))
   (vlax-get-property acdoc 'paperspace)
   (vlax-get-property acdoc 'modelspace)
         )
)
(setq ss (ssget '((0 . "line"))))
(repeat (setq n (sslength ss))
    (setq enl (cons (ssname ss (setq n (1- n))) enl))
)
(make-hatch1 mspace enl "SOLID" :vlax-true 1)
)
(defun c:tt2 (/ acdoc mspace ss n enl)
(setq
    acdoc (vlax-get-property (vlax-get-acad-object) 'activedocument)
)
(setqmspace (if (= 1 (getvar 'cvport))
   (vlax-get-property acdoc 'paperspace)
   (vlax-get-property acdoc 'modelspace)
         )
)
(setq ss (ssget '((0 . "LWpolyline"))))
(repeat (setq n (sslength ss))
    (setq enl (cons (ssname ss (setq n (1- n))) enl))
)
(make-hatch2 mspace enl "SOLID" :vlax-true 1)
)



magicheno 发表于 2021-8-31 20:36:42

大佬牛~~~~~~!
页: [1]
查看完整版本: 发码养号之创建填充