Page 1 of 1

How to create a custom hatch?

Posted: Sun Oct 27, 2019 3:41 pm
by MPN
Hi
I'm looking for a way to create a custom hatch with QCAD professional. Is that possible today?

Re: How to create a custom hatch?

Posted: Sun Oct 27, 2019 8:02 pm
by CVH
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

Re: How to create a custom hatch?

Posted: Tue Oct 29, 2019 7:47 am
by MPN
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

Re: How to create a custom hatch?

Posted: Tue Oct 29, 2019 10:40 am
by CVH
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

Re: How to create a custom hatch?

Posted: Sat Nov 09, 2019 5:30 pm
by MPN
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.

Re: How to create a custom hatch?

Posted: Sun Nov 10, 2019 12:19 am
by CVH
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

Re: How to create a custom hatch?

Posted: Thu Nov 21, 2019 11:30 pm
by CVH
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 10640 times
IsoHorizontal?? ... Insulation ... Horizontal. :?
Insulation one can find plenty online.
Orientation has no meaning, hatches can be oriented from 0-360 degrees.

Regards,
CVH

Re: How to create a custom hatch?

Posted: Thu Nov 21, 2019 11:48 pm
by CVH
Grabbed from the autodesk forum.

Re: How to create a custom hatch?

Posted: Sat Nov 23, 2019 3:56 pm
by MPN
Hi CVH

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

Cheers