Author Topic: block bottom WIPEOUT (or solid hatch)  (Read 7044 times)

0 Members and 1 Guest are viewing this topic.

domenicomaria

  • Swamp Rat
  • Posts: 723
block bottom WIPEOUT (or solid hatch)
« on: March 23, 2021, 06:12:32 AM »
I need to add a wipeout or a solid hatch to the bottom of a block.

And I want to automate this process.

And it's not difficult.

But the problem is that frequenly some errors happen.

Many times it does not work, because the entities that define the boundaries of the block, many times do not touch each other precisely. . . there are holes. . .

Any ideas to solve this problem?


ciao
« Last Edit: March 23, 2021, 08:24:17 AM by domenicomaria »

ronjonp

  • Needs a day job
  • Posts: 7526
Re: block bottom WIPEOUT (or solid hatch)
« Reply #1 on: March 23, 2021, 02:12:12 PM »
Create the boundary in step 2 using hatch with internal point then (HATCHGENERATEBOUNDARY).

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

domenicomaria

  • Swamp Rat
  • Posts: 723
Re: block bottom WIPEOUT (or solid hatch)
« Reply #2 on: March 23, 2021, 03:02:56 PM »
I did not know the existence of the "HATCH GENERATE BOUNDARY" command
which is very useful.

I have tried using it and it seems to solve a lot of problems.
Thanks a lot for your reply.

d2010, as you can see, it is possible to give intelligent and useful answers and share one's knowledge and experiences.

BIGAL

  • Swamp Rat
  • Posts: 1396
  • 40 + years of using Autocad
Re: block bottom WIPEOUT (or solid hatch)
« Reply #3 on: March 23, 2021, 08:31:33 PM »
Like Ronjonp another way is draw a rough pline around block, then do bpoly pick inside it will make inner and outer plines, erase outer.

A man who never made a mistake never made anything

domenicomaria

  • Swamp Rat
  • Posts: 723
Re: block bottom WIPEOUT (or solid hatch)
« Reply #4 on: March 23, 2021, 11:25:14 PM »
But the problem is that frequenly some errors happen.

Many times it does not work, because the entities that define the boundaries of the block,
(which is not the little man you drew)
do not touch each other precisely. . . because there are little holes. . .
. . .
however if I use HATCHGENERATEBOUNDARY I get better results
. . .

what would be needed is a command that
closes all the holes in the boundary of a block . . .
. . . and it is not easy even to imagine. . .
« Last Edit: March 24, 2021, 01:44:56 AM by domenicomaria »

roy_043

  • Water Moccasin
  • Posts: 1895
  • BricsCAD 18
Re: block bottom WIPEOUT (or solid hatch)
« Reply #5 on: March 24, 2021, 03:42:32 AM »
Maybe experiment with the HPGAPTOL setting?

Marc'Antonio Alessi

  • Swamp Rat
  • Posts: 1451
  • Marco
Re: block bottom WIPEOUT (or solid hatch)
« Reply #6 on: March 24, 2021, 03:45:21 AM »
Code: [Select]
;;-----------------------=={ Outline Objects  }==-----------------------;;
;;                                                                      ;;
;;  This program enables the user to generate one or more closed        ;;
;;  polylines or regions outlining all objects in a selection.          ;;
;;                                                                      ;;
;;  Following a valid selection, the program calculates the overall     ;;
;;  rectangular extents of all selected objects and constructs a        ;;
;;  temporary rectangular polyline offset outside of such extents.      ;;
;;                                                                      ;;
;;  Using a point located within the offset margin between the extents  ;;
;;  of the selection and temporary rectangular frame, the program then  ;;
;;  leverages the standard AutoCAD BOUNDARY command to construct        ;;
;;  polylines and/or regions surrounding all 'islands' within the       ;;
;;  temporary bounding frame.                                           ;;
;;                                                                      ;;
;;----------------------------------------------------------------------;;
;;  Author:  Lee Mac, Copyright © 2014  -  www.lee-mac.com              ;;
;;----------------------------------------------------------------------;;
;;  Version 1.0    -    2014-11-30                                      ;;
;;                                                                      ;;
;;  - First release.                                                    ;;
;;----------------------------------------------------------------------;;
;;  Version 1.1    -    2016-01-23                                      ;;
;;                                                                      ;;
;;  - Added option to erase original objects.                           ;;
;;----------------------------------------------------------------------;;

domenicomaria

  • Swamp Rat
  • Posts: 723
