From a20bd38f17c68a1bdb544dc5b2b79cfcf7522c19 Mon Sep 17 00:00:00 2001
From: Matthias Koefferlein Usage:
@@ -554,6 +554,39 @@ delivered by polygon_layer is not.
On the other hand, a layer created by the make_layer method is not intended to be
filled with Layer#insert.
Usage:
+In deep mode, polygons with a bounding box to polygon area ratio bigger than the given number
+will be split into smaller chunks to optimize performance (which gets better if the polygon's
+bounding boxes do not cover a lot of empty space).
+The default threshold is 3.0 which means fairly compact polygons. Use this method with a numeric
+argument to set the value and without an argument to get the current maximum area ratio.
+Set the value to zero to disable splitting by area ratio.
+
+See also max_vertex_count for the other option affecting polygon splitting.
+ Usage:
+In deep mode, polygons with more than the given number of vertexes will be split into
+smaller chunks to optimize performance (which is better or less complex polygons).
+The default threshold is 16 vertexes. Use this method with a vertex count to set the
+value and without an argument to get the current maximum vertex count.
+Set the value to zero to disable splitting by vertex count.
+
+See also max_area_ratio for the other option affecting polygon splitting.
+ Usage: Usage:
If using threads, tiles are distributed on multiple CPU cores for
parallelization. Still, all tiles must be processed before the
-operation proceeds with the next statement.
+operation proceeds with the next statement.
+
+Without an argument, "threads" will return the current number of
+threads
Usage:
The tile border specifies the distance to which shapes are collected into the
diff --git a/src/lay/lay/doc/about/drc_ref_layer.xml b/src/lay/lay/doc/about/drc_ref_layer.xml
index 439fb74bd..fe5f8f27c 100644
--- a/src/lay/lay/doc/about/drc_ref_layer.xml
+++ b/src/lay/lay/doc/about/drc_ref_layer.xml
@@ -627,6 +627,38 @@ If the layer is a hierarchical layer (an original layer or
a derived layer in deep mode), this method will convert it
to a flat collection of texts, polygons, edges or edge pairs.
Usage:
+KLayout's DRC engine is imperative. This means, every command is executed immediately
+rather than being compiled and executed later. The advantage of this approach is that
+it allows decisions to be taken depending on the content of a layer and to code
+functions that operate directly on the layer's content.
+
+However, one drawback is that the engine cannot decide when a layer is no longer
+required - it may still be used later in the script. So a layer's data is not cleaned
+up automatically.
+
+In order to save memory for DRC scripts intended for bigger layouts, the DRC script
+should clean up layers as soon as they are no longer required. The "forget" method
+will free the memory used for the layer's information.
+
+The recommended approach is:
+
+
-
"max_area_ratio" - Gets or sets the maximum bounding box to polygon area ratio for deep mode fragmentation
+
+
+"max_vertex_count" - Gets or sets the maximum vertex count for deep mode fragmentation
+
+
+"mos3" - Supplies the MOS3 transistor extractor class
"tile_borders" - Specifies a minimum tile border
-
"forget" - Cleans up memory for this layer
+
+
+
+l = ... # compute some layer
+...
+# once you're done with l:
+l.forget
+l = nil
+
+
+By setting the layer to nil, it is ensured that it can no longer be accessed. +
Usage: