Andrew,
Both RhatchEntity and RhatchData have the flag .hasCustomPattern().
I can test this flag to know if the hatch originates from the dxf file.
Both also have the method .getPatternName() what returns the correct pattern name as a string.
And .clearCustomPattern() what clears the custom pattern when casted back.
Both have the method .getCustomPattern() what should return a RPattern.
https://qcad.org/doc/qcad/3.0/developer ... 41f3decae6
In trial .getCustomPattern() returns a QVariant(RPattern) instead.
Obviously all the RPattern methods fail on the QVariant.
How to retrieve the Description, PatternLines and from those the Dashes, BasePoint, Angle, Length and
the Offset what are all getters from the RPattern Class?
Regards,
CVH
(SOLVED) Retrieving custom hatch patterns
Moderator: andrew
Forum rules
Always indicate your operating system and QCAD version.
Attach drawing files, scripts and screenshots.
Post one question per topic.
Always indicate your operating system and QCAD version.
Attach drawing files, scripts and screenshots.
Post one question per topic.
(SOLVED) Retrieving custom hatch patterns
Last edited by CVH on Tue Oct 20, 2020 2:26 pm, edited 1 time in total.
Re: Retrieving custom hatch patterns
I've updated the RPattern script bindings accordingly, so the problem should be fixed in the next release.
Re: Retrieving custom hatch patterns
Thanks, Andrew,
looking forward to it ...
Meanwhile, I dove in the dxf myself.
But I have more confidence in a calibrated approach.
Discovered that a dxf stores the cloning data in Cartesian way.
Funny:
We make a design in Cartesian spaced tiles, our designs are Cartesian recorded.
A PAT file is coded as a parallel offset and an inline shift.
For dxf it is recomputed and stores it back as a Cartesian offset.
This Cartesian data is in a way the base of an alternative hatch generator.
Presuming hatches are parallel patterned lines in QCAD.
Regards,
CVH
looking forward to it ...
Meanwhile, I dove in the dxf myself.
But I have more confidence in a calibrated approach.
Discovered that a dxf stores the cloning data in Cartesian way.
Funny:
We make a design in Cartesian spaced tiles, our designs are Cartesian recorded.
A PAT file is coded as a parallel offset and an inline shift.
For dxf it is recomputed and stores it back as a Cartesian offset.
This Cartesian data is in a way the base of an alternative hatch generator.
Presuming hatches are parallel patterned lines in QCAD.
Regards,
CVH
(SOLVED) Retrieving custom hatch patterns
Solved with release 3.25.2.1
Tile2Hatch can now extract orphaned hatch patterns from the current drawing.
Thanks, Andrew
CVH
Tile2Hatch can now extract orphaned hatch patterns from the current drawing.
Thanks, Andrew
CVH