Author Topic: [XDrX-PlugIn(56)] WIPEOUT to Hatch  (Read 1103 times)

0 Members and 1 Guest are viewing this topic.

xdcad

  • Swamp Rat
  • Posts: 514
[XDrX-PlugIn(56)] WIPEOUT to Hatch
« on: December 19, 2023, 11:36:40 PM »

Code: [Select]
(defun c:XDTB_WIPEOUT2HA (/ ss verts)
  (if (setq ss (xdrx-ssget
(xdrx-string-multilanguage
   "\n选择WIPEOUT<退出>:"
   "\nSelect Wipeout<Exit>:"
)
'((0 . "wipeout"))
       )
      )
    (progn
      (xdrx-begin)
      (setq verts (xdrx-getpropertyvalue ss "vertices"))
      (mapcar '(lambda (x)
(setq pl (xdrx-polyline-make x t))
(setq ha (xdrx-hatch-make pl))
(xdrx-setpropertyvalue
   (xdrx-entity-filter ha '((0 . "hatch")))
   "color"
   1
)
       )
      verts
      )
      (xdrx-entity-delete ss)
      (xdrx-end)
    )
  )
  (princ)
)
The code I wrote uses XDRX-API,which can be downloaded from github.com and is updated at any time.
===================================
https://github.com/xdcad
https://sourceforge.net/projects/xdrx-api-zip/
http://bbs.xdcad.net