View Issue Details

IDProjectCategoryView StatusLast Update
0001920DrawingFeaturepublic2018-09-16 11:45
Reportertriplus Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionwon't fix 
PlatformLinuxOSUbuntuOS Version14.04
Summary0001920: Drawing scale and stroke-dasharray
DescriptionI could not provide feedback to closed report therefore i opened a new report: 0001773

SVG linestyles are now configurable in Draft WB preferences and that is great! I would expect this setting to be available in Drawing WB preferences but nonetheless it is now possible to set desired stroke-dasharray under FreeCAD preferences and that is nice addition.

From the original report:

"I'm not sure if/how it is possible to have scale-independent dashes in SVG, but I'll have a look."

This part still is not implemented therefore settings in preferences will still scale stroke-dasharray based on the drawing view scale used.

The most elegant solution would be to use vector-effect="non-scaling-stroke":

http://www.w3.org/TR/SVGTiny12/painting.html#NonScalingStroke

And it actually works quite good in QtSvg and Firefox but ATM it is not supported in for example Inkscape or default Ubuntu image viewer. Lack of support in Inkscape is in my opinion to big drawback to use this attribute ATM.

Best cross-software solution therefore for the time being would be to take scale into consideration and set stroke-dasharray based on that. The same behaviour as the current situation with stroke-width.

Example rectangle scale 1:

<?xml version="1.0" encoding="UTF-8"?>

<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
    width="420mm"
    height="297mm"
    viewBox="0 0 420 297">
<!-- Working space 0 0 420 297 -->
<g id="ViewRectangle" transform="rotate(0.0,100.0,200.0) translate(100.0,200.0) scale(1.0,-1.0)"><path id="Rectangle_w0000" d="M 0.0 0.0 L 100.0 0.0 L 100.0 100.0 L 0.0 100.0 L 0.0 0.0 " stroke="#000000" stroke-width="0.35 px" style="stroke-width:0.35;stroke-miterlimit:4;stroke-dasharray:0.09,0.05;fill:none;fill-rule: evenodd "/>
</g>


</svg>

Example rectangle scale 100:

<?xml version="1.0" encoding="UTF-8"?>

<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
    width="420mm"
    height="297mm"
    viewBox="0 0 420 297">
<!-- Working space 0 0 420 297 -->
<g id="ViewRectangle" transform="rotate(0.0,100.0,200.0) translate(100.0,200.0) scale(100.0,-100.0)"><path id="Rectangle_w0000" d="M 0.0 0.0 L 100.0 0.0 L 100.0 100.0 L 0.0 100.0 L 0.0 0.0 " stroke="#000000" stroke-width="0.0035 px" style="stroke-width:0.0035;stroke-miterlimit:4;stroke-dasharray:0.09,0.05;fill:none;fill-rule: evenodd "/>
</g>


</svg>

Observe the stroke-width and stroke-dasharray attribute:

Scale 1 stroke-width:0.35
            stroke-dasharray:0.09,0.05
Scale 100 stroke-width:0.0035
            stroke-dasharray:0.09,0.05

At scale 100 stroke-dasharray:0.09,0.05 would need to be set like this stroke-dasharray:0.0009,0.0005.

More sane default values should be used and Scale 1 should be the default target under preferences. Something like stroke-dasharray:9,5 for example.
TagsNo tags attached.

Relationships

related to 0001863 closed Global preference for drawing line width 
related to 0001921 closed Drawing view hidden lines and stroke-dasharray 

Activities

triplus

2015-01-16 11:38

developer   ~0005659

"I would expect this setting to be available in Drawing WB preferences but nonetheless it is now possible to set desired stroke-dasharray under FreeCAD preferences and that is nice addition."

Not true. This is about Draft object "projected" on drawing page and therefore it makes sense to control them in Draft preferences.

Kunda1

2017-02-02 00:35

administrator   ~0008161

See related tickets 0001921 & 0001863

wandererfan

2018-09-16 11:45

manager   ~0011755

Line widths & styles are controlled by Draft module, not Drawing module.

Issue History

Date Modified Username Field Change
2015-01-16 10:14 triplus New Issue
2015-01-16 11:38 triplus Note Added: 0005659
2017-01-14 01:16 Kunda1 Relationship added related to 0001921
2017-02-02 00:27 Kunda1 Relationship added related to 0001863
2017-02-02 00:35 Kunda1 Note Added: 0008161
2017-02-02 00:36 Kunda1 Description Updated
2017-02-02 00:38 Kunda1 Status new => confirmed
2018-09-16 11:45 wandererfan Status confirmed => closed
2018-09-16 11:45 wandererfan Resolution open => won't fix
2018-09-16 11:45 wandererfan Note Added: 0011755