Hatch Problems

Use this forum to ask questions about how to do things in QCAD.

Moderator: andrew

Forum rules

Always indicate your operating system and QCAD version.

Attach drawing files and screenshots.

Post one question per topic.

Kevinti28
Junior Member
Posts: 13
Joined: Fri Feb 02, 2018 11:34 pm

Hatch Problems

Post by Kevinti28 » Sun May 17, 2020 6:04 pm

I am having trouble getting hatch to work.
I am doing a drawing for use in etching brass. This involves a lot of hatching (areas which are hatched get etched, areas which are not hatched remain as solid brass).
When I started using hatch, selecting each segment before hatching started off ok, but after about 30-40 segments, one would not select and then nothing further could be selected. Going through the help on the forum, I started to use the creation tool for a poly line to ensure each separate entity was complete before selecting it for hatching.
This seemed to work ok.
Then after coming back to the drawing a while later, whilst each entity is a poly line, using hatch is now showing each line, arc, etc; as separate and not as a poly line.
In the attached screenshot, the lower part of the drawing has hatched ok, but the top drawing won't hatch.
In order to hatch the top drawing, every single line and arc has to be selected individually!!! as the hatch has to go around each component as one big hatch.
Screenshot 2020-05-17 at 17.52.48.png
Screenshot 2020-05-17 at 17.52.48.png (50.28 KiB) Viewed 10493 times

CVH
Premier Member
Posts: 3364
Joined: Wed Sep 27, 2017 4:17 pm

Re: Hatch Problems

Post by CVH » Sun May 17, 2020 6:06 pm

Hi,
Could you share the file?

Regards,
CVH

Kevinti28
Junior Member
Posts: 13
Joined: Fri Feb 02, 2018 11:34 pm

Re: Hatch Problems

Post by Kevinti28 » Sun May 17, 2020 6:14 pm

I could, but I don't know how to do that.

Kevinti28
Junior Member
Posts: 13
Joined: Fri Feb 02, 2018 11:34 pm

Re: Hatch Problems

Post by Kevinti28 » Sun May 17, 2020 6:18 pm

I think I've found out how to attach the file
Attachments
Class AB 0.4mm Etch Master 160520.dxf
(1.18 MiB) Downloaded 422 times

CVH
Premier Member
Posts: 3364
Joined: Wed Sep 27, 2017 4:17 pm

Re: Hatch Problems

Post by CVH » Sun May 17, 2020 7:32 pm

In the top design there are duplicates.

Try to explode these polys.
Then detect duplicates and delete them.
Then recombine to polys.
Poly from selection (OC) will create logical closed polys.
Easy to check in the props if they are.
Selection Filter can find open polys.

For etching:
You only need hatches.
Remark that a boundaries could have a width.
A Circle with 10mm diameter with Lineweigth 0,35 will blank out 10,35 across.

Regards,
CVH
Last edited by CVH on Wed May 20, 2020 6:09 am, edited 1 time in total.

Kevinti28
Junior Member
Posts: 13
Joined: Fri Feb 02, 2018 11:34 pm

Re: Hatch Problems

Post by Kevinti28 » Mon May 18, 2020 7:18 am

CVH

Thank you for your help. I’ll work my way through the various entities to search out any duplicates.

With regard to line width, I always draw with a line width of 0.0, so hopefully this wouldn’t affect the size of the hatch for etching.

Regards

Kevin

CVH
Premier Member
Posts: 3364
Joined: Wed Sep 27, 2017 4:17 pm

Re: Hatch Problems

Post by CVH » Mon May 18, 2020 7:33 am

Kevinti28 wrote:
Mon May 18, 2020 7:18 am
I always draw with a line width of 0.0, so hopefully this wouldn’t affect the size of the hatch for etching.
'0.00' is a supplemental type added for specific targets, I think it was a laser.
Some applications may have problems with that, the same is true for 'default'.
An SVG export may not give you exactly what you designed.

Just to not - not have mentioned it.

Regards,
CVH

Kevinti28
Junior Member
Posts: 13
Joined: Fri Feb 02, 2018 11:34 pm

Re: Hatch Problems

Post by Kevinti28 » Tue May 19, 2020 4:29 pm

