View Issue Details

IDProjectCategoryView StatusLast Update
0002283DrawingBugpublic2017-02-03 23:31
Reporterpkoning2 Assigned Toyorik  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformMacOSMac OSOS Version10.10
Product Version0.15 
Target VersionFixed in Version 
Summary0002283: Drawing::FeatureViewPart LineWidth should not be scaled
DescriptionI would expect the LineWidth attribute of Drawing::FeatureViewPart to be the actual line width, and indeed the preview shown in FreeCAD looks that way. But when I export to SVG, the SVG line width is scaled by the reciprocal of the object scale factor. So if I have the Part scaled by 0.01 (because the original is drawn in 1:1 scale) and I set line width to 0.5, I end up with a line width of 50 in the exported graphic.
I can adjust for this when setting the line width in my script, but if I do that, the line width ends up so small that the preview no longer shows any lines...
TagsNo tags attached.

Activities

yorik

2016-01-31 19:12

administrator   ~0006788

I see no other way to achieve the correct result, though...

The user who will enter "line width: 0.35" in the GUI will want a line width of 0.35, no matter the scale. If the line is inside a group scaled at 0.1x, we have no other way than setting the line width at 35.

This might maybe be considered a flaw of the SVG, but I don't see what else we can do at FreeCAD level...

Kunda1

2017-01-23 13:29

administrator   ~0007918

Forum thread: https://forum.freecadweb.org/viewtopic.php?f=10&t=20150

Kunda1

2017-02-02 00:33

administrator   ~0008160

> line widths are not scaled in [TechDraw]
Per @wandererfan in https://forum.freecadweb.org/viewtopic.php?f=10&t=20342#p157399
Context: Drawing is planned to be deprecated after 0.17 in favor of TechDraw

pkoning2

2017-02-02 18:26

reporter   ~0008179

Thanks for the note about TechDraw.

The question is about the intent. It could be either a specific absolute width, or a width that's intended to be a fraction of the drawn objects. The latter translates to: scaling doesn't affect the visual appearance of the drawing.

I was expecting the latter. In drawing applications, typically when you scale an object, the outline thickness is scaled also, so the result is an object which is a different size but the black / white proportions are unchanged.

One could argue for either. The "preserve appearance" form is what I was hoping for, especially because I draw at 1:1 but I don't have 70 meters of paper to print on. And given that I have to scale by a factor of 50 or so, the resulting printout ends up entirely unusable if the line width is taken as an absolute value.

Would it be possible to have an option to select the desired mode, as is done in applications like Adobe Illustrator?

ian.rees

2017-02-03 05:15

developer   ~0008185

Just to expand on WandererFan's response - the old Drawing and the new TechDraw are fundamentally different with regards to line widths. This issue shouldn't be associated with TechDraw.

Illustrator is a vector graphics program, where it makes sense to preserve the appearance of the graphic during scaling. I don't think typical CAD packages scale line widths based on object size (or hard copy size for that matter, but I have very little experience with commercial mechanical CAD).

In the old Drawing, the 2D object shown on the screen was an SVG object, so the line width shown on screen related to what would appear in the saved file, or on prints made based on that file. In the old TechDraw, it could make sense to work like pkoning2 described, where the "virtual paper" is 1:1 with the 3D object, then the scaling happens at printing or whatever.

That workflow doesn't make sense with TechDraw - the "virtual paper" is 1:1 with the resulting hard copy. So, the scaling happens when the 3D model is projected 2D - before there are lines. In general, rendering is much fancier in TechDraw; there's not necessarily a fixed relationship between the width of a line on the screen, and the width of the printed line.

I can't think of a fundamental reason a "line scaling mode" couldn't be made in TechDraw, but am having a hard time imagining a use case for one (and therefore what exactly it would do).

pkoning2

2017-02-03 21:05

reporter   ~0008196

Thanks for that explanation. It does suggest that the problem I ran into should not exist in TechDraw. Given that and the fact that Drawing is being deprecated, it may make sense to close this issue.

ian.rees

2017-02-03 21:17

developer   ~0008197

pkoning2 - thanks for the report, and for following up!

If you find that TechDraw doesn't work for you, certainly feel free to make another bug/forum post/etc.

Issue History

Date Modified Username Field Change
2015-09-29 16:50 pkoning2 New Issue
2015-10-06 19:37 wmayer Project FreeCAD => Drawing
2016-01-31 19:12 yorik Note Added: 0006788
2016-01-31 19:12 yorik Assigned To => yorik
2016-01-31 19:12 yorik Status new => feedback
2017-01-23 13:29 Kunda1 Note Added: 0007918
2017-01-23 13:30 Kunda1 Tag Attached: #pending
2017-02-02 00:33 Kunda1 Note Added: 0008160
2017-02-02 18:26 pkoning2 Note Added: 0008179
2017-02-02 18:26 pkoning2 Status feedback => assigned
2017-02-03 05:15 ian.rees Note Added: 0008185
2017-02-03 21:05 pkoning2 Note Added: 0008196
2017-02-03 21:17 ian.rees Note Added: 0008197
2017-02-03 21:17 ian.rees Status assigned => closed
2017-02-03 21:17 ian.rees Resolution open => fixed
2017-02-03 23:31 Kunda1 Tag Detached: #pending