sketchup-api-stubs 0.1.2 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. checksums.yaml +4 -4
  2. data/SketchUp/Geom/BoundingBox.rb +17 -20
  3. data/SketchUp/Geom/Bounds2d.rb +172 -0
  4. data/SketchUp/Geom/LatLong.rb +31 -16
  5. data/SketchUp/Geom/OrientedBounds2d.rb +102 -0
  6. data/SketchUp/Geom/Point2d.rb +365 -0
  7. data/SketchUp/Geom/Point3d.rb +121 -110
  8. data/SketchUp/Geom/PolygonMesh.rb +30 -21
  9. data/SketchUp/Geom/Transformation.rb +8 -4
  10. data/SketchUp/Geom/Transformation2d.rb +125 -0
  11. data/SketchUp/Geom/UTM.rb +43 -37
  12. data/SketchUp/Geom/Vector2d.rb +497 -0
  13. data/SketchUp/Geom/Vector3d.rb +143 -131
  14. data/SketchUp/Layout.rb +25 -0
  15. data/SketchUp/Layout/AngularDimension.rb +569 -0
  16. data/SketchUp/Layout/AutoTextDefinition.rb +417 -0
  17. data/SketchUp/Layout/AutoTextDefinitions.rb +186 -0
  18. data/SketchUp/Layout/ConnectionPoint.rb +70 -0
  19. data/SketchUp/Layout/Document.rb +458 -0
  20. data/SketchUp/Layout/Ellipse.rb +29 -0
  21. data/SketchUp/Layout/Entities.rb +155 -0
  22. data/SketchUp/Layout/Entity.rb +363 -0
  23. data/SketchUp/Layout/FormattedText.rb +349 -0
  24. data/SketchUp/Layout/Grid.rb +131 -0
  25. data/SketchUp/Layout/Group.rb +261 -0
  26. data/SketchUp/Layout/Image.rb +86 -0
  27. data/SketchUp/Layout/Label.rb +371 -0
  28. data/SketchUp/Layout/Layer.rb +222 -0
  29. data/SketchUp/Layout/LayerInstance.rb +128 -0
  30. data/SketchUp/Layout/Layers.rb +232 -0
  31. data/SketchUp/Layout/LinearDimension.rb +563 -0
  32. data/SketchUp/Layout/LockedEntityError.rb +10 -0
  33. data/SketchUp/Layout/LockedLayerError.rb +11 -0
  34. data/SketchUp/Layout/Page.rb +187 -0
  35. data/SketchUp/Layout/PageInfo.rb +393 -0
  36. data/SketchUp/Layout/Pages.rb +216 -0
  37. data/SketchUp/Layout/Path.rb +326 -0
  38. data/SketchUp/Layout/Rectangle.rb +174 -0
  39. data/SketchUp/Layout/SketchUpModel.rb +522 -0
  40. data/SketchUp/Layout/Style.rb +1520 -0
  41. data/SketchUp/Layout/Table.rb +290 -0
  42. data/SketchUp/Layout/TableCell.rb +149 -0
  43. data/SketchUp/Layout/TableColumn.rb +139 -0
  44. data/SketchUp/Layout/TableRow.rb +135 -0
  45. data/SketchUp/Sketchup/Animation.rb +7 -4
  46. data/SketchUp/Sketchup/ArcCurve.rb +10 -10
  47. data/SketchUp/Sketchup/AttributeDictionaries.rb +13 -4
  48. data/SketchUp/Sketchup/AttributeDictionary.rb +12 -12
  49. data/SketchUp/Sketchup/Color.rb +68 -78
  50. data/SketchUp/Sketchup/ComponentDefinition.rb +60 -60
  51. data/SketchUp/Sketchup/ComponentInstance.rb +57 -55
  52. data/SketchUp/Sketchup/DefinitionList.rb +34 -17
  53. data/SketchUp/Sketchup/Drawingelement.rb +19 -21
  54. data/SketchUp/Sketchup/Edge.rb +22 -24
  55. data/SketchUp/Sketchup/Entities.rb +173 -162
  56. data/SketchUp/Sketchup/Entity.rb +71 -55
  57. data/SketchUp/Sketchup/Face.rb +45 -44
  58. data/SketchUp/Sketchup/Group.rb +47 -49
  59. data/SketchUp/Sketchup/Image.rb +16 -0
  60. data/SketchUp/Sketchup/ImageRep.rb +226 -0
  61. data/SketchUp/Sketchup/InstancePath.rb +13 -13
  62. data/SketchUp/Sketchup/Layer.rb +15 -17
  63. data/SketchUp/Sketchup/Material.rb +40 -30
  64. data/SketchUp/Sketchup/Materials.rb +40 -22
  65. data/SketchUp/Sketchup/Menu.rb +5 -5
  66. data/SketchUp/Sketchup/Model.rb +230 -228
  67. data/SketchUp/Sketchup/Page.rb +32 -0
  68. data/SketchUp/Sketchup/Pages.rb +3 -4
  69. data/SketchUp/Sketchup/RenderingOptions.rb +21 -16
  70. data/SketchUp/Sketchup/SectionPlane.rb +64 -0
  71. data/SketchUp/Sketchup/Selection.rb +20 -28
  72. data/SketchUp/Sketchup/ShadowInfo.rb +14 -14
  73. data/SketchUp/Sketchup/Text.rb +24 -26
  74. data/SketchUp/Sketchup/Texture.rb +28 -12
  75. data/SketchUp/Sketchup/Vertex.rb +14 -11
  76. data/SketchUp/Sketchup/View.rb +126 -116
  77. data/SketchUp/UI/Command.rb +17 -17
  78. data/SketchUp/UI/HtmlDialog.rb +8 -5
  79. data/SketchUp/UI/Notification.rb +1 -1
  80. data/SketchUp/UI/Toolbar.rb +13 -14
  81. data/SketchUp/UI/WebDialog.rb +55 -59
  82. data/SketchUp/_top_level.rb +139 -27
  83. data/SketchUp/{Array.rb → array.rb} +167 -30
  84. data/SketchUp/{Geom.rb → geom.rb} +9 -7
  85. data/SketchUp/{LanguageHandler.rb → languagehandler.rb} +15 -15
  86. data/SketchUp/{Length.rb → length.rb} +15 -15
  87. data/SketchUp/{Numeric.rb → numeric.rb} +19 -19
  88. data/SketchUp/sketchup.rb +167 -156
  89. data/SketchUp/{SketchupExtension.rb → sketchupextension.rb} +27 -27
  90. data/SketchUp/{String.rb → string.rb} +1 -1
  91. data/SketchUp/ui.rb +113 -87
  92. metadata +46 -9
@@ -22,7 +22,7 @@ class Sketchup::Menu
22
22
  #
23
23
  # @overload add_item(menu, &block)
24
24
  #
25
- # @param [String] menu The name of the menu to add.
25
+ # @param [String] menu The name of the menu to add.
26
26
  # @yield A block that will be invoked when the menu item is selected.
27
27
  # @return [Integer] A unique integer id for the added menu item.
28
28
  #
@@ -41,7 +41,7 @@ class Sketchup::Menu
41
41
  # plugins_menu = UI.menu("Plugins")
42
42
  # plugins_menu.add_separator
43
43
  #
44
- # @return nil
44
+ # @return [nil]
45
45
  #
46
46
  # @version SketchUp 6.0
47
47
  def add_separator
@@ -59,7 +59,7 @@ class Sketchup::Menu
59
59
  # @param [String] title
60
60
  # The title of the sub menu.
61
61
  #
62
- # @return submenu - a Menu object
62
+ # @return [Sketchup::Menu] a Menu object
63
63
  #
64
64
  # @version SketchUp 6.0
65
65
  def add_submenu(title)
@@ -80,10 +80,10 @@ class Sketchup::Menu
80
80
  # end
81
81
  # }
82
82
  #
83
- # @param menu
83
+ # @param [String] menu
84
84
  # A string name of the menu to add.
85
85
  #
86
- # @return item_id - a unique numerical item id for the menu
86
+ # @return [Integer] a unique numerical item id for the menu
87
87
  #
88
88
  # @version SketchUp 6.0
89
89
  #
@@ -51,6 +51,7 @@ class Sketchup::Model
51
51
  VERSION_2015 = nil # Stub value.
52
52
  VERSION_2016 = nil # Stub value.
53
53
  VERSION_2017 = nil # Stub value.
54
+ VERSION_2018 = nil # Stub value.
54
55
  VERSION_3 = nil # Stub value.
55
56
  VERSION_4 = nil # Stub value.
56
57
  VERSION_5 = nil # Stub value.
@@ -69,15 +70,19 @@ class Sketchup::Model
69
70
  # @example
70
71
  # status = model.abort_operation
71
72
  #
72
- # @return status - true if successful, false if unsuccessful
73
+ # @return [Boolean] true if successful, false if unsuccessful
73
74
  #
74
75
  # @version SketchUp 6.0
75
76
  def abort_operation
76
77
  end
77
78
 
78
79
  # Returns an {Sketchup::Entities} object which contains
79
- # all of the entities in the active model, component, or group (if you are
80
- # within a group or component edit session.)
80
+ # the entities in the open group or component instance. If no group or
81
+ # component is open for editing then this will be the same as {#entities}.
82
+ #
83
+ # To perform actions upon the current set of entities the user is working with
84
+ # then this is the method to use. Entities selected by the user will be a
85
+ # subset of the active entities.
81
86
  #
82
87
  # @example
83
88
  # model = Sketchup.active_model
@@ -86,11 +91,13 @@ class Sketchup::Model
86
91
  #
87
92
  # @return [Sketchup::Entities]
88
93
  #
94
+ # @see #edit_transform
95
+ #
89
96
  # @version SketchUp 6.0
90
97
  def active_entities
91
98
  end
92
99
 
93
- # The active_layer method retrieves the active Layer.
100
+ # The {#active_layer} method retrieves the active Layer.
94
101
  #
95
102
  # The default layer in SketchUp is layer 0.
96
103
  #
@@ -98,8 +105,7 @@ class Sketchup::Model
98
105
  # model = Sketchup.active_model
99
106
  # layer = model.active_layer
100
107
  #
101
- # @return layer - a layer object containing the currently active
102
- # layer
108
+ # @return [Sketchup::Layer]
103
109
  #
104
110
  # @version SketchUp 6.0
105
111
  def active_layer
@@ -135,20 +141,20 @@ class Sketchup::Model
135
141
  # @example
136
142
  # active_path = Sketchup.active_model.active_path
137
143
  #
138
- # @return path - array of entities showing where the user is
144
+ # @return [Array<Sketchup::Drawingelement>, nil] array of entities showing where the user is
139
145
  # currently editing.
140
146
  #
141
147
  # @version SketchUp 7.0
142
148
  def active_path
143
149
  end
144
150
 
145
- # The active_view method returns the active View object for this model.
151
+ # The {#active_view} method returns the active View object for this model.
146
152
  #
147
153
  # @example
148
154
  # model = Sketchup.active_model
149
155
  # view = model.active_view
150
156
  #
151
- # @return view - a view object
157
+ # @return [Sketchup::View]
152
158
  #
153
159
  # @version SketchUp 6.0
154
160
  def active_view
@@ -165,16 +171,16 @@ class Sketchup::Model
165
171
  # # upper left corner of model window.
166
172
  # note = Sketchup.active_model.add_note('Hello World', 0.1, 0.1)
167
173
  #
168
- # @param note
174
+ # @param [String] note
169
175
  # A string note.
170
176
  #
171
- # @param x
172
- # A distance along the x axis between 0 and 1.
173
- #
174
- # @param y
177
+ # @param [Numeric] y
175
178
  # A distance along the y axis between 0 and 1.
176
179
  #
177
- # @return note - a note object or an exception if it is
180
+ # @param [Numeric] x
181
+ # A distance along the x axis between 0 and 1.
182
+ #
183
+ # @return [Sketchup::Text] a note object or an exception if it is
178
184
  # unsuccessful.
179
185
  #
180
186
  # @version SketchUp 6.0
@@ -188,17 +194,17 @@ class Sketchup::Model
188
194
  # observer = Sketchup::ModelObserver.new
189
195
  # status = model.add_observer(observer)
190
196
  #
191
- # @param observer
197
+ # @param [Object] observer
192
198
  # An observer.
193
199
  #
194
- # @return true if successful, false if unsuccessful.
200
+ # @return [Boolean] true if successful, false if unsuccessful.
195
201
  #
196
202
  # @version SketchUp 6.0
197
203
  def add_observer(observer)
198
204
  end
199
205
 
200
- # The attribute_dictionaries method retrieves the AttributeDictionaries object
201
- # that is associated with the Model.
206
+ # The {#attribute_dictionaries} method retrieves the AttributeDictionaries
207
+ # object that is associated with the Model.
202
208
  #
203
209
  # @example
204
210
  # model = Sketchup.active_model
@@ -210,7 +216,7 @@ class Sketchup::Model
210
216
  # # Code to do something if attribute dictionaries do not exist.
211
217
  # end
212
218
  #
213
- # @return attributedictionaries - the AttributeDictionaries
219
+ # @return [Sketchup::AttributeDictionaries] the AttributeDictionaries
214
220
  # object associated with the entity, or nil if there are
215
221
  # no attribute_dictionary objects associated with the
216
222
  # model. Care must be taken if nil is returned, for
@@ -233,22 +239,22 @@ class Sketchup::Model
233
239
  # create_if_empty = true
234
240
  # dictionary = model.attribute_dictionary('name', create_if_empty)
235
241
  #
236
- # @param name
242
+ # @param [String] name
237
243
  # The name of the dictionary you are attempting to
238
244
  # retrieve.
239
245
  #
240
- # @param [optional] create
246
+ # @param [Boolean] create
241
247
  # if set to true an attribute dictionary of the
242
248
  # given "name" will be created if not found.
243
249
  #
244
- # @return attributedictionary - an attribute dictionary object if
250
+ # @return [Sketchup::AttributeDictionary] an attribute dictionary object if
245
251
  # successful, nil if unsuccessful
246
252
  #
247
253
  # @version SketchUp 6.0
248
254
  def attribute_dictionary(name, create = false)
249
255
  end
250
256
 
251
- # The axes method returns the drawing axes for the model.
257
+ # The {#axes} method returns the drawing axes for the model.
252
258
  #
253
259
  # @example
254
260
  # # Point for a rectangle.
@@ -264,7 +270,7 @@ class Sketchup::Model
264
270
  # points.each { |point| point.transform!(tr) }
265
271
  # Sketchup.active_model.active_entities.add_face(points)
266
272
  #
267
- # @return Axes - the axes for the model.
273
+ # @return [Sketchup::Axes] the axes for the model.
268
274
  #
269
275
  # @version SketchUp 2016
270
276
  def axes
@@ -276,32 +282,32 @@ class Sketchup::Model
276
282
  # model = Sketchup.active_model
277
283
  # behavior = model.behavior
278
284
  #
279
- # @return behavior = behavior object for the model if successful
285
+ # @return [Sketchup::Behavior] behavior object for the model if successful
280
286
  #
281
287
  # @version SketchUp 6.0
282
288
  def behavior
283
289
  end
284
290
 
285
- # The bounds method retrieves the bounding box of the model.
291
+ # The {#bounds} method retrieves the bounding box of the model.
286
292
  #
287
293
  # @example
288
294
  # model = Sketchup.active_model
289
295
  # bounds = model.bounds
290
296
  #
291
- # @return boundingbox = bounding box for the model if successful
297
+ # @return [Geom::BoundingBox] bounding box for the model if successful
292
298
  #
293
299
  # @version SketchUp 6.0
294
300
  def bounds
295
301
  end
296
302
 
297
- # The classifications method is used to retrieve the Classifications object
303
+ # The {#classifications} method is used to retrieve the Classifications object
298
304
  # for this model.
299
305
  #
300
306
  # @example
301
307
  # model = Sketchup.active_model
302
308
  # c = model.classifications
303
309
  #
304
- # @return a Classifications object.
310
+ # @return [Sketchup::Classifications] a Classifications object.
305
311
  #
306
312
  # @version SketchUp 2015
307
313
  def classifications
@@ -316,13 +322,13 @@ class Sketchup::Model
316
322
  # model = Sketchup.active_model
317
323
  # model.close
318
324
  #
319
- # @param ignore_changes
320
- # boolean - if true, model changes will be
325
+ # @param [Boolean] ignore_changes
326
+ # If true, model changes will be
321
327
  # ignored and save prompts will be suppressed.
322
328
  # If false, changes will not be ignored and save
323
329
  # prompts will be displayed normally.
324
330
  #
325
- # @return nil
331
+ # @return [nil]
326
332
  #
327
333
  # @version SketchUp 2015
328
334
  def close(ignore_changes = false)
@@ -339,7 +345,7 @@ class Sketchup::Model
339
345
  # model = Sketchup.active_model
340
346
  # status = model.close_active
341
347
  #
342
- # @return status - true if successful, false if unsuccessful.
348
+ # @return [Boolean] true if successful, false if unsuccessful.
343
349
  #
344
350
  # @version SketchUp 6.0
345
351
  def close_active
@@ -353,22 +359,20 @@ class Sketchup::Model
353
359
  # @example
354
360
  # status = model.commit_operation
355
361
  #
356
- # @return status - true if successful, false if unsuccessful
362
+ # @return [Boolean] true if successful, false if unsuccessful
357
363
  #
358
364
  # @version SketchUp 6.0
359
365
  def commit_operation
360
366
  end
361
367
 
362
- # The definitions method retrieves a definition list containing all of the
368
+ # The {#definitions} method retrieves a definition list containing all of the
363
369
  # component definitions in the model.
364
370
  #
365
- # The returned definitions can be empty.
366
- #
367
371
  # @example
368
372
  # model = Sketchup.active_model
369
373
  # definitions = model.definitions
370
374
  #
371
- # @return definitions - a definitions list if successful.
375
+ # @return [Sketchup::DefinitionList]
372
376
  #
373
377
  # @version SketchUp 6.0
374
378
  def definitions
@@ -384,7 +388,7 @@ class Sketchup::Model
384
388
  # model = Sketchup.active_model
385
389
  # description = model.description
386
390
  #
387
- # @return description - a description if successful.
391
+ # @return [String] a description if successful.
388
392
  #
389
393
  # @version SketchUp 6.0
390
394
  def description
@@ -415,23 +419,24 @@ class Sketchup::Model
415
419
  # @example
416
420
  # Sketchup.active_model.edit_transform
417
421
  #
418
- # @return transform - the current edit Transformation
422
+ # @return [Geom::Transformation] the current edit Transformation
419
423
  #
420
424
  # @version SketchUp 7.0
421
425
  def edit_transform
422
426
  end
423
427
 
424
- # The entities method returns an Entities object containing an array of
425
- # entities in the model.
426
- #
427
- # If no entities are in your model, this method returns an empty Entities
428
- # object (an empty array)
428
+ # The {#entities} method returns an {Sketchup::Entities} object containing the
429
+ # entities in the root of model.
429
430
  #
430
431
  # @example
431
432
  # model = Sketchup.active_model
432
433
  # entities = model.entities
433
434
  #
434
- # @return entities - an Entities object if successful
435
+ # @note This does not return a collection of all the entities in the model,
436
+ # only the top level node of the model hierarchy. To get to all entities in
437
+ # a model you must recursivly traverse the model.
438
+ #
439
+ # @return [Sketchup::Entities] an Entities object if successful
435
440
  #
436
441
  # @version SketchUp 6.0
437
442
  def entities
@@ -447,74 +452,31 @@ class Sketchup::Model
447
452
  #
448
453
  # Format Support Changes:
449
454
  # * SketchUp 7.1 added COLLADA (.dae) export capability.
450
- # * SketchUp Pro 2016+ includes PDF export capability.
451
- #
452
- # The optional second parameter can be either:
453
- # - a boolean flag, which instructs the exporter to display a summary dialog after export
454
- # - a hash of options specific to the given exporter, which may include a summary dialog flag.
455
- #
456
- # The following describes the options that can be defined in the hash for the
457
- # various exporters.
458
- #
459
- # All exporters
460
- # - show_summary (default = false)
461
- #
462
- # DAE (COLLADA)
463
- # - triangulated_faces (default = true)
464
- # - doublesided_faces (default = true)
465
- # - edges (default = false)
466
- # - author_attribution (default = false)
467
- # - texture_maps (default = true)
468
- # - selectionset_only (default = false)
469
- # - preserve_instancing (default = true)
470
- #
471
- # PDF
472
- # WINDOWS OPTIONS
473
- # - output_profile_lines (default = true)
474
- # - output_section_lines (default = true)
475
- # - edge_extensions (default = true)
476
- # - match_screen_profiles (default = true)
477
- # - match_screen_section (default = true)
478
- # - match_screen_extensions (default = true)
479
- # - full_scale (default = true)
480
- # - map_fonts (default = true)
481
- # - drawing_units (default = Length::Inches)
482
- # - extension_units (default = Length::Feet)
483
- # - height_units (default = Length::Feet)
484
- # - model_units (default = Length::Feet)
485
- # - width_units (default = Length::Feet)
486
- # - extension_length (default = 0.0)
487
- # - line_width (default = 0.0)
488
- # - line_width_section (default = 0.0)
489
- # - length_in_drawing (default = 1.0)
490
- # - length_in_model (default = 1.0)
491
- # - window_height (default = 1.0)
492
- #
493
- # MAC OPTIONS
494
- # - line_weight (default = 0.5)
495
- # - imageWidth (default = 50)
496
- # - imageHeight (default = 50)
497
- #
498
- # Returns true or false indicating success or failure.
455
+ # * SketchUp Pro 2015+ added IFC export capability.
456
+ # * SketchUp Pro 2016+ added PDF export capability.
457
+ # * SketchUp Pro 2018+ added options for all 3D exporters.
458
+ #
459
+ # See the {file:pages/exporter_options.md Exporter Options} file for information
460
+ # on creating a valid hash for the various exporters.
499
461
  #
500
462
  # @example
501
463
  # model = Sketchup.active_model
502
464
  # show_summary = true
503
465
  #
504
466
  # # Export dwg file on a PC, showing a summary when complete.
505
- # status = model.export 'c:\my_export.dwg', show_summary
467
+ # status = model.export('c:\my_export.dwg', show_summary)
506
468
  #
507
469
  # # Export kmz file on Mac (note the absolute file path), without summary.
508
- # status = model.export '/Library/my_export.kmz'
470
+ # status = model.export('/Library/my_export.kmz')
509
471
  #
510
472
  # # Export pdf file on a PC, showing a summary when complete.
511
473
  # options_hash = { :show_summary => true,
512
474
  # :output_profile_lines => false,
513
475
  # :map_fonts => false,
514
476
  # :model_units => Length::Meter }
515
- # status = model.export 'c:/my_export.pdf', show_summary
477
+ # status = model.export('c:/my_export.pdf', options_hash)
516
478
  #
517
- # # Or for a COLLADA (.dae) file, using the default options
479
+ # # Or for a COLLADA (.dae) file.
518
480
  # options_hash = { :triangulated_faces => true,
519
481
  # :doublesided_faces => true,
520
482
  # :edges => false,
@@ -522,19 +484,24 @@ class Sketchup::Model
522
484
  # :texture_maps => true,
523
485
  # :selectionset_only => false,
524
486
  # :preserve_instancing => true }
525
- # status = model.export 'c:/my_export.dae', options_hash
487
+ # status = model.export('c:/my_export.dae', options_hash)
488
+ #
489
+ # @overload export(filename, show_summary = false)
526
490
  #
527
- # @param filename
528
- # The name of the file to export.
491
+ # @param [String] filename The name of the file to export.
492
+ # @param [Boolean] show_summary Boolean to show summary dialog.
493
+ # @return [Boolean]
529
494
  #
530
- # @param options
531
- # Either a true/false value or a hash table. See above
532
- # for details.
495
+ # @overload export(filename, options)
533
496
  #
534
- # @return status - true if successful, false if unsuccessful
497
+ # @param [String] filename The name of the file to export.
498
+ # @param [Hash] options
499
+ # @return [Boolean]
500
+ #
501
+ # @raise [ArgumentError] If the file extension is unsupported.
535
502
  #
536
503
  # @version SketchUp 6.0
537
- def export(filename, options)
504
+ def export(*args)
538
505
  end
539
506
 
540
507
  # Finds and returns entities by their entityID or GUID.
@@ -564,12 +531,12 @@ class Sketchup::Model
564
531
  # entities = model.find_entity_by_id(guid1, guid2, guid3)
565
532
  # entities = model.find_entity_by_id([guid1, guid2, guid3])
566
533
  #
567
- # @param ids_or_array
534
+ # @param [Array<Integer, String>] ids_or_array
568
535
  # Pass either a series of ids or a single array containing
569
536
  # ids. Ids must either be entityID Integers or GUID
570
537
  # Strings.
571
538
  #
572
- # @return entities_or_array Returns an array with Entity objects for each id
539
+ # @return [Array<Sketchup::Entity, nil>] Returns an array with Entity objects for each id
573
540
  # found and nil otherwise. Single Entity or nil when
574
541
  # called with a single id.
575
542
  #
@@ -630,17 +597,17 @@ class Sketchup::Model
630
597
  # model.set_attribute('testdictionary', 'test', 115)
631
598
  # value = model.get_attribute('testdictionary', 'test', 42)
632
599
  #
633
- # @param dictname
600
+ # @param [String] dictname
634
601
  # The name of the dictionary containing the value.
635
602
  #
636
- # @param key
637
- # The key containing the value.
638
- #
639
- # @param [optional] defaultvalue
603
+ # @param [Object] defaultvalue
640
604
  # default value that will be returned if a
641
605
  # value does not exist.
642
606
  #
643
- # @return value - the value for a given key in the given
607
+ # @param [String] key
608
+ # The key containing the value.
609
+ #
610
+ # @return [Object, nil] the value for a given key in the given
644
611
  # dictionary if a value exists; the default value if a
645
612
  # defaultvalue is provided and the value does not exist;
646
613
  # nil if the value does not exist and no defaultvalue is
@@ -657,7 +624,7 @@ class Sketchup::Model
657
624
  # model = Sketchup.active_model
658
625
  # datum = model.get_datum
659
626
  #
660
- # @return datum - a datum represented as a string if successful.
627
+ # @return [String] a datum represented as a string if successful.
661
628
  #
