Zoom by percent?

edited January 2014 in General
Hi,
I want to print my layout directly on a transparency for a home made mask. However, the print feature allows only for the "current view" and it does not show the drawing in its "actual size". It does not even show the zoom percentage anywhere and hence I can not adjust it to 100%.
Is there any workaround to get this done? May be I am missing something very straightforward.

Comments

  • edited November -1

    Hi,

    the print function is intended to produce a printout document in the sense of a screenshot, not a mask. So there is no functionality related to your requirements. You may be able to reuse the screenshot functionality for your purpose - using a script it is possible to create a image file which contains the single layer you want to print, omits all the decoration and comes in the scale you need it.

    Still that's kind of tinkering. Given the poor accuracy of printers, the printout is likely not to meet your requirements regarding scale fidelity, overlay accuracy and critical dimension tolerances.

    Matthias

  • edited November -1
    Thanks,
    I don't think there is, but I wonder if there is some indirect way to export the design to say a postscript or pdf file?
  • edited November -1

    Hi,

    I sorry, but there isn't. GDS already is the final format in the VLSI world and KLayout is supposed to be a viewer and editor for that format. It's not quite common to use PDF/Postscript or similar, specifically since those formats are pretty inefficient and hardly capable to handle the specific requirements for that purpose. Since PDF or Postscript renderers will themselves produce a bitmap in the end, it won't make a big difference whether you use a high-resolution bitmap or Postscript/PDF.

    Matthias

  • edited January 2014
    Hi tanuj,
    you can create a high-quality-plot of your layout by using save_image:

    RBA::Application.instance.main_window.current_view.save_image(plotfilename.to_s,img_factor_w * plotscale.to_i,img_factor_h * plotscale.to_i)

    img_factor... was calculated as follows:
    # resolution of target png
    vpdpi=96
    # um per inch
    vpinum=25400
    # viewport: width/height (pixels), scale (pixel per um)
    vpwidth = RBA::Application.instance.main_window.current_view.viewport_width
    vpheight = RBA::Application.instance.main_window.current_view.viewport_height
    vpumtopix = RBA::Application.instance.main_window.current_view.viewport_trans.mag

    # img_factor: width/height (pixel) for a 1X-scaled plot at 96 dpi
    img_factor_w = (vpdpi.to_f/vpinum)*(vpwidth.to_f/vpumtopix)
    img_factor_h = (vpdpi.to_f/vpinum)*(vpheight.to_f/vpumtopix)

    final scale of your plot has to be defined as plotscale, included in the
    save_image-call as above.

    to get the plot-filename:

    if $plotdir.to_s.length == 0 then
    $plotdir="C:\\temp"
    end
    plotfilename = RBA::FileDialog.get_save_file_name("KLayout Plot", $plotdir.to_s, "PNG-Files (*.png)")

    printing the resulting .png (from some image-viewer) will result in a correctly scaled plot if you
    set plot-options similar to "plot: original size according to dpi of .png"
    and the resolution of .png to 96x96dpi

    Attention: 32bit KLayout crashed when the number of pixels in x or y exceeded 10000.
    For our application, i limited resolution to 10000, never checked if this applies to
    64bit KLayout too.
    (10000 pixels result in a plotsize of 2,6m @96dpi, not really a limit for us).

    hope this helps
    Stefan
Sign In or Register to comment.