Class: Sketchup::Entities

Inherits:
Object show all
Includes:
Enumerable
Defined in:
lib/entities.rb

Instance Method Summary (collapse)

Methods included from Enumerable

#all?, #any?, #chunk, #collect, #collect_concat, #cycle, #detect, #drop, #drop_while, #each_cons, #each_entry, #each_slice, #each_with_index, #each_with_object, #entries, #find, #find_all, #find_index, #first, #flat_map, #grep, #group_by, #inject, #lazy, #map, #max, #max_by, #member?, #min, #min_by, #minmax, #minmax_by, #none?, #one?, #partition, #reduce, #reject, #reverse_each, #select, #slice_before, #sort, #sort_by, #take, #take_while, #to_a, #zip

Instance Method Details

- (Object) [](o)



22
23
# File 'lib/entities.rb', line 22

def [](o)
end

- (SectionPlane) active_section_plane

Since:

  • SketchUp 2014



35
36
# File 'lib/entities.rb', line 35

def active_section_plane
end

- (Object) active_section_plane=

Since:

  • SketchUp 2014



39
40
# File 'lib/entities.rb', line 39

def active_section_plane=
end

- (Object) add_3d_text



60
61
# File 'lib/entities.rb', line 60

def add_3d_text
end

- (Object) add_arc(center, xaxis, normal, radius, start_angle, end_angle, segments = 12)



62
63
64
65
# File 'lib/entities.rb', line 62

def add_arc(center, xaxis, normal, radius, start_angle, end_angle, segments = 12)
  arc = SketchUp::ArcCurve.new(center, xaxis, normal, radius, start_angele, end_angle, segments)
  return(arc)
end

- (Object) add_circle



66
67
# File 'lib/entities.rb', line 66

def add_circle
end

- (Object) add_cline



68
69
# File 'lib/entities.rb', line 68

def add_cline
end

- (Object) add_cpoint(pt)



71
72
73
74
75
# File 'lib/entities.rb', line 71

def add_cpoint(pt)
  pt = Sketchup::ConstructionPoint.new(pt)
  @list.push(pt)
  return(pt)
end

- (Object) add_curve



77
78
# File 'lib/entities.rb', line 77

def add_curve
end

- (Object) add_dimension_linear

Since:

  • SketchUp 2014



43
44
# File 'lib/entities.rb', line 43

def add_dimension_linear
end

- (Object) add_dimension_radial

Since:

  • SketchUp 2014



47
48
# File 'lib/entities.rb', line 47

def add_dimension_radial
end

- (Array<Sketchup::Edge>) add_edges(*args)

Accepts list of Point3ds or Array of Point3ds



86
87
88
89
90
91
92
93
94
95
# File 'lib/entities.rb', line 86

def add_edges(*args)
  edges = []
  len = args.length
  (len-1).times {|i| 
    edge = Edge.new(args[i], args[i+1])
    edges.push(edge)
  }
  @list.concat(edges)
  return(edges)
end

- (Object) add_face



96
97
# File 'lib/entities.rb', line 96

def add_face
end

- (Object) add_faces_from_mesh



98
99
# File 'lib/entities.rb', line 98

def add_faces_from_mesh
end

- (Object) add_group



100
101
# File 'lib/entities.rb', line 100

def add_group
end

- (Object) add_image



102
103
# File 'lib/entities.rb', line 102

def add_image
end

- (Object) add_instance



104
105
# File 'lib/entities.rb', line 104

def add_instance
end

- (Sketchup::Edge) add_line(pt1, pt2)

Adds an Edge to the Entities collection

Examples:

model = Sketchup.active_model
ents = model.entities
edge = ents.add_line(ORIGIN, [1, 1, 0])


119
120
121
122
# File 'lib/entities.rb', line 119

def add_line(pt1, pt2)
  edges = add_edges(pt1, pt2)
  return(edges.first)
end

- (Object) add_ngon



124
125
# File 'lib/entities.rb', line 124

def add_ngon
end

- (Object) add_observer



126
127
# File 'lib/entities.rb', line 126

def add_observer
end

- (Object) add_section_plane

Since:

  • SketchUp 2014



51
52
# File 'lib/entities.rb', line 51

def add_section_plane
end

- (Object) add_text



128
129
# File 'lib/entities.rb', line 128

def add_text
end

- (Object) at



130
131
# File 'lib/entities.rb', line 130

def at
end

- (Object) clear!



132
133
# File 'lib/entities.rb', line 132

def clear!
end

- (Object) count

Since:

  • SketchUp 2014 @see Enumberable#count



136
137
# File 'lib/entities.rb', line 136

def count
end

- (Object) each



139
140
# File 'lib/entities.rb', line 139

def each
end

- (Object) erase_entities



141
142
# File 'lib/entities.rb', line 141

def erase_entities
end

- (Object) fill_from_mesh



143
144
# File 'lib/entities.rb', line 143

def fill_from_mesh
end

- (Object) intersect_with



145
146
# File 'lib/entities.rb', line 145

def intersect_with
end

- (Object) length



147
148
# File 'lib/entities.rb', line 147

def length
end

- (Object) model



150
151
152
# File 'lib/entities.rb', line 150

def model
  @model
end

- (Object) parent



153
154
# File 'lib/entities.rb', line 153

def parent
end

- (Object) remove_observer



155
156
# File 'lib/entities.rb', line 155

def remove_observer
end

- (Object) size

alias_method :size, :length

See Also:

Since:

  • SketchUp 2014



57
58
# File 'lib/entities.rb', line 57

def size
end

- (Object) transform_by_vectors



157
158
# File 'lib/entities.rb', line 157

def transform_by_vectors
end

- (Object) transform_entities



159
160
# File 'lib/entities.rb', line 159

def transform_entities
end