662
629
  # @version SketchUp 6.0
663
630
  def get_datum
@@ -682,10 +649,10 @@ class Sketchup::Model
682
649
  # model = Sketchup.active_model
683
650
  # product_family = model.get_product_family
684
651
  # if product_family == Sketchup::Model::ProLicensed then
685
- # puts("You are running licensed SketchUp Pro!")
652
+ # puts "You are running licensed SketchUp Pro!"
686
653
  # end
687
654
  #
688
- # @return number - the product family number.
655
+ # @return [Integer] the product family number.
689
656
  #
690
657
  # @version SketchUp 6.0
691
658
  def get_product_family
@@ -700,7 +667,7 @@ class Sketchup::Model
700
667
  # model = Sketchup.active_model
701
668
  # guid = model.guid
702
669
  #
703
- # @return guid - a globally unique identifier, in the form of a
670
+ # @return [String] a globally unique identifier, in the form of a
704
671
  # string, for the model
705
672
  #
706
673
  # @version SketchUp 6.0
@@ -710,22 +677,36 @@ class Sketchup::Model
710
677
  # The import method is used to load a file by recognizing the file extension
711
678
  # and calling appropriate importer.
712
679
  #
713
- # @example
680
+ # See the {file:pages/importer_options.md Importer Options} file for information
681
+ # on creating a valid hash for the various importers.
682
+ #
683
+ # @example Import for SketchUp 2017 and older
714
684
  # model = Sketchup.active_model
715
685
  # show_summary = true
716
- # status = model.import "filename", show_summary
686
+ # status = model.import("filename", show_summary)
687
+ #
688
+ # @example Import for SketchUp 2018+ and newer
689
+ # model = Sketchup.active_model
690
+ # options = { :units => "model",
691
+ # :merge_coplaner_faces => true,
692
+ # :show_summary => true }
693
+ # status = model.import("filename", options)
694
+ #
695
+ # @overload import(filename, options)
717
696
  #
718
- # @param filename
719
- # The name of the file to import.
697
+ # @param [String] filename The input filename.
698
+ # @param [Hash] options The options.
699
+ # @return [Boolean]
720
700
  #
721
- # @param show_summary
722
- # true if you want to show a summary window, false if you
723
- # do not want to show a summary window.
701
+ # @overload import(filename, show_summary = false)
724
702
  #
725
- # @return status - true if successful, false if unsuccessful
703
+ # @note This variant is for SketchUp 2017 and earlier.
704
+ # @param [String] filename The input filename.
705
+ # @param [Boolean] show_summary Show the summary dialog.
706
+ # @return [Boolean]
726
707
  #
727
708
  # @version SketchUp 6.0
728
- def import(filename, show_summary)
709
+ def import(*args)
729
710
  end
730
711
 
731
712
  # The {#instance_path_from_pid_path} method returns a instance path given a
@@ -772,24 +753,24 @@ class Sketchup::Model
772
753
  # local_point = model.latlong_to_point(lnglat_array)
773
754
  # model.entities.add_cpoint(local_point)
774
755
  #
775
- # @param lnglat_array
756
+ # @param [Array(Numeric, Numeric)] lnglat_array
776
757
  # A 2-element array containing first the longitude then
777
758
  # the latitude.
778
759
  #
779
- # @return point - a point3d object if successful, false if
760
+ # @return [Geom::Point3d] a point3d object if successful, false if
780
761
  # unsuccessful.
781
762
  #
782
763
  # @version SketchUp 6.0
783
764
  def latlong_to_point(lnglat_array)
784
765
  end
785
766
 
786
- # The layers method retrieves a collection of all Layers objects in the model.
767
+ # The {#layers method retrieves a collection of all Layers objects in the model.
787
768
  #
788
769
  # @example
789
770
  # model = Sketchup.active_model
790
771
  # layers = model.layers
791
772
  #
792
- # @return layers - a Layers object containing a collection of
773
+ # @return [Sketchup::Layers] a Layers object containing a collection of
793
774
  # layers in the model
794
775
  #
795
776
  # @version SketchUp 6.0
@@ -802,21 +783,21 @@ class Sketchup::Model
802
783
  # model = Sketchup.active_model
803
784
  # datums = model.list_datums
804
785
  #
805
- # @return datums - An Array object containing the datums
786
+ # @return [Array<String>] An Array object containing the datums
806
787
  # supported by SketchUp
807
788
  #
808
789
  # @version SketchUp 6.0
809
790
  def list_datums
810
791
  end
811
792
 
812
- # The materials method returns a collection of all of the materials in the
793
+ # The {#materials} method returns a collection of all of the materials in the
813
794
  # model.
814
795
  #
815
796
  # @example
816
797
  # model = Sketchup.active_model
817
798
  # materials = model.materials
818
799
  #
819
- # @return materials - materials collection.
800
+ # @return [Sketchup::Materials]
820
801
  #
821
802
  # @version SketchUp 6.0
822
803
  def materials
@@ -827,10 +808,10 @@ class Sketchup::Model
827
808
  # @example
828
809
  # Sketchup.active_model.mipmapping = false
829
810
  #
830
- # @param mipmap
831
- # boolean - whether mipmapping is turned on or off.
811
+ # @param [Boolean] mipmap
812
+ # whether mipmapping is turned on or off.
832
813
  #
833
- # @return boolean - the new mipmapping setting
814
+ # @return [Boolean] the new mipmapping setting
834
815
  #
835
816
  # @version SketchUp 7.0
836
817
  def mipmapping=(mipmap)
@@ -841,7 +822,7 @@ class Sketchup::Model
841
822
  # @example
842
823
  # mipmapping = Sketchup.active_model.mipmapping?
843
824
  #
844
- # @return boolean - the current mipmapping setting
825
+ # @return [Boolean]
845
826
  #
846
827
  # @return [Boolean]
847
828
  #
@@ -859,9 +840,7 @@ class Sketchup::Model
859
840
  # entities.add_group
860
841
  # status = model.modified?
861
842
  #
862
- # @return status = true if the model has been modified since last
863
- # save (and requires a save), false if the model has not
864
- # been modified.
843
+ # @return [Boolean]
865
844
  #
866
845
  # @return [Boolean]
867
846
  #
@@ -875,7 +854,7 @@ class Sketchup::Model
875
854
  # model = Sketchup.active_model
876
855
  # name = model.name
877
856
  #
878
- # @return name - string name of the model
857
+ # @return [String] string name of the model
879
858
  #
880
859
  # @version SketchUp 6.0
881
860
  def name
@@ -886,10 +865,10 @@ class Sketchup::Model
886
865
  # @example
887
866
  # Sketchup.active_model.name = "My New Model Name"
888
867
  #
