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,597 @@
1
+ # Copyright:: Copyright 2017 Trimble Inc.
2
+ # License:: The MIT License (MIT)
3
+
4
+ # The ComponentInstance class is used to represent component instances of a
5
+ # component definition or components that have been dragged from the Component
6
+ # Browser and placed (thus, instanced) within the Model. Therefore, the
7
+ # ComponentInstance class contains a reference to a corresponding
8
+ # ComponentDefinition object and a Transformation object (which contains the
9
+ # location of the component in the Drawing Window).
10
+ #
11
+ # @version SketchUp 6.0
12
+ class Sketchup::ComponentInstance < Sketchup::Drawingelement
13
+
14
+ # Instance Methods
15
+
16
+ # The add_observer method is used to add an observer to the current object.
17
+ #
18
+ # @example
19
+ # entities = Sketchup.active_model.entities
20
+ # definition = Sketchup.active_model.definitions[0]
21
+ # transformation = Geom::Transformation.new([0,0,0])
22
+ # componentinstance = entities.add_instance(definition, transformation)
23
+ # status = componentinstance.add_observer observer
24
+ #
25
+ # @param observer
26
+ # An observer.
27
+ #
28
+ # @return true if successful, false if unsuccessful.
29
+ #
30
+ # @version SketchUp 6.0
31
+ def add_observer(observer)
32
+ end
33
+
34
+ # The definition method is used to retrieve the component definition for this
35
+ # component instance.
36
+ #
37
+ # @example
38
+ # # First create an instance for us to look at.
39
+ # entities = Sketchup.active_model.entities
40
+ # definition = Sketchup.active_model.definitions[0]
41
+ # transformation = Geom::Transformation.new([0,0,0])
42
+ # componentinstance = entities.add_instance(definition, transformation)
43
+ #
44
+ # # You can get an instance's definition with this method.
45
+ # definition = componentinstance.definition
46
+ #
47
+ # @return componentdefinition - a ComponentDefinition object if
48
+ # successful
49
+ #
50
+ # @version SketchUp 6.0
51
+ def definition
52
+ end
53
+
54
+ # The definition= method is used to set the component definition for this
55
+ # component.
56
+ #
57
+ # This method causes the instance to use a different definition, but it will
58
+ # use the same transformation to position it in the Model.
59
+ #
60
+ # @example
61
+ # # Assumes that the active model contains two different components.
62
+ # instance1 = Sketchup.active_model.entities[0]
63
+ # instance2 = Sketchup.active_model.entities[1]
64
+ #
65
+ # # Grab handles to our two definitions.
66
+ # definition1 = instance1.definition
67
+ # definition2 = instance2.definition
68
+ #
69
+ # # Replace 2nd instance with the 1st definition.
70
+ # instance2.definition = definition1
71
+ #
72
+ # @param definition
73
+ # A ComponentDefinition object to set.
74
+ #
75
+ # @return componentdefinition - the ComponentDefinition object
76
+ # that was set if successful, false if unsuccessful
77
+ #
78
+ # @version SketchUp 6.0
79
+ def definition=(definition)
80
+ end
81
+
82
+ # The equals? method is used to determine if a component instance is
83
+ # geometrically equivalent to another instance.
84
+ #
85
+ # @example
86
+ # entities = Sketchup.active_model.entities
87
+ # instance1 = entities[0]
88
+ # instance2 = entities[1]
89
+ # status = instance1.equals?(instance2)
90
+ #
91
+ # @param instance
92
+ # The instance to compare this instance with.
93
+ #
94
+ # @return status - true if the instances are geometrically
95
+ # equivalent.
96
+ # Otherwise false.
97
+ #
98
+ # @return [Boolean]
99
+ #
100
+ # @version SketchUp 8.0
101
+ def equals?(instance)
102
+ end
103
+
104
+ # The explode method is used to explode the component instance into separate
105
+ # entities.
106
+ #
107
+ # @example
108
+ # # Assuming 'instance' is a ComponentInstance object
109
+ # array = instance.explode
110
+ # if array
111
+ # UI.messagebox "Exploded the component instance"
112
+ # else
113
+ # UI.messagebox "Failure"
114
+ # end
115
+ #
116
+ # @return An array of entity objects if successful, false if
117
+ # unsuccessful
118
+ #
119
+ # @version SketchUp 6.0
120
+ def explode
121
+ end
122
+
123
+ # The glued_to method is used to retrieve the entity that this instance is
124
+ # glued to.
125
+ #
126
+ # Returns nil if it is not glued to anything.
127
+ #
128
+ # @example
129
+ # point = Geom::Point3d.new 10,20,30
130
+ # transform = Geom::Transformation.new point
131
+ # model = Sketchup.active_model
132
+ # entities = model.active_entities
133
+ # path = Sketchup.find_support_file "Bed.skp",
134
+ # "Components/Components Sampler/"
135
+ # definitions = model.definitions
136
+ # componentdefinition = definitions.load path
137
+ # instance = entities.add_instance componentdefinition, transform
138
+ # status = instance.glued_to
139
+ #
140
+ # @return entity - the Entity object that the instance is glued
141
+ # to (if successful)
142
+ #
143
+ # @version SketchUp 6.0
144
+ def glued_to
145
+ end
146
+
147
+ # The glued_to= method glues this instance to a face.
148
+ #
149
+ # This method will raise an exception if the instance cannot be glued to the
150
+ # given face. Instances cannot be glued if the definition of the instance
151
+ # doesn't support gluing or if the alignment is wrong.
152
+ #
153
+ # @example
154
+ # depth = 100
155
+ # width = 100
156
+ # path=Sketchup.find_support_file "Bed.skp",
157
+ # "Components/Components Sampler/"
158
+ # model = Sketchup.active_model
159
+ # entities = model.active_entities
160
+ # pts = []
161
+ # pts[0] = [0, 0, 0]
162
+ # pts[1] = [width, 0, 0]
163
+ # pts[2] = [width, depth, 0]
164
+ # pts[3] = [0, depth, 0]
165
+ # # Add the face to the entities in the model
166
+ # face = entities.add_face pts
167
+ # point = Geom::Point3d.new 10,10,0
168
+ # transform = Geom::Transformation.new point
169
+ # definitions = model.definitions
170
+ # componentdefinition = definitions.load path
171
+ # instance = entities.add_instance componentdefinition, transform
172
+ # begin
173
+ # status = instance.glued_to = face
174
+ # rescue
175
+ # UI.messagebox $!.message
176
+ # end
177
+ # if (status)
178
+ # UI.messagebox status.to_s
179
+ # else
180
+ # UI.messagebox "Failure"
181
+ # end
182
+ #
183
+ # @param [Sketchup::Face] face
184
+ #
185
+ # @return face - the Face object where the component is glued if
186
+ # successful
187
+ #
188
+ # @version SketchUp 6.0
189
+ def glued_to=(face)
190
+ end
191
+
192
+ # The guid method is used to get the base 64 encoded unique id
193
+ # for this SketchUp object.
194
+ #
195
+ # @example
196
+ # entities = Sketchup.active_model.entities
197
+ # definition = Sketchup.active_model.definitions[0]
198
+ # transformation = Geom::Transformation.new([0,0,0])
199
+ # componentinstance = entities.add_instance(definition, transformation)
200
+ # guid = componentinstance.guid
201
+ #
202
+ # @return guid - a unique 22 character string
203
+ #
204
+ # @version SketchUp 2014
205
+ def guid
206
+ end
207
+
208
+ # The intersect method is used to compute the boolean intersection of two
209
+ # instances representing manifold solid volumes (this - arg). If the specified
210
+ # objects (this and arg) do not represent manifold volumes, this method fails.
211
+ #
212
+ # @example
213
+ # entities = Sketchup.active_model.entities
214
+ # instance1 = entities[0]
215
+ # instance2 = entities[1]
216
+ # result = instance1.intersect(instance2)
217
+ #
218
+ # @param instance
219
+ # The instance to intersect this instance with.
220
+ #
221
+ # @return result - The resultant group if the two objects
222
+ # (this and arg) represent manifold solids and the
223
+ # operation succeeds otherwise nil is returned.
224
+ #
225
+ # @version SketchUp 8.0
226
+ def intersect(instance)
227
+ end
228
+
229
+ # The locked= method is used to lock a component instance.
230
+ #
231
+ # @example
232
+ # entities = Sketchup.active_model.entities
233
+ # definition = Sketchup.active_model.definitions[0]
234
+ # transformation = Geom::Transformation.new([0,0,0])
235
+ # componentinstance = entities.add_instance(definition, transformation)
236
+ # status = componentinstance.locked = true
237
+ #
238
+ # @param [Boolean] lock
239
+ #
240
+ # @return status - true if the component instance is locked.
241
+ # False if the instance is not locked.
242
+ #
243
+ # @version SketchUp 6.0
244
+ def locked=(lock)
245
+ end
246
+
247
+ # The locked? method is used to determine if a component instance is locked.
248
+ #
249
+ # @example
250
+ # entities = Sketchup.active_model.entities
251
+ # definition = Sketchup.active_model.definitions[0]
252
+ # transformation = Geom::Transformation.new([0,0,0])
253
+ # componentinstance = entities.add_instance(definition, transformation)
254
+ # status = componentinstance.locked?
255
+ #
256
+ # @return status - true if the component instance is locked.
257
+ # False if the instance is not locked.
258
+ #
259
+ # @return [Boolean]
260
+ #
261
+ # @version SketchUp 6.0
262
+ def locked?
263
+ end
264
+
265
+ # The make_unique method is used to create a component definition for this
266
+ # instance that is not used by any other instances.
267
+ #
268
+ # @example
269
+ # point = Geom::Point3d.new 10,20,30
270
+ # transform = Geom::Transformation.new point
271
+ # model = Sketchup.active_model
272
+ # entities = model.active_entities
273
+ #
274
+ # path = Sketchup.find_support_file "Bed.skp",
275
+ # "Components/Components Sampler/"
276
+ # definitions = model.definitions
277
+ # componentdefinition = definitions.load path
278
+ # instance = entities.add_instance componentdefinition, transform
279
+ # # Returns unique component instance
280
+ # status = instance.make_unique
281
+ #
282
+ # @return status - true if successful, false if unsuccessful
283
+ #
284
+ # @version SketchUp 6.0
285
+ def make_unique
286
+ end
287
+
288
+ # The manifold? method is used to determine if an instance is manifold.
289
+ #
290
+ # @example
291
+ # entities = Sketchup.active_model.entities
292
+ # definition = Sketchup.active_model.definitions[0]
293
+ # transformation = Geom::Transformation.new([0,0,0])
294
+ # componentinstance = entities.add_instance(definition, transformation)
295
+ # status = componentinstance.manifold?
296
+ #
297
+ # @return status - true if the instance is manifold.
298
+ # false if the instance is not manifold.
299
+ #
300
+ # @return [Boolean]
301
+ #
302
+ # @version SketchUp 8.0
303
+ def manifold?
304
+ end
305
+
306
+ # The move! method is the same as the transform! method, except that it does
307
+ # not record the move as an undo operation.
308
+ #
309
+ # This method is useful for moving entities inside of an animation or page
310
+ # transition.
311
+ #
312
+ # @example
313
+ # entities = Sketchup.active_model.entities
314
+ # definition = Sketchup.active_model.definitions[0]
315
+ # transformation = Geom::Transformation.new([0,0,0])
316
+ # componentinstance = entities.add_instance(definition, transformation)
317
+ # new_transformation = Geom::Transformation.new([100,0,0])
318
+ # componentinstance.move! new_transformation
319
+ #
320
+ # @param transform
321
+ # The transform object to apply to the component instance.
322
+ #
323
+ # @return status - true if successful, false if unsuccessful
324
+ #
325
+ # @version SketchUp 6.0
326
+ def move!(transform)
327
+ end
328
+
329
+ # The name method is used to get the name of this instance.
330
+ #
331
+ # @example
332
+ # entities = Sketchup.active_model.entities
333
+ # definition = Sketchup.active_model.definitions[0]
334
+ # transformation = Geom::Transformation.new([0,0,0])
335
+ # componentinstance = entities.add_instance(definition, transformation)
336
+ # name = componentinstance.name
337
+ #
338
+ # @return name - the string name of the ComponentInstance
339
+ #
340
+ # @version SketchUp 6.0
341
+ def name
342
+ end
343
+
344
+ # The name method is used to set the name of this instance.
345
+ #
346
+ # @example
347
+ # entities = Sketchup.active_model.entities
348
+ # definition = Sketchup.active_model.definitions[0]
349
+ # transformation = Geom::Transformation.new([0,0,0])
350
+ # componentinstance = entities.add_instance(definition, transformation)
351
+ # componentinstance.name = "Sang"
352
+ #
353
+ # @param name
354
+ # name - the string name to set
355
+ #
356
+ # @return instance - the newly named ComponentInstance
357
+ #
358
+ # @version SketchUp 6.0
359
+ def name=(name)
360
+ end
361
+
362
+ # The outer_shell method is used to compute the outer shell of the two
363
+ # instances representing manifold solid volumes (this || arg). If the specified
364
+ # objects (this and arg) do not represent manifold volumes, this method fails.
365
+ #
366
+ # @example
367
+ # entities = Sketchup.active_model.entities
368
+ # instance1 = entities[0]
369
+ # instance2 = entities[1]
370
+ # result = instance1.outer_shell(instance2)
371
+ #
372
+ # @param instance
373
+ # The instance to outer shell this instance with.
374
+ #
375
+ # @return result - The resultant group if the two objects
376
+ # (this and arg) represent manifold solids and the
377
+ # operation succeeds otherwise nil is returned.
378
+ #
379
+ # @version SketchUp 8.0
380
+ def outer_shell(instance)
381
+ end
382
+
383
+ # The remove_observer method is used to remove an observer from the current
384
+ # object.
385
+ #
386
+ # @example
387
+ # entities = Sketchup.active_model.entities
388
+ # definition = Sketchup.active_model.definitions[0]
389
+ # transformation = Geom::Transformation.new([0,0,0])
390
+ # componentinstance = entities.add_instance(definition, transformation)
391
+ # status = componentinstance.remove_observer observer
392
+ #
393
+ # @param observer
394
+ # An observer.
395
+ #
396
+ # @return true if successful, false if unsuccessful.
397
+ #
398
+ # @version SketchUp 6.0
399
+ def remove_observer(observer)
400
+ end
401
+
402
+ # The show_differences method is used to determine if a component instance is
403
+ # geometrically equivalent to another instance and in addition move the non-
404
+ # matching and matching geometry to new layers.
405
+ #
406
+ # This method will move both instances to Layer0. Geometry that is the same
407
+ # in both components will be moved to a new layer named def_name + "_same".
408
+ # Geometry that is not the same will be moved to a layer named def_name +
409
+ # "_diff".
410
+ #
411
+ # If verbose is true, a list of all the geometry that is different
412
+ # from one component to the other is displayed texturally in the Ruby Console.
413
+ #
414
+ # @example
415
+ # entities = Sketchup.active_model.entities
416
+ # instance1 = entities[0]
417
+ # instance2 = entities[1]
418
+ # status = instance1.show_differences(instance2, true)
419
+ #
420
+ # @param instance
421
+ # The instance to be compared with.
422
+ #
423
+ # @param verbose
424
+ # A boolean flag indicating whether to display a textural
425
+ # report of the found differences to the Ruby console.
426
+ #
427
+ # @return status - true if the instances are geometrically
428
+ # equivalent, otherwise false.
429
+ #
430
+ # @version SketchUp 8.0
431
+ def show_differences(instance, verbose)
432
+ end
433
+
434
+ # The split method is used to compute the boolean split (map overlay)of the two
435
+ # instances representing manifold solid volumes (this - arg). If the specified
436
+ # objects (this and arg) do not represent manifold volumes, this method fails.
437
+ #
438
+ # @example
439
+ # entities = Sketchup.active_model.entities
440
+ # instance1 = entities[0]
441
+ # instance2 = entities[1]
442
+ # result = instance1.split(instance2)
443
+ #
444
+ # @param instance
445
+ # The instance to split this instance with.
446
+ #
447
+ # @return result - A vector (array) of the three resultant groups
448
+ # if the two objects (this and arg) represent manifold
449
+ # solids and the operation succeeds otherwise Qnil is
450
+ # returned. The 3 groups are as follows: The intersection
451
+ # of volume 1 & volume 2, the difference of
452
+ # volume 1 minus volume 2, and the reverse difference of
453
+ # volume 2 minus volume 1.
454
+ #
455
+ # @version SketchUp 8.0
456
+ def split(instance)
457
+ end
458
+
459
+ # The subtract method is used to compute the boolean difference of the two
460
+ # instances representing manifold solid volumes (this - arg). If the specified
461
+ # objects (this and arg) do not represent manifold volumes, this method fails.
462
+ #
463
+ # @example
464
+ # entities = Sketchup.active_model.entities
465
+ # instance1 = entities[0]
466
+ # instance2 = entities[1]
467
+ # result = instance1.subtract(instance2)
468
+ #
469
+ # @param instance
470
+ # The instance to subtract this instance from.
471
+ #
472
+ # @return result - The resultant group if the two objects
473
+ # (this and arg) represent manifold solids and the
474
+ # operation succeeds otherwise nil is returned.
475
+ #
476
+ # @version SketchUp 8.0
477
+ def subtract(instance)
478
+ end
479
+
480
+ # Apply a {Geom::Transformation} to a component instance.
481
+ #
482
+ # @example
483
+ # entities = Sketchup.active_model.entities
484
+ # definition = Sketchup.active_model.definitions[0]
485
+ # transformation = Geom::Transformation.new([0, 0, 0])
486
+ # componentinstance = entities.add_instance(definition, transformation)
487
+ # new_transformation = Geom::Transformation.new([100, 0, 0])
488
+ # componentinstance.transform! new_transformation
489
+ #
490
+ # @param [Geom::Transformation] transform
491
+ # The transformation object to apply to the component instance.
492
+ #
493
+ # @return [Boolean]
494
+ #
495
+ # @version SketchUp 6.0
496
+ def transform!(transform)
497
+ end
498
+
499
+ # The transformation method is used to retrieve the transformation of this
500
+ # instance.
501
+ #
502
+ # @example
503
+ # entities = Sketchup.active_model.entities
504
+ # definition = Sketchup.active_model.definitions[0]
505
+ # transformation = Geom::Transformation.new([0,0,0])
506
+ # componentinstance = entities.add_instance(definition, transformation)
507
+ # t = componentinstance.transformation
508
+ #
509
+ # @return transformation - the Transformation object if
510
+ # successful
511
+ #
512
+ # @version SketchUp 6.0
513
+ def transformation
514
+ end
515
+
516
+ # The transformation= method is used to set the transformation on this
517
+ # instance.
518
+ #
519
+ # @example
520
+ # entities = Sketchup.active_model.entities
521
+ # definition = Sketchup.active_model.definitions[0]
522
+ # transformation = Geom::Transformation.new([0,0,0])
523
+ # componentinstance = entities.add_instance(definition, transformation)
524
+ # new_transformation = Geom::Transformation.new([100,0,0])
525
+ # componentinstance.transformation = new_transformation
526
+ #
527
+ # @param transformation
528
+ # A Transformation object to apply.
529
+ #
530
+ # @return instance - the transformed ComponentInstance
531
+ #
532
+ # @version SketchUp 6.0
533
+ def transformation=(transformation)
534
+ end
535
+
536
+ # The trim method is used to compute the (non-destructive) boolean difference
537
+ # of the two instances representing manifold solid volumes (this - arg). If
538
+ # the specified objects (this and arg) do not represent manifold volumes, this
539
+ # method fails.
540
+ #
541
+ # @example
542
+ # entities = Sketchup.active_model.entities
543
+ # instance1 = entities[0]
544
+ # instance2 = entities[1]
545
+ # result = instance1.trim(instance2)
546
+ #
547
+ # @param instance
548
+ # The instance to trim this instance against.
549
+ #
550
+ # @return result - The resultant group if the two objects
551
+ # (this and arg) represent manifold solids and the
552
+ # operation succeeds otherwise nil is returned.
553
+ #
554
+ # @version SketchUp 8.0
555
+ def trim(instance)
556
+ end
557
+
558
+ # The union method is used to compute the boolean union of the two instances
559
+ # representing manifold solid volumes (this | arg). If the specified
560
+ # objects (this and arg) do not represent manifold volumes, this method fails.
561
+ #
562
+ # @example
563
+ # entities = Sketchup.active_model.entities
564
+ # instance1 = entities[0]
565
+ # instance2 = entities[1]
566
+ # result = instance1.union(instance2)
567
+ #
568
+ # @param instance
569
+ # The instance to union this instance with.
570
+ #
571
+ # @return result - The resultant group if the two objects
572
+ # (this and arg) represent manifold solids and the
573
+ # operation succeeds otherwise nil is returned.
574
+ #
575
+ # @version SketchUp 8.0
576
+ def union(instance)
577
+ end
578
+
579
+ # The volume method is used to compute the volume of this instance if and only
580
+ # if this instance is manifold.
581
+ #
582
+ # @example
583
+ # entities = Sketchup.active_model.entities
584
+ # definition = Sketchup.active_model.definitions[0]
585
+ # transformation = Geom::Transformation.new([0,0,0])
586
+ # componentinstance = entities.add_instance(definition, transformation)
587
+ # volume = componentinstance.volume
588
+ #
589
+ # @return volume - If the instance represents a manifold volume,
590
+ # volume will be a positive value. If volume is negative,
591
+ # the instance is not manifold.
592
+ #
593
+ # @version SketchUp 8.0
594
+ def volume
595
+ end
596
+
597
+ end