In the TechDraw Workbench, I have imported a single Line made in the Sketcher, but it's not displayed nor exportable to SVG if its width is smaller than 0.50mm. It's working for other polylines also imported from the Sketcher.
In attachement is a basic test file I made with FreeCAD 0.17 and 0.18 on macOS.
Is it a bug or did I make a bad manipulation somewhere ?
OS: Mac OS X
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.13651 (Git)
Build type: Release
Branch: (HEAD detached at 4604bd9)
Hash: 4604bd9456688e6108b1b5f1a0dcc7f8d205555f
Python version: 2.7.14
Qt version: 5.10.1
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: English/UnitedStates (en_US)
Line width <0.5mm not exported to SVG in TechDraw Workbench
Forum rules
and Helpful information
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help
Also, be nice to others! Read the FreeCAD code of conduct!
Also, be nice to others! Read the FreeCAD code of conduct!
Re: Line width <0.5mm not exported to SVG in TechDraw Workbench
I can scale down to 0.1mm. Did you try enlarging the page view?
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.13651 (Git)
Build type: Release
Branch: (HEAD detached at 4604bd9)
Hash: 4604bd9456688e6108b1b5f1a0dcc7f8d205555f
Python version: 2.7.14
Qt version: 5.10.1
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: German/Germany (de_DE)
OS: Mac OS XWord size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.13651 (Git)
Build type: Release
Branch: (HEAD detached at 4604bd9)
Hash: 4604bd9456688e6108b1b5f1a0dcc7f8d205555f
Python version: 2.7.14
Qt version: 5.10.1
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: German/Germany (de_DE)
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
- wandererfan
- Veteran
- Posts: 6326
- Joined: Tue Nov 06, 2012 5:42 pm
- Contact:
Re: Line width <0.5mm not exported to SVG in TechDraw Workbench
You're using a DraftView to display a Sketch. I'm surprised it worked at all. Sketches are not Draft objects.
If you use regular TD View you can make the line any width you want.
There does seem to be something odd about the line width for a DraftView. Maybe the conversion to pixels in Draft??
- wandererfan
- Veteran
- Posts: 6326
- Joined: Tue Nov 06, 2012 5:42 pm
- Contact:
Re: Line width <0.5mm not exported to SVG in TechDraw Workbench
This is the issue. Draft.getSVG scales the LineWidth (LineWidth = LineWidth/Scale) then uses the result as a Svg stroke-width in pixels. So your 0.5 mm LineWidth gets converted to 0.5px before display.
The line is in the exported Svg file even with a width < 0.5.
Stoke width = 0 is never drawn by Svg, but I don't know what the rules are for displaying a line < 1/2 px in width.