889
- # @param name
890
- # - new name of the model
868
+ # @param [String] name
869
+ # new name of the model
891
870
  #
892
- # @return string - the new name
871
+ # @return [String] the new name
893
872
  #
894
873
  # @version SketchUp 6.0
895
874
  def name=(name)
@@ -902,11 +881,13 @@ class Sketchup::Model
902
881
  # number_of_faces = model.number_faces
903
882
  # puts "There are #{number_of_faces} faces in the model."
904
883
  #
884
+ # @return [Integer]
885
+ #
905
886
  # @version SketchUp 7.1
906
887
  def number_faces
907
888
  end
908
889
 
909
- # The options method retrieves the options manager that defines the options
890
+ # The {#options} method retrieves the options manager that defines the options
910
891
  # settings for the model.
911
892
  #
912
893
  # Use the string keys instead of numerical indicies when accessing the options
@@ -922,21 +903,20 @@ class Sketchup::Model
922
903
  # }
923
904
  # }
924
905
  #
925
- # @return optionsmanager - an OptionsManager object containing
926
- # one or more options providers if successful.
906
+ # @return [Sketchup::OptionsManager]
927
907
  #
928
908
  # @version SketchUp 6.0
929
909
  def options
930
910
  end
931
911
 
932
- # The pages method retrieves a Pages object containing all of the pages in the
933
- # Model.
912
+ # The {#pages} method retrieves a {Sketchup::Pages} object containing all of
913
+ # the pages in the model.
934
914
  #
935
915
  # @example
936
916
  # model = Sketchup.active_model
937
917
  # pages = model.pages
938
918
  #
939
- # @return pages - returns a Pages object with 0 or more pages.
919
+ # @return [Sketchup::Pages]
940
920
  #
941
921
  # @version SketchUp 6.0
942
922
  def pages
@@ -952,7 +932,7 @@ class Sketchup::Model
952
932
  # model = Sketchup.active_model
953
933
  # path = model.path
954
934
  #
955
- # @return path - an string containing the path for the currently
935
+ # @return [String] an string containing the path for the currently
956
936
  # opened model.
957
937
  #
958
938
  # @version SketchUp 6.0
@@ -965,15 +945,15 @@ class Sketchup::Model
965
945
  # @example
966
946
  # model.place_component componentdefinition, repeat
967
947
  #
968
- # @param componentdef
948
+ # @param [Sketchup::ComponentDefinition] componentdef
969
949
  # A component definition object containing the
970
950
  # definition (blueprint) for the component.
971
951
  #
972
- # @param repeat
952
+ # @param [Boolean] repeat
973
953
  # If set to true, stay in the component
974
954
  # placement tool and place multiple components.
975
955
  #
976
- # @return model - The model object on success or Nil
956
+ # @return [Sketchup::Model, nil] The model object on success or Nil
977
957
  #
978
958
  # @version SketchUp 6.0
979
959
  def place_component(componentdef, repeat = false)
@@ -993,10 +973,10 @@ class Sketchup::Model
993
973
  # local_point = Geom::Point3d.new(10, 10, 10)
994
974
  # world_point = model.point_to_latlong(local_point)
995
975
  #
996
- # @param point
976
+ # @param [Geom::Point3d] point
997
977
  # A Point3d object.
998
978
  #
999
- # @return latlong_or_point - a LatLong or Point3d object. See
979
+ # @return [Geom::Point3d, Geom::LatLong] a LatLong or Point3d object. See
1000
980
  # details for information.
1001
981
  #
1002
982
  # @version SketchUp 6.0
@@ -1012,10 +992,10 @@ class Sketchup::Model
1012
992
  # point = Geom::Point3d.new(10, 10, 10)
1013
993
  # utm = model.point_to_utm(point)
1014
994
  #
1015
- # @param point
995
+ # @param [Geom::Point3d] point
1016
996
  # A Point3d object.
1017
997
  #
1018
- # @return utm - a UTM object
998
+ # @return [Geom::UTM] a UTM object
1019
999
  #
1020
1000
  # @version SketchUp 6.0
1021
1001
  def point_to_utm(point)
@@ -1038,21 +1018,21 @@ class Sketchup::Model
1038
1018
  #
1039
1019
  # @note The parameter wysiwyg_flag was added in SU8 M1.
1040
1020
  #
1041
- # @param wysiwyg_flag
1021
+ # @param [Array(Geom::Point3d, Geom::Vector3d)] ray
1022
+ # A two element array containing a point and a vector.
1023
+ #
1024
+ # @param [Boolean] wysiwyg_flag
1042
1025
  # An optional boolean, added in SU8 M1, indicating
1043
1026
  # whether or not to consider hidden geometry in intersect
1044
1027
  # computations. If this flag is not specified, it
1045
1028
  # defaults to true (WYSIWYG) - i.e. hidden geometry is
1046
1029
  # not intersected against.
1047
1030
  #
1048
- # @param ray
1049
- # A two element array containing a point and a vector.
1050
- #
1051
- # @return item - an array of two values. The first value is a
1031
+ # @return [Array(Geom::Point3d, Array<Sketchup::Drawingelement>), nil] an array of two values. The first value is a
1052
1032
  # Point3d where the item that the ray passed through
1053
1033
  # exists. The second element is the instance path array
1054
1034
  # of the entity that the ray hit. For example, if the ray
1055
- # hits a face that contained by a component instance the
1035
+ # hits a face that is contained by a component instance the
1056
1036
  # instance path would be [Component1]. If the ray hit a
1057
1037
  # face that is contained by a component instance, which
1058
1038
  # is contained by another component instance and so on,
@@ -1060,7 +1040,7 @@ class Sketchup::Model
1060
1040
  # Component3...].
1061
1041
  #
1062
1042
  # @version SketchUp 6.0
1063
- def raytest(ray, wysiwyg_flag)
1043
+ def raytest(ray, wysiwyg_flag = true)
1064
1044
  end
1065
1045
 
1066
1046
  # The remove_observer method is used to remove an observer from the current
@@ -1072,23 +1052,23 @@ class Sketchup::Model
1072
1052
  # model.add_observer(observer)
1073
1053
  # status = model.remove_observer(observer)
1074
1054
  #
1075
- # @param observer
1055
+ # @param [Object] observer
1076
1056
  # An observer.
1077
1057
  #
1078
- # @return true if successful, false if unsuccessful.
1058
+ # @return [Boolean] true if successful, false if unsuccessful.
1079
1059
  #
1080
1060
  # @version SketchUp 6.0
1081
1061
  def remove_observer(observer)
1082
1062
  end
1083
1063
 
1084
- # The rendering_options method retrieves the RenderingOptions object for this
1085
- # Model.
1064
+ # The {#rendering_options} method retrieves the RenderingOptions object for
1065
+ # this model.
1086
1066
  #
