The problem is: when copying over a cell from one layout to another, the full tree is copied always. If multiple cells are copied, common subcells are not shared, not duplicated.
A solution is required to provide multi-cell copies while sharing common subcells. The "multi_clip_into" feature for example provides this ability already.
The solution consists of two methods: Cellmapping#for_multi_cells_full will create the target structure and prepare a mapping table and Layout#copy_tree_shapes will copy the shapes.
Here is some sample code:
l = ... # source layout
lt = ... # target layout
target_cells = ... # array of cell indexes to which cells to copy (in target layout)
source_cell = ... # array of cell indexes from which cells to copy (in source layout)
# NOTE: target_cells.size must be equal to source_cells.size
# Prepare a cell mapping (this will also create the necessary subcells in the target layout)
cm = RBA::CellMapping::new
cm.for_multi_cells_full(lt, target_cells, l, source_cells)
# Copy the cell's shapes
The text was updated successfully, but these errors were encountered: