having problems applying hatch to an area

Mike Gera
Posts: 197
Joined: Mon Sep 06, 2021 1:29 pm
Answers: 0
x 88
x 34

having problems applying hatch to an area

Unread post by Mike Gera »

I am trying to apply a hatch to the region in the .SLDDRW shown below but am getting the error shown.

What am I doing wrong?

Thanks.
2023-08-09 19_48_15-SOLIDWORKS Premium 2022 SP5.0 - [hatch_test - Sheet1 _].png
Attachments
hatch_test.SLDPRT
(29.38 KiB) Downloaded 103 times
hatch_test.SLDDRW
(47.57 KiB) Downloaded 85 times
by Glenn Schroeder » Thu Aug 10, 2023 3:21 pm
Adding hatching in Drawings has been flaky for the entire 14 years I've been using SW.
Go to full post
SW 2024 SP 5.0
Windows 11
Shaun
Posts: 12
Joined: Wed Apr 14, 2021 10:35 am
Answers: 2
x 30
x 6

Re: having problems applying hatch to an area

Unread post by Shaun »

I have not downloaded the files as I still use SW2019.

I think it may not like the longer vertical line extending beyond the horizontal lines for boundary selection.

Have you tried selecting region as below and clicking inside the region?
image.png
User avatar
AlexLachance
Posts: 2182
Joined: Thu Mar 11, 2021 8:14 am
Answers: 17
Location: Quebec
x 2363
x 2013

Re: having problems applying hatch to an area

Unread post by AlexLachance »

Don't select the lines. Click inside the square rather.
image.png
Mike Gera
Posts: 197
Joined: Mon Sep 06, 2021 1:29 pm
Answers: 0
x 88
x 34

Re: having problems applying hatch to an area

Unread post by Mike Gera »

AlexLachance wrote: Thu Aug 10, 2023 7:53 am Don't select the lines. Click inside the square rather.

image.png
When I do that, nothing happens. Set to "Region".
SW 2024 SP 5.0
Windows 11
User avatar
AlexLachance
Posts: 2182
Joined: Thu Mar 11, 2021 8:14 am
Answers: 17
Location: Quebec
x 2363
x 2013

Re: having problems applying hatch to an area

Unread post by AlexLachance »

Mike Gera wrote: Thu Aug 10, 2023 8:19 am When I do that, nothing happens. Set to "Region".
That's odd, it works for me in SolidWorks 2019.

This is a GIF. Click on it to see it
hatch.gif
User avatar
AlexLachance
Posts: 2182
Joined: Thu Mar 11, 2021 8:14 am
Answers: 17
Location: Quebec
x 2363
x 2013

Re: having problems applying hatch to an area

Unread post by AlexLachance »

From your screenshot in the first post, it seems there is a viewport where your jointed lines are and the long line may be outside of the viewport. Select all, cut it, double click on view port, paste it and retry, see if it works.
User avatar
DanPihlaja
Posts: 848
Joined: Thu Mar 11, 2021 9:33 am
Answers: 25
Location: Traverse City, MI
x 811
x 978

Re: having problems applying hatch to an area

Unread post by DanPihlaja »

The line on the left is part of the view (hence the border) The rest of the lines are NOT in that view.

Activate the view, then redraw your lines and it should work.
-Dan Pihlaja
Solidworks 2022 SP4

2 Corinthians 13:14
Mike Gera
Posts: 197
Joined: Mon Sep 06, 2021 1:29 pm
Answers: 0
x 88
x 34

Re: having problems applying hatch to an area

Unread post by Mike Gera »

I redrew the sketch, making sure that all 4 lines are inside the view. Files attached. I still can't get "region" (or "boundary) to work.
Attachments
hatch_test_01.SLDPRT
(29.38 KiB) Downloaded 94 times
hatch_test_01.SLDDRW
(45.36 KiB) Downloaded 95 times
SW 2024 SP 5.0
Windows 11
Mike Gera
Posts: 197
Joined: Mon Sep 06, 2021 1:29 pm
Answers: 0
x 88
x 34

Re: having problems applying hatch to an area

Unread post by Mike Gera »

AlexLachance wrote: Thu Aug 10, 2023 8:26 am That's odd, it works for me in SolidWorks 2019.

This is a GIF. Click on it to see it
hatch.gif
Alex, what program did you use to create that .gif?

Thanks.
SW 2024 SP 5.0
Windows 11
User avatar
AlexLachance
Posts: 2182
Joined: Thu Mar 11, 2021 8:14 am
Answers: 17
Location: Quebec
x 2363
x 2013

Re: having problems applying hatch to an area

Unread post by AlexLachance »

Mike Gera wrote: Thu Aug 10, 2023 9:20 am Alex, what program did you use to create that .gif?

