How to create a custom hatch?

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.

Post Reply
MPN
Active Member
Posts: 34
Joined: Sun Oct 27, 2019 3:33 pm

How to create a custom hatch?

Post by MPN » Sun Oct 27, 2019 3:41 pm

Hi
I'm looking for a way to create a custom hatch with QCAD professional. Is that possible today?

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

Re: How to create a custom hatch?

Post by CVH » Sun Oct 27, 2019 8:02 pm

Hatch patterns file are stored under ....\QCAD\patterns\

About the used format I had no clue.
So I looked it up for you.
https://qcad.org/rsforum/viewtopic.php? ... t=patterns
It seems it's pritty standard.

Regards,
CVH

MPN
Active Member
Posts: 34
Joined: Sun Oct 27, 2019 3:33 pm

Re: How to create a custom hatch?

Post by MPN » Tue Oct 29, 2019 7:47 am

Thank you for the links.

I was hoping for a simple approach for creating new hatches similar to what is described here for librecad: https://forum.librecad.org/file/n570892 ... torial.pdf

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

Re: How to create a custom hatch?

Post by CVH » Tue Oct 29, 2019 10:40 am

Well, there are common standards and there is non-standard.

LibreCad uses dxf tiles.
Qcad uses common patterns.

Not sure how that works out for LibreCad but I think that those hatches are converted into entities.
While under Qcad they stay defined as patterns.
Not sure about all that.

In short the standard is build up of spaced Xlines with on-off-dot sequence.

I investigated some simple patterns and then got curious about:
http://micastoneworks.com/product/coron ... on-rubble/
Not that this pattern is workable in Qcad, I pritty got the picture how to.

So if you have a repetitive pattern in dxf you may post it.
I would like to give it a try.

Regards,
CVH

MPN
Active Member
Posts: 34
Joined: Sun Oct 27, 2019 3:33 pm

Re: How to create a custom hatch?

Post by MPN » Sat Nov 09, 2019 5:30 pm

Hi again.

I have attached an example of a dxf file that would be great to use as a hatch pattern. Looks like this:

Image

Thanks for helping out.
Attachments
IsoHorizontal.dxf
(99.26 KiB) Downloaded 569 times
Last edited by MPN on Sat Nov 09, 2019 5:50 pm, edited 2 times in total.

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

Re: How to create a custom hatch?

Post by CVH » Sun Nov 10, 2019 12:19 am

First: A Hatch consists of line pieces, nothing else.

But there are ways arround that so it looks as rounded.

Further: Please also indicate the repetitive nature.
Remember this has to fill everything in all directions up to the boundary and in all scales.
Lets say 3-4 repetitions in the desired directions at least.

Did thought it would going to be a hard one, offcourse.
Never mind.

Regards,
CVH

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

Re: How to create a custom hatch?

Post by CVH » Thu Nov 21, 2019 11:30 pm

Got the repetive nature by PM.
Simply 10 up/down and 10 aside.

For start, we have two verticals that repeat up/down.
With angle = 90, start (x,y), on state, off state (magenta).
The offset along the line is 0 and the ortho offset is 10.

Kept it simple and approximated the arcs by 9 segments. :|
I only use the flatten apex of the arcs.
So, we have two horizontals that repeat across.
With angle = 0, start (x,y), on state, off state (magenta).
The offset along the line is 0 and the ortho offset is 10.

Next, drew a ray (blue) that connects the right ref. of the lower flat apex with the repetition that sits 1 up, 3 right (1).
The circle chord is the next segment and the length is the on state.
This segment is repeated.
The distance between two colinear chords is the off state (magenta).
Next, drew a ray that connect the right ref. of the second chord with the one that sits 2 up, 3 right (2).
Again, this new chord is the next segment.
And so on.
The last ray (6) is pointed to the one that sits 11 up 1 right.
:!: Remark that in the 45 and 135 degree orientation I use the 1 up, 1 right instead of 3/3 or 2/2.

The last chord does not connect properly with the vertical.
The verticals are trimmed (lengten).

The 6 chords and most we need can simply be moved, mirrored and/or rotated 180. e_geek

That will give us 24 chord segments.
With angle, start (x,y), on state, off state (magenta).
Turns out that the arcs are finally approximated by 13 segments.

Now it is simply the question to add the offset along the line (dark yellow) and the ortho offset (yellow) for each.
I used the shape 1 above to determine these values.

:!: When I stepped across by 2 or by 3 the definitions have to be repeated by posX+10 and by posX+10 and posX+20.
In the vertical direction I only stepped by 1, so there is no need to repeat definitions in that direction.

The file is called <Test_MPN.pat>.
Inside the file the hatch name is set on the first line after an asterisk (*).
Set as <Test_MPN>.
Further details I posted here:
https://qcad.org/rsforum/viewtopic.php? ... 325#p25325
Pat files may include different hatches starting with *pattern-name
But this is not common in Qcad.

I added the construction dxf. :shock:
In case you might find 13 segments too coarse, you need to refine this.

This was a fun test aside the fact one can source freely many hatches online.
Test_MPN.pat.png
Test_MPN.pat.png (14.15 KiB) Viewed 10643 times
IsoHorizontal?? ... Insulation ... Horizontal. :?
Insulation one can find plenty online.
Orientation has no meaning, hatches can be oriented from 0-360 degrees.

Regards,
CVH
Attachments
IsoHorizontal.dxf
(345.12 KiB) Downloaded 567 times
Test_MPN.pat
(3.34 KiB) Downloaded 572 times
Last edited by CVH on Fri Nov 22, 2019 12:44 am, edited 3 times in total.

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

Re: How to create a custom hatch?

Post by CVH » Thu Nov 21, 2019 11:48 pm

Grabbed from the autodesk forum.
Attachments
OTB-ISO.pat
(9.34 KiB) Downloaded 598 times

MPN
Active Member
Posts: 34
Joined: Sun Oct 27, 2019 3:33 pm

Re: How to create a custom hatch?

Post by MPN » Sat Nov 23, 2019 3:56 pm

Hi CVH

Thanks a bunch for creating the .pat files!
I will play around with creating my own hatches as well now.

Cheers

Post Reply

Return to “QCAD 'How Do I' Questions”