Author Topic: create a boundary around solid hatch  (Read 481 times)

0 Members and 1 Guest are viewing this topic.

jtm2018hyo

  • Newt
  • Posts: 30
create a boundary around solid hatch
« on: February 22, 2019, 10:50:24 PM »
I need to create a boundary around all solid hatch inside the drawing (nested/dynamic/regular blocks and external solid hatch)


CAB

  • Global Moderator
  • Seagull
  • Posts: 10327
Re: create a boundary around solid hatch
« Reply #1 on: February 23, 2019, 07:32:17 AM »
I've reached the age where the happy hour is a nap. ()
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

Crank

  • Swamp Rat
  • Posts: 1434
Re: create a boundary around solid hatch
« Reply #2 on: February 23, 2019, 09:42:44 AM »

 Vault Professional 2018   /   Building Design Suite Ultimate 2017  /  AEC Collection 2018+2019   /   Acad Qubit

jtm2018hyo

  • Newt
  • Posts: 30
Re: create a boundary around solid hatch
« Reply #3 on: February 24, 2019, 11:31:46 AM »
https://jtbworld.com/autocad-hatchb-lsp


I tried "HATCHB.LSP Free AutoLISP for AutoCAD" but I actually does not work with SOLIDs

jtm2018hyo

  • Newt
  • Posts: 30
Re: create a boundary around solid hatch
« Reply #4 on: February 24, 2019, 11:34:07 AM »
https://goo.gl/CZCXUx

0 results for a lisp-routine to generate  BOUNDARY polyline around a SOLID

ronjonp

  • Needs a day job
  • Posts: 6858
Re: create a boundary around solid hatch
« Reply #5 on: February 24, 2019, 07:36:31 PM »
I need to create a boundary around all solid hatch inside the drawing (nested/dynamic/regular blocks and external solid hatch)
You asked for boundary around solid hatch then asked for boundary around a solid? Which is it?

Windows 10 x64 - AutoCAD /C3D 2019

Custom Build PC

jtm2018hyo

  • Newt
  • Posts: 30
Re: create a boundary around solid hatch
« Reply #6 on: February 25, 2019, 09:29:18 AM »
I need to create a boundary around all solid hatch inside the drawing (nested/dynamic/regular blocks and external solid hatch)
You asked for boundary around solid hatch then asked for boundary around a solid? Which is it?


mmm... it's not the same?

ronjonp

  • Needs a day job
  • Posts: 6858
Re: create a boundary around solid hatch
« Reply #7 on: February 25, 2019, 09:42:12 AM »
I need to create a boundary around all solid hatch inside the drawing (nested/dynamic/regular blocks and external solid hatch)
You asked for boundary around solid hatch then asked for boundary around a solid? Which is it?


mmm... it's not the same?
A SOLID is different object than a SOLID hatch.

Windows 10 x64 - AutoCAD /C3D 2019

Custom Build PC

jtm2018hyo

  • Newt
  • Posts: 30
Re: create a boundary around solid hatch
« Reply #8 on: February 27, 2019, 09:11:23 AM »
my request is for the SOLID.

I need to generate polyline around SOLID in nested blocks and find another code-routine to delete them all.

hmspe

  • Bull Frog
  • Posts: 334
Re: create a boundary around solid hatch
« Reply #9 on: February 27, 2019, 05:12:57 PM »
"Science is the belief in the ignorance of experts." - Richard Feynman

ronjonp

  • Needs a day job
  • Posts: 6858
Re: create a boundary around solid hatch
« Reply #10 on: February 28, 2019, 11:48:10 AM »
Here's a version of that code without command calls. If you want it to work on your example drawing at the Autodesk forum, explode all your blocks.
https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/create-a-boundary-around-solid-hatch/m-p/8619452#M381543
Code - Auto/Visual Lisp: [Select]
  1. (defun c:foo (/ a b c d s)
  2.  ;; RJP 2019-02-28
  3.  ;; Trace solids and delete
  4.  (if (setq s (ssget ":L" '((0 . "solid"))))
  5.    (foreach e (vl-remove-if 'listp (mapcar 'cadr (ssnamex s)))
  6.      (setq a (vl-remove-if-not '(lambda (x) (vl-position (car x) '(10 11 12 13))) (entget e)))
  7.      (mapcar 'set '(a b c d) (mapcar 'cdr a))
  8.      (entmakex (list '(0 . "LWPOLYLINE")
  9.      '(100 . "AcDbEntity")
  10.      (assoc 8 (entget e))
  11.      '(100 . "AcDbPolyline")
  12.      '(90 . 4)
  13.      '(43 . 0)
  14.      '(70 . 1)
  15.      (cons 10 a)
  16.      (cons 10 b)
  17.      (cons 10 d)
  18.      (cons 10 c)
  19.      (assoc 210 (entget e))
  20. )
  21.      )
  22.      (entdel e)
  23.    )
  24.  )
  25.  (princ)
  26. )

Windows 10 x64 - AutoCAD /C3D 2019

Custom Build PC

Dilan

  • Mosquito
  • Posts: 11
Re: create a boundary around solid hatch
« Reply #11 on: March 11, 2019, 04:19:11 AM »
Link to source code.https://jtbworld.com/autocad-hatchb-lsp
Note that code with a copy write should not be posted without the authors permission.Please post a link to the source instead.
« Last Edit: March 11, 2019, 09:27:04 AM by CAB »

jtm2018hyo

  • Newt
  • Posts: 30
Re: create a boundary around solid hatch
« Reply #12 on: March 21, 2019, 04:41:00 PM »
Perhaps post #3 in http://www.theswamp.org/index.php?topic=45099.msg502994#msg502994


In your link, I found the solution for solid...

...but what about SOLIDs in NESTED BLOCKs, Dynamics BLOCKS and Regular blocks?
« Last Edit: March 21, 2019, 05:20:42 PM by jtm2018hyo »