Notation used in Ruby API documentation
Module: db
Description: The layout object
This object represents a layout. The layout object contains the cell hierarchy and adds functionality for managing cell names and layer names. The cell hierarchy can be changed by adding cells and cell instances. Cell instances will virtually put the content of a cell into another cell. Many cell instances can be put into a cell thus forming repetitions of the cell content. This process can be repeated over multiple levels. In effect a cell graphs is created with parent cells and child cells. The graph must not be recursive, so there is at least one top cell, which does not have a parent cell. Multiple top cells can be present.
Layout is the very basic class of the layout database. It has a rich set of methods to manipulate and query the layout hierarchy, the geometrical objects, the meta information and other features of the layout database. For a discussion of the basic API and the related classes see The Database API.
Usually layout objects have already been created by KLayout's application core. You can address such a layout via the CellView object inside the LayoutView class. For example:
active_layout = RBA::CellView::active.layout puts "Top cell of current layout is #{active_layout.top_cell.name}"
However, a layout can also be used standalone:
layout = RBA::Layout::new cell = layout.create_cell("TOP") layer = layout.layer(RBA::LayerInfo::new(1, 0)) cell.shapes(layer).insert(RBA::Box::new(0, 0, 1000, 1000)) layout.write("single_rect.gds")
new Layout ptr | new | (Manager manager) | Creates a layout object attached to a manager |
new Layout ptr | new | Creates a layout object | |
new Layout ptr | new | (bool editable, Manager manager) | Creates a layout object attached to a manager |
new Layout ptr | new | (bool editable) | Creates a layout object |
[const] | Layout ptr | _const_cast | Returns a non-const reference to self. | |
void | _create | Ensures the C++ object is created | ||
void | _destroy | Explicitly destroys the object | ||
[const] | bool | _destroyed? | Returns a value indicating whether the object was already destroyed | |
[const] | bool | _is_const_object? | Returns a value indicating whether the reference is a const reference | |
void | _manage | Marks the object as managed by the script side. | ||
void | _unmanage | Marks the object as no longer owned by the script side. | ||
unsigned int | add_lib_cell | (Library ptr library, unsigned int lib_cell_index) | Imports a cell from the library | |
void | add_meta_info | (const LayoutMetaInfo info) | Adds meta information to the layout | |
unsigned int | add_pcell_variant | (unsigned int pcell_id, map<string,variant> parameters) | Creates a PCell variant for the given PCell ID with the parameters given as a name/value dictionary | |
unsigned int | add_pcell_variant | (unsigned int pcell_id, variant[] parameters) | Creates a PCell variant for the given PCell ID with the given parameters | |
unsigned int | add_pcell_variant | (Library ptr library, unsigned int pcell_id, map<string,variant> parameters) | Creates a PCell variant for a PCell located in an external library with the parameters given as a name/value dictionary | |
unsigned int | add_pcell_variant | (Library ptr library, unsigned int pcell_id, variant[] parameters) | Creates a PCell variant for a PCell located in an external library | |
void | assign | (const Layout other) | Assigns another object to self | |
[const] | RecursiveShapeIterator | begin_shapes | (const Cell ptr cell, unsigned int layer) | Delivers a recursive shape iterator for the shapes below the given cell on the given layer |
void | break_polygons | (unsigned long max_vertex_count, double max_area_ratio) | Breaks the polygons of the layout into smaller ones | |
void | break_polygons | (unsigned int layer, unsigned long max_vertex_count, double max_area_ratio) | Breaks the polygons of the layer into smaller ones | |
Cell ptr | cell | (string name) | Gets a cell object from the cell name | |
[const] | const Cell ptr | cell | (string name) | Gets a cell object from the cell name (const version) |
Cell ptr | cell | (unsigned int i) | Gets a cell object from the cell index | |
[const] | const Cell ptr | cell | (unsigned int i) | Gets a cell object from the cell index (const version) |
[const] | string | cell_name | (unsigned int index) | Gets the name for a cell with the given index |
[const] | unsigned int | cells | Returns the number of cells | |
Cell ptr[] | cells | (string name_filter) | Gets the cell objects for a given name filter | |
[const] | const Cell ptr[] | cells | (string name_filter) | Gets the cell objects for a given name filter (const version) |
void | cleanup | (unsigned int[] cell_indexes_to_keep = []) | Cleans up the layout | |
void | clear | Clears the layout | ||
void | clear_all_meta_info | Clears all meta information of the layout (cell specific and global) | ||
void | clear_layer | (unsigned int layer_index) | Clears a layer | |
void | clear_layer | (const LayerInfo layer) | Clears a layer | |
void | clear_layer | (unsigned int layer_index, unsigned int flags) | Clears a layer (given shape types only) | |
void | clear_layer | (const LayerInfo layer, unsigned int flags) | Clears a layer (given shape types only) | |
void | clear_meta_info | Clears the meta information of the layout | ||
unsigned int | clip | (unsigned int cell, const Box box) | Clips the given cell by the given rectangle and produce a new cell with the clip | |
unsigned int | clip | (unsigned int cell, const DBox box) | Clips the given cell by the given rectangle and produce a new cell with the clip | |
Cell ptr | clip | (const Cell cell, const Box box) | Clips the given cell by the given rectangle and produce a new cell with the clip | |
Cell ptr | clip | (const Cell cell, const DBox box) | Clips the given cell by the given rectangle and produce a new cell with the clip | |
[const] | unsigned int | clip_into | (unsigned int cell, Layout ptr target, const Box box) | Clips the given cell by the given rectangle and produce a new cell with the clip |
[const] | unsigned int | clip_into | (unsigned int cell, Layout ptr target, const DBox box) | Clips the given cell by the given rectangle and produce a new cell with the clip |
[const] | Cell ptr | clip_into | (const Cell cell, Layout ptr target, const Box box) | Clips the given cell by the given rectangle and produce a new cell with the clip |
[const] | Cell ptr | clip_into | (const Cell cell, Layout ptr target, const DBox box) | Clips the given cell by the given rectangle and produce a new cell with the clip |
unsigned int | convert_cell_to_static | (unsigned int cell_index) | Converts a PCell or library cell to a usual (static) cell | |
void | copy_layer | (unsigned int src, unsigned int dest) | Copies a layer | |
void | copy_layer | (unsigned int src, unsigned int dest, unsigned int flags) | Copies a layer (selected shape types only) | |
void | copy_meta_info | (const Layout other) | Copies the meta information from the other layout into this layout | |
void | copy_meta_info | (const Layout other, const CellMapping cm) | Copies the meta information from the other layout into this layout for the cells given by the cell mapping | |
void | copy_tree_shapes | (const Layout source_layout, const CellMapping cell_mapping) | Copies the shapes for all given mappings in the CellMapping object | |
void | copy_tree_shapes | (const Layout source_layout, const CellMapping cell_mapping, const LayerMapping layer_mapping) | Copies the shapes for all given mappings in the CellMapping object using the given layer mapping | |
Cell ptr | create_cell | (string name) | Creates a cell with the given name | |
Cell ptr | create_cell | (string pcell_name, map<string,variant> params) | Creates a cell as a PCell variant for the PCell with the given name | |
Cell ptr | create_cell | (string name, string lib_name) | Creates a cell with the given name | |
Cell ptr | create_cell | (string pcell_name, string lib_name, map<string,variant> params) | Creates a cell for a PCell with the given PCell name from the given library | |
[const] | double | dbu | Gets the database unit | |
void | dbu= | (double dbu) | Sets the database unit | |
void | delete_cell | (unsigned int cell_index) | Deletes a cell | |
void | delete_cell_rec | (unsigned int cell_index) | Deletes a cell plus all subcells | |
void | delete_cells | (unsigned int[] cell_index_list) | Deletes multiple cells | |
void | delete_layer | (unsigned int layer_index) | Deletes a layer | |
void | delete_layer | (const LayerInfo layer) | Deletes a layer | |
void | delete_property | (variant key) | Deletes the user property with the given key | |
[const] | new Layout ptr | dup | Creates a copy of self | |
[iter] | Cell | each_cell | Iterates the unsorted cell list | |
[iter] | unsigned int | each_cell_bottom_up | Iterates the bottom-up sorted cell list | |
[iter] | unsigned int | each_cell_top_down | begin iterator of the top-down sorted cell list | |
[const,iter] | LayoutMetaInfo | each_meta_info | Iterates over the meta information of the layout | |
[iter] | unsigned int | each_top_cell | Iterates the top cells | |
void | end_changes | Cancels the "in changes" state (see "start_changes") | ||
[const] | unsigned int | error_layer | Returns the index of the error layer | |
variant | find_layer | (const LayerInfo info) | Finds a layer with the given properties | |
variant | find_layer | (string name) | Finds a layer with the given name | |
variant | find_layer | (int layer, int datatype) | Finds a layer with the given layer and datatype number | |
variant | find_layer | (int layer, int datatype, string name) | Finds a layer with the given layer and datatype number and name | |
void | flatten | (unsigned int cell_index, int levels, bool prune) | Flattens the given cell | |
void | flatten_into | (unsigned int source_cell_index, unsigned int target_cell_index, const ICplxTrans trans, int levels) | Flattens the given cell into another cell | |
[const] | LayerInfo | get_info | (unsigned int index) | Gets the info structure for a specified layer |
[const] | unsigned int | guiding_shape_layer | Returns the index of the guiding shape layer | |
bool | has_cell? | (string name) | Returns true if a cell with a given name exists | |
[const] | bool | has_prop_id? | Returns true, if the layout has user properties | |
void | insert | (unsigned int cell_index, int layer, const Region region) | Inserts a region into the given cell and layer | |
void | insert | (unsigned int cell_index, int layer, const Edges edges) | Inserts an edge collection into the given cell and layer | |
void | insert | (unsigned int cell_index, int layer, const EdgePairs edge_pairs) | Inserts an edge pair collection into the given cell and layer | |
void | insert | (unsigned int cell_index, int layer, const Texts texts) | Inserts an text collection into the given cell and layer | |
unsigned int | insert_layer | (const LayerInfo props) | Inserts a new layer with the given properties | |
void | insert_layer_at | (unsigned int index, const LayerInfo props) | Inserts a new layer with the given properties at the given index | |
unsigned int | insert_special_layer | (const LayerInfo props) | Inserts a new special layer with the given properties | |
void | insert_special_layer_at | (unsigned int index, const LayerInfo props) | Inserts a new special layer with the given properties at the given index | |
[const] | bool | is_editable? | Returns a value indicating whether the layout is editable. | |
[const] | bool | is_free_layer? | (unsigned int layer_index) | Returns true, if a layer index is a free (unused) layer index |
[const] | bool | is_special_layer? | (unsigned int layer_index) | Returns true, if a layer index is a special layer index |
[const] | bool | is_valid_cell_index? | (unsigned int cell_index) | Returns true, if a cell index is a valid index |
[const] | bool | is_valid_layer? | (unsigned int layer_index) | Returns true, if a layer index is a valid normal layout layer index |
unsigned int | layer | Creates a new internal layer | ||
unsigned int | layer | (const LayerInfo info) | Finds or creates a layer with the given properties | |
unsigned int | layer | (string name) | Finds or creates a layer with the given name | |
unsigned int | layer | (int layer, int datatype) | Finds or creates a layer with the given layer and datatype number | |
unsigned int | layer | (int layer, int datatype, string name) | Finds or creates a layer with the given layer and datatype number and name | |
[const] | unsigned int[] | layer_indexes | Gets a list of valid layer's indices | |
[const] | LayerInfo[] | layer_infos | Gets a list of valid layer's properties | |
[const] | unsigned int | layers | Returns the number of layers | |
[const] | Library ptr | library | Gets the library this layout lives in or nil if the layout is not part of a library | |
void | merge_meta_info | (const Layout other) | Merges the meta information from the other layout into this layout | |
void | merge_meta_info | (const Layout other, const CellMapping cm) | Merges the meta information from the other layout into this layout for the cells given by the cell mapping | |
new LayoutMetaInfo ptr | meta_info | (string name) | Gets the meta information for a given name | |
variant | meta_info_value | (string name) | Gets the meta information value for a given name | |
void | move_layer | (unsigned int src, unsigned int dest) | Moves a layer | |
void | move_layer | (unsigned int src, unsigned int dest, unsigned int flags) | Moves a layer (selected shape types only) | |
void | move_tree_shapes | (Layout source_layout, const CellMapping cell_mapping) | Moves the shapes for all given mappings in the CellMapping object | |
void | move_tree_shapes | (Layout source_layout, const CellMapping cell_mapping, const LayerMapping layer_mapping) | Moves the shapes for all given mappings in the CellMapping object using the given layer mapping | |
unsigned int[] | multi_clip | (unsigned int cell, Box[] boxes) | Clips the given cell by the given rectangles and produces new cells with the clips, one for each rectangle. | |
unsigned int[] | multi_clip | (unsigned int cell, DBox[] boxes) | Clips the given cell by the given rectangles and produces new cells with the clips, one for each rectangle. | |
Cell ptr[] | multi_clip | (const Cell cell, Box[] boxes) | Clips the given cell by the given rectangles and produces new cells with the clips, one for each rectangle. | |
Cell ptr[] | multi_clip | (const Cell cell, DBox[] boxes) | Clips the given cell by the given rectangles and produces new cells with the clips, one for each rectangle. | |
unsigned int[] | multi_clip_into | (unsigned int cell, Layout ptr target, Box[] boxes) | Clips the given cell by the given rectangles and produces new cells with the clips, one for each rectangle. | |
unsigned int[] | multi_clip_into | (unsigned int cell, Layout ptr target, DBox[] boxes) | Clips the given cell by the given rectangles and produces new cells with the clips, one for each rectangle. | |
Cell ptr[] | multi_clip_into | (const Cell cell, Layout ptr target, Box[] boxes) | Clips the given cell by the given rectangles and produces new cells with the clips, one for each rectangle. | |
Cell ptr[] | multi_clip_into | (const Cell cell, Layout ptr target, DBox[] boxes) | Clips the given cell by the given rectangles and produces new cells with the clips, one for each rectangle. | |
[const] | const PCellDeclaration ptr | pcell_declaration | (string name) | Gets a reference to the PCell declaration for the PCell with the given name |
[const] | const PCellDeclaration ptr | pcell_declaration | (unsigned int pcell_id) | Gets a reference to the PCell declaration for the PCell with the given PCell ID. |
[const] | unsigned int | pcell_id | (string name) | Gets the ID of the PCell with the given name |
[const] | unsigned int[] | pcell_ids | Gets the IDs of the PCells registered in the layout | |
[const] | string[] | pcell_names | Gets the names of the PCells registered in the layout | |
[const] | unsigned long | prop_id | Gets the properties ID associated with the layout | |
void | prop_id= | (unsigned long id) | Sets the properties ID associated with the layout | |
[const] | variant | properties | Gets the Layout's user properties as a hash | |
[const] | variant[] | properties_array | (unsigned long properties_id) | Gets the properties set for a given properties ID |
[const] | variant | properties_hash | (unsigned long properties_id) | Gets the properties set for a given properties ID as a hash |
unsigned long | properties_id | (variant[] properties) | Gets the properties ID for a given properties set | |
unsigned long | properties_id | (map<variant,variant> properties) | Gets the properties ID for a given properties set | |
[const] | variant | property | (variant key) | Gets the Layout's user property with the given key |
void | prune_cell | (unsigned int cell_index, int levels) | Deletes a cell plus subcells not used otherwise | |
void | prune_subcells | (unsigned int cell_index, int levels) | Deletes all sub cells of the cell which are not used otherwise down to the specified level of hierarchy | |
LayerMap | read | (string filename) | Load the layout from the given file | |
LayerMap | read | (string filename, const LoadLayoutOptions options) | Load the layout from the given file with options | |
void | refresh | Calls Cell#refresh on all cells inside this layout | ||
unsigned int | register_pcell | (string name, PCellDeclaration ptr declaration) | Registers a PCell declaration under the given name | |
void | remove_meta_info | (string name) | Removes meta information from the layout | |
void | rename_cell | (unsigned int index, string name) | Renames the cell with given index | |
void | scale_and_snap | (Cell cell, int grid, int mult, int div) | Scales and snaps the layout below a given cell by the given rational factor and snaps to the given grid | |
void | scale_and_snap | (unsigned int cell_index, int grid, int mult, int div) | Scales and snaps the layout below a given cell by the given rational factor and snaps to the given grid | |
void | set_info | (unsigned int index, const LayerInfo props) | Sets the info structure for a specified layer | |
void | set_property | (variant key, variant value) | Sets the user property with the given key to the given value | |
void | start_changes | Signals the start of an operation bringing the layout into invalid state | ||
void | swap_layers | (unsigned int a, unsigned int b) | Swap two layers | |
[const] | const Technology ptr | technology | Gets the Technology object of the technology this layout is associated with or nil if the layout is not associated with a technology | |
[const] | string | technology_name | Gets the name of the technology this layout is associated with | |
void | technology_name= | (string name) | Sets the name of the technology this layout is associated with | |
Cell ptr | top_cell | Returns the top cell object | ||
[const] | const Cell ptr | top_cell | Returns the top cell object (const version) | |
Cell ptr[] | top_cells | Returns the top cell objects | ||
[const] | const Cell ptr[] | top_cells | Returns the top cell objects (const version) | |
void | transform | (const Trans trans) | Transforms the layout with the given transformation | |
void | transform | (const ICplxTrans trans) | Transforms the layout with the given complex integer transformation | |
void | transform | (const DTrans trans) | Transforms the layout with the given transformation, which is in micrometer units | |
void | transform | (const DCplxTrans trans) | Transforms the layout with the given complex integer transformation, which is in micrometer units | |
[const] | bool | under_construction? | Returns true if the layout object is under construction | |
[const] | string | unique_cell_name | (string name) | Creates a new unique cell name from the given name |
void | update | Updates the internals of the layout | ||
void | write | (string filename, const SaveLayoutOptions options) | Writes the layout to a stream file | |
void | write | (string filename) | Writes the layout to a stream file |
unsigned int | add_cell | (string name) | Use of this method is deprecated | |
[const] | RecursiveShapeIterator | begin_shapes | (unsigned int cell_index, unsigned int layer) | Use of this method is deprecated |
[const] | RecursiveShapeIterator | begin_shapes_overlapping | (unsigned int cell_index, unsigned int layer, Box region) | Use of this method is deprecated |
[const] | RecursiveShapeIterator | begin_shapes_overlapping | (const Cell ptr cell_index, unsigned int layer, Box region) | Use of this method is deprecated |
[const] | RecursiveShapeIterator | begin_shapes_overlapping | (unsigned int cell_index, unsigned int layer, DBox region) | Use of this method is deprecated |
[const] | RecursiveShapeIterator | begin_shapes_overlapping | (const Cell ptr cell, unsigned int layer, DBox region) | Use of this method is deprecated |
[const] | RecursiveShapeIterator | begin_shapes_touching | (unsigned int cell_index, unsigned int layer, Box region) | Use of this method is deprecated |
[const] | RecursiveShapeIterator | begin_shapes_touching | (const Cell ptr cell, unsigned int layer, Box region) | Use of this method is deprecated |
[const] | RecursiveShapeIterator | begin_shapes_touching | (unsigned int cell_index, unsigned int layer, DBox region) | Use of this method is deprecated |
[const] | RecursiveShapeIterator | begin_shapes_touching | (const Cell ptr cell, unsigned int layer, DBox region) | Use of this method is deprecated |
unsigned int | cell_by_name | (string name) | Use of this method is deprecated | |
void | create | Use of this method is deprecated. Use _create instead | ||
void | destroy | Use of this method is deprecated. Use _destroy instead | ||
[const] | bool | destroyed? | Use of this method is deprecated. Use _destroyed? instead | |
[const] | bool | is_const_object? | Use of this method is deprecated. Use _is_const_object? instead | |
[const] | unsigned int[] | layer_indices | Use of this method is deprecated. Use layer_indexes instead | |
[const] | variant[] | properties | (unsigned long properties_id) | Use of this method is deprecated. Use properties_array instead |
void | write | (string filename, bool gzip, const SaveLayoutOptions options) | Use of this method is deprecated |
_const_cast | Signature: [const] Layout ptr _const_cast Description: Returns a non-const reference to self. Basically, this method allows turning a const object reference to a non-const one. This method is provided as last resort to remove the constness from an object. Usually there is a good reason for a const object reference, so using this method may have undesired side effects. This method has been introduced in version 0.29.6. | ||||||||
_create | Signature: void _create Description: Ensures the C++ object is created Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created. | ||||||||
_destroy | Signature: void _destroy Description: Explicitly destroys the object Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception. If the object is not owned by the script, this method will do nothing. | ||||||||
_destroyed? | Signature: [const] bool _destroyed? Description: Returns a value indicating whether the object was already destroyed This method returns true, if the object was destroyed, either explicitly or by the C++ side. The latter may happen, if the object is owned by a C++ object which got destroyed itself. | ||||||||
_is_const_object? | Signature: [const] bool _is_const_object? Description: Returns a value indicating whether the reference is a const reference This method returns true, if self is a const reference. In that case, only const methods may be called on self. | ||||||||
_manage | Signature: void _manage Description: Marks the object as managed by the script side. After calling this method on an object, the script side will be responsible for the management of the object. This method may be called if an object is returned from a C++ function and the object is known not to be owned by any C++ instance. If necessary, the script side may delete the object if the script's reference is no longer required. Usually it's not required to call this method. It has been introduced in version 0.24. | ||||||||
_unmanage | Signature: void _unmanage Description: Marks the object as no longer owned by the script side. Calling this method will make this object no longer owned by the script's memory management. Instead, the object must be managed in some other way. Usually this method may be called if it is known that some C++ object holds and manages this object. Technically speaking, this method will turn the script's reference into a weak reference. After the script engine decides to delete the reference, the object itself will still exist. If the object is not managed otherwise, memory leaks will occur. Usually it's not required to call this method. It has been introduced in version 0.24. | ||||||||
add_cell | Signature: unsigned int add_cell (string name) Description: Adds a cell with the given name
Use of this method is deprecated From version 0.23 on this method is deprecated because another method exists which is more convenient because is returns a Cell object (create_cell). | ||||||||
add_lib_cell | Signature: unsigned int add_lib_cell (Library ptr library, unsigned int lib_cell_index) Description: Imports a cell from the library
This method imports the given cell from the library and creates a new proxy cell. The proxy cell acts as a pointer to the actual cell which still resides in the library (precisely: in library.layout). The name of the new cell will be the name of library cell. This method has been introduced in version 0.22. | ||||||||
add_meta_info | Signature: void add_meta_info (const LayoutMetaInfo info) Description: Adds meta information to the layout See LayoutMetaInfo for details about layouts and meta information. This method has been introduced in version 0.25. | ||||||||
add_pcell_variant | (1) Signature: unsigned int add_pcell_variant (unsigned int pcell_id, map<string,variant> parameters) Description: Creates a PCell variant for the given PCell ID with the parameters given as a name/value dictionary
This method will create a PCell variant proxy for a local PCell definition. It will create the PCell variant for the given parameters. Note that this method does not allow one to create PCell instances for PCells located in a library. Use add_pcell_variant with the library parameter for that purpose. Unlike the variant using a list of parameters, this version allows specification of the parameters with a key/value dictionary. The keys are the parameter names as given by the PCell declaration. The parameters are a sequence of variants which correspond to the parameters declared by the PCellDeclaration object. The name of the new cell will be the name of the PCell. If a cell with that name already exists, a new unique name is generated. This method has been introduced in version 0.22. | ||||||||
(2) Signature: unsigned int add_pcell_variant (unsigned int pcell_id, variant[] parameters) Description: Creates a PCell variant for the given PCell ID with the given parameters
This method will create a PCell variant proxy for a local PCell definition. It will create the PCell variant for the given parameters. Note that this method does not allow one to create PCell instances for PCells located in a library. Use add_pcell_variant with the library parameter for that purpose. The parameters are a sequence of variants which correspond to the parameters declared by the PCellDeclaration object. The name of the new cell will be the name of the PCell. If a cell with that name already exists, a new unique name is generated. This method has been introduced in version 0.22. | |||||||||
(3) Signature: unsigned int add_pcell_variant (Library ptr library, unsigned int pcell_id, map<string,variant> parameters) Description: Creates a PCell variant for a PCell located in an external library with the parameters given as a name/value dictionary
This method will import a PCell from a library and create a variant for the given parameter set. Technically, this method creates a proxy to the library and creates the variant inside that library. Unlike the variant using a list of parameters, this version allows specification of the parameters with a key/value dictionary. The keys are the parameter names as given by the PCell declaration. The parameters are a sequence of variants which correspond to the parameters declared by the PCellDeclaration object. The name of the new cell will be the name of the PCell. If a cell with that name already exists, a new unique name is generated. This method has been introduced in version 0.22. | |||||||||
(4) Signature: unsigned int add_pcell_variant (Library ptr library, unsigned int pcell_id, variant[] parameters) Description: Creates a PCell variant for a PCell located in an external library
This method will import a PCell from a library and create a variant for the given parameter set. Technically, this method creates a proxy to the library and creates the variant inside that library. The parameters are a sequence of variants which correspond to the parameters declared by the PCellDeclaration object. The name of the new cell will be the name of the PCell. If a cell with that name already exists, a new unique name is generated. This method has been introduced in version 0.22. | |||||||||
assign | Signature: void assign (const Layout other) Description: Assigns another object to self | ||||||||
begin_shapes | (1) Signature: [const] RecursiveShapeIterator begin_shapes (const Cell ptr cell, unsigned int layer) Description: Delivers a recursive shape iterator for the shapes below the given cell on the given layer
For details see the description of the RecursiveShapeIterator class. This version is convenience overload which takes a cell object instead of a cell index. This method is deprecated. Use Cell#begin_shapes_rec instead. This method has been added in version 0.24. | ||||||||
(2) Signature: [const] RecursiveShapeIterator begin_shapes (unsigned int cell_index, unsigned int layer) Description: Delivers a recursive shape iterator for the shapes below the given cell on the given layer
Use of this method is deprecated For details see the description of the RecursiveShapeIterator class. This method is deprecated. Use Cell#begin_shapes_rec instead. This method has been added in version 0.18. | |||||||||
begin_shapes_overlapping | (1) Signature: [const] RecursiveShapeIterator begin_shapes_overlapping (unsigned int cell_index, unsigned int layer, Box region) Description: Delivers a recursive shape iterator for the shapes below the given cell on the given layer using a region search
Use of this method is deprecated For details see the description of the RecursiveShapeIterator class. This version gives an iterator delivering shapes whose bounding box overlaps the given region. This method is deprecated. Use Cell#begin_shapes_rec_overlapping instead. This method has been added in version 0.18. | ||||||||
(2) Signature: [const] RecursiveShapeIterator begin_shapes_overlapping (const Cell ptr cell_index, unsigned int layer, Box region) Description: Delivers a recursive shape iterator for the shapes below the given cell on the given layer using a region search
Use of this method is deprecated For details see the description of the RecursiveShapeIterator class. This version gives an iterator delivering shapes whose bounding box overlaps the given region. It is convenience overload which takes a cell object instead of a cell index. This method is deprecated. Use Cell#begin_shapes_rec_overlapping instead. This method has been added in version 0.24. | |||||||||
(3) Signature: [const] RecursiveShapeIterator begin_shapes_overlapping (unsigned int cell_index, unsigned int layer, DBox region) Description: Delivers a recursive shape iterator for the shapes below the given cell on the given layer using a region search, the region given in micrometer units
Use of this method is deprecated For details see the description of the RecursiveShapeIterator class. This version gives an iterator delivering shapes whose bounding box overlaps the given region. This method is deprecated. Use Cell#begin_shapes_rec_overlapping instead. This variant has been added in version 0.25. | |||||||||
(4) Signature: [const] RecursiveShapeIterator begin_shapes_overlapping (const Cell ptr cell, unsigned int layer, DBox region) Description: Delivers a recursive shape iterator for the shapes below the given cell on the given layer using a region search, the region given in micrometer units
Use of this method is deprecated For details see the description of the RecursiveShapeIterator class. This version gives an iterator delivering shapes whose bounding box overlaps the given region. It is convenience overload which takes a cell object instead of a cell index. This method is deprecated. Use Cell#begin_shapes_rec_overlapping instead. This variant has been added in version 0.25. | |||||||||
begin_shapes_touching | (1) Signature: [const] RecursiveShapeIterator begin_shapes_touching (unsigned int cell_index, unsigned int layer, Box region) Description: Delivers a recursive shape iterator for the shapes below the given cell on the given layer using a region search
Use of this method is deprecated For details see the description of the RecursiveShapeIterator class. This version gives an iterator delivering shapes whose bounding box touches the given region. This method is deprecated. Use Cell#begin_shapes_rec_touching instead. This method has been added in version 0.18. | ||||||||
(2) Signature: [const] RecursiveShapeIterator begin_shapes_touching (const Cell ptr cell, unsigned int layer, Box region) Description: Delivers a recursive shape iterator for the shapes below the given cell on the given layer using a region search
Use of this method is deprecated For details see the description of the RecursiveShapeIterator class. This version gives an iterator delivering shapes whose bounding box touches the given region. It is convenience overload which takes a cell object instead of a cell index. This method is deprecated. Use Cell#begin_shapes_rec_touching instead. This method has been added in version 0.24. | |||||||||
(3) Signature: [const] RecursiveShapeIterator begin_shapes_touching (unsigned int cell_index, unsigned int layer, DBox region) Description: Delivers a recursive shape iterator for the shapes below the given cell on the given layer using a region search, the region given in micrometer units
Use of this method is deprecated For details see the description of the RecursiveShapeIterator class. This version gives an iterator delivering shapes whose bounding box touches the given region. This method is deprecated. Use Cell#begin_shapes_rec_touching instead. This variant has been added in version 0.25. | |||||||||
(4) Signature: [const] RecursiveShapeIterator begin_shapes_touching (const Cell ptr cell, unsigned int layer, DBox region) Description: Delivers a recursive shape iterator for the shapes below the given cell on the given layer using a region search, the region given in micrometer units
Use of this method is deprecated For details see the description of the RecursiveShapeIterator class. This version gives an iterator delivering shapes whose bounding box touches the given region. It is convenience overload which takes a cell object instead of a cell index. This method is deprecated. Use Cell#begin_shapes_rec_touching instead. This variant has been added in version 0.25. | |||||||||
break_polygons | (1) Signature: void break_polygons (unsigned long max_vertex_count, double max_area_ratio) Description: Breaks the polygons of the layout into smaller ones There are two criteria for splitting a polygon: a polygon is split into parts with less then 'max_vertex_count' points and an bounding box-to-polygon area ratio less than 'max_area_ratio'. The area ratio is supposed to render polygons whose bounding box is a better approximation. This applies for example to 'L' shape polygons. Using a value of 0 for either limit means that the respective limit isn't checked. Breaking happens by cutting the polygons into parts at 'good' locations. The algorithm does not have a specific goal to minimize the number of parts for example. The only goal is to achieve parts within the given limits. Breaking also applies to paths if their polygon representation satisfies the breaking criterion. In that case, paths are converted to polygons and broken into smaller parts. This variant applies breaking to all cells and layers. This method has been introduced in version 0.29.5. | ||||||||
(2) Signature: void break_polygons (unsigned int layer, unsigned long max_vertex_count, double max_area_ratio) Description: Breaks the polygons of the layer into smaller ones This variant applies breaking to all cells and the given layer. This method has been introduced in version 0.29.5. | |||||||||
cell | (1) Signature: Cell ptr cell (string name) Description: Gets a cell object from the cell name
If name is not a valid cell name, this method will return "nil". This method has been introduced in version 0.23 and replaces cell_by_name. | ||||||||
(2) Signature: [const] const Cell ptr cell (string name) Description: Gets a cell object from the cell name (const version)
If name is not a valid cell name, this method will return "nil". This method has been introduced in version 0.23 and replaces cell_by_name. This variant has been introduced in version 0.29.6. | |||||||||
(3) Signature: Cell ptr cell (unsigned int i) Description: Gets a cell object from the cell index
If the cell index is not a valid cell index, this method will raise an error. Use is_valid_cell_index? to test whether a given cell index is valid. | |||||||||
(4) Signature: [const] const Cell ptr cell (unsigned int i) Description: Gets a cell object from the cell index (const version)
If the cell index is not a valid cell index, this method will raise an error. Use is_valid_cell_index? to test whether a given cell index is valid. This variant has been introduced in version 0.29.6. | |||||||||
cell_by_name | Signature: unsigned int cell_by_name (string name) Description: Gets the cell index for a given name Use of this method is deprecated Returns the cell index for the cell with the given name. If no cell with this name exists, an exception is thrown. From version 0.23 on, a version of the cell method is provided which returns a Cell object for the cell with the given name or "nil" if the name is not valid. This method replaces cell_by_name and has_cell? | ||||||||
cell_name | Signature: [const] string cell_name (unsigned int index) Description: Gets the name for a cell with the given index | ||||||||
cells | (1) Signature: [const] unsigned int cells Description: Returns the number of cells
| ||||||||
(2) Signature: Cell ptr[] cells (string name_filter) Description: Gets the cell objects for a given name filter
This method has been introduced in version 0.27.3. | |||||||||
(3) Signature: [const] const Cell ptr[] cells (string name_filter) Description: Gets the cell objects for a given name filter (const version)
This method has been introduced in version 0.27.3. This variant has been introduced in version 0.29.6. | |||||||||
cleanup | Signature: void cleanup (unsigned int[] cell_indexes_to_keep = []) Description: Cleans up the layout This method will remove proxy objects that are no longer in use. After changing PCell parameters such proxy objects may still be present in the layout and are cached for later reuse. Usually they are cleaned up automatically, but in a scripting context it may be useful to clean up these cells explicitly. Use 'cell_indexes_to_keep' for specifying a list of cell indexes of PCell variants or library proxies you don't want to be cleaned up. This method has been introduced in version 0.25. | ||||||||
clear | Signature: void clear Description: Clears the layout Clears the layout completely. | ||||||||
clear_all_meta_info | Signature: void clear_all_meta_info Description: Clears all meta information of the layout (cell specific and global) See LayoutMetaInfo for details about layouts and meta information. This method has been introduced in version 0.28.16. | ||||||||
clear_layer | (1) Signature: void clear_layer (unsigned int layer_index) Description: Clears a layer
Clears the layer: removes all shapes. This method was introduced in version 0.19. | ||||||||
(2) Signature: void clear_layer (const LayerInfo layer) Description: Clears a layer
This variant takes a LayerInfo object to address the layer. It does nothing if no layer with these attributes exists. This variant was introduced in version 0.26.7. | |||||||||
(3) Signature: void clear_layer (unsigned int layer_index, unsigned int flags) Description: Clears a layer (given shape types only)
Clears the layer: removes all shapes for the given shape types. This method was introduced in version 0.28.9. | |||||||||
(4) Signature: void clear_layer (const LayerInfo layer, unsigned int flags) Description: Clears a layer (given shape types only)
This variant takes a LayerInfo object to address the layer. It does nothing if no layer with these attributes exists. This variant was introduced in version 0.26.7. | |||||||||
clear_meta_info | Signature: void clear_meta_info Description: Clears the meta information of the layout See LayoutMetaInfo for details about layouts and meta information. This method has been introduced in version 0.28.8. | ||||||||
clip | (1) Signature: unsigned int clip (unsigned int cell, const Box box) Description: Clips the given cell by the given rectangle and produce a new cell with the clip
This method will cut a rectangular region given by the box from the given cell. The clip will be stored in a new cell whose index is returned. The clip will be performed hierarchically. The resulting cell will hold a hierarchy of child cells, which are potentially clipped versions of child cells of the original cell. This method has been added in version 0.21. | ||||||||
(2) Signature: unsigned int clip (unsigned int cell, const DBox box) Description: Clips the given cell by the given rectangle and produce a new cell with the clip
This variant which takes a micrometer-unit box has been added in version 0.28. | |||||||||
(3) Signature: Cell ptr clip (const Cell cell, const Box box) Description: Clips the given cell by the given rectangle and produce a new cell with the clip
This variant which takes cell references instead of cell indexes has been added in version 0.28. | |||||||||
(4) Signature: Cell ptr clip (const Cell cell, const DBox box) Description: Clips the given cell by the given rectangle and produce a new cell with the clip
This variant which takes a micrometer-unit box and cell references has been added in version 0.28. | |||||||||
clip_into | (1) Signature: [const] unsigned int clip_into (unsigned int cell, Layout ptr target, const Box box) Description: Clips the given cell by the given rectangle and produce a new cell with the clip
This method will cut a rectangular region given by the box from the given cell. The clip will be stored in a new cell in the target layout. The clip will be performed hierarchically. The resulting cell will hold a hierarchy of child cells, which are potentially clipped versions of child cells of the original cell. Please note that it is important that the database unit of the target layout is identical to the database unit of the source layout to achieve the desired results.This method also assumes that the target layout holds the same layers than the source layout. It will copy shapes to the same layers than they have been on the original layout. This method has been added in version 0.21. | ||||||||
(2) Signature: [const] unsigned int clip_into (unsigned int cell, Layout ptr target, const DBox box) Description: Clips the given cell by the given rectangle and produce a new cell with the clip
This variant which takes a micrometer-unit box has been added in version 0.28. | |||||||||
(3) Signature: [const] Cell ptr clip_into (const Cell cell, Layout ptr target, const Box box) Description: Clips the given cell by the given rectangle and produce a new cell with the clip
This variant which takes cell references instead of cell indexes has been added in version 0.28. | |||||||||
(4) Signature: [const] Cell ptr clip_into (const Cell cell, Layout ptr target, const DBox box) Description: Clips the given cell by the given rectangle and produce a new cell with the clip
This variant which takes a micrometer-unit box and cell references has been added in version 0.28. | |||||||||
convert_cell_to_static | Signature: unsigned int convert_cell_to_static (unsigned int cell_index) Description: Converts a PCell or library cell to a usual (static) cell
This method will create a new cell which contains the static representation of the PCell or library proxy given by "cell_index". If that cell is not a PCell or library proxy, it won't be touched and the input cell index is returned. This method has been added in version 0.23. | ||||||||
copy_layer | (1) Signature: void copy_layer (unsigned int src, unsigned int dest) Description: Copies a layer
Copies a layer from the source to the destination layer. The destination layer is not cleared before, so that this method merges shapes from the source with the destination layer. This method was introduced in version 0.19. | ||||||||
(2) Signature: void copy_layer (unsigned int src, unsigned int dest, unsigned int flags) Description: Copies a layer (selected shape types only)
Copies a layer from the source to the destination layer. The destination layer is not cleared before, so that this method merges shapes from the source with the destination layer. This method variant has been introduced in version 0.28.9. | |||||||||
copy_meta_info | (1) Signature: void copy_meta_info (const Layout other) Description: Copies the meta information from the other layout into this layout See LayoutMetaInfo for details about cells and meta information. The meta information from this layout will be replaced by the meta information from the other layout. This method has been introduced in version 0.28.16. | ||||||||
(2) Signature: void copy_meta_info (const Layout other, const CellMapping cm) Description: Copies the meta information from the other layout into this layout for the cells given by the cell mapping See LayoutMetaInfo for details about cells and meta information. This method will use the source/target cell pairs from the cell mapping object and merge the meta information from each source cell from the 'other' layout into the mapped cell inside self. This method can be used with 'copy_tree_shapes' and similar to copy meta information in addition to the shapes. All cell-specific keys in this layout will be replaced by the respective values from the other layout. This method has been introduced in version 0.28.16. | |||||||||
copy_tree_shapes | (1) Signature: void copy_tree_shapes (const Layout source_layout, const CellMapping cell_mapping) Description: Copies the shapes for all given mappings in the CellMapping object
Provide a CellMapping object to specify pairs of cells which are mapped from the source layout to this layout. When constructing such a cell mapping object for example with CellMapping#for_multi_cells_full, use self as the target layout. During the cell mapping construction, the cell mapper will usually create a suitable target hierarchy already. After having completed the cell mapping, use copy_tree_shapes to copy over the shapes from the source to the target layout. This method has been added in version 0.26.8. | ||||||||
(2) Signature: void copy_tree_shapes (const Layout source_layout, const CellMapping cell_mapping, const LayerMapping layer_mapping) Description: Copies the shapes for all given mappings in the CellMapping object using the given layer mapping
Provide a CellMapping object to specify pairs of cells which are mapped from the source layout to this layout. When constructing such a cell mapping object for example with CellMapping#for_multi_cells_full, use self as the target layout. During the cell mapping construction, the cell mapper will usually create a suitable target hierarchy already. After having completed the cell mapping, use copy_tree_shapes to copy over the shapes from the source to the target layout. This method has been added in version 0.26.8. | |||||||||
create | Signature: void create Description: Ensures the C++ object is created Use of this method is deprecated. Use _create instead Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created. | ||||||||
create_cell | (1) Signature: Cell ptr create_cell (string name) Description: Creates a cell with the given name
If a cell with that name already exists, the unique name will be chosen for the new cell consisting of the given name plus a suitable suffix. This method has been introduce in version 0.23 and replaces add_cell. | ||||||||
(2) Signature: Cell ptr create_cell (string pcell_name, map<string,variant> params) Description: Creates a cell as a PCell variant for the PCell with the given name
PCells are instantiated by creating a PCell variant. A PCell variant is linked to the PCell and represents this PCell with a particular parameter set. This method will look up the PCell by the PCell name and create a new PCell variant for the given parameters. If the PCell has already been instantiated with the same parameters, the original variant will be returned. Hence this method is not strictly creating a cell - only if the required variant has not been created yet. The parameters are specified as a key/value dictionary with the names being the ones from the PCell declaration. If no PCell with the given name exists, nil is returned. This method has been introduce in version 0.24. | |||||||||
(3) Signature: Cell ptr create_cell (string name, string lib_name) Description: Creates a cell with the given name
Library cells are imported by creating a 'library proxy'. This is a cell which represents the library cell in the framework of the current layout. The library proxy is linked to the library and will be updated if the library cell is changed. This method will look up the cell by the given name in the specified library and create a new library proxy for this cell. If the same library cell has already been used, the original library proxy is returned. Hence, strictly speaking this method does not always create a new cell but may return a reference to an existing cell. If the library name is not valid, nil is returned. This method has been introduce in version 0.24. | |||||||||
(4) Signature: Cell ptr create_cell (string pcell_name, string lib_name, map<string,variant> params) Description: Creates a cell for a PCell with the given PCell name from the given library
This method will look up the PCell by the PCell name in the specified library and create a new PCell variant for the given parameters plus the library proxy. The parameters must be specified as a key/value dictionary with the names being the ones from the PCell declaration. If no PCell with the given name exists or the library name is not valid, nil is returned. Note that this function - despite the name - may not always create a new cell, but return an existing cell if the PCell from the library has already been used with the given parameters. This method has been introduce in version 0.24. | |||||||||
dbu | Signature: [const] double dbu Description: Gets the database unit The database unit is the value of one units distance in micrometers. For numerical reasons and to be compliant with the GDS2 format, the database objects use integer coordinates. The basic unit of these coordinates is the database unit. You can convert coordinates to micrometers by multiplying the integer value with the database unit. Typical values for the database unit are 0.001 micrometer (one nanometer). Python specific notes: | ||||||||
dbu= | Signature: void dbu= (double dbu) Description: Sets the database unit See dbu for a description of the database unit. Python specific notes: | ||||||||
delete_cell | Signature: void delete_cell (unsigned int cell_index) Description: Deletes a cell
This deletes a cell but not the sub cells of the cell. These subcells will likely become new top cells unless they are used otherwise. All instances of this cell are deleted as well. Hint: to delete multiple cells, use "delete_cells" which is far more efficient in this case. This method has been introduced in version 0.20. | ||||||||
delete_cell_rec | Signature: void delete_cell_rec (unsigned int cell_index) Description: Deletes a cell plus all subcells
This deletes a cell and also all sub cells of the cell. In contrast to prune_cell, all cells are deleted together with their instances even if they are used otherwise. This method has been introduced in version 0.20. | ||||||||
delete_cells | Signature: void delete_cells (unsigned int[] cell_index_list) Description: Deletes multiple cells
This deletes the cells but not the sub cells of these cells. These subcells will likely become new top cells unless they are used otherwise. All instances of these cells are deleted as well. This method has been introduced in version 0.20. | ||||||||
delete_layer | (1) Signature: void delete_layer (unsigned int layer_index) Description: Deletes a layer
This method frees the memory allocated for the shapes of this layer and remembers the layer's index for reuse when the next layer is allocated. | ||||||||
(2) Signature: void delete_layer (const LayerInfo layer) Description: Deletes a layer
This variant takes a LayerInfo object to address the layer. It does nothing if no layer with these attributes exists. This variant was introduced in version 0.26.7. | |||||||||
delete_property | Signature: void delete_property (variant key) Description: Deletes the user property with the given key This method is a convenience method that deletes the property with the given key. It does nothing if no property with that key exists. Using that method is more convenient than creating a new property set with a new ID and assigning that properties ID. This method may change the properties ID. This method has been introduced in version 0.24. | ||||||||
destroy | Signature: void destroy Description: Explicitly destroys the object Use of this method is deprecated. Use _destroy instead Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception. If the object is not owned by the script, this method will do nothing. | ||||||||
destroyed? | Signature: [const] bool destroyed? Description: Returns a value indicating whether the object was already destroyed Use of this method is deprecated. Use _destroyed? instead This method returns true, if the object was destroyed, either explicitly or by the C++ side. The latter may happen, if the object is owned by a C++ object which got destroyed itself. | ||||||||
dup | Signature: [const] new Layout ptr dup Description: Creates a copy of self Python specific notes: | ||||||||
each_cell | Signature: [iter] Cell each_cell Description: Iterates the unsorted cell list | ||||||||
each_cell_bottom_up | Signature: [iter] unsigned int each_cell_bottom_up Description: Iterates the bottom-up sorted cell list In bottom-up traversal a cell is not delivered before the last child cell of this cell has been delivered. The bottom-up iterator does not deliver cells but cell indices actually. | ||||||||
each_cell_top_down | Signature: [iter] unsigned int each_cell_top_down Description: begin iterator of the top-down sorted cell list The top-down cell list has the property of delivering all cells before they are instantiated. In addition the first cells are all top cells. There is at least one top cell. The top-down iterator does not deliver cells but cell indices actually. | ||||||||
each_meta_info | Signature: [const,iter] LayoutMetaInfo each_meta_info Description: Iterates over the meta information of the layout See LayoutMetaInfo for details about layouts and meta information. This method has been introduced in version 0.25. | ||||||||
each_top_cell | Signature: [iter] unsigned int each_top_cell Description: Iterates the top cells A layout may have an arbitrary number of top cells. The usual case however is that there is one top cell. | ||||||||
end_changes | Signature: void end_changes Description: Cancels the "in changes" state (see "start_changes") | ||||||||
error_layer | Signature: [const] unsigned int error_layer Description: Returns the index of the error layer The error layer is used to place error texts on it, for example when a PCell evaluation fails. This method has been added in version 0.23.13. | ||||||||
find_layer | (1) Signature: variant find_layer (const LayerInfo info) Description: Finds a layer with the given properties If a layer with the given properties already exists, this method will return the index of that layer.If no such layer exists, it will return nil. In contrast to layer, this method will also find layers matching by name only. For example: # finds layer '17/0' and 'name (17/0)': index = layout.find_layer(RBA::LayerInfo::new(17, 0)) # finds layer 'name' (first priority), but also 'name (17/0)' (second priority): index = layout.find_layer(RBA::LayerInfo::new('name')) # note that this will not match layer 'name (17/0)' and create a new name-only layer: index = layout.layer(RBA::LayerInfo::new('name')) This method has been introduced in version 0.23 and has been extended to name queries in version 0.28.11. | ||||||||
(2) Signature: variant find_layer (string name) Description: Finds a layer with the given name If a layer with the given name already exists, this method will return the index of that layer.If no such layer exists, it will return nil. In contrast to layer, this method will also find numbered layers if the name matches. For example: # finds layer 'name' (first priority), but also 'name (17/0)' (second priority): index = layout.find_layer('name') # note that this will not match layer 'name (17/0)' and create a new name-only layer: index = layout.layer('name') This method has been introduced in version 0.23 and has been extended to name queries in version 0.28.11. | |||||||||
(3) Signature: variant find_layer (int layer, int datatype) Description: Finds a layer with the given layer and datatype number If a layer with the given layer/datatype already exists, this method will return the index of that layer.If no such layer exists, it will return nil. This method has been introduced in version 0.23. | |||||||||
(4) Signature: variant find_layer (int layer, int datatype, string name) Description: Finds a layer with the given layer and datatype number and name If a layer with the given layer/datatype/name already exists, this method will return the index of that layer.If no such layer exists, it will return nil. This method has been introduced in version 0.23. | |||||||||
flatten | Signature: void flatten (unsigned int cell_index, int levels, bool prune) Description: Flattens the given cell
This method propagates all shapes and instances from the specified number of hierarchy levels below into the given cell. It also removes the instances of the cells from which the shapes came from, but does not remove the cells themselves if prune is set to false. If prune is set to true, these cells are removed if not used otherwise. This method has been introduced in version 0.20. | ||||||||
flatten_into | Signature: void flatten_into (unsigned int source_cell_index, unsigned int target_cell_index, const ICplxTrans trans, int levels) Description: Flattens the given cell into another cell
This method works like 'flatten', but allows specification of a target cell which can be different from the source cell plus a transformation which is applied for all shapes and instances in the target cell. In contrast to the 'flatten' method, the source cell is not modified. This method has been introduced in version 0.24. | ||||||||
get_info | Signature: [const] LayerInfo get_info (unsigned int index) Description: Gets the info structure for a specified layer If the layer index is not a valid layer index, an empty LayerProperties object will be returned. | ||||||||
guiding_shape_layer | Signature: [const] unsigned int guiding_shape_layer Description: Returns the index of the guiding shape layer The guiding shape layer is used to store guiding shapes for PCells. This method has been added in version 0.22. | ||||||||
has_cell? | Signature: bool has_cell? (string name) Description: Returns true if a cell with a given name exists Returns true, if the layout has a cell with the given name | ||||||||
has_prop_id? | Signature: [const] bool has_prop_id? Description: Returns true, if the layout has user properties This method has been introduced in version 0.24. | ||||||||
insert | (1) Signature: void insert (unsigned int cell_index, int layer, const Region region) Description: Inserts a region into the given cell and layer If the region is (conceptionally) a flat region, it will be inserted into the cell's shapes list as a flat sequence of polygons. If the region is a deep (hierarchical) region, it will create a subhierarchy below the given cell and its shapes will be put into the respective cells. Suitable subcells will be picked for inserting the shapes. If a hierarchy already exists below the given cell, the algorithm will try to reuse this hierarchy. This method has been introduced in version 0.26. | ||||||||
(2) Signature: void insert (unsigned int cell_index, int layer, const Edges edges) Description: Inserts an edge collection into the given cell and layer If the edge collection is (conceptionally) flat, it will be inserted into the cell's shapes list as a flat sequence of edges. If the edge collection is deep (hierarchical), it will create a subhierarchy below the given cell and its edges will be put into the respective cells. Suitable subcells will be picked for inserting the edges. If a hierarchy already exists below the given cell, the algorithm will try to reuse this hierarchy. This method has been introduced in version 0.26. | |||||||||
(3) Signature: void insert (unsigned int cell_index, int layer, const EdgePairs edge_pairs) Description: Inserts an edge pair collection into the given cell and layer If the edge pair collection is (conceptionally) flat, it will be inserted into the cell's shapes list as a flat sequence of edge pairs. If the edge pair collection is deep (hierarchical), it will create a subhierarchy below the given cell and its edge pairs will be put into the respective cells. Suitable subcells will be picked for inserting the edge pairs. If a hierarchy already exists below the given cell, the algorithm will try to reuse this hierarchy. This method has been introduced in version 0.27. | |||||||||
(4) Signature: void insert (unsigned int cell_index, int layer, const Texts texts) Description: Inserts an text collection into the given cell and layer If the text collection is (conceptionally) flat, it will be inserted into the cell's shapes list as a flat sequence of texts. If the text collection is deep (hierarchical), it will create a subhierarchy below the given cell and its texts will be put into the respective cells. Suitable subcells will be picked for inserting the texts. If a hierarchy already exists below the given cell, the algorithm will try to reuse this hierarchy. This method has been introduced in version 0.27. | |||||||||
insert_layer | Signature: unsigned int insert_layer (const LayerInfo props) Description: Inserts a new layer with the given properties
| ||||||||
insert_layer_at | Signature: void insert_layer_at (unsigned int index, const LayerInfo props) Description: Inserts a new layer with the given properties at the given index This method will associate the given layer info with the given layer index. If a layer with that index already exists, this method will change the properties of the layer with that index. Otherwise a new layer is created. | ||||||||
insert_special_layer | Signature: unsigned int insert_special_layer (const LayerInfo props) Description: Inserts a new special layer with the given properties
Special layers can be used to represent objects that should not participate in normal viewing or other related operations. Special layers are not reported as valid layers. | ||||||||
insert_special_layer_at | Signature: void insert_special_layer_at (unsigned int index, const LayerInfo props) Description: Inserts a new special layer with the given properties at the given index See insert_special_layer for a description of special layers. | ||||||||
is_const_object? | Signature: [const] bool is_const_object? Description: Returns a value indicating whether the reference is a const reference Use of this method is deprecated. Use _is_const_object? instead This method returns true, if self is a const reference. In that case, only const methods may be called on self. | ||||||||
is_editable? | Signature: [const] bool is_editable? Description: Returns a value indicating whether the layout is editable.
If a layout is editable, in general manipulation methods are enabled and some optimizations are disabled (i.e. shape arrays are expanded). This method has been introduced in version 0.22. | ||||||||
is_free_layer? | Signature: [const] bool is_free_layer? (unsigned int layer_index) Description: Returns true, if a layer index is a free (unused) layer index
This method has been introduced in version 0.26. | ||||||||
is_special_layer? | Signature: [const] bool is_special_layer? (unsigned int layer_index) Description: Returns true, if a layer index is a special layer index
| ||||||||
is_valid_cell_index? | Signature: [const] bool is_valid_cell_index? (unsigned int cell_index) Description: Returns true, if a cell index is a valid index
This method has been added in version 0.20. | ||||||||
is_valid_layer? | Signature: [const] bool is_valid_layer? (unsigned int layer_index) Description: Returns true, if a layer index is a valid normal layout layer index
| ||||||||
layer | (1) Signature: unsigned int layer Description: Creates a new internal layer This method will create a new internal layer and return the layer index for this layer. The layer does not have any properties attached to it. That means, it is not going to be saved to a layout file unless it is given database properties with set_info. This method is equivalent to "layer(RBA::LayerInfo::new())". This method has been introduced in version 0.25. | ||||||||
(2) Signature: unsigned int layer (const LayerInfo info) Description: Finds or creates a layer with the given properties If a layer with the given properties already exists, this method will return the index of that layer.If no such layer exists, a new one with these properties will be created and its index will be returned. If "info" is anonymous (info.anonymous? is true), a new layer will always be created. This method has been introduced in version 0.23. | |||||||||
(3) Signature: unsigned int layer (string name) Description: Finds or creates a layer with the given name If a layer with the given name already exists, this method will return the index of that layer.If no such layer exists, a new one with this name will be created and its index will be returned. This method has been introduced in version 0.23. | |||||||||
(4) Signature: unsigned int layer (int layer, int datatype) Description: Finds or creates a layer with the given layer and datatype number If a layer with the given layer/datatype already exists, this method will return the index of that layer.If no such layer exists, a new one with these properties will be created and its index will be returned. This method has been introduced in version 0.23. | |||||||||
(5) Signature: unsigned int layer (int layer, int datatype, string name) Description: Finds or creates a layer with the given layer and datatype number and name If a layer with the given layer/datatype/name already exists, this method will return the index of that layer.If no such layer exists, a new one with these properties will be created and its index will be returned. This method has been introduced in version 0.23. | |||||||||
layer_indexes | Signature: [const] unsigned int[] layer_indexes Description: Gets a list of valid layer's indices This method returns an array with layer indices representing valid layers. This method has been introduced in version 0.19. | ||||||||
layer_indices | Signature: [const] unsigned int[] layer_indices Description: Gets a list of valid layer's indices Use of this method is deprecated. Use layer_indexes instead This method returns an array with layer indices representing valid layers. This method has been introduced in version 0.19. | ||||||||
layer_infos | Signature: [const] LayerInfo[] layer_infos Description: Gets a list of valid layer's properties The method returns an array with layer properties representing valid layers. The sequence and length of this list corresponds to that of layer_indexes. This method has been introduced in version 0.25. | ||||||||
layers | Signature: [const] unsigned int layers Description: Returns the number of layers The number of layers reports the maximum (plus 1) layer index used so far. Not all of the layers with an index in the range of 0 to layers-1 needs to be a valid layer. These layers can be either valid, special or unused. Use is_valid_layer? and is_special_layer? to test for the first two states. | ||||||||
library | Signature: [const] Library ptr library Description: Gets the library this layout lives in or nil if the layout is not part of a library This attribute has been introduced in version 0.27.5. | ||||||||
merge_meta_info | (1) Signature: void merge_meta_info (const Layout other) Description: Merges the meta information from the other layout into this layout See LayoutMetaInfo for details about cells and meta information. Existing keys in this layout will be overwritten by the respective values from the other layout. New keys will be added. This method has been introduced in version 0.28.16. | ||||||||
(2) Signature: void merge_meta_info (const Layout other, const CellMapping cm) Description: Merges the meta information from the other layout into this layout for the cells given by the cell mapping See LayoutMetaInfo for details about cells and meta information. This method will use the source/target cell pairs from the cell mapping object and merge the meta information from each source cell from the 'other' layout into the mapped cell inside self. This method can be used with 'copy_tree_shapes' and similar to copy meta information in addition to the shapes. Existing cell-specific keys in this layout will be overwritten by the respective values from the other layout. New keys will be added. This method has been introduced in version 0.28.16. | |||||||||
meta_info | Signature: new LayoutMetaInfo ptr meta_info (string name) Description: Gets the meta information for a given name See LayoutMetaInfo for details about layouts and meta information. If no meta information with the given name exists, nil is returned. This method has been introduced in version 0.28.8. | ||||||||
meta_info_value | Signature: variant meta_info_value (string name) Description: Gets the meta information value for a given name See LayoutMetaInfo for details about layouts and meta information. If no meta information with the given name exists, a nil value will be returned. A more generic version that delivers all fields of the meta information is meta_info. This method has been introduced in version 0.25. Starting with version 0.28.8, the value is of variant type instead of string only. | ||||||||
move_layer | (1) Signature: void move_layer (unsigned int src, unsigned int dest) Description: Moves a layer
Moves a layer from the source to the destination layer. The target is not cleared before, so that this method merges shapes from the source with the destination layer. The source layer is empty after that operation. This method was introduced in version 0.19. | ||||||||
(2) Signature: void move_layer (unsigned int src, unsigned int dest, unsigned int flags) Description: Moves a layer (selected shape types only)
Moves a layer from the source to the destination layer. The target is not cleared before, so that this method merges shapes from the source with the destination layer. The copied shapes are removed from the source layer. This method variant has been introduced in version 0.28.9. | |||||||||
move_tree_shapes | (1) Signature: void move_tree_shapes (Layout source_layout, const CellMapping cell_mapping) Description: Moves the shapes for all given mappings in the CellMapping object This method acts like the corresponding copy_tree_shapes method, but removes the shapes from the source layout after they have been copied. This method has been added in version 0.26.8. | ||||||||
(2) Signature: void move_tree_shapes (Layout source_layout, const CellMapping cell_mapping, const LayerMapping layer_mapping) Description: Moves the shapes for all given mappings in the CellMapping object using the given layer mapping This method acts like the corresponding copy_tree_shapes method, but removes the shapes from the source layout after they have been copied. This method has been added in version 0.26.8. | |||||||||
multi_clip | (1) Signature: unsigned int[] multi_clip (unsigned int cell, Box[] boxes) Description: Clips the given cell by the given rectangles and produces new cells with the clips, one for each rectangle.
This method will cut rectangular regions given by the boxes from the given cell. The clips will be stored in a new cells whose indexed are returned. The clips will be performed hierarchically. The resulting cells will hold a hierarchy of child cells, which are potentially clipped versions of child cells of the original cell. This version is somewhat more efficient than doing individual clips because the clip cells may share clipped versions of child cells. This method has been added in version 0.21. | ||||||||
(2) Signature: unsigned int[] multi_clip (unsigned int cell, DBox[] boxes) Description: Clips the given cell by the given rectangles and produces new cells with the clips, one for each rectangle.
This variant which takes micrometer-unit boxes has been added in version 0.28. | |||||||||
(3) Signature: Cell ptr[] multi_clip (const Cell cell, Box[] boxes) Description: Clips the given cell by the given rectangles and produces new cells with the clips, one for each rectangle.
This variant which takes cell references has been added in version 0.28. | |||||||||
(4) Signature: Cell ptr[] multi_clip (const Cell cell, DBox[] boxes) Description: Clips the given cell by the given rectangles and produces new cells with the clips, one for each rectangle.
This variant which takes cell references and micrometer-unit boxes has been added in version 0.28. | |||||||||
multi_clip_into | (1) Signature: unsigned int[] multi_clip_into (unsigned int cell, Layout ptr target, Box[] boxes) Description: Clips the given cell by the given rectangles and produces new cells with the clips, one for each rectangle.
This method will cut rectangular regions given by the boxes from the given cell. The clips will be stored in a new cells in the given target layout. The clips will be performed hierarchically. The resulting cells will hold a hierarchy of child cells, which are potentially clipped versions of child cells of the original cell. This version is somewhat more efficient than doing individual clips because the clip cells may share clipped versions of child cells. Please note that it is important that the database unit of the target layout is identical to the database unit of the source layout to achieve the desired results. This method also assumes that the target layout holds the same layers than the source layout. It will copy shapes to the same layers than they have been on the original layout. This method has been added in version 0.21. | ||||||||
(2) Signature: unsigned int[] multi_clip_into (unsigned int cell, Layout ptr target, DBox[] boxes) Description: Clips the given cell by the given rectangles and produces new cells with the clips, one for each rectangle.
This variant which takes micrometer-unit boxes has been added in version 0.28. | |||||||||
(3) Signature: Cell ptr[] multi_clip_into (const Cell cell, Layout ptr target, Box[] boxes) Description: Clips the given cell by the given rectangles and produces new cells with the clips, one for each rectangle.
This variant which takes cell references boxes has been added in version 0.28. | |||||||||
(4) Signature: Cell ptr[] multi_clip_into (const Cell cell, Layout ptr target, DBox[] boxes) Description: Clips the given cell by the given rectangles and produces new cells with the clips, one for each rectangle.
This variant which takes cell references and micrometer-unit boxes has been added in version 0.28. | |||||||||
new | (1) Signature: [static] new Layout ptr new (Manager manager) Description: Creates a layout object attached to a manager This constructor specifies a manager object which is used to store undo information for example. Starting with version 0.25, layouts created with the default constructor are always editable. Before that version, they inherited the editable flag from the application. Python specific notes: | ||||||||
(2) Signature: [static] new Layout ptr new Description: Creates a layout object Starting with version 0.25, layouts created with the default constructor are always editable. Before that version, they inherited the editable flag from the application. Python specific notes: | |||||||||
(3) Signature: [static] new Layout ptr new (bool editable, Manager manager) Description: Creates a layout object attached to a manager This constructor specifies a manager object which is used to store undo information for example. It also allows one to specify whether the layout is editable. In editable mode, some optimizations are disabled and the layout can be manipulated through a variety of methods. This method was introduced in version 0.22. Python specific notes: | |||||||||
(4) Signature: [static] new Layout ptr new (bool editable) Description: Creates a layout object This constructor specifies whether the layout is editable. In editable mode, some optimizations are disabled and the layout can be manipulated through a variety of methods. This method was introduced in version 0.22. Python specific notes: | |||||||||
pcell_declaration | (1) Signature: [const] const PCellDeclaration ptr pcell_declaration (string name) Description: Gets a reference to the PCell declaration for the PCell with the given name Returns a reference to the local PCell declaration with the given name. If the name is not a valid PCell name, this method returns nil. Usually this method is used on library layouts that define PCells. Note that this method cannot be used on the layouts using the PCell from a library. This method has been introduced in version 0.22. | ||||||||
(2) Signature: [const] const PCellDeclaration ptr pcell_declaration (unsigned int pcell_id) Description: Gets a reference to the PCell declaration for the PCell with the given PCell ID. Returns a reference to the local PCell declaration with the given PCell id. If the parameter is not a valid PCell ID, this method returns nil. The PCell ID is the number returned by register_pcell for example. Usually this method is used on library layouts that define PCells. Note that this method cannot be used on the layouts using the PCell from a library. This method has been introduced in version 0.22. | |||||||||
pcell_id | Signature: [const] unsigned int pcell_id (string name) Description: Gets the ID of the PCell with the given name This method is equivalent to 'pcell_declaration(name).id'. This method has been introduced in version 0.22. | ||||||||
pcell_ids | Signature: [const] unsigned int[] pcell_ids Description: Gets the IDs of the PCells registered in the layout Returns an array of PCell IDs. This method has been introduced in version 0.24. | ||||||||
pcell_names | Signature: [const] string[] pcell_names Description: Gets the names of the PCells registered in the layout Returns an array of PCell names. This method has been introduced in version 0.24. | ||||||||
prop_id | Signature: [const] unsigned long prop_id Description: Gets the properties ID associated with the layout This method has been introduced in version 0.24. Python specific notes: | ||||||||
prop_id= | Signature: void prop_id= (unsigned long id) Description: Sets the properties ID associated with the layout This method is provided, if a properties ID has been derived already. Usually it's more convenient to use delete_property, set_property or property. This method has been introduced in version 0.24. Python specific notes: | ||||||||
properties | (1) Signature: [const] variant properties Description: Gets the Layout's user properties as a hash This method is a convenience method that gets all user properties of the Layout object as a single hash. This method has been introduced in version 0.29.5. | ||||||||
(2) Signature: [const] variant[] properties (unsigned long properties_id) Description: Gets the properties set for a given properties ID
Use of this method is deprecated. Use properties_array instead Basically this method performs the backward conversion of the 'properties_id' method. Given a properties ID, it returns the properties set as an array. In this array, each key and the value is stored as a pair (an array with two elements). If the properties ID is not valid, an empty array is returned. A version that returns a hash instead of pairs of key/values, is properties_hash. The 'properties_array' alias was introduced in version 0.29.7 and the plain 'properties' alias was deprecated. | |||||||||
properties_array | Signature: [const] variant[] properties_array (unsigned long properties_id) Description: Gets the properties set for a given properties ID
Basically this method performs the backward conversion of the 'properties_id' method. Given a properties ID, it returns the properties set as an array. In this array, each key and the value is stored as a pair (an array with two elements). If the properties ID is not valid, an empty array is returned. A version that returns a hash instead of pairs of key/values, is properties_hash. The 'properties_array' alias was introduced in version 0.29.7 and the plain 'properties' alias was deprecated. | ||||||||
properties_hash | Signature: [const] variant properties_hash (unsigned long properties_id) Description: Gets the properties set for a given properties ID as a hash
Returns the properties for a given properties ID as a hash. It is a convenient alternative to properties_array, which returns an array of key/value pairs. This method has been introduced in version 0.29.7. | ||||||||
properties_id | (1) Signature: unsigned long properties_id (variant[] properties) Description: Gets the properties ID for a given properties set
Before a set of properties can be attached to a shape, it must be converted into an ID that is unique for that set. The properties set must be given as a list of pairs of variants, each pair describing a name and a value. The name acts as the key for the property and does not need to be a string (it can be an integer or double value as well). The backward conversion can be performed with the 'properties' method. | ||||||||
(2) Signature: unsigned long properties_id (map<variant,variant> properties) Description: Gets the properties ID for a given properties set
This variant accepts a hash of value vs. key for the properties instead of array of key/value pairs. Apart from this, it behaves like the other properties_id variant. This variant has been introduced in version 0.29.7. | |||||||||
property | Signature: [const] variant property (variant key) Description: Gets the Layout's user property with the given key This method is a convenience method that gets the property with the given key. If no property with that key exists, it will return nil. Using that method is more convenient than using the properties ID to retrieve the property value. This method has been introduced in version 0.24. | ||||||||
prune_cell | Signature: void prune_cell (unsigned int cell_index, int levels) Description: Deletes a cell plus subcells not used otherwise
This deletes a cell and also all sub cells of the cell which are not used otherwise. The number of hierarchy levels to consider can be specified as well. One level of hierarchy means that only the direct children of the cell are deleted with the cell itself. All instances of this cell are deleted as well. This method has been introduced in version 0.20. | ||||||||
prune_subcells | Signature: void prune_subcells (unsigned int cell_index, int levels) Description: Deletes all sub cells of the cell which are not used otherwise down to the specified level of hierarchy
This deletes all sub cells of the cell which are not used otherwise. All instances of the deleted cells are deleted as well. It is possible to specify how many levels of hierarchy below the given root cell are considered. This method has been introduced in version 0.20. | ||||||||
read | (1) Signature: LayerMap read (string filename) Description: Load the layout from the given file
The format of the file is determined automatically and automatic unzipping is provided. No particular options can be specified. This method has been added in version 0.18. | ||||||||
(2) Signature: LayerMap read (string filename, const LoadLayoutOptions options) Description: Load the layout from the given file with options
The format of the file is determined automatically and automatic unzipping is provided. In this version, some reader options can be specified. This method has been added in version 0.18. | |||||||||
refresh | Signature: void refresh Description: Calls Cell#refresh on all cells inside this layout This method is useful to recompute all PCells from a layout. Note that this does not update PCells which are linked from a library. To recompute PCells from a library, you need to use Library#refresh on the library object from which the PCells are imported. This method has been introduced in version 0.27.9. | ||||||||
register_pcell | Signature: unsigned int register_pcell (string name, PCellDeclaration ptr declaration) Description: Registers a PCell declaration under the given name Registers a local PCell in the current layout. If a declaration with that name already exists, it is replaced with the new declaration. This method has been introduced in version 0.22. | ||||||||
remove_meta_info | Signature: void remove_meta_info (string name) Description: Removes meta information from the layout See LayoutMetaInfo for details about layouts and meta information. This method has been introduced in version 0.25. | ||||||||
rename_cell | Signature: void rename_cell (unsigned int index, string name) Description: Renames the cell with given index The cell with the given index is renamed to the given name. NOTE: it is not ensured that the name is unique. This method allows assigning identical names to different cells which usually breaks things. Consider using unique_cell_name to generate truely unique names. | ||||||||
scale_and_snap | (1) Signature: void scale_and_snap (Cell cell, int grid, int mult, int div) Description: Scales and snaps the layout below a given cell by the given rational factor and snaps to the given grid This method is useful to scale a layout by a non-integer factor. The scale factor is given by the rational number mult / div. After scaling, the layout will be snapped to the given grid. Snapping happens 'as-if-flat' - that is, touching edges will stay touching, regardless of their hierarchy path. To achieve this, this method usually needs to produce cell variants. This method has been introduced in version 0.26.1. | ||||||||
(2) Signature: void scale_and_snap (unsigned int cell_index, int grid, int mult, int div) Description: Scales and snaps the layout below a given cell by the given rational factor and snaps to the given grid Like the other version of scale_and_snap, but taking a cell index for the argument. This method has been introduced in version 0.26.1. | |||||||||
set_info | Signature: void set_info (unsigned int index, const LayerInfo props) Description: Sets the info structure for a specified layer | ||||||||
set_property | Signature: void set_property (variant key, variant value) Description: Sets the user property with the given key to the given value This method is a convenience method that sets the property with the given key to the given value. If no property with that key exists, it will create one. Using that method is more convenient than creating a new property set with a new ID and assigning that properties ID. This method may change the properties ID. Note: GDS only supports integer keys. OASIS supports numeric and string keys. This method has been introduced in version 0.24. | ||||||||
start_changes | Signature: void start_changes Description: Signals the start of an operation bringing the layout into invalid state This method should be called whenever the layout is about to be brought into an invalid state. After calling this method, under_construction? returns true which tells foreign code (i.e. the asynchronous painter or the cell tree view) not to use this layout object. This state is cancelled by the end_changes method. The start_changes method can be called multiple times and must be cancelled the same number of times. This method can be used to speed up certain operations. For example iterating over the layout with a RecursiveShapeIterator while modifying other layers of the layout can be very inefficient, because inside the loop the layout's state is invalidate and updated frequently. Putting a update and start_changes sequence before the loop (use both methods in that order!) and a end_changes call after the loop can improve the performance dramatically. In addition, it can be necessary to prevent redraw operations in certain cases by using start_changes .. end_changes, in particular when it is possible to put a layout object into an invalid state temporarily. While the layout is under construction update can be called to update the internal state explicitly if required. This for example might be necessary to update the cell bounding boxes or to redo the sorting for region queries. | ||||||||
swap_layers | Signature: void swap_layers (unsigned int a, unsigned int b) Description: Swap two layers
Swaps the shapes of both layers. This method was introduced in version 0.19. | ||||||||
technology | Signature: [const] const Technology ptr technology Description: Gets the Technology object of the technology this layout is associated with or nil if the layout is not associated with a technology This method has been introduced in version 0.27. Before that, the technology has been kept in the 'technology' meta data element. | ||||||||
technology_name | Signature: [const] string technology_name Description: Gets the name of the technology this layout is associated with This method has been introduced in version 0.27. Before that, the technology has been kept in the 'technology' meta data element. Python specific notes: | ||||||||
technology_name= | Signature: void technology_name= (string name) Description: Sets the name of the technology this layout is associated with Changing the technology name will re-assess all library references because libraries can be technology specified. Cell layouts may be substituted during this re-assessment. This method has been introduced in version 0.27. Python specific notes: | ||||||||
top_cell | (1) Signature: Cell ptr top_cell Description: Returns the top cell object
If the layout has a single top cell, this method returns the top cell's Cell object. If the layout does not have a top cell, this method returns "nil". If the layout has multiple top cells, this method raises an error. This method has been introduced in version 0.23. | ||||||||
(2) Signature: [const] const Cell ptr top_cell Description: Returns the top cell object (const version)
If the layout has a single top cell, this method returns the top cell's Cell object. If the layout does not have a top cell, this method returns "nil". If the layout has multiple top cells, this method raises an error. This variant has been introduced in version 0.29.6. | |||||||||
top_cells | (1) Signature: Cell ptr[] top_cells Description: Returns the top cell objects
This method returns and array of Cell objects representing the top cells of the layout. This array can be empty, if the layout does not have a top cell (i.e. no cell at all). This method has been introduced in version 0.23. | ||||||||
(2) Signature: [const] const Cell ptr[] top_cells Description: Returns the top cell objects (const version)
This method returns and array of Cell objects representing the top cells of the layout. This array can be empty, if the layout does not have a top cell (i.e. no cell at all). This variant has been introduced in version 0.29.6. | |||||||||
transform | (1) Signature: void transform (const Trans trans) Description: Transforms the layout with the given transformation This method has been introduced in version 0.23. | ||||||||
(2) Signature: void transform (const ICplxTrans trans) Description: Transforms the layout with the given complex integer transformation This method has been introduced in version 0.23. | |||||||||
(3) Signature: void transform (const DTrans trans) Description: Transforms the layout with the given transformation, which is in micrometer units This variant will internally translate the transformation's displacement into database units. Apart from that, it behaves identical to the version with a Trans argument. This variant has been introduced in version 0.25. | |||||||||
(4) Signature: void transform (const DCplxTrans trans) Description: Transforms the layout with the given complex integer transformation, which is in micrometer units This variant will internally translate the transformation's displacement into database units. Apart from that, it behaves identical to the version with a ICplxTrans argument. This method has been introduced in version 0.23. | |||||||||
under_construction? | Signature: [const] bool under_construction? Description: Returns true if the layout object is under construction A layout object is either under construction if a transaction is ongoing or the layout is brought into invalid state by "start_changes". | ||||||||
unique_cell_name | Signature: [const] string unique_cell_name (string name) Description: Creates a new unique cell name from the given name
If a cell with the given name exists, a suffix will be added to make the name unique. Otherwise, the argument will be returned unchanged. The returned name can be used to rename cells without risk of creating name clashes. This method has been introduced in version 0.28. | ||||||||
update | Signature: void update Description: Updates the internals of the layout This method updates the internal state of the layout. Usually this is done automatically This method is provided to ensure this explicitly. This can be useful while using start_changes and end_changes to wrap a performance-critical operation. See start_changes for more details. | ||||||||
write | (1) Signature: void write (string filename, bool gzip, const SaveLayoutOptions options) Description: Writes the layout to a stream file
Use of this method is deprecated Starting with version 0.23, this variant is deprecated since the more convenient variant with two parameters automatically determines the compression mode from the file name. The gzip parameter is ignored staring with version 0.23. | ||||||||
(2) Signature: void write (string filename, const SaveLayoutOptions options) Description: Writes the layout to a stream file
This version automatically determines the compression mode from the file name. The file is written with zlib compression if the suffix is ".gz" or ".gzip". This variant has been introduced in version 0.23. | |||||||||
(3) Signature: void write (string filename) Description: Writes the layout to a stream file
|