Re: block bottom WIPEOUT (or solid hatch)
« Reply #7 on: March 24, 2021, 04:28:15 AM »
Code: [Select]
;;-----------------------=={ Outline Objects  }==-----------------------;;
;;                                                                      ;;
;;  This program enables the user to generate one or more closed        ;;
;;  polylines or regions outlining all objects in a selection.          ;;
;;                                                                      ;;
;;  Following a valid selection, the program calculates the overall     ;;
;;  rectangular extents of all selected objects and constructs a        ;;
;;  temporary rectangular polyline offset outside of such extents.      ;;
;;                                                                      ;;
;;  Using a point located within the offset margin between the extents  ;;
;;  of the selection and temporary rectangular frame, the program then  ;;
;;  leverages the standard AutoCAD BOUNDARY command to construct        ;;
;;  polylines and/or regions surrounding all 'islands' within the       ;;
;;  temporary bounding frame.                                           ;;
;;                                                                      ;;
;;----------------------------------------------------------------------;;
;;  Author:  Lee Mac, Copyright © 2014  -  www.lee-mac.com              ;;
;;----------------------------------------------------------------------;;
;;  Version 1.0    -    2014-11-30                                      ;;
;;                                                                      ;;
;;  - First release.                                                    ;;
;;----------------------------------------------------------------------;;
;;  Version 1.1    -    2016-01-23                                      ;;
;;                                                                      ;;
;;  - Added option to erase original objects.                           ;;
;;----------------------------------------------------------------------;;

Marco,
the LEE MAC code is useful and interesting (as always)
but the problem is much more complex. . .
. . .
think also to the blocks that have
empty areas, holes inside them . . .
. . .
I am not sure,
but maybe, the code of Lee Mac,
reduces the problem of the external holes
on the contour of the objects
. . .
when entities that define the boundaries of the block,
do not touch each other precisely . . .
. . .

however, everything you are telling me
helps.

ciao

Marc'Antonio Alessi

  • Swamp Rat
  • Posts: 1451
  • Marco
Re: block bottom WIPEOUT (or solid hatch)
« Reply #8 on: March 24, 2021, 04:58:27 AM »
<clip>. . .
when entities that define the boundaries of the block,
do not touch each other precisely . . .
. . .
<clip>
For this problem I do not see other solution than to adjust the outline, see:
>>> The progam is configured to use the JOIN option of the PEDIT command with a zero fuzz distance, however, this may be easily altered if necessary.
Code: [Select]
;; Polyline Join  -  Lee Mac
;; Attempts to join all lines, arcs and polylines in a selection.
edit: 20210324 Lee code removed - see http://www.lee-mac.com/ for the code (sorry)


domenicomaria

  • Swamp Rat
  • Posts: 723
Re: block bottom WIPEOUT (or solid hatch)
« Reply #9 on: March 24, 2021, 05:38:26 AM »
Quote
For this problem I do not see other solution than to adjust the outline, see:
The progam is configured to use the JOIN option of the PEDIT command
with a zero fuzz distance, however,
this may be easily altered if necessary.
Marco,
I already know this Lee Mac routine. . .

And it might help. . .

Thank you

domenicomaria

  • Swamp Rat
  • Posts: 723
Re: block bottom WIPEOUT (or solid hatch)
« Reply #10 on: March 24, 2021, 01:41:37 PM »
Quote
Create the boundary in step 2 using hatch with internal point then (HATCHGENERATEBOUNDARY).

Quote
Maybe experiment with the HPGAPTOL setting?

I have taken into account the suggestions you have given me
and for now the result is this.

HATCHGENERATEBOUNDARY
and HPGAPTOL
are very USEFUL !


Marc'Antonio Alessi

  • Swamp Rat
  • Posts: 1451
  • Marco
Re: block bottom WIPEOUT (or solid hatch)
« Reply #11 on: March 24, 2021, 02:38:15 PM »
Please post a piece of code... and HPGAPTOL settings… thanks.

domenicomaria

  • Swamp Rat
  • Posts: 723
Re: block bottom WIPEOUT (or solid hatch)
« Reply #12 on: March 24, 2021, 03:14:19 PM »
Please post a piece of code... and HPGAPTOL settings… thanks.
I am still making everything manually . . .

But however, with your suggestion,
every thing is more easy,
and works better !

I will try to write the code
and I will post it completely.

ronjonp

  • Needs a day job
  • Posts: 7526
Re: block bottom WIPEOUT (or solid hatch)
« Reply #13 on: March 24, 2021, 03:25:47 PM »
Why do you create a quad of boundaries? This took me a minute to hatch using a single rectangle around the car.


Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

domenicomaria

  • Swamp Rat
  • Posts: 723
Re: block bottom WIPEOUT (or solid hatch)
« Reply #14 on: March 25, 2021, 12:51:05 AM »
Why do you create a quad of boundaries? This took me a minute to hatch using a single rectangle around the car.
I did this, because I noticed that sometimes,
the "bhatch" command works better if the area to be filled
is divided into several parts.
(. . . maybe because it is more easy to calculate the boundary . . .)

If you have a perfect shape, there is no problem.

While, if there are points where the lines, the polylines, the arcs, the splines . . . of the contour
do not touch each other, perfectly,
then the pattern enters the shape . . .