of the layout. This handles all the #complicated work of finding shapes in the current cell and #all child cells. reg.insert(layout.begin_shapes(cell, layer_indexes[idx]))
of the layout. This handles all the #complicated work of finding shapes in the current cell. reg.insert(layout.begin_shapes(cell,layer_indexes[idx])) total_area += reg.area(
Usually maintaining the hierarchy helps. Simply adding two layers can be done cell wise (Layout#copy_layer does this in case you stay inside the same layout object). Deep mode may be an option. The ke
There was a discussion about this here: https://www.klayout.de/forum/discussion/comment/9350#Comment_9350. There is a small Python script implementing auto-save.
You can cut shapes into parts using "Edit/Selection/Separate into Inside/Outside". There is a discussion about this: https://www.klayout.de/forum/discussion/comment/8963#Comment_8963