Hatching in SVG Export

Discussions about the development of the TechDraw workbench
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
User avatar
wandererfan
Veteran
Posts: 6268
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Hatching in SVG Export

Post by wandererfan »

After git commit a9b718d1e0 Svg Face hatches should be present in exported Svg drawings. The Svg hatches are converted to bitmaps and clipped to fit the Face before export.
Attachments
ExportedHatchInInkscape.png
ExportedHatchInInkscape.png (220.37 KiB) Viewed 1712 times
User avatar
M4x
Veteran
Posts: 1472
Joined: Sat Mar 11, 2017 9:23 am
Location: Germany

Re: Hatching in SVG Export

Post by M4x »

Nice, thank you very much!
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: Hatching in SVG Export

Post by uwestoehr »

Cool new feature!

I gave it a try and I have 2 ideas of what might in future be implemented as well:

Here is a screenshot:
screenshot
screenshot
FreeCAD_m13PpZEWqt.png (73.08 KiB) Viewed 1603 times

1. users might want to rotate the Standard Hatch because for some reasons the stripes must go from the upper left to the lower right.
2. the geometric hatch is currently not exported in the PDF.
User avatar
wandererfan
Veteran
Posts: 6268
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Hatching in SVG Export

Post by wandererfan »

uwestoehr wrote: Mon Jun 08, 2020 12:27 am 1. users might want to rotate the Standard Hatch because for some reasons the stripes must go from the upper left to the lower right.
For now, the user can pick a different pattern (ex hatch45R.svg and hatch45L.svg) or make one of their own. We will probably need something like this eventually to distinguish adjacent faces in SectionView.
2. the geometric hatch is currently not exported in the PDF.
I probably broke something. I'll have a look.
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: Hatching in SVG Export

Post by uwestoehr »

wandererfan wrote: Mon Jun 08, 2020 2:55 pm For now, the user can pick a different pattern (ex hatch45R.svg and hatch45L.svg) or make one of their own.
Ah, up to now I did not know this exists. I get as default hatch "simple.svg" thus there was no hint.
I think having a task dialog to set the hatch would help here. I mean geometric hatch has one while standard hatch has not. Should I come up with such a dialog or do you already work on this?

2. the geometric hatch is currently not exported in the PDF.
I probably broke something. I'll have a look.
Thanks.
User avatar
wandererfan
Veteran
Posts: 6268
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Hatching in SVG Export

Post by wandererfan »

uwestoehr wrote: Mon Jun 08, 2020 3:28 pm Should I come up with such a dialog or do you already work on this?
Go ahead. It will take me a long time to get to this.
2. the geometric hatch is currently not exported in the PDF.
Do you know if this ever worked in v0.19? It doesn't seem to work in v0.18.4.
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: Hatching in SVG Export

Post by uwestoehr »

wandererfan wrote: Mon Jun 08, 2020 5:46 pm Go ahead. It will take me a long time to get to this.
OK.
2. the geometric hatch is currently not exported in the PDF.
Do you know if this ever worked in v0.19? It doesn't seem to work in v0.18.4.
I am not sure but since in the Wiki page:
TechDraw_GeometricHatch
there is no note about this, it maybe it once worked for 0.19.
User avatar
wandererfan
Veteran
Posts: 6268
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Hatching in SVG Export

Post by wandererfan »

uwestoehr wrote: Mon Jun 08, 2020 12:27 am 2. the geometric hatch is currently not exported in the PDF.
should be fixed by git commit cda235aba0.
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: Hatching in SVG Export

Post by uwestoehr »

wandererfan wrote: Wed Jun 10, 2020 12:10 am should be fixed by git commit cda235aba0.
many thanks! Confirmed fixed.
Post Reply