Class: Gdsii::Boundary

Inherits:
Element
  • Object
show all
Includes:
Access::Datatype, Access::ELFlags, Access::Layer, Access::Plex, Access::XY
Defined in:
lib/gdsii/boundary.rb

Overview

Represents a GDSII Boundary element (i.e. a rectangle or polygon). Most methods are from Element or from the various included Access module methods.

Instance Method Summary collapse

Methods included from Access::Plex

#plex, #plex=, #plex_record

Methods included from Access::ELFlags

#elflags, #elflags=, #elflags_record

Methods included from Access::XY

#xy, #xy=, #xy_record

Methods included from Access::Datatype

#datatype, #datatype=, #datatype_record

Methods included from Access::Layer

#layer, #layer=, #layer_record

Constructor Details

#initialize(layer = nil, datatype = nil, xy = nil) {|_self| ... } ⇒ Boundary

Boundary object constructor. Layer and datatype are given as Fixnum and the coordinate points are given as an array of Fixnum alternating x and y values (coordinate pair range is 4-200). Example:

rectangle = Gdsii::Boundary.new(1, 0, [0,0, 0,10, 10,10, 10,0, 0,0])

Yields:

  • (_self)

Yield Parameters:



43
44
45
46
47
48
49
50
# File 'lib/gdsii/boundary.rb', line 43

def initialize(layer=nil, datatype=nil, xy=nil)
  super()
  @records[GRT_BOUNDARY] = Record.new(GRT_BOUNDARY)
  self.layer = layer unless layer.nil?
  self.datatype = datatype unless datatype.nil?
  self.xy = xy unless xy.nil?
  yield self if block_given?
end