Specifying hatch spacing instead of scale?

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
Peter York
Newbie Member
Posts: 6
Joined: Thu May 26, 2016 7:18 pm

Specifying hatch spacing instead of scale?

Post by Peter York » Thu May 26, 2016 8:49 pm

I'm wondering how easy it would be to implement an option within the "hatch" feature to choose the spacing between hatch entities rather than choosing the "scale" of the hatch. I'm really only interested in using the "LINE" pattern, but I'd love to be able to choose the spacing between the lines. My application is toolpathing for laser rastering, where the relationship between line spacing and laser kerf size is important.

Thanks!
Pete

QCAD version: 3.14
OS: Windows 7 & 10

User avatar
andrew
Site Admin
Posts: 9059
Joined: Fri Mar 30, 2007 6:07 am

Re: Specifying hatch spacing instead of scale?

Post by andrew » Thu May 26, 2016 9:04 pm

This would be in conflict with the way how patterns are defined.

If you need a simple line hatch pattern with an exact spacing between lines, I can think of two options:

A) Work out the factor you need to apply to an existing pattern to get a spacing of 1.0 (for ANSI31, that's 1/3.175). Then enter the formula to get the desired spacing into the scale input in the hatch dialog, for example for ANSI31, enter 1/3.175*3 to get an exact spacing of 3 or 1/3.175*S for a spacing of S.

B) Create your own pattern definitions in patterns/metric of your QCAD installation. For example for a line pattern that is horizontal at angle 0.0 and has a spacing of 1.0 at a scale of 1.0, create a simple text file patterns/metric/mypattern.pat with as contents:

Code: Select all

*MYPATTERN,MyPattern
0, 0,0, 0,1.0
The last value (1.0) is indeed the distance between the lines at a pattern scale of 1.0. You could scale that hatch pattern with any factor S to get a line spacing of S.

Peter York
Newbie Member
Posts: 6
Joined: Thu May 26, 2016 7:18 pm

Re: Specifying hatch spacing instead of scale?

Post by Peter York » Thu May 26, 2016 11:21 pm

Thanks, Andrew-- both options sound reasonable! For now, I ended up baking the 3.175 factor into the hatch script and editing the GUI to read "spacing [mm]" instead of "scale"...I only intend to use the line pattern and don't care if the standard hatch patterns are inaccurate.

Cheers,
Pete

Post Reply

Return to “QCAD 'How Do I' Questions”