Draft Hatch

Info about new community or project announcements, implemented features, classes, modules or APIs. Might get technical!
PLEASE DO NOT POST HELP REQUESTS OR OTHER DISCUSSIONS HERE!
User avatar
Roy_043
Posts: 3723
Joined: Thu Dec 27, 2018 12:28 pm

Re: Draft Hatch

Post by Roy_043 »

Roy_043 wrote: Fri Sep 24, 2021 6:18 pm seems to fix it.
OK that actually does not do the trick. The matrix is derived from the parent object so it only works for planar Draft objects.
User avatar
Roy_043
Posts: 3723
Joined: Thu Dec 27, 2018 12:28 pm

Re: Draft Hatch

Post by Roy_043 »

I think I have found a solution for the relocation bug. In this version of hatch.py the first edge and the normal of the face are used to create a matrix. This offers a level of control over how the shape is translated to the XY plane. The first point of the first edge is put on the origin, the first edge will be aligned with the X-axis.

If you create wires with that in mind you can control how the hatch is aligned with the outline. For wires on the XY plane the Translate property can then be used to switch between relative and absolute patterns.

Also included in the ZIP file are two test files and the PAT file I have used.
Attachments
hatch.zip
(51.63 KiB) Downloaded 12 times
insul-zigzag.png
insul-zigzag.png (11.45 KiB) Viewed 1095 times
User avatar
Roy_043
Posts: 3723
Joined: Thu Dec 27, 2018 12:28 pm

Re: Draft Hatch

Post by Roy_043 »

User avatar
Roy_043
Posts: 3723
Joined: Thu Dec 27, 2018 12:28 pm

Re: Draft Hatch

Post by Roy_043 »

Merged.
User avatar
ragohix769
Posts: 287
Joined: Sat Jul 18, 2020 7:04 am
Location: Rome - Italy

Re: Draft Hatch

Post by ragohix769 »

Roy_043 wrote: Fri Oct 08, 2021 11:29 pm
Merged.
Now it works!


Thanks Roy!! :D
Attachments
wepz.png
wepz.png (262.64 KiB) Viewed 697 times
User avatar
Roy_043
Posts: 3723
Joined: Thu Dec 27, 2018 12:28 pm

Re: Draft Hatch

Post by Roy_043 »

Roy_043 wrote: Fri Oct 01, 2021 2:44 pm In this version of hatch.py the first edge and the normal of the face are used to create a matrix.
Oops, there is an obvious problem if the first edge is a circle... :oops:
I'll try to fix that.
User avatar
Roy_043
Posts: 3723
Joined: Thu Dec 27, 2018 12:28 pm

Re: Draft Hatch

Post by Roy_043 »

User avatar
Roy_043
Posts: 3723
Joined: Thu Dec 27, 2018 12:28 pm

Re: Draft Hatch

Post by Roy_043 »

Merged.
Post Reply