Class SaveLayoutOptions (version 0.16)Description: Options for saving layouts This class describes the various options for saving a layout to a stream file (GDS2, OASIS). There are: layers to be saved, cell or cells to be saved, scale factor, format, database unit and format specific options. Usually the default constructor provides a suitable object. The layers are specified by either selecting all layers or by defining layer by layer using the add_layer method. select_all_layers will explicitly select all layers for saving, deselect_all_layers will explicitly clear the list of layers. Cells are selected in a similar fashion: by default, all cells are selected. Using add_cell, specific cells can be selected for saving. All these cells plus their hierarchy will then be written to the stream file.
Method Overview
add_cell( unsigned int cell_index )Description: Add a cell (plus hierarchy) to be saved The index of the cell must be a valid index in the context of the layout that will be saved. This method clears the 'select all cells' flag.
add_layer( unsigned int layer_index, LayerInfo properties )Description: Add a layer to be saved Adds the layer with the given index to the layer list that will be written. If all layers have been selected previously, this state will be cleared. The 'properties' argument can be used to assign different layer properties than the ones present in the layout. Pass a default LayerInfo object to this argument to use the properties from the layout object. Construct a valid LayerInfo object with explicit layer, datatype and possibly a name to override the properties stored in the layout.
[const] double dbuDescription: Get the explicit database unit if one is set
dbu=( double dbu )Description: Set the database unit to be used in the stream file By default, the database unit of the layout is used. This method allows to explicitly use a different database unit. This effectively scales the layout.
deselect_all_layersDescription: Unselect all layers: no layer will be saved This method will clear all layers selected with add_layer so far and clear the 'select all layers' flag. Using this method is the only way to save a layout without any layers.
destroyDescription: Explicitly destroy the object Explicitly destroy the object on C++ side if it was owned by the Ruby interpreter. Subsequent access to this object will throw an exception. If the object is not owned by Ruby, this method will do nothing.
[const] bool destroyedDescription: Tell, if the object was 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.
[const] string formatDescription: Get the format name
format=( string format )Description: Select a format The format string can be either "GDS2" or "OASIS". Other formats may be available if a suitable plugin is installed.
[static] SaveLayoutOptions newDescription: Default constructor By default, the scale factor will be 1.0, the database unit is set to "same as original" and all layers are selected as well as all cells. The default format is GDS2.
[const] int oasis_compression_levelDescription: Get the OASIS compression level See oasis_compression_level= method for a description of the OASIS compression level.
oasis_compression_level=( int )Description: Set the OASIS compression level The OASIS compression level is an integer number between 0 and 10. 0 basically is no compression, 1 produces shape arrays in a simple fashion. 2 and higher compression levels will use a more elaborate algorithm to find shape arrays which uses 2nd and futher neighbor distances. The higher the level, the higher the memory requirements and run times. Setting this property clears all format specific options for other formats such as GDS.
[const] double scale_factorDescription: Get the scaling factor currently set
scale_factor=( double scale_factor )Description: Set the scaling factor for the saving Using a scaling factor will scale all objects accordingly. Using a scaling factor can compensate implicit scaling by an explicit database unit specification. Setting and scale factor plus an explicit database unit thus allows to transcribe a layout to a different database unit without changing the layout's physical dimensions (beside potential grid snapping effects). Be aware that rounding effects may occure if fractional scaling factors are used which are not compliant with any implicit layout grid. By default, no scaling is applied.
select_all_cellsDescription: Select all cells to save This method will clear all cells specified with add_cells so far and set the 'select all cells' flag. This is the default.
select_all_layersDescription: Select all layers to be saved This method will clear all layers selected with add_layer so far and set the 'select all layers' flag. This is the default.
|