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
Specifying hatch spacing instead of scale?
Moderator: andrew
Forum rules
Always indicate your operating system and QCAD version.
Attach drawing files and screenshots.
Post one question per topic.
Always indicate your operating system and QCAD version.
Attach drawing files and screenshots.
Post one question per topic.
-
- Newbie Member
- Posts: 6
- Joined: Thu May 26, 2016 7:18 pm
Re: Specifying hatch spacing instead of scale?
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:
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.
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
-
- Newbie Member
- Posts: 6
- Joined: Thu May 26, 2016 7:18 pm
Re: Specifying hatch spacing instead of scale?
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
Cheers,
Pete