Adding Hatches

Adding Hatches

Anonymous
Not applicable
765 Views
8 Replies
Message 1 of 9

Adding Hatches

Anonymous
Not applicable

I am getting the following error message when I try to add hatches to my floor plan, "A closed boundary could not be determined". The red circle is where AutoCAD is indicating the gap is. I've redrawn it numerous times but I keep getting the same error message. Does anyone know what the problem might be.

 

Thanks for all your help in advance!

 

 Aisha.

0 Likes
Accepted solutions (1)
766 Views
8 Replies
Replies (8)
Message 2 of 9

chriscowgill7373
Advisor
Advisor

Its hard to say without the drawing, perhaps the boundary doubles back on itself.  polyline boundaries can sometimes act strange.  You could try this code, and then just change the solid hatch to whatever pattern you are trying to make:

 

(defun c:hatchpoints (/ b)
      (command "._pline")
      (while (>= (getvar "cmdactive") 1)
	(command PAUSE)
      ) ;_ end of while
      (command "._HATCH" "_P" "SOLID" "_S" (setq b (entlast)) "")
      (entdel b)
      (princ)
    ) ;_ end of defun
    (defun c:hp	(/)
      (c:hatchpoints)
    ) ;_ end of defun

Christopher T. Cowgill, P.E.

AutoCAD Certified Professional
Civil 3D Certified Professional
Civil 3D 2024 on Windows 10

Please select the Accept as Solution button if my post solves your issue or answers your question.

0 Likes
Message 3 of 9

nrz13
Advisor
Advisor

Aside from AutoCAD not being very good at handling hatches, I couldn't tell you.  If you attach your drawing we might be able to see something else, like maybe the lines aren't in the same plane?

What happens when you draw the lines as a continuous polyline?  You could try isolating just the boundary lines of what you want to hatch; that works sometimes.  Or, you could try to initiate your hatch using "Add: Select object" instead of "Add: Pick points".

Also, you are posting in the Windows forum, but someone else with the Mac version may have encountered a similar problem.  I'd try posting in the AutoCAD for Mac forum.


Work:  AutoCAD 2022.1.3, Windows 10 Pro v22H2 64-bit, Intel Core i7-8700K, 32GB RAM, Samsung 960 Pro SSD, AMD Radeon Pro WX 5100, 3 Dell Monitors (3840x2160)
Home: AutoCAD 2022.1.3, Windows 10 Pro v22H2 64-bit, Intel Core i7-11700, 64GB RAM, Samsung 980 Pro SSD, NVIDIA Quadro P2200, Dell Monitor (3840x2160)
0 Likes
Message 4 of 9

imadHabash
Mentor
Mentor

Hi,

 

>>  I've redrawn it numerous times but I keep getting the same error message.  <<

does Redraw or Regen commands fix the issue ? also try to zoom out all of needed hatch area and see if any changes . 

 

Regatrds,

 

Imad Habash

EESignature

0 Likes
Message 5 of 9

Anonymous
Not applicable

I tried those two commands and I am still having the same issue. I have attached my drawing below. The redraw or regen command removes the circles where AutoCAD indicated that my boundaries are not closed.

0 Likes
Message 6 of 9

Anonymous
Not applicable

I tried the code but I am still having the same issue. I've attached a copy of my drawing in case you have a moment to take a look at it. Thanks for all the help you've been giving me, I appreciate it.

 

Aisha.

0 Likes
Message 7 of 9

Anonymous
Not applicable

I tried drawing my lines as a continuous polyline in the areas where AutoCAD said my boundary wasn't closed but I am still having the same issue. Thanks, I just posted to my question to the MAC forum. I have also attached a copy of my drawing here.

0 Likes
Message 8 of 9

nrz13
Advisor
Advisor

It hatches just fine for me in AutoCAD 2018 – see attachment below.  Without knowing any other variables, this problem seems limited to the AutoCAD for Mac version.

You might experiment with the HPGAPTOL variable (mine is set to 1), although this seems an unlikely fix since you said you already tried re-creating polyline boundaries.


Work:  AutoCAD 2022.1.3, Windows 10 Pro v22H2 64-bit, Intel Core i7-8700K, 32GB RAM, Samsung 960 Pro SSD, AMD Radeon Pro WX 5100, 3 Dell Monitors (3840x2160)
Home: AutoCAD 2022.1.3, Windows 10 Pro v22H2 64-bit, Intel Core i7-11700, 64GB RAM, Samsung 980 Pro SSD, NVIDIA Quadro P2200, Dell Monitor (3840x2160)
0 Likes
Message 9 of 9

gccdesign
Collaborator
Collaborator
Accepted solution

Aisha,

 

Sometimes hatching can be easy, sometimes a pain.

 

For instance in your drawing (Windows 10) if I tried to hatch the walls when zoomed in so that it would be easy to get my cursor inside the walls, it gave me the same error message.

If I zoomed out quite a bit so that I had all or most of that wall on screen, then it would hatch.

 

But regardless, here are various steps I take in trying to get hatching to work.

 

1.    Check all corners and intersections to make sure they are closed. No gaps. Fillet command "F>Enter" is good for this. Extend, fillet, things like that.

2.    Look for things that are intersecting your attempted hatch area. Like leaders, dimensions, blocks. Try freezing the layers those are on. But of course you can't freeze the lines that are supposed to be the border for your hatch.

3.    Look for lines that are under or on top of your hatch border. For instance you have some short wall lines at the corner on top of or overlapping each other. Make lines that are just one line. Again, fillet helps here.

4.    An object that intersects or is tangent seems to confuse hatching sometimes. Like a circle or arc that is tangent to a hatch border line. If the object is on a different layer, freeze it before hatching.

4.    Sometimes zooming in or out can help, regenerating "RE", things like that.

5.    Before 2018 Autocad seemed to require that the entire area to be hatched was visible on the screen to run the hatch command. Supposedly in 2018 they made that not necessary. But on your drawing when I was zoomed way in it didn't work. When I zoomed out it worked fine. Try zooming out so that the whole area to be hatched is visible.

6.    Sometimes I will use a non-printing line and make a polyline border to be hatched. Then you can hatch that as an object. Invoke the hatch command>S>Enter and it will give you a square cursor for selecting objects. Hatching a closed border object with the "object" selection method is generally more reliable than filling an area with the crosshair cursor. It can still get confused, just not as often. It has to be a closed border. This method doesn't require the  whole area to be visible on the screen.

 

GChapp