[solved] Dashed lines become continuous in printed layout viewport

If you are having problems with QCAD, post here. Please report bugs through our Bug Tracker instead.

Always attach your original DXF or DWG file and mentions your QCAD version and the platform you are on.

Moderator: andrew

Forum rules

Always indicate your operating system and QCAD version.

Attach drawing files and screenshots.

Post one question per topic.

Post Reply
eugenesia
Newbie Member
Posts: 5
Joined: Sun Feb 20, 2022 4:27 am

[solved] Dashed lines become continuous in printed layout viewport

Post by eugenesia » Sun Feb 20, 2022 5:04 am

Hi all,

I am having an issue where my dashed lines are showing as continuous, when shown in a layout viewport and the layout printed. I have tried various line widths, linetypes, viewport linetype scales, and also printed it out to paper, to no avail. Appreciate if someone could tell me if there is a way around it. Thanks!

How to reproduce:
  1. Create a new file and add a layer to the Model Space.
  2. On the layer, draw some point-to-point lines. The lines should automatically have their lineweight and linetype set to "By Layer".
  3. Set the layer's lineweight to "0.25mm (ISO)", and linetype to "ISO dash space"
    Layer_linetype_dashed.png
    Model Space - set layer linetype to dashed
    Layer_linetype_dashed.png (185.77 KiB) Viewed 5945 times
  4. Go to the default layout "Layout1" in Paper Space
  5. Add a viewport that covers your shape. Turn on "Screen-based Linetypes".
  6. In the layout, your shape should appear with dashed lines
    Layout_add_viewport.png
    Paper Space - viewport shows dashed line
    Layout_add_viewport.png (171.5 KiB) Viewed 5945 times
  7. Print the layout (Paper Space) to paper, or export to PDF
  8. Expected result: Printout (on paper) or PDF should show the shape with dashed lines
  9. Actual result: Printout (on paper) and PDF show the shape with continuous lines
    Print_layout.png
    Layout exported to PDF
    Print_layout.png (46.8 KiB) Viewed 5945 times
  10. Note: If I print the Model Space, the line shows correctly as dashed. However what I want to print is the layout (Paper Space), as I want to compose a number of viewports at different scales (e.g. a larger area location plan at 1:1250 and a smaller area site plan at 1:500) into a single page
Please see DXF drawing file with the problematic shape and layout:
Dashed_test.dxf
Shape with dashed lines
(98.35 KiB) Downloaded 237 times
My software details:
  • Operating system: Mac OS X Big Sur 11.4 (also tried on Windows 10 with similar results)
  • QCAD version: 3.27.1.0 for Mac (also tried same version on Windows 10 with similar results)
Best regards,
Eugene
Last edited by eugenesia on Thu Mar 03, 2022 1:26 am, edited 1 time in total.

eugenesia
Newbie Member
Posts: 5
Joined: Sun Feb 20, 2022 4:27 am

Re: Dashed lines become continuous in printed layout viewport

Post by eugenesia » Sun Feb 20, 2022 7:28 am

I just realised that I'm working in metres, and I needed to change the linetype scale.