Thanks.
ScreenToGIF

https://www.screentogif.com/
User avatar
DanPihlaja
Posts: 848
Joined: Thu Mar 11, 2021 9:33 am
Answers: 25
Location: Traverse City, MI
x 811
x 978

Re: having problems applying hatch to an area

Unread post by DanPihlaja »

DanPihlaja wrote: Thu Aug 10, 2023 9:06 am The line on the left is part of the view (hence the border) The rest of the lines are NOT in that view.

Activate the view, then redraw your lines and it should work.
OK, I was wrong. I see now that this is a sketch from the part level. Looking at it now.
-Dan Pihlaja
Solidworks 2022 SP4

2 Corinthians 13:14
User avatar
DanPihlaja
Posts: 848
Joined: Thu Mar 11, 2021 9:33 am
Answers: 25
Location: Traverse City, MI
x 811
x 978

Re: having problems applying hatch to an area

Unread post by DanPihlaja »

Mike Gera wrote: Thu Aug 10, 2023 9:19 am I redrew the sketch, making sure that all 4 lines are inside the view. Files attached. I still can't get "region" (or "boundary) to work.
OK, i see what you did now.

You used sketch entities at the part level and then used "Convert entities" at the drawing level to create those lines.

This is weird.

I can draw a rectangle (at the drawing level), and hatch it just fine. But your lines, I can't do anything with.

