Hatch problems

If you are having problems with QCAD, post here. Please report bugs through our Bug Tracker instead.

Always attach your original DXF or DWG file and mentions your QCAD version and the platform you are on.

Moderator: andrew

Forum rules
Always indicate Operating system, QCAD version
Attach Drawing files, Screenshots
Post Reply
jackieh
Active Member
Posts: 43
Joined: Wed Jun 24, 2015 2:45 pm

Hatch problems

Post by jackieh » Thu Oct 31, 2019 1:37 pm

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
Attachments
Barnack Archaeology 2.dxf
(833.3 KiB) Downloaded 19 times

User avatar
Husky
Moderator/Drawing Help/Testing
Posts: 2760
Joined: Wed May 11, 2011 9:25 am
Location: USA

Re: Hatch problems

Post by Husky » Fri Nov 01, 2019 12:08 am

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.
Work smart, not hard: QCad Pro

If a thread is considered as "solved" please change the title of the first post to "[solved] Title...". Thanks!

CVH
Premier Member
Posts: 293
Joined: Wed Sep 27, 2017 4:17 pm
Location: Belgium; Antwerp

Re: Hatch problems

Post by CVH » Fri Nov 01, 2019 3:07 am

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
Attachments
ar-sand2.pat
(295 Bytes) Downloaded 14 times
QCADpro 3.23.0.0 / win7pro 32 bit / 4GB / 1e generation i7 2.6Ghz / HDD GeForce GT 520

CVH
Premier Member
Posts: 293
Joined: Wed Sep 27, 2017 4:17 pm
Location: Belgium; Antwerp

Re: Hatch problems

Post by CVH » Fri Nov 01, 2019 3:45 am

QCADpro 3.23.0.0 / win7pro 32 bit / 4GB / 1e generation i7 2.6Ghz / HDD GeForce GT 520

jackieh
Active Member
Posts: 43
Joined: Wed Jun 24, 2015 2:45 pm

Re: Hatch problems

Post by jackieh » Fri Nov 01, 2019 3:14 pm

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

CVH
Premier Member
Posts: 293
Joined: Wed Sep 27, 2017 4:17 pm
Location: Belgium; Antwerp

Re: Hatch problems

Post by CVH » Fri Nov 01, 2019 6:59 pm

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
QCADpro 3.23.0.0 / win7pro 32 bit / 4GB / 1e generation i7 2.6Ghz / HDD GeForce GT 520

Post Reply

Return to “QCAD Troubleshooting and Problems”