sketchup-api-stubs 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (107) hide show
  1. checksums.yaml +7 -0
  2. data/SketchUp/Geom/BoundingBox.rb +335 -0
  3. data/SketchUp/Geom/LatLong.rb +123 -0
  4. data/SketchUp/Geom/Point3d.rb +643 -0
  5. data/SketchUp/Geom/PolygonMesh.rb +478 -0
  6. data/SketchUp/Geom/Transformation.rb +476 -0
  7. data/SketchUp/Geom/UTM.rb +135 -0
  8. data/SketchUp/Geom/Vector3d.rb +684 -0
  9. data/SketchUp/Sketchup/Animation.rb +137 -0
  10. data/SketchUp/Sketchup/AppObserver.rb +157 -0
  11. data/SketchUp/Sketchup/ArcCurve.rb +209 -0
  12. data/SketchUp/Sketchup/AttributeDictionaries.rb +146 -0
  13. data/SketchUp/Sketchup/AttributeDictionary.rb +280 -0
  14. data/SketchUp/Sketchup/Axes.rb +149 -0
  15. data/SketchUp/Sketchup/Behavior.rb +338 -0
  16. data/SketchUp/Sketchup/Camera.rb +594 -0
  17. data/SketchUp/Sketchup/ClassificationSchema.rb +63 -0
  18. data/SketchUp/Sketchup/Classifications.rb +118 -0
  19. data/SketchUp/Sketchup/Color.rb +291 -0
  20. data/SketchUp/Sketchup/ComponentDefinition.rb +562 -0
  21. data/SketchUp/Sketchup/ComponentInstance.rb +597 -0
  22. data/SketchUp/Sketchup/Console.rb +78 -0
  23. data/SketchUp/Sketchup/ConstructionLine.rb +257 -0
  24. data/SketchUp/Sketchup/ConstructionPoint.rb +32 -0
  25. data/SketchUp/Sketchup/Curve.rb +196 -0
  26. data/SketchUp/Sketchup/DefinitionList.rb +312 -0
  27. data/SketchUp/Sketchup/DefinitionObserver.rb +73 -0
  28. data/SketchUp/Sketchup/DefinitionsObserver.rb +102 -0
  29. data/SketchUp/Sketchup/Dimension.rb +167 -0
  30. data/SketchUp/Sketchup/DimensionLinear.rb +232 -0
  31. data/SketchUp/Sketchup/DimensionObserver.rb +38 -0
  32. data/SketchUp/Sketchup/DimensionRadial.rb +87 -0
  33. data/SketchUp/Sketchup/Drawingelement.rb +400 -0
  34. data/SketchUp/Sketchup/Edge.rb +517 -0
  35. data/SketchUp/Sketchup/EdgeUse.rb +213 -0
  36. data/SketchUp/Sketchup/Entities.rb +1011 -0
  37. data/SketchUp/Sketchup/EntitiesObserver.rb +125 -0
  38. data/SketchUp/Sketchup/Entity.rb +522 -0
  39. data/SketchUp/Sketchup/EntityObserver.rb +59 -0
  40. data/SketchUp/Sketchup/ExtensionsManager.rb +129 -0
  41. data/SketchUp/Sketchup/Face.rb +737 -0
  42. data/SketchUp/Sketchup/FrameChangeObserver.rb +104 -0
  43. data/SketchUp/Sketchup/Group.rb +705 -0
  44. data/SketchUp/Sketchup/Http.rb +27 -0
  45. data/SketchUp/Sketchup/Http/Request.rb +285 -0
  46. data/SketchUp/Sketchup/Http/Response.rb +62 -0
  47. data/SketchUp/Sketchup/Image.rb +393 -0
  48. data/SketchUp/Sketchup/Importer.rb +192 -0
  49. data/SketchUp/Sketchup/InputPoint.rb +393 -0
  50. data/SketchUp/Sketchup/InstanceObserver.rb +82 -0
  51. data/SketchUp/Sketchup/InstancePath.rb +297 -0
  52. data/SketchUp/Sketchup/Layer.rb +240 -0
  53. data/SketchUp/Sketchup/Layers.rb +235 -0
  54. data/SketchUp/Sketchup/LayersObserver.rb +136 -0
  55. data/SketchUp/Sketchup/Licensing.rb +47 -0
  56. data/SketchUp/Sketchup/Licensing/ExtensionLicense.rb +88 -0
  57. data/SketchUp/Sketchup/Loop.rb +141 -0
  58. data/SketchUp/Sketchup/Material.rb +384 -0
  59. data/SketchUp/Sketchup/Materials.rb +283 -0
  60. data/SketchUp/Sketchup/MaterialsObserver.rb +141 -0
  61. data/SketchUp/Sketchup/Menu.rb +97 -0
  62. data/SketchUp/Sketchup/Model.rb +1459 -0
  63. data/SketchUp/Sketchup/ModelObserver.rb +356 -0
  64. data/SketchUp/Sketchup/OptionsManager.rb +135 -0
  65. data/SketchUp/Sketchup/OptionsProvider.rb +277 -0
  66. data/SketchUp/Sketchup/OptionsProviderObserver.rb +58 -0
  67. data/SketchUp/Sketchup/Page.rb +636 -0
  68. data/SketchUp/Sketchup/Pages.rb +349 -0
  69. data/SketchUp/Sketchup/PagesObserver.rb +76 -0
  70. data/SketchUp/Sketchup/PickHelper.rb +457 -0
  71. data/SketchUp/Sketchup/RegionalSettings.rb +43 -0
  72. data/SketchUp/Sketchup/RenderingOptions.rb +337 -0
  73. data/SketchUp/Sketchup/RenderingOptionsObserver.rb +44 -0
  74. data/SketchUp/Sketchup/SectionPlane.rb +88 -0
  75. data/SketchUp/Sketchup/Selection.rb +470 -0
  76. data/SketchUp/Sketchup/SelectionObserver.rb +115 -0
  77. data/SketchUp/Sketchup/Set.rb +253 -0
  78. data/SketchUp/Sketchup/ShadowInfo.rb +257 -0
  79. data/SketchUp/Sketchup/ShadowInfoObserver.rb +57 -0
  80. data/SketchUp/Sketchup/Style.rb +77 -0
  81. data/SketchUp/Sketchup/Styles.rb +204 -0
  82. data/SketchUp/Sketchup/Text.rb +241 -0
  83. data/SketchUp/Sketchup/Texture.rb +211 -0
  84. data/SketchUp/Sketchup/TextureWriter.rb +237 -0
  85. data/SketchUp/Sketchup/Tool.rb +808 -0
  86. data/SketchUp/Sketchup/Tools.rb +120 -0
  87. data/SketchUp/Sketchup/ToolsObserver.rb +154 -0
  88. data/SketchUp/Sketchup/UVHelper.rb +61 -0
  89. data/SketchUp/Sketchup/Vertex.rb +143 -0
  90. data/SketchUp/Sketchup/View.rb +965 -0
  91. data/SketchUp/Sketchup/ViewObserver.rb +40 -0
  92. data/SketchUp/UI/Command.rb +307 -0
  93. data/SketchUp/UI/HtmlDialog.rb +346 -0
  94. data/SketchUp/UI/Notification.rb +229 -0
  95. data/SketchUp/UI/Toolbar.rb +243 -0
  96. data/SketchUp/UI/WebDialog.rb +623 -0
  97. data/SketchUp/_top_level.rb +193 -0
  98. data/SketchUp/array.rb +593 -0
  99. data/SketchUp/geom.rb +231 -0
  100. data/SketchUp/languagehandler.rb +92 -0
  101. data/SketchUp/length.rb +210 -0
  102. data/SketchUp/numeric.rb +249 -0
  103. data/SketchUp/sketchup.rb +1290 -0
  104. data/SketchUp/sketchupextension.rb +355 -0
  105. data/SketchUp/string.rb +24 -0
  106. data/SketchUp/ui.rb +637 -0
  107. metadata +176 -0