I changed the global linetype scale from 1 to 1000 (as recommended in the tutorial https://www.qcad.org/en/tutorial-workin ... _not_Shown ).

The dashed lines are now showing in the exported PDF.

Problem solved?

User avatar
Husky
Moderator/Drawing Help/Testing
Posts: 4935
Joined: Wed May 11, 2011 9:25 am
Location: USA

Re: Dashed lines become continuous in printed layout viewport

Post by Husky » Sun Feb 20, 2022 8:36 am

eugenesia wrote:
Sun Feb 20, 2022 7:28 am
Problem solved?
I'm not convinced by that - it was working without changing the global linetype scale in previos QCAD Pro versions (e.g. 3.24.0.0)
Work smart, not hard: QCad Pro
Win10/64, QcadPro, QcadCam version: Current.
If a thread is considered as "solved" please change the title of the first post to "[solved] Title..."

User avatar
andrew
Site Admin
Posts: 9037
Joined: Fri Mar 30, 2007 6:07 am

Re: Dashed lines become continuous in printed layout viewport

Post by andrew » Sun Feb 20, 2022 10:58 am

Add a viewport that covers your shape. Turn on "Screen-based Linetypes".
This is at least part of the problem. Screen-based line types means that linetypes are optimized for the screen, not for printing. So the print preview now shows something that looks good on the screen but not what will be printed.

eugenesia
Newbie Member
Posts: 5
Joined: Sun Feb 20, 2022 4:27 am

Re: Dashed lines become continuous in printed layout viewport

Post by eugenesia » Mon Feb 21, 2022 12:41 am

Thanks Husky and Andrew for your quick responses - that was some food for thought. I did a test with different settings to see what works:
  1. Settings: Screen-based Linetypes ON, Global Linetype Scale 1
    Result:
    • Screen shows dashed lines
    • Exported PDF shows continuous lines - WRONG
  2. Settings: Screen-based Linetypes ON, Global Linetype Scale 1000
    Result:
    • Screen shows dashed lines
    • Exported PDF shows dashed lines - CORRECT
  3. Settings: Screen-based Linetypes OFF, Global Linetype Scale 1
    Result:
    • Screen shows continuous lines
    • Exported PDF shows continuous lines - WRONG
  4. Settings: Screen-based Linetypes OFF, Global Linetype Scale 1000
    Result:
    • Screen shows continuous lines
    • Exported PDF shows dashed lines - CORRECT
My conclusions are:
  • Screen-based Linetypes only causes the lines to be shown as dashed on screen. They do not affect the exported PDF nor printed output.
  • Global Linetype Scale affects the exported PDF and printed output. If using metres as units, the Global Linetype Scale needs to be set to a large number such as 1000, to show dashed lines in the exported PDF and printed output.
I am chiefly interested in the exported PDF and paper-printed output correctly showing dashed lines. Hence I think I have my answer: we need to set the Global Linetype Scale correctly especially when using metres as drawing units.

Is this correct? If so I think I am OK to mark this question as "solved". Thanks everyone for your inputs and help.

Best regards,
Eugene

eugenesia
Newbie Member
Posts: 5
Joined: Sun Feb 20, 2022 4:27 am

Re: Dashed lines become continuous in printed layout viewport

Post by eugenesia » Mon Feb 21, 2022 1:17 am

Did another drawing with drawing unit set to "millimeter", and Global Linetype Scale set to 1 - see attached
Mm_test.dxf
Drawing unit millimeter, Global Linetype Scale 1
(98.23 KiB) Downloaded 233 times
I drew some lines and set the layer linetype to a dashed type. Then created a viewport within the layout.

When the layout was exported to PDF, the line shows correctly as dashed.

Conclusion:
  • When using drawing unit of "millimeter", it is OK to leave Global Linetype Scale set to 1. Dashed lines will show correctly in the exported PDF (and probably printed output) of the layout.
  • When using drawing unit of "meter", you will need to set Global Linetype Scale to a large number e.g. 1000, for dashed lines to show correctly in the exported PDF (and printed output) of the layout.

User avatar
Husky
Moderator/Drawing Help/Testing
Posts: 4935
Joined: Wed May 11, 2011 9:25 am
Location: USA

Re: Dashed lines become continuous in printed layout viewport

Post by Husky » Mon Feb 21, 2022 1:54 am

eugenesia wrote:
Mon Feb 21, 2022 1:17 am
  • When using drawing unit of "millimeter", it is OK to leave Global Linetype Scale set to 1. Dashed lines will show correctly in the exported PDF (and probably printed output) of the layout.
Nope it isn't ok. :( You may try to do another test with your mm drawing and an example rectangle of 130000 by 190000. Spoiler alarm - it fails again.

BTW: I assume this is something which has to be fixed within the coding and not within a user setting. I've a hunch what makes me thinking that this issue is more complex than it looks like ... :shock:
Work smart, not hard: QCad Pro
Win10/64, QcadPro, QcadCam version: Current.
If a thread is considered as "solved" please change the title of the first post to "[solved] Title..."

eugenesia
Newbie Member
Posts: 5
Joined: Sun Feb 20, 2022 4:27 am

Re: [solved] Dashed lines become continuous in printed layout viewport

Post by eugenesia » Thu Mar 03, 2022 1:30 am

Thank you so much Husky. I think I get what your point is, the drawing unit selected doesn't matter, it's how much real-world distance you are trying to squeeze into the page.

The dashed lines only show up on a millimetre-level on a 1:1 scale. When trying to squeeze several metres or kilometres onto a small A4 size-page, scaling down happens, and the dashes end up getting squeezed together into a continuous line.

The answer therefore is to scale the lines UP when your drawing gets scaled DOWN.

I will try the example scenario you pointed out and report my results if I have time.

For now, as the problem with my specific use case has been resolved, I have updated the post title with "[solved]".

Thanks again!
Eugene

Post Reply

Return to “QCAD Troubleshooting and Problems”