[TechDraw] Hatch (and not GeometricHatch) line width

Discussions about the development of the TechDraw workbench
Post Reply
gatlib
Posts: 31
Joined: Fri Nov 09, 2018 5:17 pm

[TechDraw] Hatch (and not GeometricHatch) line width

Post by gatlib »

Hi everyone,

With TechDraw GeometricHatch, it is possible to set the width of the hatch lines: the "Weight Pattern" property.

I'm looking for a way to set the line width of TechDraw Hatch. Is this somehow possible? It does not seem possible reading the documentation, or playing around with the various lines properties of the corresponding view. Is it necessary to modify the svg pattern?

Thanks for any hint or work-around.

Code: Select all

OS: Debian GNU/Linux 10 (buster) (XFCE/lightdm-xsession)
Word size of FreeCAD: 64-bit
Version: 2023.811.0.14555 (Git shallow) AppImage
Build type: Release
Branch: HEAD
Hash: d31fdf6ab71bf52a96d5d3b81f3b8349bca24e27
Python 3.11.4, Qt 5.15.8, Coin 4.0.1, Vtk 9.2.5, OCC 7.7.2
Locale: English/United States (en_US)
chrisb
Veteran
Posts: 51069
Joined: Tue Mar 17, 2015 9:14 am

Re: [TechDraw] Hatch (and not GeometricHatch) line width

Post by chrisb »

Moved from Help forum.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
gatlib
Posts: 31
Joined: Fri Nov 09, 2018 5:17 pm

Re: [TechDraw] Hatch (and not GeometricHatch) line width

Post by gatlib »

A possible work-around: it may be possible to play with the ratio between the "Scale" of the View and the "Svg Pattern Scale" of the Hatch.
This is not suitable for my use-case, where I use distinct Hatch for various surfaces in the same view.

@chrisb In the future, should I directly post in the Dev/TechDraw forum rather than in the Help forum for help using TechDraw?
User avatar
wandererfan
Veteran
Posts: 5853
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: [TechDraw] Hatch (and not GeometricHatch) line width

Post by wandererfan »

gatlib wrote: Sat Sep 16, 2023 4:35 pm Is it necessary to modify the svg pattern?
Yes. The hatch is a mosaic of the small svg tiles and the code doesn't know anything about the line width used in the tile. The picture shows the standard "simple" pattern with "stroke-width:1px" in the circle and a modified pattern "simple_fat" with "stroke-width:5px" in the square.
simpleAndsimple_fat.png
simpleAndsimple_fat.png (49.21 KiB) Viewed 226 times
gatlib
Posts: 31
Joined: Fri Nov 09, 2018 5:17 pm

Re: [TechDraw] Hatch (and not GeometricHatch) line width

Post by gatlib »

OK, thanks for confirming @wandererfan.

A little follow-up question: I couldn't find an easy way to update the hatches when I manually modify my custom *.svg pattern ("Recompute" has no effect).
I have to choose another hatch pattern in Combo>Data>Hatch>Hatch Pattern and then go back to the modified *.svg for the change to appear.
Is it possible to do that with less clicks?
User avatar
wandererfan
Veteran
Posts: 5853
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: [TechDraw] Hatch (and not GeometricHatch) line width

Post by wandererfan »

gatlib wrote: Mon Sep 18, 2023 3:31 pm A little follow-up question: I couldn't find an easy way to update the hatches when I manually modify my custom *.svg pattern ("Recompute" has no effect).
I have to choose another hatch pattern in Combo>Data>Hatch>Hatch Pattern and then go back to the modified *.svg for the change to appear.
Is it possible to do that with less clicks?
Took me a while to figure out what you meant. You are changing the svg pattern file while FC is running? If the file name property doesn't change, then the file changed logic won't be triggered. Even redraw all views won't help.
gatlib
Posts: 31
Joined: Fri Nov 09, 2018 5:17 pm

Re: [TechDraw] Hatch (and not GeometricHatch) line width

Post by gatlib »

Sorry for being unclear... Indeed, I modify the *.svg pattern file while freecad is running. For example to try/choose the correct thickness of the hatching lines. Thanks for confirming that there is nothing more straightforward than my work-around to update the hatches in the drawings.

Would a feature request e.g. to be able to reload the pattern be useful? (Not necessary for me, but it would ease-off a bit the modification of line width for Hatch.)
Post Reply