Anyone has the hatching pattern in svg for "insulation" layer?

Discussions about the development of the TechDraw workbench
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
ragohix769
Posts: 565
Joined: Sat Jul 18, 2020 7:04 am
Location: Rome - Italy

Re: Anyone has the hatching pattern in svg for "insulation" layer?

Post by ragohix769 »

Roy_043 wrote: Wed Sep 22, 2021 7:29 am In your example you have an L shape that is a single contour both for a Draft hatch and a TD hatch. For the insulation pattern this contour needs to be split into two contours. Each has to be hatched separately, with a scale and angle derived from the contour.
I don't understand because I don't know the implementation of the hatching tool (in Draft and/or in TD).

But, if I undestand, in TD you can insert an hatch pattern in 2 ways: one it's geometrical/vectorial, so when you create a pdf or a dxf export, there it's all vector, hatching too. So I imagine that it's more difficult. The second way it's with Hatching "image" in TD (when you export, there is not a vector, but an Image of the pattern projected over): maybe (just for now) this is easier to manage then the vectorial method?
After #ElonMuskBuyTwitter I'm no more on Twitter, that's really enough :-(
=> Now you can find me here on #Mastodon: https://mastodon.uno/@opensoul - I hope more people do the same :-)
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

Re: Anyone has the hatching pattern in svg for "insulation" layer?

Post by Roy_043 »

I have corrected my previous message. Some PAT patterns with dashed lines do work.
Attachments
Honeycomb.png
Honeycomb.png (32.79 KiB) Viewed 1617 times
User avatar
ragohix769
Posts: 565
Joined: Sat Jul 18, 2020 7:04 am
Location: Rome - Italy

Re: Anyone has the hatching pattern in svg for "insulation" layer?

Post by ragohix769 »

Roy_043 wrote: Wed Sep 22, 2021 9:05 am I have corrected my previous message. Some PAT patterns with dashed lines do work.
Have you the PAT file with the pattern to share?

[in general: how it's possibile to create *.PAT files? they are *.svg that can be created with Inkscape?]
After #ElonMuskBuyTwitter I'm no more on Twitter, that's really enough :-(
=> Now you can find me here on #Mastodon: https://mastodon.uno/@opensoul - I hope more people do the same :-)
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

Re: Anyone has the hatching pattern in svg for "insulation" layer?

Post by Roy_043 »

PAT files are text files. There are some utilities to create them out there, but they usually require a DwgCAD program to run. You can also create them manually.

The honeycomb pattern in my previous example belongs to a commercial DwgCAD program, so I don't want to post that.

Attached is a FCPAT.pat file with a new pattern: "Insulation-ZigZag", and a FreeCAD file that uses it. Apart from the already mentioned scale and angle there is also the hatch origin that must be user defined for this pattern and the S-shaped insulation pattern to work.

Note: The scale of the Insulation-ZigZag pattern must equal the scaled thickness of the insulation.
Attachments
insul-zigzag-dwg.png
insul-zigzag-dwg.png (4.99 KiB) Viewed 1514 times
insul-zigzag.png
insul-zigzag.png (14.86 KiB) Viewed 1523 times
insul-zigzag.FCStd
(10.11 KiB) Downloaded 46 times
FCPAT.zip
(344 Bytes) Downloaded 45 times
User avatar
ragohix769
Posts: 565
Joined: Sat Jul 18, 2020 7:04 am
Location: Rome - Italy

Re: Anyone has the hatching pattern in svg for "insulation" layer?

Post by ragohix769 »

That's very strange: now if I push over "apply geometric Hatch to face" in Td, FC crash (not exit but not responding anymore).
But if I use "Hatch a Face using image file", it's still working as usual.
OS: Ubuntu 18.04.6 LTS (KDE/plasma)
Word size of FreeCAD: 64-bit
Version: 0.20.
Build type: Release
Branch: unknown
Hash: 582c26ea8b5f9d85957a6cb1bf798839fa2ce94c
Python version: 3.6.9
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.5.2
Locale: Italian/Italy (it_IT)
After #ElonMuskBuyTwitter I'm no more on Twitter, that's really enough :-(
=> Now you can find me here on #Mastodon: https://mastodon.uno/@opensoul - I hope more people do the same :-)
Post Reply