mirror of https://github.com/KLayout/klayout.git
Allowing PCell layer parameters without default (-> empty)
This commit is contained in:
parent
7ac51337ca
commit
e766b12c3e
|
|
@ -408,7 +408,7 @@ module RBA
|
|||
|
||||
# get the layer definitions
|
||||
def get_layers(parameters)
|
||||
@layer_param_index.collect { |i| parameters[i] }
|
||||
@layer_param_index.collect { |i| parameters[i] || RBA::LayerInfo::new }
|
||||
end
|
||||
|
||||
# coerce parameters (make consistent)
|
||||
|
|
|
|||
|
|
@ -430,7 +430,10 @@ class _PCellDeclarationHelper(pya.PCellDeclaration):
|
|||
"""
|
||||
layers = []
|
||||
for i in self._layer_param_index:
|
||||
layers.append(parameters[i])
|
||||
if parameters[i] is not None:
|
||||
layers.append(parameters[i])
|
||||
else:
|
||||
layers.append(pya.LayerInfo())
|
||||
return layers
|
||||
|
||||
def callback(self, layout, name, states):
|
||||
|
|
|
|||
|
|
@ -263,7 +263,7 @@ static std::vector<db::LayerProperties> get_layer_declarations_native (const db:
|
|||
std::vector<db::PCellLayerDeclaration> lp = pd->db::PCellDeclaration::get_layer_declarations (parameters);
|
||||
std::vector<db::LayerProperties> ret;
|
||||
for (std::vector<db::PCellLayerDeclaration>::const_iterator l = lp.begin (); l != lp.end (); ++l) {
|
||||
ret.push_back (db::LayerProperties(*l));
|
||||
ret.push_back (db::LayerProperties (*l));
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue