Class: Gdsii::Node
- Inherits:
-
Element
- Object
- Element
- Gdsii::Node
- Includes:
- Access::ELFlags, Access::Layer, Access::Plex, Access::XY
- Defined in:
- lib/gdsii/node.rb
Overview
Represents a GDSII Node element. Most methods are from Element or from the various included Access module methods.
Instance Method Summary collapse
-
#initialize(layer = nil, nodetype = nil, xy = nil) {|_self| ... } ⇒ Node
constructor
Create a node record grouping given a layer, nodetype, and xy coordinates.
-
#nodetype ⇒ Object
Get the nodetype number (returns Fixnum).
-
#nodetype=(val) ⇒ Object
Set the nodetype number.
-
#nodetype_record ⇒ Object
Get the nodetype record (returns Record).
Methods included from Access::Plex
Methods included from Access::ELFlags
#elflags, #elflags=, #elflags_record
Methods included from Access::XY
Methods included from Access::Layer
#layer, #layer=, #layer_record
Constructor Details
#initialize(layer = nil, nodetype = nil, xy = nil) {|_self| ... } ⇒ Node
Create a node record grouping given a layer, nodetype, and xy coordinates. The node object can have 1-50 coordinate pairs.
node = Gdsii::Node.new(1, 0, [0,0])
40 41 42 43 44 45 46 47 |
# File 'lib/gdsii/node.rb', line 40 def initialize(layer=nil, nodetype=nil, xy=nil) super() @records[GRT_NODE] = Record.new(GRT_NODE) self.layer = layer unless layer.nil? self.nodetype = nodetype unless nodetype.nil? self.xy = xy unless xy.nil? yield self if block_given? end |
Instance Method Details
#nodetype ⇒ Object
Get the nodetype number (returns Fixnum).
57 |
# File 'lib/gdsii/node.rb', line 57 def nodetype() @records.get_data(GRT_NODETYPE); end |
#nodetype=(val) ⇒ Object
Set the nodetype number.
62 |
# File 'lib/gdsii/node.rb', line 62 def nodetype=(val) @records.set(GRT_NODETYPE, val); end |
#nodetype_record ⇒ Object
Get the nodetype record (returns Record).
52 |
# File 'lib/gdsii/node.rb', line 52 def nodetype_record() @records.get(GRT_NODETYPE); end |