I have been through and tried to get rid of all duplicates and set up all of the various shapes, etc; as polylines.

I did discover that there are some parts of the drawing on one layer and parts on another, I haven’t been able to work out how to combine everything on to one layer though. But I’m not sure if this affects the selection during hatch anyway.

However, when I do try to hatch by selection, it doesn’t matter where I start, or in what order I make the selection, I cannot select more than 51 entities. It is as if there is an upper limit.

Is there a limit? If there is, maybe I need to divide the hatch area up, so I can select less than 51 entities, and hatch smaller areas at a time?

Kevin

CVH
Premier Member
Posts: 3364
Joined: Wed Sep 27, 2017 4:17 pm

Re: Hatch Problems

Post by CVH » Tue May 19, 2020 7:18 pm

We know, it isn't straightforward sometimes.
Kevinti28 wrote:
Tue May 19, 2020 4:29 pm
I haven’t been able to work out how to combine everything on to one layer though
The simplest is to alter the Layer property of a selection in the Porperty Editor.


With your file:

Moved text
Moved existing hatches
Select all
Explode (downside: circles explode to circular polys)
Select all; Checked Selection in Property editor; We still have Polys
Explode further untill no polys remain (downside: circular polys explode to arcs)
With no selection
Detect duplicates
Moved duplicates & closed function
Detect zero-length
Moved 1 spook & closed function
Selected the lower section
Polys from selection >> 528 polys (not all logical closed !!)
Selected the upper section
Polys from selection >> 557 polys (not all logical closed !!)
Selection Filter: Polys; not closed; select all
16 Polys fail (Keep the filter handy to recheck)

-71.45203816,-23.19474163 (not trimmed)
-55.33852684,-30.49795165 (not trimmed)
Trimmed & select both polys & Polys from selection
-70.25084439 & -27.6632726 (not trimmed)
-7.47905258,-25.97027035 (not trimmed)
Trimmed & select both polys & Polys from selection
-6.2790525,-25.96650315 (not trimmed)
Trimmed & select poly & Polys from selection

Still 11 Polys in the top design fail
Here the trimming seems ok but we discover orphans that sit under other entities
moved 3 round corners to duplicates (Detect duplicates did not find them !!)
Leaving just 8 Orphans and moved those

Freeze layer 'Moved'
Select all: 1104 logical closed polys => Cleanup succeeded. :D

Created new hatch layer (=active)
Box select the inner part of the lower section
Draw hatch from selection
Box select the inner part of the upper section
Draw hatch from selection


Remarks:
- Not sure about the triangles and you can't isolate it from the multi hatch.
> redo the hatch
- Found some entities that are not squared out but are slanted a tiny bit.
> Only correctable as single entities

Revision Included. :wink:
Regards,
CVH
Attachments
Class AB 0.4mm Etch Master 160520 Rev.dxf
(1.9 MiB) Downloaded 402 times
Last edited by CVH on Wed May 20, 2020 6:43 am, edited 3 times in total.

CVH
Premier Member
Posts: 3364
Joined: Wed Sep 27, 2017 4:17 pm

Re: Hatch Problems

Post by CVH » Tue May 19, 2020 7:57 pm

The slanted: (Itentionally slanted where set aside)

Slanted.png
Slanted.png (3.32 KiB) Viewed 10412 times
Last edited by CVH on Wed May 20, 2020 6:38 am, edited 2 times in total.

CVH
Premier Member
Posts: 3364
Joined: Wed Sep 27, 2017 4:17 pm

Re: Hatch Problems

Post by CVH » Wed May 20, 2020 6:08 am

Kevinti28 wrote:
Tue May 19, 2020 4:29 pm
However, when I do try to hatch by selection, it doesn’t matter where I start, or in what order I make the selection, I cannot select more than 51 entities. It is as if there is an upper limit.
What you describe here looks like the functionality of 'Polyline from segments' (OG).
Workflow: OG followed by selecting segments one by one (rather chains or paths as Qcad finds all interconnected).
And then again it isn't.
If I would start with OG and would point to any contour in your drawing I can keep on pointing.
Every contour I point to will become a poly.