@@ -0,0 +1,125 @@
1
+ # Copyright:: Copyright 2017 Trimble Inc.
2
+ # License:: The MIT License (MIT)
3
+
4
+ # This observer interface is implemented to react to {Sketchup::Entities}
5
+ # collection events. To implement this observer, create a Ruby class of this
6
+ # type, override the desired methods, and add an instance of the observer to
7
+ # the objects of interests.
8
+ #
9
+ # @example
10
+ # # This is an example of an observer that watches the entities collection
11
+ # # new added elements and writes a message on the console.
12
+ # class MyEntitiesObserver < Sketchup::EntitiesObserver
13
+ # def onElementAdded(entities, entity)
14
+ # puts "onElementAdded: #{entity}"
15
+ # end
16
+ # end
17
+ #
18
+ # # Attach the observer
19
+ # Sketchup.active_model.entities.add_observer(MyEntitiesObserver.new)
20
+ #
21
+ # @note The methods of this observer fire in such a way that making changes
22
+ # to the model while inside of them is dangerous. If you experience sudden
23
+ # crashes, it could be because of this observer. A potential workaround is to
24
+ # use a {Sketchup::ToolsObserver} to watch what the user is doing instead.
25
+ #
26
+ # @version SketchUp 6.0
27
+ class Sketchup::EntitiesObserver
28
+
29
+ # Instance Methods
30
+
31
+ # The {#onActiveSectionPlaneChanged} method is invoked when a section plane
32
+ # within this entities is activated or the active one is deactivated.
33
+ #
34
+ # @example
35
+ # def onActiveSectionPlaneChanged(entities)
36
+ # sp = entities.active_section_plane
37
+ # if sp.nil?
38
+ # puts "Section plane is deactivated on #{entities}"
39
+ # else
40
+ # puts "#{sp} is activated on #{entities}"
41
+ # end
42
+ # end
43
+ #
44
+ # @param [Sketchup::Entities] entities
45
+ #
46
+ # @return [nil]
47
+ #
48
+ # @version SketchUp 2014
49
+ def onActiveSectionPlaneChanged(entities)
50
+ end
51
+
52
+ # The onElementAdded method is invoked when a single element is added
53
+ # to the {Sketchup::Entities} collection.
54
+ #
55
+ # @example
56
+ # def onElementAdded(entities, entity)
57
+ # puts "onElementAdded: #{entity}"
58
+ # end
59
+ #
60
+ # @param [Sketchup::Entities] entities
61
+ #
62
+ # @param [Sketchup::Entity] entity
63
+ #
64
+ # @return [nil]
65
+ #
66
+ # @version SketchUp 6.0
67
+ def onElementAdded(entities, entity)
68
+ end
69
+
70
+ # The {#onElementModified} method is invoked whenever one or more elements in
71
+ # the collection are modified.
72
+ #
73
+ # @example
74
+ # def onElementModified(entities, entity)
75
+ # puts "onElementModified: #{entity}"
76
+ # end
77
+ #
78
+ # @param [Sketchup::Entities] entities
79
+ #
80
+ # @param [Sketchup::Entity] entity
81
+ #
82
+ # @return [nil]
83
+ #
84
+ # @version SketchUp 8.0
85
+ def onElementModified(entities, entity)
86
+ end
87
+
88
+ # The {#onElementRemoved} method is invoked when a single element is removed
89
+ # from the {Sketchup::Entities} collection. Note that the entity has been
90
+ # deleted and should not be used in anyway except to know that the entity has
91
+ # been deleted.
92
+ #
93
+ # @example
94
+ # def onElementRemoved(entities, entity_id)
95
+ # puts "onElementRemoved: #{entity_id}"
96
+ # end
97
+ #
98
+ # @param [Sketchup::Entities] entities
99
+ #
100
+ # @param [Sketchup::Entity] entity_id
101
+ # The id of the entity that was
102
+ # deleted/removed.
103
+ #
104
+ # @return [nil]
105
+ #
106
+ # @version SketchUp 6.0
107
+ def onElementRemoved(entities, entity_id)
108
+ end
109
+
110
+ # The {#onEraseEntities} method is invoked when one or more entities are erased.
111
+ #
112
+ # @example
113
+ # def onEraseEntities(entities)
114
+ # puts "onEraseEntities: #{entities}"
115
+ # end
116
+ #
117
+ # @param [Sketchup::Entities] entities
118
+ #
119
+ # @return [nil]
120
+ #
121
+ # @version SketchUp 6.0
122
+ def onEraseEntities(entities)
123
+ end
124
+
125
+ end
@@ -0,0 +1,522 @@
1
+ # Copyright:: Copyright 2017 Trimble Inc.
2
+ # License:: The MIT License (MIT)
3
+
4
+ # This is the base class for all SketchUp entities. Entities are basically
5
+ # anything that can be contained in a model, including Drawingelements
6
+ # such as Edges, SectionPlanes, Groups, etc. and entities that relate to
7
+ # those Drawingelements, such as Loops, Layers, etc.
8
+ #
9
+ # Keep in mind that the methods below are available on all subclasses.
10
+ # For example, an Edge's parent class is Drawingelement, and a
11
+ # Drawingelement's parent class is Entity. Therefore an Edge has all of the
12
+ # methods defined in Drawingelement and Entity.
13
+ #
14
+ # The Object.is_a? method is the common way of determining what sort of Entity
15
+ # you're dealing with.
16
+ #
17
+ # @example
18
+ # # Count how many faces are in the current selection.
19
+ # selection = Sketchup.active_model.selection
20
+ # face_count = 0
21
+ #
22
+ # # Look at all of the entities in the selection.
23
+ # selection.each { |entity|
24
+ # if entity.is_a? Sketchup::Face
25
+ # face_count = face_count + 1
26
+ # end
27
+ # }
28
+ #
29
+ # UI.messagebox("There are " + face_count.to_s + " faces selected.")
30
+ #
31
+ # @version SketchUp 6.0
32
+ class Sketchup::Entity
33
+
34
+ # Instance Methods
35
+
36
+ # The add_observer method is used to add an observer to the current object.
37
+ #
38
+ # @example
39
+ # entity = Sketchup.active_model.entities[0]
40
+ # if entity.valid?
41
+ # status = entity.add_observer observer
42
+ # end
43
+ #
44
+ # @param observer
45
+ # An observer.
46
+ #
47
+ # @return true if successful, false if unsuccessful.
48
+ #
49
+ # @version SketchUp 6.0
50
+ def add_observer(observer)
51
+ end
52
+
53
+ # The attribute_dictionaries method is used to retrieve the
54
+ # AttributeDictionaries collection attached to the entity.
55
+ #
56
+ # @example
57
+ # depth = 100
58
+ # width = 100
59
+ # model = Sketchup.active_model
60
+ # entities = model.active_entities
61
+ # pts = []
62
+ # pts[0] = [0, 0, 0]
63
+ # pts[1] = [width, 0, 0]
64
+ # pts[2] = [width, depth, 0]
65
+ # pts[3] = [0, depth, 0]
66
+ #
67
+ # # Add the face to the entities in the model
68
+ # face = entities.add_face pts
69
+ #
70
+ # # I just happen to know that the second and third entities in the
71
+ # # entities objects are edges.
72
+ # entity1 = entities[1]
73
+ # status = entity1.set_attribute "testdictionary", "test", 115
74
+ # attrdicts = entity1.attribute_dictionaries
75
+ #
76
+ # @return attributedictionaries - the AttributeDictionaries
77
+ # object associated with the entity, or nil if there are
78
+ # no attribute_dictionary objects associated with the
79
+ # model. Care must be taken if nil is returned, for
80
+ # example: invoking attribute_dictionaries.length will
81
+ # throw a NoMethodError exception, not return 0.
82
+ #
83
+ # @version SketchUp 6.0
84
+ def attribute_dictionaries
85
+ end
86
+
87
+ # The attribute_dictionary method is used to retrieve an attribute dictionary
88
+ # with a given name that is attached to an Entity.
89
+ #
90
+ # @example
91
+ # depth = 100
92
+ # width = 100
93
+ # model = Sketchup.active_model
94
+ # entities = model.active_entities
95
+ # pts = []
96
+ # pts[0] = [0, 0, 0]
97
+ # pts[1] = [width, 0, 0]
98
+ # pts[2] = [width, depth, 0]
99
+ # pts[3] = [0, depth, 0]
100
+ #
101
+ # # Add the face to the entities in the model
102
+ # face = entities.add_face pts
103
+ #
104
+ # # I just happen to know that the second and third entities in the
105
+ # # entities objects are edges.
106
+ # entity1 = entities[1]
107
+ # status = entity1.set_attribute "testdictionary", "test", 115
108
+ # attrdict = entity1.attribute_dictionary "testdictionary"
109
+ #
110
+ # @param name
111
+ # The name of the attribute dictionary.
112
+ #
113
+ # @param [optional] create
114
+ # boolean, if set to true then the attribute
115
+ # dictionary will be created if it does not exist.
116
+ #
117
+ # @return attributedictionary - an AttributeDictionary object if
118
+ # successful, or nil if there is no attribute dictionary
119
+ #
120
+ # @version SketchUp 6.0
121
+ def attribute_dictionary(name, create)
122
+ end
123
+
124
+ # The delete_attribute method is used to delete an attribute from an entity.
125
+ #
126
+ # If only the dictionary_name is given, then it deletes the entire
127
+ # AttributeDictionary. Otherwise, delete_attribute deletes the attribute with
128
+ # the given key from the given dictionary.
129
+ #
130
+ # @example
131
+ # depth = 100
132
+ # width = 100
133
+ # model = Sketchup.active_model
134
+ # entities = model.active_entities
135
+ # pts = []
136
+ # pts[0] = [0, 0, 0]
137
+ # pts[1] = [width, 0, 0]
138
+ # pts[2] = [width, depth, 0]
139
+ # pts[3] = [0, depth, 0]
140
+ # # Add the face to the entities in the model
141
+ # face = entities.add_face pts
142
+ #
143
+ # # I just happen to know that the second and third entities in the
144
+ # # entities objects are edges.
145
+ # entity1 = entities[1]
146
+ # status = entity1.set_attribute "testdictionary", "test", 115
147
+ # status = entity1.delete_attribute "testdictionary"
148
+ #
149
+ # @overload delete_attribute(dictionary_name)
150
+ #
151
+ # @param dictionary_name The name of an attribute dictionary.
152
+ # @return nil
153
+ #
154
+ # @overload delete_attribute(dictionary_name, key)
155
+ #
156
+ # @param dictionary_name The name of an attribute dictionary.
157
+ # @param key An attribute key.
158
+ # @return nil
159
+ #
160
+ # @version SketchUp 6.0
161
+ def delete_attribute(*args)
162
+ end
163
+
164
+ # The deleted? method is used to determine if your entity is still valid (not
165
+ # deleted by another script, for example.)
166
+ #
167
+ # @example
168
+ # depth = 100
169
+ # width = 100
170
+ # model = Sketchup.active_model
171
+ # entities = model.active_entities
172
+ # pts = []
173
+ # pts[0] = [0, 0, 0]
174
+ # pts[1] = [width, 0, 0]
175
+ # pts[2] = [width, depth, 0]
176
+ # pts[3] = [0, depth, 0]
177
+ #
178
+ # # Add the face to the entities in the model
179
+ # face = entities.add_face pts
180
+ # entity1 = entities[1]
181
+ # status = entity1.deleted?
182
+ #
183
+ # @return status - true if deleted, false if not deleted
184
+ #
185
+ # @return [Boolean]
186
+ #
187
+ # @version SketchUp 6.0
188
+ def deleted?
189
+ end
190
+
191
+ # The entityID method is used to retrieve a unique ID assigned to an entity.
192
+ #
193
+ # The entityID is not persistent between sessions.
194
+ #
195
+ # @example
196
+ # depth = 100
197
+ # width = 100
198
+ # model = Sketchup.active_model
199
+ # entities = model.active_entities
200
+ # pts = []
201
+ # pts[0] = [0, 0, 0]
202
+ # pts[1] = [width, 0, 0]
203
+ # pts[2] = [width, depth, 0]
204
+ # pts[3] = [0, depth, 0]
205
+ #
206
+ # # Add the face to the entities in the model
207
+ # face = entities.add_face pts
208
+ # entity1 = entities[1]
209
+ # id = entity1.entityID
210
+ #
211
+ # @return id - the id for the Entity object
212
+ #
213
+ # @version SketchUp 6.0
214
+ def entityID
215
+ end
216
+
217
+ # The get_attribute method is used to retrieve the value of an attribute in
218
+ # the entity's attribute dictionary.
219
+ #
220
+ # If the third parameter, default_value, is not passed and there is no
221
+ # attribute that matches the given name, it returns nil.
222
+ #
223
+ # If default_value is provided and there is no matching attribute it returns
224
+ # the given value. It does not create an attribute with that name though.
225
+ #
226
+ # @example
227
+ # depth = 100
228
+ # width = 100
229
+ # model = Sketchup.active_model
230
+ # entities = model.active_entities
231
+ # pts = []
232
+ # pts[0] = [0, 0, 0]
233
+ # pts[1] = [width, 0, 0]
234
+ # pts[2] = [width, depth, 0]
235
+ # pts[3] = [0, depth, 0]
236
+ #
237
+ # # Add the face to the entities in the model
238
+ # face = entities.add_face pts
239
+ #
240
+ # # I just happen to know that the second and third entities in the
241
+ # # entities objects are edges.
242
+ # entity1 = entities[1]
243
+ # status = entity1.set_attribute "testdictionary", "test", 115
244
+ # value = entity1.get_attribute "testdictoinary", "test"
245
+ #
246
+ # @param dict_name
247
+ # The name of an attribute dictionary.
248
+ #
249
+ # @param key
250
+ # An attribute key.
251
+ #
252
+ # @param [optional] default_value
253
+ # A default value to return if no attribute
254
+ # is found.
255
+ #
256
+ # @return value - the retrieved value
257
+ #
258
+ # @version SketchUp 6.0
259
+ def get_attribute(dict_name, key, default_value = nil)
260
+ end
261
+
262
+ # The to_s method is used to retrieve the string representation of the entity.
263
+ #
264
+ # @example
265
+ # depth = 100
266
+ # width = 100
267
+ # model = Sketchup.active_model
268
+ # entities = model.active_entities
269
+ # pts = []
270
+ # pts[0] = [0, 0, 0]
271
+ # pts[1] = [width, 0, 0]
272
+ # pts[2] = [width, depth, 0]
273
+ # pts[3] = [0, depth, 0]
274
+ #
275
+ # # Add the face to the entities in the model
276
+ # face = entities.add_face pts
277
+ #
278
+ # # I just happen to know that the second and third entities in the
279
+ # # entities objects are edges.
280
+ # entity1 = entities[1]
281
+ # st = entity1.to_s
282
+ #
283
+ # @return string - the string representation of the entity if
284
+ # successful
285
+ #
286
+ # @version SketchUp 6.0
287
+ def inspect
288
+ end
289
+
290
+ # The model method is used to retrieve the model for the entity.
291
+ #
292
+ # @example
293
+ # depth = 100
294
+ # width = 100
295
+ # model = Sketchup.active_model
296
+ # entities = model.active_entities
297
+ # pts = []
298
+ # pts[0] = [0, 0, 0]
299
+ # pts[1] = [width, 0, 0]
300
+ # pts[2] = [width, depth, 0]
301
+ # pts[3] = [0, depth, 0]
302
+ #
303
+ # # Add the face to the entities in the model
304
+ # face = entities.add_face pts
305
+ #
306
+ # # I just happen to know that the second and third entities in the
307
+ # # entities objects are edges.
308
+ # entity1 = entities[1]
309
+ # m = entity1.model
310
+ #
311
+ # @return model - the model that contains the Entity object
312
+ #
313
+ # @version SketchUp 6.0
314
+ def model
315
+ end
316
+
317
+ # The parent method is used to retrieve the parent of the entity.
318
+ #
319
+ # The parent will be a ComponentDefinition, a Group, or a Model, whatever
320
+ # the entity is contained within.
321
+ #
322
+ # @example
323
+ # depth = 100
324
+ # width = 100
325
+ # model = Sketchup.active_model
326
+ # entities = model.active_entities
327
+ # pts = []
328
+ # pts[0] = [0, 0, 0]
329
+ # pts[1] = [width, 0, 0]
330
+ # pts[2] = [width, depth, 0]
331
+ # pts[3] = [0, depth, 0]
332
+ #
333
+ # # Add the face to the entities in the model
334
+ # face = entities.add_face pts
335
+ #
336
+ # # I just happen to know that the second and third entities in the
337
+ # # entities objects are edges.
338
+ # entity1 = entities[1]
339
+ # parent = entity1.parent
340
+ #
341
+ # @return entity - a Entity object representing the parent of
342
+ # this entity
343
+ #
344
+ # @version SketchUp 6.0
345
+ def parent
346
+ end
347
+
348
+ # The {#persistent_id} method is used to retrieve a unique persistent id
349
+ # assigned to an entity.
350
+ #
351
+ # The persistent id persistent between sessions.
352
+ #
353
+ # @example
354
+ # model = Sketchup.active_model
355
+ # entities = model.active_entities
356
+ # pts = [
357
+ # Geom::Point3d.new(0, 0, 0)
358
+ # Geom::Point3d.new(9, 0, 0)
359
+ # Geom::Point3d.new(9, 9, 0)
360
+ # Geom::Point3d.new(0, 9, 0)
361
+ # ]
362
+ #
363
+ # # Add the face to the entities in the model
364
+ # group = entities.add_group
365
+ # face = group.entities.add_face(pts)
366
+ # pid = face.persistent_id
367
+ # # Exploding the group will preserve the pid.
368
+ # pid == face.persistent_id # Should return true
369
+ #
370
+ # @return [Integer] the id for the {Sketchup::Entity} object
371
+ #
372
+ # @version SketchUp 2017
373
+ def persistent_id
374
+ end
375
+
376
+ # The remove_observer method is used to remove an observer from the current
377
+ # object.
378
+ #
379
+ # @example
380
+ # entity = Sketchup.active_model.entities[0]
381
+ # if entity.valid?
382
+ # status = entity.remove_observer observer
383
+ # end
384
+ #
385
+ # @param observer
386
+ # An observer.
387
+ #
388
+ # @return true if successful, false if unsuccessful.
389
+ #
390
+ # @version SketchUp 6.0
391
+ def remove_observer(observer)
392
+ end
393
+
394
+ # The set attribute is used to set the value of an attribute in an attribute
395
+ # dictionary with the given name.
396
+ #
397
+ # This method will create a new AttributeDictionary if none exists.
398
+ #
399
+ # Note, a bug prior to SketchUp 2015 would corrupt the model if the key is
400
+ # an empty string. This also includes values that will evaluate to empty
401
+ # strings, such as nil.
402
+ #
403
+ # @example
404
+ # depth = 100
405
+ # width = 100
406
+ # model = Sketchup.active_model
407
+ # entities = model.active_entities
408
+ # pts = []
409
+ # pts[0] = [0, 0, 0]
410
+ # pts[1] = [width, 0, 0]
411
+ # pts[2] = [width, depth, 0]
412
+ # pts[3] = [0, depth, 0]
413
+ #
414
+ # # Add the face to the entities in the model
415
+ # face = entities.add_face pts
416
+ #
417
+ # # I just happen to know that the second and third entities in the
418
+ # # entities objects are edges.
419
+ # entity1 = entities[1]
420
+ # status = entity1.set_attribute "testdictionary", "test", 115
421
+ #
422
+ # @param dict_name
423
+ # The name of an attribute dictionary.
424
+ #
425
+ # @param key
426
+ # An attribute key.
427
+ #
428
+ # @param value
429
+ # The value for the attribute.
430
+ #
431
+ # @return value - the newly set value if successful
432
+ #
433
+ # @version SketchUp 6.0
434
+ def set_attribute(dict_name, key, value)
435
+ end
436
+
437
+ # The to_s method is used to retrieve the string representation of the entity.
438
+ #
439
+ # @example
440
+ # depth = 100
441
+ # width = 100
442
+ # model = Sketchup.active_model
443
+ # entities = model.active_entities
444
+ # pts = []
445
+ # pts[0] = [0, 0, 0]
446
+ # pts[1] = [width, 0, 0]
447
+ # pts[2] = [width, depth, 0]
448
+ # pts[3] = [0, depth, 0]
449
+ #
450
+ # # Add the face to the entities in the model
451
+ # face = entities.add_face pts
452
+ #
453
+ # # I just happen to know that the second and third entities in the
454
+ # # entities objects are edges.
455
+ # entity1 = entities[1]
456
+ # st = entity1.to_s
457
+ #
458
+ # @return string - the string representation of the entity if
459
+ # successful
460
+ #
461
+ # @version SketchUp 6.0
462
+ def to_s
463
+ end
464
+
465
+ # The typename method retrieves the type of the entity, which will be a string
466
+ # such as "Face", "Edge", or "Group".
467
+ #
468
+ # @example
469
+ # depth = 100
470
+ # width = 100
471
+ # model = Sketchup.active_model
472
+ # entities = model.active_entities
473
+ # pts = []
474
+ # pts[0] = [0, 0, 0]
475
+ # pts[1] = [width, 0, 0]
476
+ # pts[2] = [width, depth, 0]
477
+ # pts[3] = [0, depth, 0]
478
+ #
479
+ # # Add the face to the entities in the model
480
+ # face = entities.add_face pts
481
+ #
482
+ # # I just happen to know that the second and third entities in the
483
+ # # entities objects are edges.
484
+ # entity1 = entities[1]
485
+ # type = entity1.typename
486
+ #
487
+ # @return type - the type of the entity
488
+ #
489
+ # @version SketchUp 6.0
490
+ def typename
491
+ end
492
+
493
+ # The valid? method is used to determine if your entity is still valid (not
494
+ # deleted by another script, for example.)
495
+ #
496
+ # This method is functionally identical to the deleted? method.
497
+ #
498
+ # @example
499
+ # depth = 100
500
+ # width = 100
501
+ # model = Sketchup.active_model
502
+ # entities = model.active_entities
503
+ # pts = []
504
+ # pts[0] = [0, 0, 0]
505
+ # pts[1] = [width, 0, 0]
506
+ # pts[2] = [width, depth, 0]
507
+ # pts[3] = [0, depth, 0]
508
+ #
509
+ # # Add the face to the entities in the model
510
+ # face = entities.add_face pts
511
+ # entity1 = entities[1]
512
+ # status = entity1.valid?
513
+ #
514
+ # @return status - true if deleted, false if not deleted
515
+ #
516
+ # @return [Boolean]
517
+ #
518
+ # @version SketchUp 6.0
519
+ def valid?
520
+ end
521
+
522
+ end