Closed sebastian-goeldi closed 4 days ago
The PR fixes a segfault in the fill_tiled function by introducing a temporary layout and cell to handle fill operations. Instead of directly modifying the target cell during the filling process, the changes are first applied to a temporary cell and then transferred to the target cell in a controlled manner.
sequenceDiagram
participant FillOperator
participant temp_ly as Temporary Layout
participant temp_tc as Temporary Cell
participant top_cell as Top Cell
participant fill_cell as Fill Cell
fill_tiled->>FillOperator: Create FillOperator instance
FillOperator->>temp_ly: Start changes
FillOperator->>temp_tc: fill_region_multi or fill_region
FillOperator->>temp_ly: End changes
FillOperator->>temp_tc: Iterate each_inst
temp_tc->>top_cell: Insert cell_inst_array
fill_tiled->>FillOperator: insert_fill()
FillOperator->>top_cell: Insert fill cell into regions
classDiagram
class FillOperator {
+list<kdb.Cell> filled_cells
+kdb.Layout temp_ly
+kdb.Cell temp_tc
+kdb.Cell temp_fc
+int temp_fc_ind
+void insert_fill()
}
FillOperator : fill_region_multi(region, fill_cell_index, fc_bbox, row_step, column_step, fill_margin, glue_box)
FillOperator : fill_region(region, fill_cell_index, fc_bbox, row_step, column_step, fill_margin, glue_box)
note for FillOperator "New attributes and method added to handle temporary layout and cell operations"
Change | Details | Files |
---|---|---|
Introduce temporary layout and cell handling for fill operations |
|
src/kfactory/utils/fill.py |
Add new method to safely transfer fill instances |
|
src/kfactory/utils/fill.py |
Refactor fill_tiled function structure |
|
src/kfactory/utils/fill.py |
fix https://github.com/KLayout/klayout/issues/1929
Summary by Sourcery
Bug Fixes: