Class SaveLayoutOptions (version 0.18)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.
assign( SaveLayoutOptions other )Description: Assign the contents of another object to self This method assigns the contents of another object to self. This is a deep copy that does not only copy the reference but the actual content.
[const] unsigned int box_modeDescription: Specifies how to treat BOX records See gds2_box_mode= method for a description of this mode. This property has been added in version 0.18.
[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] SaveLayoutOptions dupDescription: Creates a copy of self.
[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.
[const] bool gds2_allow_big_recordsDescription: Specifies whether to allow big records with a length of 32768 to 65535 bytes. See gds2_allow_big_records= method for a description of this property. This property has been added in version 0.18.
gds2_allow_big_records=( bool )Description: Allow big records with more than 32767 bytes Setting this property to true allows larger records by treating the record length as unsigned short, which for example allows larger polygons (~8000 points rather than ~4000 points) without using multiple XY records. For strict compatibility with the standard, this property should be set to false. The default is true. This property has been added in version 0.18.
[const] bool gds2_allow_multi_xy_recordsDescription: Specifies whether to allow big polygons with multiple XY records. See gds2_allow_multi_xy_records= method for a description of this property. This property has been added in version 0.18.
gds2_allow_multi_xy_records=( bool )Description: Allows the use of multiple XY records in BOUNDARY elements for unlimited large polygons Setting this property to true allows big polygons that span over multiple XY records. For strict compatibility with the standard, this property should be set to false. The default is true. This property has been added in version 0.18.
gds2_box_mode=( unsigned int )Description: Specify how to treat BOX records This property specifies how BOX records are treated. Allowed values are 0 (ignore), 1 (treat as rectangles), 2 (treat as boundaries) or 3 (treat as errors). The default is 1. This property has been added in version 0.18.
[const] string gds2_libnameDescription: Get the library name See gds2_libname= method for a description of the library name. This property has been added in version 0.18.
gds2_libname=( string )Description: Set the library name The library name is the string written into the LIBNAME records of the GDS file. The library name should not be an empty string and is subject to certain limitations in the character choice. This property has been added in version 0.18.
[const] unsigned int gds2_max_cellname_lengthDescription: Get the maximum length of cell names See gds2_max_cellname_length= method for a description of the maximum cell name length. This property has been added in version 0.18.
gds2_max_cellname_length=( unsigned int )Description: Maximum length of cell names This property describes the maximum number of characters for cell names. Longer cell names will be shortened. This property has been added in version 0.18.
[const] unsigned int gds2_max_vertex_countDescription: Get the maximum number of vertices for polygons to write See gds2_max_vertex_count= method for a description of the maximum vertex count. This property has been added in version 0.18.
gds2_max_vertex_count=( unsigned int )Description: Set the maximum number of vertices for polygons to write This property describes the maximum number of point for polygons in GDS2 files. Polygons with more points will be split. The minimum value for this property is 4. The maximum allowed value is about 4000 or 8000, depending on the GDS2 interpretation. If gds2_multi_xy_records is true, this property is not used. Instead, the number of points is unlimited. This property has been added in version 0.18.
[const] bool gds2_multi_xy_recordsDescription: Get the property enabling multiple XY records for BOUNDARY elements See gds2_multi_xy_records= method for a description of this property. This property has been added in version 0.18.
gds2_multi_xy_records=( bool )Description: Use multiple XY records in BOUNDARY elements for unlimited large polygons Setting this property to true allows to produce unlimited polygons at the cost of incompatible formats. Setting it to true disables the gds2_max_vertex_count setting. This property has been added in version 0.18.
[const] double gds2_user_unitsDescription: Get the user units See gds2_user_units= method for a description of the user units. This property has been added in version 0.18.
gds2_user_units=( double )Description: Set the users units to write into the GDS file The user units of a GDS file are rarely used and usually are set to 1 (micron). The intention of the user units is to specify the display units. KLayout ignores the user unit and uses microns as the display unit. The user unit must be larger than zero. This property has been added in version 0.18.
[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.
|