View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002283 | Drawing | Bug | public | 2015-09-29 16:50 | 2017-02-03 23:31 |
Reporter | pkoning2 | Assigned To | yorik | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | Mac | OS | Mac OS | OS Version | 10.10 |
Product Version | 0.15 | ||||
Summary | 0002283: Drawing::FeatureViewPart LineWidth should not be scaled | ||||
Description | I 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... | ||||
Tags | No tags attached. | ||||
|
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... |
|
Forum thread: https://forum.freecadweb.org/viewtopic.php?f=10&t=20150 |
|
> 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 |
|
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? |
|
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). |
|
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. |
|
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. |
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 |