Bad Hatch pattern file .. Poor pattern

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 your operating system and QCAD version.

Attach drawing files and screenshots.

Post one question per topic.

Post Reply
CVH
Premier Member
Posts: 4955
Joined: Wed Sep 27, 2017 4:17 pm

Bad Hatch pattern file .. Poor pattern

Post by CVH » Thu Sep 19, 2024 8:42 am

All,

Received a non-functional hatch pattern file to investigate.
FrenchCobble.pat
No need to try, it won't work under QCAD
(66.95 KiB) Downloaded 1174 times

The main reason it fails to load is that the End of Line marker is \r (=CR:CarriageReturn)
Under Qt a \n or \r\n is expected to read textual files.
The reported pattern name is then FrenchCobble14.81231 where the value is the angle of the first definition line.
Perhaps there is a way around that ... How to ... :?

This means that there are hatching patterns online that may fail to load.
Not some, there are seemingly many examples, frustrating. :roll:


Even when the EOL is converted with a text editor it is still a poorly coded hatch pattern e_geek
FrenchCobble_FixEOL.pat
EOL adapted, functional
(62.58 KiB) Downloaded 1035 times
FrenchCobble.png
FrenchCobble.png (31.25 KiB) Viewed 25663 times

It consist of :!: 898 definition lines with each a single dash and space.
Segments angle vary widely resulting in a max. cloning load of :!: 191 and a total cloning load of :!: 53417 :!:
It is defined within a confined area of about 27.97309 wide and 27.98086 high, we tend to call this a tile.
The definition is not near the origin ... Lowest left corner is at about (6360,1522).
Larger coordinate values eat up textual space and are less accurate to begin with.

For those who are not very familiar with the technical aspect of hatching:
It requires 898 times 1 to 191 each or 53417 parallel lines in total, each with a custom linetype ...
... So that every hatch segment is repeated just once in an adjacent tile.
Figure it out for yourself:
At scale 1.0 a hatched area of 100 units wide would easily require over 300000 custom formatted endless lines before clipping.

And that shows in QCAD rendering latency. :roll:
Or the QCAD hatching engine may time-out altogether.

This is a know problem of the QCAD hatching engine.
The parallel cloning method is fairly good for simple patterns if the hatched area is near to the hatch origin.
Old-school hatching based on tiles is then already better, probably prior QCAD3.
All segments within a tile retain their programmed coherency.
This would also open up the capability for the unsupported SUPERHATCH with block content, images, ...


Fixing this pattern (Tile2Hatch) will take some time.
The architect that wants to use this pattern provided by the stone supplier can wait a week or two.
I will provide a better copy later but it is unsure if the total cloning load can be reduced enough for usage with QCAD.

That last is the single most important reason to NOT release the Tile2Hatch QCAD addon.

Regards,
CVH

Post Reply

Return to “QCAD Troubleshooting and Problems”