It is a simple fact that we can select more then 51 elements.
So I tried selecting and adding with Shift-select and I could keep on selecting.
Can you explain your workflow?
It is never handy to select several hundreds or thousands of entities one by one.

For the record:
OG will produce logical open polys from any contour even from geometrical closed.
It is different in regards with 'Polyline from Selection' (OC).
Workflow: select segments followed by OC.
OC will produce logical closed polys from closed contours (Closed property = yes).

Handy to check for and ...
... if the boundaries are simplex and logical closed they always comply for hatching.

There is almost no limit for OC.
But be aware that it might take long when the selection is not straightforward, very complex or having boundaries in boundaries in bou...
Qcad is evaluating all possible one on one relations and that could take forever.

If all fails: Divide et impera. Divide you problem up.

Regards,
CVH

User avatar
Husky
Moderator/Drawing Help/Testing
Posts: 4931
Joined: Wed May 11, 2011 9:25 am
Location: USA

Re: Hatch Problems

Post by Husky » Wed May 20, 2020 8:05 am

CVH wrote:
Wed May 20, 2020 6:08 am
It is never handy to select several hundreds or thousands of entities one by one.
Bless the programmer which are providing tools to avoid that in many cases. :D

Maybe it is different kind of virus but I played a bit with the drawing ...

1. I cleaned the drawing - yes, I think you already know why. :wink:
2. I relocated the text to a new layer. That brings me in the situation to bring it easily out of the way because hatch doesn't accept text.
3. I created then the polylines (OC) - well not all but at least around 99% of them. I think 4 or 6 needed a little manual help from my side. How 99% - playing with QCAD tolerances helps a lot ...
4. To spice it up - I deleted the existing hatch which was created on the lower part.
5. Then I selected all polylines which need a hatch - the tool "Select Rectangular Area" (left to right) is just perfect for drawings like this one.
6. I launched the Hatch tool - took care of the dialog - confirmed with OK and the hatch was done in seconds - mission accomplished. :D

Conclusion: A clean drawn drawing will cooperate with QCAD like a charm and saves you a lot of time ...

Work smart, not hard: QCad Pro
Win10/64, QcadPro, QcadCam version: Current.
If a thread is considered as "solved" please change the title of the first post to "[solved] Title..."

CVH
Premier Member
Posts: 3364
Joined: Wed Sep 27, 2017 4:17 pm

Re: Hatch Problems

Post by CVH » Wed May 20, 2020 9:50 am

Husky wrote:
Wed May 20, 2020 8:05 am
Conclusion: A clean drawn drawing will cooperate with QCAD like a charm and saves you a lot of time ...
It is the way to a clean drawing that can be troublesome....
For the rest I think the approach is not that different.

CVH

Kevinti28
Junior Member
Posts: 13
Joined: Fri Feb 02, 2018 11:34 pm

Re: Hatch Problems

Post by Kevinti28 » Thu May 21, 2020 9:26 am

CVH and Husky, thank you both for taking the time and trouble to help a CAD novice.
My drawing habits have certainly created me (and you) a lot of issues, I need to be more careful with my drawing :)
I have tried to work through my drawing myself to eliminate the issues that I have caused, so that I can learn from my mistakes.
I have used the close poly lines tool,
Used property editor to check if the poly lines are closed,
Used property editor to move entities from one layer to another,
Re-drawn the slanted elements to be parallel,
Discovered that if I select an exploded entity, that if it is white, it is duplicated.
That I should delete the entities until I have one which is red,

I haven't learnt how to use the selection filter yet, but I will keep trying.

Once again your help is much appreciated. The explanations and video have been very helpful.

Kevin

CVH
Premier Member
Posts: 3364
Joined: Wed Sep 27, 2017 4:17 pm

Re: Hatch Problems

Post by CVH » Thu May 21, 2020 9:35 am

Kevinti28 wrote:
Thu May 21, 2020 9:26 am
I haven't learnt how to use the selection filter yet, but I will keep trying.
The use was different but the explanation holds for many:
https://qcad.org/rsforum/viewtopic.php? ... 56&#p27956

CVH

Post Reply

Return to “QCAD 'How Do I' Questions”