Hatching in SVG Export

Discussions about the development of the TechDraw workbench
User avatar
wandererfan
Posts: 4078
Joined: Tue Nov 06, 2012 5:42 pm

Hatching in SVG Export

Postby wandererfan » Sat May 30, 2020 12:35 pm

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 573 times
User avatar
M4x
Posts: 281
Joined: Sat Mar 11, 2017 9:23 am
Location: Germany

Re: Hatching in SVG Export

Postby M4x » Sat May 30, 2020 7:27 pm

Nice, thank you very much!
User avatar
uwestoehr
Posts: 1929
Joined: Sun Jan 27, 2019 3:21 am

Re: Hatching in SVG Export

Postby uwestoehr » Mon Jun 08, 2020 12:27 am

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:
FreeCAD_m13PpZEWqt.png
screenshot
FreeCAD_m13PpZEWqt.png (73.08 KiB) Viewed 464 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
Posts: 4078
Joined: Tue Nov 06, 2012 5:42 pm

Re: Hatching in SVG Export

Postby wandererfan » Mon Jun 08, 2020 2:55 pm

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
Posts: 1929
Joined: Sun Jan 27, 2019 3:21 am

Re: Hatching in SVG Export

Postby uwestoehr » Mon Jun 08, 2020 3:28 pm

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
Posts: 4078
Joined: Tue Nov 06, 2012 5:42 pm

Re: Hatching in SVG Export

Postby wandererfan » Mon Jun 08, 2020 5:46 pm

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
Posts: 1929
Joined: Sun Jan 27, 2019 3:21 am

Re: Hatching in SVG Export

Postby uwestoehr » Tue Jun 09, 2020 1:52 am

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
Posts: 4078
Joined: Tue Nov 06, 2012 5:42 pm

Re: Hatching in SVG Export

Postby wandererfan » Wed Jun 10, 2020 12:10 am

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
Posts: 1929
Joined: Sun Jan 27, 2019 3:21 am

Re: Hatching in SVG Export

Postby uwestoehr » Wed Jun 10, 2020 12:26 am

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