If I delete and redrawing your lines (using "convert entities" to to pull from your part sketch, then trim the right hand line back to be limited by your to horizontal lines, then I can get it to work. But I cannot get it to work with your original lines.
image.png
Attachments
image.png
-Dan Pihlaja
Solidworks 2022 SP4

2 Corinthians 13:14
Mike Gera
Posts: 197
Joined: Mon Sep 06, 2021 1:29 pm
Answers: 0
x 88
x 34

Re: having problems applying hatch to an area

Unread post by Mike Gera »

DanPihlaja wrote: Thu Aug 10, 2023 9:58 am OK, i see what you did now.

You used sketch entities at the part level and then used "Convert entities" at the drawing level to create those lines.

This is weird.

I can draw a rectangle (at the drawing level), and hatch it just fine. But your lines, I can't do anything with.

If I delete and redrawing your lines (using "convert entities" to to pull from your part sketch, then trim the right hand line back to be limited by your to horizontal lines, then I can get it to work. But I cannot get it to work with your original lines.

image.png
Ah, this seems like a bug (or an oversight).

How do I resize the viewport box?

Thanks.
SW 2024 SP 5.0
Windows 11
Mike Gera
Posts: 197
Joined: Mon Sep 06, 2021 1:29 pm
Answers: 0
x 88
x 34

Re: having problems applying hatch to an area

Unread post by Mike Gera »

This is my latest attempt:
hatch.gif
SW 2024 SP 5.0
Windows 11
User avatar
DanPihlaja
Posts: 848
Joined: Thu Mar 11, 2021 9:33 am
Answers: 25
Location: Traverse City, MI
x 811
x 978

Re: having problems applying hatch to an area

Unread post by DanPihlaja »

Mike Gera wrote: Thu Aug 10, 2023 10:42 am Ah, this seems like a bug (or an oversight).

How do I resize the viewport box?

Thanks.
I hit CTRL Q to run a rebuild and it auto resized.
-Dan Pihlaja
Solidworks 2022 SP4

2 Corinthians 13:14
User avatar
DanPihlaja
Posts: 848
Joined: Thu Mar 11, 2021 9:33 am
Answers: 25
Location: Traverse City, MI
x 811
x 978

Re: having problems applying hatch to an area

Unread post by DanPihlaja »

Mike Gera wrote: Thu Aug 10, 2023 12:50 pm This is my latest attempt:

hatch.gif
OK, as far as I know, hatch needs to use the entire line. So your line on the right needs to be ONLY the length between the 2 horizontal lines.
-Dan Pihlaja
Solidworks 2022 SP4

2 Corinthians 13:14
User avatar
jcapriotti
Posts: 1868
Joined: Wed Mar 10, 2021 6:39 pm
Answers: 30
Location: The south
x 1207
x 1995

Re: having problems applying hatch to an area

Unread post by jcapriotti »

Mike Gera wrote: Thu Aug 10, 2023 12:50 pm This is my latest attempt:

hatch.gif
Double click the view to activate it, then try the region option,
Jason
Mike Gera
Posts: 197
Joined: Mon Sep 06, 2021 1:29 pm
Answers: 0
x 88
x 34

Re: having problems applying hatch to an area

Unread post by Mike Gera »

DanPihlaja wrote: Thu Aug 10, 2023 1:03 pm I hit CTRL Q to run a rebuild and it auto resized.
Mine does not for some reason.
SW 2024 SP 5.0
Windows 11
Mike Gera
Posts: 197
Joined: Mon Sep 06, 2021 1:29 pm
Answers: 0
x 88
x 34

Re: having problems applying hatch to an area

Unread post by Mike Gera »

jcapriotti wrote: Thu Aug 10, 2023 1:07 pm Double click the view to activate it, then try the region option,
Still does not work.

But, I did just learn that views can be activated via double-clicking!
SW 2024 SP 5.0
Windows 11
User avatar
AlexLachance
Posts: 2182
Joined: Thu Mar 11, 2021 8:14 am
Answers: 17
Location: Quebec
x 2363
x 2013

Re: having problems applying hatch to an area

Unread post by AlexLachance »

Mike Gera wrote: Thu Aug 10, 2023 1:12 pm Still does not work.

But, I did just learn that views can be activated via double-clicking!
Careful though, you can draw/add annotations thinking you're attaching them to another view and they actually get added to the view you double clicked on.
Mike Gera
Posts: 197
Joined: Mon Sep 06, 2021 1:29 pm
Answers: 0
x 88
x 34

Re: having problems applying hatch to an area

Unread post by Mike Gera »

AlexLachance wrote: Thu Aug 10, 2023 1:35 pm Careful though, you can draw/add annotations thinking you're attaching them to another view and they actually get added to the view you double clicked on.
Thanks for the heads-up.

I've done that more than once (as in hundreds of times), even before knowing how to lock the view selection.
SW 2024 SP 5.0
Windows 11
User avatar
jcapriotti
Posts: 1868
Joined: Wed Mar 10, 2021 6:39 pm
Answers: 30
Location: The south
x 1207
x 1995

Re: having problems applying hatch to an area

Unread post by jcapriotti »

Odd behavior, if I convert entities like you did in that file you attached, it doesn't hatch by region. Deleting all of the "on edge" relations allows it to work.
Jason
Mike Gera
Posts: 197
Joined: Mon Sep 06, 2021 1:29 pm
Answers: 0
x 88
x 34

Re: having problems applying hatch to an area

Unread post by Mike Gera »

jcapriotti wrote: Thu Aug 10, 2023 1:50 pm Odd behavior, if I convert entities like you did in that file you attached, it doesn't hatch by region. Deleting all of the "on edge" relations allows it to work.
Yes, I'm now able to get it to work by deleting the on-edge relations. This must be a bug. Does someone want to report it?
SW 2024 SP 5.0
Windows 11
User avatar
JSculley
Posts: 643
Joined: Tue May 04, 2021 7:28 am
Answers: 55
x 9
x 877

Re: having problems applying hatch to an area

Unread post by JSculley »

Definitely some sort of quirk. If you drag the end points of the two horizontal lines to move them off the vertical line:
image.png
You can then hatch the region:
image.png
and drag the endpoints back:
image.png
Or, hatch it in the model and avoid the convert entities mess altogether:

image.png
image.png
User avatar
jcapriotti
Posts: 1868
Joined: Wed Mar 10, 2021 6:39 pm
Answers: 30
Location: The south
x 1207
x 1995

Re: having problems applying hatch to an area

Unread post by jcapriotti »

Makes me think there is some tolerance issue with convert entities....like the ends aren't touching to create a closed region. Removing the "on edge" maybe recalculates the position more accurately....I don't know. Who knows what programming tricks are going on in the background to get around other issues we aren't aware of. Our own internal programs have some code that would leave people scratching their head at first glance.....until we explain why.
Jason
User avatar
Glenn Schroeder
Posts: 1520
Joined: Mon Mar 08, 2021 11:43 am
Answers: 23
Location: southeast Texas
x 1758
x 2130

Re: having problems applying hatch to an area

Unread post by Glenn Schroeder »

Adding hatching in Drawings has been flaky for the entire 14 years I've been using SW.
"On the days when I keep my gratitude higher than my expectations, well, I have really good days."

Ray Wylie Hubbard in his song "Mother Blues"
Mike Gera
Posts: 197
Joined: Mon Sep 06, 2021 1:29 pm
Answers: 0
x 88
x 34

Re: having problems applying hatch to an area

Unread post by Mike Gera »

I discovered that if I break up "complex" regions, hatch works. Sort of. It still requires multiple clicks and some luck.

See attached example.

Try deleting the hatch and the break lines, then applying hatch to the entire region.

Note that hatch and break lines are on their own layers.
Attachments
hatch_test_02.SLDPRT
(33.6 KiB) Downloaded 110 times
hatch_test_02.SLDDRW
(76.72 KiB) Downloaded 117 times
SW 2024 SP 5.0
Windows 11
Post Reply