class Gdsii::Node
Represents a GDSII Node element. Most methods are from Element or from the various included Access module methods.
Public Class Methods
new(layer=nil, nodetype=nil, xy=nil) { |self| ... }
click to toggle source
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])
Calls superclass method
Gdsii::Element.new
# 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
Public Instance Methods
nodetype()
click to toggle source
Get the nodetype number (returns Fixnum).
# File lib/gdsii/node.rb, line 57 def nodetype() @records.get_data(GRT_NODETYPE); end
nodetype=(val)
click to toggle source
Set the nodetype number.
# File lib/gdsii/node.rb, line 62 def nodetype=(val) @records.set(GRT_NODETYPE, val); end
nodetype_record()
click to toggle source
Get the nodetype record (returns Record).
# File lib/gdsii/node.rb, line 52 def nodetype_record() @records.get(GRT_NODETYPE); end