From d7a41b860dff625c06e65b7a90178fd5738f7944 Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Thu, 6 Aug 2026 21:26:18 +0200 Subject: [PATCH] Clarify layer parameters in doc. --- src/doc/doc/programming/ruby_pcells.xml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/doc/doc/programming/ruby_pcells.xml b/src/doc/doc/programming/ruby_pcells.xml index d068d3ef5..d407ff4e6 100644 --- a/src/doc/doc/programming/ruby_pcells.xml +++ b/src/doc/doc/programming/ruby_pcells.xml @@ -288,12 +288,21 @@ end

+

+ Layer parameters are "optional" is a sense that the value can always be set to "empty" by the user. + "Empty" layers have a value that is "anonymous". In general it + is a good idea to check production code for an anonymous layer info and skip shape generation + in that case. Empty layers can be present if a PCell is freshly initialized or the layer is + not yet given by the user. A PCell should behave nicely in that case and not empty any polygons + to a non-existing layer. +

+

After the PCell initialization is finished, we can start with the production code. These are the methods that KLayout will call on certain opportunities. The first method that a PCell must implement is the