# Hatch problems

**URL:** <http://forum.qcad.org/t/hatch-problems/4912>\
**Category:** QCAD Troubleshooting and Problems\
**Created:** [October 31, 2019, 12:37pm UTC](http://forum.qcad.org/t/hatch-problems/4912 "2019-10-31T12:37:29Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jackieh](http://forum.qcad.org/letter_avatar_proxy/v4/letter/j/90ced4/32.png) [@jackieh](http://forum.qcad.org/u/jackieh)\
**Post date:** [October 31, 2019, 12:37pm UTC](http://forum.qcad.org/t/hatch-problems/4912/1 "2019-10-31T12:37:29Z")

</div>

Hi Folks  
I’ve haven’t posted here for about 18 months, which is a record. My problems started yesterday, when lines only partially appeared in both print preview and pdfs. Since the drawing started out as an engineer’s drawing, almost certainly not drawn in QCAD, I copied and pasted what I needed into a new drawing. That solved the print/pdf problem, but now the hatch patterns aren’t working - which were fine in the original drawing (thought the hatch was created by me in QCAD). Since I need something that looks like dots (standard for mortar in archaeological drawings), I think that only AR-Sand or Dots will do - but in the drawing they are coming out nothing like their preview.

Can you help?

Many thanks, Jackie

PS before I thought to copy and paste into a new drawing, I reinstalled QCAD and restarted my computer as well  
[Barnack Archaeology 2.dxf](http://forum.qcad.org/uploads/short-url/6HcTUgIIUkgdX24zzZ2P3UmA2hS.dxf) (833 KB)

---

<div class="post-metadata">

**Author:** ![Husky](http://forum.qcad.org/user_avatar/forum.qcad.org/husky/32/13_2.png) [@Husky](http://forum.qcad.org/u/Husky)\
**Post date:** [October 31, 2019, 11:08pm UTC](http://forum.qcad.org/t/hatch-problems/4912/2 "2019-10-31T23:08:47Z")

</div>

Hello Jackie,

> [@](#):
>
> I’ve haven’t posted here for about 18 months, which is a record.

I think that is a good sign, isn’t it? 😉

> [@](#):
>
> … but now the hatch patterns aren’t working - which were fine in the original drawing (thought the hatch was created by me in QCAD). Since I need something that looks like dots (standard for mortar in archaeological drawings), I think that only AR-Sand or Dots will do - but in the drawing they are coming out nothing like their preview.  
> Can you help?

To my knowledge the chosen hatch is provided by a third party. I checked your drawing and figured that the hatch has problems with the used unit. Your drawing is in meter and the hatch doesn’t works. If you change the unit to mm, cm or inch everything works as expected.

Conclusion:  
I assume you have to stick to meter and I don’t have a good workaround for that. ☹  
If you are free to convert the drawing to cm everything would work just fine …  
I assume the best solution would be to find another hatch which works with meters.

> [@](#):
>
> PS before I thought to copy and paste into a new drawing, I reinstalled QCAD and restarted my computer as well

Good thoughts but the problem is based in the particular hatch coding.

---

<div class="post-metadata">

**Author:** ![CVH](http://forum.qcad.org/letter_avatar_proxy/v4/letter/c/82dd89/32.png) [@CVH](http://forum.qcad.org/u/CVH)\
**Post date:** [November 1, 2019, 2:07am UTC](http://forum.qcad.org/t/hatch-problems/4912/3 "2019-11-01T02:07:42Z")

</div>

That was a hard one.

Hatches are defined as:

```plaintext
; remarks and blank lines are ignored
*pattern-name[, description] 
angle, x-origin, y-origin, delta-x, delta-y [, dash1, dash2] [, dash3] [, dash4] [, dash5] [, dash6]
angle, ...
...
Empty line

```

The name start with \*, max 31 characters long.  
A line is max 80 characters long, max 6 dashes.  
Positive dashes define the lenght that is ON.  
Negative dashes define the lenght that is OFF.  
Zero dashes are dots.

Nothing wrong with the patterns \*AR-SAND or \*DOTS so far.

Did some hatching in different units and with different scales.  
It turns out that dots are always rendered as line pieces 0.02 units long.  
An this regardless the unit or the scale.

With the aplied scale of 0.0008 the first dashed line off \*AR-SAND becomes:  
… 0, -0.0309, 0, -0.0345, 0, -0.0330  
Its obvious that the dot spacings are the same magnitude as the rendered dots.  
Instead of a dotted line it rather looks like a dashed line.

Workaround:  
Included is the metric pattern \*AR-SAND2 without dots.  
Changed the dots to 0.01 ON what is scaled properly.  
Copy the file to …\QCAD\patterns\metric.  
Reboot Qcad, change pattern.

Regards,  
CVH  
[ar-sand2.pat](http://forum.qcad.org/uploads/short-url/j2RE5Lr8hWmOkaNMblCcbLfVLE8.pat) (295 Bytes)

---

<div class="post-metadata">

**Author:** ![CVH](http://forum.qcad.org/letter_avatar_proxy/v4/letter/c/82dd89/32.png) [@CVH](http://forum.qcad.org/u/CVH)\
**Post date:** [November 1, 2019, 2:45am UTC](http://forum.qcad.org/t/hatch-problems/4912/4 "2019-11-01T02:45:58Z")

</div>

Filed bug-report:

> **[FS#1985 : Hatch dots are rendered as lines with fixed length of 0.02 units](https://qcad.org/bugtracker/index.php?do=details&task_id=1985)**
>
> Flyspray, a Bug Tracking System written in PHP.

---

<div class="post-metadata">

**Author:** ![jackieh](http://forum.qcad.org/letter_avatar_proxy/v4/letter/j/90ced4/32.png) [@jackieh](http://forum.qcad.org/u/jackieh)\
**Post date:** [November 1, 2019, 2:14pm UTC](http://forum.qcad.org/t/hatch-problems/4912/5 "2019-11-01T14:14:25Z")

</div>

Thank you both! Ar-sand2 works perfectly.  
Yes - 18 months with no problems (usually user error) is definitely good… I must be getting better - and using QCAD is always (usually) a pleasure.  
Jackie

---

<div class="post-metadata">

**Author:** ![CVH](http://forum.qcad.org/letter_avatar_proxy/v4/letter/c/82dd89/32.png) [@CVH](http://forum.qcad.org/u/CVH)\
**Post date:** [November 1, 2019, 5:59pm UTC](http://forum.qcad.org/t/hatch-problems/4912/6 "2019-11-01T17:59:26Z")

</div>

Remember ‘Ar-sand2’ is a quick patch.  
Andrew fixed this for future releases.

Following the commit in the bugreport I assume that  
dots will be rendered by null-lenght line segments.

Regards,  
CVH