1087
1067
  # @example
1088
1068
  # model = Sketchup.active_model
1089
1069
  # renderingoptions = model.rendering_options
1090
1070
  #
1091
- # @return renderingoptions - a RenderingOptions object
1071
+ # @return [Sketchup::RenderingOptions]
1092
1072
  #
1093
1073
  # @version SketchUp 6.0
1094
1074
  def rendering_options
@@ -1109,30 +1089,50 @@ class Sketchup::Model
1109
1089
  # filename = File.join(ENV['Home'], 'Desktop', 'mysketchup_v8.skp')
1110
1090
  # status = model.save("filename", Sketchup::Model::VERSION_8)
1111
1091
  #
1112
- # @param filename
1113
- # The name of the file to save.
1092
+ # @overload save
1093
+ #
1114
1094
  # Starting with SketchUp 2014, this parameter is optional.
1115
- # If not provided or an empty string, model will be saved
1116
- # to the file to which it is associated. It must have
1095
+ # If no arguments are provided or the filename is an empty string, model
1096
+ # will be saved to the file to which it is associated. It must have
1117
1097
  # already been saved to a file.
1118
1098
  #
1119
- # @param [SketchUp 2014+] version
1120
- # Optional SketchUp file format to save.
1121
- # If not provided, latest file format will be used.
1122
- # Possible values are:
1123
- # Sketchup::Model::VERSION_3, Sketchup::Model::VERSION_4,
1124
- # Sketchup::Model::VERSION_5, Sketchup::Model::VERSION_6,
1125
- # Sketchup::Model::VERSION_7, Sketchup::Model::VERSION_8,
1126
- # Sketchup::Model::VERSION_2013,
1127
- # Sketchup::Model::VERSION_2014,
1128
- # Sketchup::Model::VERSION_2015,
1129
- # Sketchup::Model::VERSION_2016,
1130
- # Sketchup::Model::VERSION_2017
1131
- #
1132
- # @return status - true if successful, false if unsuccessful
1099
+ # @overload save(filename)
1100
+ #
1101
+ # @param [String] filename
1102
+ # The name of the file to save.
1103
+ # Starting with SketchUp 2014, this parameter is optional.
1104
+ # If not provided or an empty string, model will be saved
1105
+ # to the file to which it is associated. It must have
1106
+ # already been saved to a file.
1107
+ #
1108
+ # @overload save(filename, version)
1109
+ #
1110
+ # @param [String] filename
1111
+ # The name of the file to save.
1112
+ # Starting with SketchUp 2014, this parameter is optional.
1113
+ # If not provided or an empty string, model will be saved
1114
+ # to the file to which it is associated. It must have
1115
+ # already been saved to a file.
1116
+ #
1117
+ # @param [Integer] version
1118
+ # (SketchUp 2014+)
1119
+ # Optional SketchUp file format to save.
1120
+ # If not provided, latest file format will be used.
1121
+ # Possible values are:
1122
+ # Sketchup::Model::VERSION_3, Sketchup::Model::VERSION_4,
1123
+ # Sketchup::Model::VERSION_5, Sketchup::Model::VERSION_6,
1124
+ # Sketchup::Model::VERSION_7, Sketchup::Model::VERSION_8,
1125
+ # Sketchup::Model::VERSION_2013,
1126
+ # Sketchup::Model::VERSION_2014,
1127
+ # Sketchup::Model::VERSION_2015,
1128
+ # Sketchup::Model::VERSION_2016,
1129
+ # Sketchup::Model::VERSION_2017,
1130
+ # Sketchup::Model::VERSION_2018
1131
+ #
1132
+ # @return [Boolean] true if successful, false if unsuccessful
1133
1133
  #
1134
1134
  # @version SketchUp 6.0
1135
- def save(filename, version)
1135
+ def save(*args)
1136
1136
  end
1137
1137
 
1138
1138
  # This method is used to save the copy of the current model to a file.
@@ -1146,10 +1146,11 @@ class Sketchup::Model
1146
1146
  # filename = File.join(ENV['Home'], 'Desktop', 'mysketchupcopy_v8.skp')
1147
1147
  # status = model.save_copy(filename, Sketchup::Model::VERSION_8)
1148
1148
  #
1149
- # @param filename
1149
+ # @param [String] filename
1150
1150
  # The name of the file to save the model copy.
1151
1151
  #
1152
- # @param version
1152
+ # @param [Integer] version
1153
+ # (SketchUp 2014+)
1153
1154
  # Optional SketchUp file format to save.
1154
1155
  # If not provided, latest file format will be used.
1155
1156
  # Possible values are:
@@ -1160,9 +1161,10 @@ class Sketchup::Model
1160
1161
  # Sketchup::Model::VERSION_2014,
1161
1162
  # Sketchup::Model::VERSION_2015,
1162
1163
  # Sketchup::Model::VERSION_2016,
1163
- # Sketchup::Model::VERSION_2017
1164
+ # Sketchup::Model::VERSION_2017,
1165
+ # Sketchup::Model::VERSION_2018
1164
1166
  #
1165
- # @return status - true if successful, false if unsuccessful
1167
+ # @return [Boolean] true if successful, false if unsuccessful
1166
1168
  #
1167
1169
  # @version SketchUp 2014
1168
1170
  def save_copy(filename, version)
@@ -1176,11 +1178,11 @@ class Sketchup::Model
1176
1178
  # model = Sketchup.active_model
1177
1179
  # status = model.save_thumbnail('testthumbnail2.jpg')
1178
1180
  #
1179
- # @param filename
1181
+ # @param [String] filename
1180
1182
  # The name of the file, with extension, to save the
1181
1183
  # thumbnail as.
1182
1184
  #
1183
- # @return status - true if successful, false if unsuccessful
1185
+ # @return [Boolean] true if successful, false if unsuccessful
1184
1186
  #
1185
1187
  # @version SketchUp 6.0
1186
1188
  def save_thumbnail(filename)
@@ -1200,10 +1202,10 @@ class Sketchup::Model
1200
1202
  # model = Sketchup.active_model
1201
1203
  # tool = model.select_tool(nil)
1202
1204
  #
1203
- # @param tool
1205
+ # @param [Object] tool
1204
1206
  # The Tool object you want to select.
1205
1207
  #
1206
- # @return model - The Model object.
1208
+ # @return [Sketchup::Model] The Model object.
1207
1209
  #
1208
1210
  # @version SketchUp 6.0
1209
1211
  def select_tool(tool)
@@ -1217,7 +1219,7 @@ class Sketchup::Model
1217
1219
  # model = Sketchup.active_model
1218
1220
  # selection = model.selection
1219
1221
  #
