Page 1 of 1

Hatch problems

Posted: Thu Oct 31, 2019 1:37 pm
by jackieh
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

Re: Hatch problems

Posted: Fri Nov 01, 2019 12:08 am
by Husky
Hello Jackie,
jackieh wrote:
Thu Oct 31, 2019 1:37 pm
I've haven't posted here for about 18 months, which is a record.
I think that is a good sign, isn't it? :wink:
jackieh wrote:
Thu Oct 31, 2019 1:37 pm
... 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.
jackieh wrote:
Thu Oct 31, 2019 1:37 pm
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.

Re: Hatch problems

Posted: Fri Nov 01, 2019 3:07 am
by CVH
That was a hard one.

Hatches are defined as:

Code: Select all

; 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

Re: Hatch problems

Posted: Fri Nov 01, 2019 3:45 am
by CVH

Re: Hatch problems

Posted: Fri Nov 01, 2019 3:14 pm
by jackieh
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

Re: Hatch problems

Posted: Fri Nov 01, 2019 6:59 pm
by CVH
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