diff --git a/src/lay/lay/doc/about/25d_screenshot.png b/src/lay/lay/doc/about/25d_screenshot.png index 1796a0573..32c96174e 100644 Binary files a/src/lay/lay/doc/about/25d_screenshot.png and b/src/lay/lay/doc/about/25d_screenshot.png differ diff --git a/src/lay/lay/doc/about/25d_screenshot2.png b/src/lay/lay/doc/about/25d_screenshot2.png new file mode 100644 index 000000000..5c988166f Binary files /dev/null and b/src/lay/lay/doc/about/25d_screenshot2.png differ diff --git a/src/lay/lay/doc/about/25d_view.xml b/src/lay/lay/doc/about/25d_view.xml index a23667f30..48a399e15 100644 --- a/src/lay/lay/doc/about/25d_view.xml +++ b/src/lay/lay/doc/about/25d_view.xml @@ -18,97 +18,187 @@

- To open the view, use "Tools/2.5d View". Currently, the performance is limited, a rough number for a + Currently, the performance is limited, a rough number for a practical limit is around 100k polygons. The 2.5d view is only available, if KLayout was compiled with OpenGL support.

+

+ In order to use the tool, you will need a script generating the material stack. + Such a script is a variant of a DRC script (see ). + The DRC language is used to import or generate polygon layers which are then + extruded and placed on a certain z level. +

+ +

+ To create a new script, use "Tools/2.5d View/New 2.5d Script". This will create a new script in the + macro editor. +

+ +

+ A simple script is this one. It takes two layers - 1/0 and 2/0 - and extrudes then in a + stacked fashion, the first with 200nm thickness and the second one with 300nm: +

+ +
+z(input(1, 0), zstart: 0.1.um, height: 200.nm)  # extrudes layer 1/0 to a height of 200nm starting at z=100nm
+z(input(2, 0), height: 300.nm)                  # adds layer 2/0 for the next 300nm
+
+ +

+ To run the script, use the "Run" button from the macro IDE or pick the script + from the script list in the "Tools/2.5d View" menu. If your script is not shown in that + menu, check if it is configured to be bound to a menu item. +

+ +

+ After the script was executed, the 2.5d window is displayed. If you closed that window, you can + re-open it with "Tools/2.5d View/Open Window". The window will show the layout section visible + in the layout view. To refresh the scene - also after changing the script - either run the script + again from the macro IDE or use the green "re-run" button in the upper left corner of the 2.5d view + window. +

+

-

Setup

+

2.5d Script Anatomy

- The 2.5d view needs a technology setup explaining the way the layers are transformed into planes. - The setup is provided within a technology. Open the technology manager (File/Manage Technologies) and - navigate to the "Z Stack (2.5d)" component. The setup is basically a list of entries listing the - layer from which to take the shapes and the depth information. -

- -

- Each entry is a single line. Empty lines are ignored. Everything after a '#' character is - considered a comment. -

- -

- Each specification line consists of a layer specification, a colon and arguments. - The arguments are named (like "x=...") or in serial. Parameters are separated by comma or blanks. - Named arguments are: + As mentioned, a 2.5d script is a variant of a DRC script. You can basically use all features + of DRC, specifically boolean operations. Some practical restrictions exist:

- 'height', 'zstart' and 'zstop' can be used in any combination. If no value is given for 'zstart', - the upper level of the previous layer will be used. + 2.5d scripts utilizes the DRC language with these two additional functions: +

+ + + +

"z" Function (plane extrusion)

+ + +

+ The layer argument of the function is a DRC layer which is rendered as an extruded sheet. + Further arguments control the height, z location and colors. + When used inside the "zz" block, the color options of the "z" calls are ignored and + taken from "zz" instead.

- If a single unnamed parameter is given, it corresponds to 'height'. Two parameters correspond to - 'zstart' and 'zstop'. + Options for this function are:

+ +

- Here are some examples: + Examples for the extrusion options:

-
1: 0.5 1.5                    # extrude layer 1/0 from 0.5 to 1.5 vertically\n"
-1/0: 0.5 1.5                  # same with explicit datatype\n"
-1: zstop=1.5, zstart=0.5      # same with named parameters\n"
-1: height=1.0, zstop=1.5      # same with z stop minus height\n"
-1: 1.0 zstop=1.5              # same with height as unnamed parameter\n"
-  
- -

Variables

- -

- You can declare variables inside the setup files and use them in formulas for - computed values. Variables are defined and set with the "var" keyword on a single line. - The notation follows the "expression" syntax used in many other places inside KLayout - (). -

- -

- Here is an example: -

- -
var hmetal = 0.48\n"
-7/0: 0.5 0.5+hmetal*2        # 2x thick metal\n"
+  
+z(layer, 0.1 .. 0.2)                extrude layer to z = 0.1 to 0.2 um
+z(layer, zstart: 0.1, zstop: 0.2)   same as above
+z(layer, zstart: 0.1, height: 0.1)  same as above, but with height instead of zstop
+z(layer, height: 200.nm)            extrude layer from last z position with a height of 200nm
 
-

Conditionals

-

- For more flexibility, but of little practical use for now, conditionals are provided. - "if", "else", "elsif" and "end" for as in other languages, e.g. Ruby: + Examples for display options:

-
var thick_m1 = true
-if thickm1
-  1: 0.5 1.5
-else
-  1: 0.5 1.2
+  
+z(..., color: 0xff0000)             use bright red for the material color (RGB)
+z(..., frame: 0xff0000)             use bright red for the frame color (combine with "fill" for the fill color)
+z(..., fill: 0x00ff00)              use bright green for the fill color along (combine with "frame" for the frame color)
+z(..., like: "7/0")                 borrow style from layout view's style for layer "7/0"
+z(..., name: "M1")                  assigns a name to show for the material 
+
+ +

"zz" Function (material groups)

+ + +

+ The "zz" function forms a display group which clusters multiple "z" calls. The basic usage is with a block + containing the "z" calls. As DRC scripts are Ruby, the notation for the block is either "do .. end" or + curly brackets immediately after the "zz" call: +

+ +
+zz( display options ... ) do
+  z(layer1, extrusion options ... )
+  z(layer2, extrusion options ... )
+  ...
 end
 
+

+ The "z" calls do not need to have colors or other display options as they are + taken from "zz". +

+ +

+ Material groups allow forming more complex, stacked geometries. Here is an example + forming a simple FinFET geometry using boolean and a sizing operation: +

+ +
+poly = input(2, 0)
+active = input(1, 0)
+
+z(poly, zstart: 0, height: 20.nm, name: "POLY")
+
+zz(name: "ACTIVE", like: "1/0") do
+  
+  poly_sized = poly.sized(10.nm)
+  active_over_poly_sized = poly_sized & active
+  
+  z(active - poly, zstart: 0, height: 10.nm)       # bottom sheet
+  z(active_over_poly_sized - poly, height: 10.nm)  # center sheet
+  z(active_over_poly_sized, height: 10.nm)         # top sheet
+
+end
+
+ +

+ Which renders this result: +

+ +

+ +

+

Navigating the 2.5d View

- navigation - 2.5d navigation + +

The navigation is based on the movement of the camera while the scene is @@ -159,7 +249,7 @@ end made invisible in the 2.5d view.

-

Other controls

+

Other Controls

The left zoom slider changes the overall scale factor. The right slider only changes the z (height) axis zoom factor. @@ -176,5 +266,13 @@ end front view, top view etc.

+

Material Visibility

+ +

+ Using the check boxes from the material view right of the scene view you can disable + materials, so they are no longer rendered. From the material list's context menu, + you can hide or show all materials or just the selected ones. +

+ diff --git a/src/lay/lay/layHelpResources.qrc b/src/lay/lay/layHelpResources.qrc index 06524e1f5..a853c8b3d 100644 --- a/src/lay/lay/layHelpResources.qrc +++ b/src/lay/lay/layHelpResources.qrc @@ -49,6 +49,7 @@ doc/about/packages.xml doc/about/25d_view.xml doc/about/25d_screenshot.png + doc/about/25d_screenshot2.png doc/manual/adjust_origin.xml