1220
- # @return selection - A Selection object with 0 or more entities
1222
+ # @return [Sketchup::Selection] A Selection object with 0 or more entities
1221
1223
  # that are currently selected.
1222
1224
  #
1223
1225
  # @version SketchUp 6.0
@@ -1233,17 +1235,17 @@ class Sketchup::Model
1233
1235
  # model = Sketchup.active_model
1234
1236
  # value = model.set_attribute('attributedictionaryname', 'key', 'value')
1235
1237
  #
1236
- # @param attrdictname
1238
+ # @param [String] attrdictname
1237
1239
  # The name of the attribute dictionary whose attribute
1238
1240
  # you wish to set.
1239
1241
  #
1240
- # @param key
1241
- # The attribute name.
1242
- #
1243
- # @param value
1242
+ # @param [Object] value
1244
1243
  # The value to set.
1245
1244
  #
1246
- # @return value - the value that was set
1245
+ # @param [String] key
1246
+ # The attribute name.
1247
+ #
1248
+ # @return [Object] the value that was set
1247
1249
  #
1248
1250
  # @version SketchUp 6.0
1249
1251
  def set_attribute(attrdictname, key, value)
@@ -1260,9 +1262,9 @@ class Sketchup::Model
1260
1262
  # model = Sketchup.active_model
1261
1263
  # value = model.set_datum('Adindan')
1262
1264
  #
1263
- # @param datum
1265
+ # @param [String] datum
1264
1266
  #
1265
- # @return nil
1267
+ # @return [nil]
1266
1268
  #
1267
1269
  # @version SketchUp 6.0
1268
1270
  def set_datum(datum)
@@ -1274,7 +1276,7 @@ class Sketchup::Model
1274
1276
  # model = Sketchup.active_model
1275
1277
  # shadowinfo = model.shadow_info
1276
1278
  #
1277
- # @return shadowinfo - a ShadowInfo object.
1279
+ # @return [Sketchup::ShadowInfo]
1278
1280
  #
1279
1281
  # @version SketchUp 6.0
1280
1282
  def shadow_info
@@ -1319,12 +1321,6 @@ class Sketchup::Model
1319
1321
  # new Ruby operation while another is still open, you will implicitly close
1320
1322
  # the first one.
1321
1323
  #
1322
- # @param [Boolean] transparent
1323
- # if set to true, then this operation will
1324
- # append to the previous operation. This is particularly useful for
1325
- # creating observers that react to user actions without littering the
1326
- # undo stack with extra steps that Ruby is performing.
1327
- #
1328
1324
  # @param [Boolean] next_transparent
1329
1325
  # <b>Deprecated!</b> if set to true, then
1330
1326
  # whatever operation comes after this one will be appended into one
@@ -1343,19 +1339,25 @@ class Sketchup::Model
1343
1339
  # @param [String] op_name
1344
1340
  # name of the operation visible in the UI
1345
1341
  #
1342
+ # @param [Boolean] transparent
1343
+ # if set to true, then this operation will
1344
+ # append to the previous operation. This is particularly useful for
1345
+ # creating observers that react to user actions without littering the
1346
+ # undo stack with extra steps that Ruby is performing.
1347
+ #
1346
1348
  # @return [Boolean] +true+ if successful, +false+ if unsuccessful
1347
1349
  #
1348
1350
  # @version SketchUp 6.0
1349
1351
  def start_operation(op_name, disable_ui = false, next_transparent = false, transparent = false)
1350
1352
  end
1351
1353
 
1352
- # The styles method retrieves the styles associated with the model.
1354
+ # The {#styles} method retrieves the styles associated with the model.
1353
1355
  #
1354
1356
  # @example
1355
1357
  # model = Sketchup.active_model
1356
1358
  # styles = model.styles
1357
1359
  #
1358
- # @return styles - the Styles object if successful
1360
+ # @return [Sketchup::Styles]
1359
1361
  #
1360
1362
  # @version SketchUp 6.0
1361
1363
  def styles
@@ -1367,7 +1369,7 @@ class Sketchup::Model
1367
1369
  # model = Sketchup.active_model
1368
1370
  # tags = model.tags
1369
1371
  #
1370
- # @return tags - string tags of the model
1372
+ # @return [String] string tags of the model
1371
1373
  #
1372
1374
  # @version SketchUp 6.0
1373
1375
  def tags
@@ -1378,10 +1380,10 @@ class Sketchup::Model
1378
1380
  # @example
1379
1381
  # Sketchup.active_model.tags = "Building, House, Brick"
1380
1382
  #
1381
- # @param tags
1382
- # - new tags of the model
1383
+ # @param [String] tags
1384
+ # new tags of the model
1383
1385
  #
1384
- # @return string - the new tags
1386
+ # @return [String] the new tags
1385
1387
  #
1386
1388
  # @version SketchUp 6.0
1387
1389
  def tags=(tags)
@@ -1395,20 +1397,20 @@ class Sketchup::Model
1395
1397
  # model = Sketchup.active_model
1396
1398
  # title = model.title
1397
1399
  #
1398
- # @return title - the title of the model or an empty string (if
1400
+ # @return [String] the title of the model or an empty string (if
1399
1401
  # the title is not set)
1400
1402
  #
1401
1403
  # @version SketchUp 6.0
1402
1404
  def title
1403
1405
  end
1404
1406
 
1405
- # The tools method is used to retrieve the current Tools object.
1407
+ # The {#tools} method is used to retrieve the current {Sketchup::Tools} object.
1406
1408
  #
1407
1409
  # @example
1408
1410
  # model = Sketchup.active_model
1409
1411
  # tools = model.tools
1410
1412
  #
1411
- # @return tools - a Tools object.
1413
+ # @return [Sketchup::Tools] a Tools object.
1412
1414
  #
1413
1415
  # @version SketchUp 6.0
1414
1416
  def tools
@@ -1422,10 +1424,10 @@ class Sketchup::Model
1422
1424
  # utm = Geom::UTM.new([+1, "A", 0.12333333, 0.12321321])
1423
1425
  # point = model.utm_to_point(utm)
1424
1426
  #
1425
- # @param utm
1427
+ # @param [Geom::UTM] utm
1426
1428
  # A UTM object.
1427
1429
  #
1428
- # @return point - A Point3d object.
1430
+ # @return [Geom::Point3d] A Point3d object.
1429
1431
  #
1430
1432
  # @version SketchUp 6.0
1431
1433
  def utm_to_point(utm)
@@ -1448,7 +1450,7 @@ class Sketchup::Model
1448
1450
  # UI.messagebox('This model is NOT valid.')
1449
1451
  # end
1450
1452
  #
1451
- # @return valid - true or false depending on model validity
1453
+ # @return [Boolean]
1452
1454
  #
1453
1455
  # @return [Boolean]
1454
1456
  #