sketchup-api-stubs 0.3.1 → 0.4.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 (148) hide show
  1. checksums.yaml +5 -5
  2. data/.yardopts +7 -7
  3. data/SketchUp/Geom/BoundingBox.rb +7 -15
  4. data/SketchUp/Geom/Bounds2d.rb +18 -18
  5. data/SketchUp/Geom/LatLong.rb +6 -6
  6. data/SketchUp/Geom/OrientedBounds2d.rb +1 -1
  7. data/SketchUp/Geom/Point2d.rb +42 -6
  8. data/SketchUp/Geom/Point3d.rb +32 -21
  9. data/SketchUp/Geom/PolygonMesh.rb +22 -17
  10. data/SketchUp/Geom/Transformation.rb +35 -35
  11. data/SketchUp/Geom/Transformation2d.rb +153 -13
  12. data/SketchUp/Geom/UTM.rb +1 -1
  13. data/SketchUp/Geom/Vector2d.rb +45 -9
  14. data/SketchUp/Geom/Vector3d.rb +11 -11
  15. data/SketchUp/Layout.rb +1 -1
  16. data/SketchUp/Layout/AngularDimension.rb +25 -25
  17. data/SketchUp/Layout/AutoTextDefinition.rb +5 -5
  18. data/SketchUp/Layout/AutoTextDefinitions.rb +1 -1
  19. data/SketchUp/Layout/ConnectionPoint.rb +1 -1
  20. data/SketchUp/Layout/Document.rb +6 -5
  21. data/SketchUp/Layout/Ellipse.rb +1 -1
  22. data/SketchUp/Layout/Entities.rb +1 -1
  23. data/SketchUp/Layout/Entity.rb +16 -16
  24. data/SketchUp/Layout/FormattedText.rb +21 -21
  25. data/SketchUp/Layout/Grid.rb +1 -1
  26. data/SketchUp/Layout/Group.rb +18 -18
  27. data/SketchUp/Layout/Image.rb +6 -6
  28. data/SketchUp/Layout/Label.rb +15 -15
  29. data/SketchUp/Layout/Layer.rb +5 -5
  30. data/SketchUp/Layout/LayerInstance.rb +3 -3
  31. data/SketchUp/Layout/Layers.rb +1 -1
  32. data/SketchUp/Layout/LinearDimension.rb +25 -25
  33. data/SketchUp/Layout/LockedEntityError.rb +1 -1
  34. data/SketchUp/Layout/LockedLayerError.rb +1 -1
  35. data/SketchUp/Layout/Page.rb +3 -3
  36. data/SketchUp/Layout/PageInfo.rb +1 -1
  37. data/SketchUp/Layout/Pages.rb +1 -1
  38. data/SketchUp/Layout/Path.rb +47 -27
  39. data/SketchUp/Layout/Rectangle.rb +8 -8
  40. data/SketchUp/Layout/SketchUpModel.rb +61 -26
  41. data/SketchUp/Layout/Style.rb +18 -17
  42. data/SketchUp/Layout/Table.rb +14 -14
  43. data/SketchUp/Layout/TableCell.rb +5 -5
  44. data/SketchUp/Layout/TableColumn.rb +7 -7
  45. data/SketchUp/Layout/TableRow.rb +7 -7
  46. data/SketchUp/Sketchup/Animation.rb +1 -1
  47. data/SketchUp/Sketchup/AppObserver.rb +1 -1
  48. data/SketchUp/Sketchup/ArcCurve.rb +1 -1
  49. data/SketchUp/Sketchup/AttributeDictionaries.rb +1 -1
  50. data/SketchUp/Sketchup/AttributeDictionary.rb +7 -7
  51. data/SketchUp/Sketchup/Axes.rb +4 -4
  52. data/SketchUp/Sketchup/Behavior.rb +1 -1
  53. data/SketchUp/Sketchup/Camera.rb +30 -41
  54. data/SketchUp/Sketchup/ClassificationSchema.rb +1 -1
  55. data/SketchUp/Sketchup/Classifications.rb +1 -1
  56. data/SketchUp/Sketchup/Color.rb +1 -1
  57. data/SketchUp/Sketchup/ComponentDefinition.rb +3 -3
  58. data/SketchUp/Sketchup/ComponentInstance.rb +10 -10
  59. data/SketchUp/Sketchup/Console.rb +5 -5
  60. data/SketchUp/Sketchup/ConstructionLine.rb +11 -11
  61. data/SketchUp/Sketchup/ConstructionPoint.rb +1 -1
  62. data/SketchUp/Sketchup/Curve.rb +1 -1
  63. data/SketchUp/Sketchup/DefinitionList.rb +12 -9
  64. data/SketchUp/Sketchup/DefinitionObserver.rb +6 -7
  65. data/SketchUp/Sketchup/DefinitionsObserver.rb +3 -3
  66. data/SketchUp/Sketchup/Dimension.rb +1 -1
  67. data/SketchUp/Sketchup/DimensionLinear.rb +81 -1
  68. data/SketchUp/Sketchup/DimensionObserver.rb +1 -1
  69. data/SketchUp/Sketchup/DimensionRadial.rb +1 -1
  70. data/SketchUp/Sketchup/Drawingelement.rb +1 -1
  71. data/SketchUp/Sketchup/Edge.rb +13 -16
  72. data/SketchUp/Sketchup/EdgeUse.rb +1 -1
  73. data/SketchUp/Sketchup/Entities.rb +181 -100
  74. data/SketchUp/Sketchup/EntitiesObserver.rb +1 -1
  75. data/SketchUp/Sketchup/Entity.rb +29 -26
  76. data/SketchUp/Sketchup/EntityObserver.rb +1 -1
  77. data/SketchUp/Sketchup/ExtensionsManager.rb +1 -1
  78. data/SketchUp/Sketchup/Face.rb +7 -7
  79. data/SketchUp/Sketchup/FrameChangeObserver.rb +4 -4
  80. data/SketchUp/Sketchup/Group.rb +1 -1
  81. data/SketchUp/Sketchup/Http.rb +1 -1
  82. data/SketchUp/Sketchup/Http/Request.rb +3 -3
  83. data/SketchUp/Sketchup/Http/Response.rb +1 -1
  84. data/SketchUp/Sketchup/Image.rb +1 -1
  85. data/SketchUp/Sketchup/ImageRep.rb +16 -16
  86. data/SketchUp/Sketchup/Importer.rb +1 -1
  87. data/SketchUp/Sketchup/InputPoint.rb +8 -4
  88. data/SketchUp/Sketchup/InstanceObserver.rb +1 -1
  89. data/SketchUp/Sketchup/InstancePath.rb +15 -12
  90. data/SketchUp/Sketchup/Layer.rb +27 -1
  91. data/SketchUp/Sketchup/Layers.rb +1 -1
  92. data/SketchUp/Sketchup/LayersObserver.rb +1 -1
  93. data/SketchUp/Sketchup/Licensing.rb +1 -1
  94. data/SketchUp/Sketchup/Licensing/ExtensionLicense.rb +1 -1
  95. data/SketchUp/Sketchup/LineStyle.rb +24 -0
  96. data/SketchUp/Sketchup/LineStyles.rb +123 -0
  97. data/SketchUp/Sketchup/Loop.rb +1 -1
  98. data/SketchUp/Sketchup/Material.rb +16 -10
  99. data/SketchUp/Sketchup/Materials.rb +9 -1
  100. data/SketchUp/Sketchup/MaterialsObserver.rb +3 -3
  101. data/SketchUp/Sketchup/Menu.rb +1 -1
  102. data/SketchUp/Sketchup/Model.rb +47 -21
  103. data/SketchUp/Sketchup/ModelObserver.rb +3 -3
  104. data/SketchUp/Sketchup/OptionsManager.rb +1 -1
  105. data/SketchUp/Sketchup/OptionsProvider.rb +5 -5
  106. data/SketchUp/Sketchup/OptionsProviderObserver.rb +1 -1
  107. data/SketchUp/Sketchup/Page.rb +1 -1
  108. data/SketchUp/Sketchup/Pages.rb +13 -8
  109. data/SketchUp/Sketchup/PagesObserver.rb +1 -1
  110. data/SketchUp/Sketchup/PickHelper.rb +49 -50
  111. data/SketchUp/Sketchup/RegionalSettings.rb +1 -1
  112. data/SketchUp/Sketchup/RenderingOptions.rb +4 -4
  113. data/SketchUp/Sketchup/RenderingOptionsObserver.rb +3 -3
  114. data/SketchUp/Sketchup/SectionPlane.rb +1 -1
  115. data/SketchUp/Sketchup/Selection.rb +3 -3
  116. data/SketchUp/Sketchup/SelectionObserver.rb +3 -3
  117. data/SketchUp/Sketchup/Set.rb +1 -1
  118. data/SketchUp/Sketchup/ShadowInfo.rb +3 -3
  119. data/SketchUp/Sketchup/ShadowInfoObserver.rb +1 -1
  120. data/SketchUp/Sketchup/Style.rb +1 -1
  121. data/SketchUp/Sketchup/Styles.rb +1 -1
  122. data/SketchUp/Sketchup/Text.rb +28 -1
  123. data/SketchUp/Sketchup/Texture.rb +1 -1
  124. data/SketchUp/Sketchup/TextureWriter.rb +13 -13
  125. data/SketchUp/Sketchup/Tool.rb +68 -64
  126. data/SketchUp/Sketchup/Tools.rb +13 -1
  127. data/SketchUp/Sketchup/ToolsObserver.rb +13 -13
  128. data/SketchUp/Sketchup/UVHelper.rb +1 -1
  129. data/SketchUp/Sketchup/Vertex.rb +1 -1
  130. data/SketchUp/Sketchup/View.rb +57 -56
  131. data/SketchUp/Sketchup/ViewObserver.rb +2 -2
  132. data/SketchUp/UI/Command.rb +4 -1
  133. data/SketchUp/UI/HtmlDialog.rb +23 -14
  134. data/SketchUp/UI/Notification.rb +10 -10
  135. data/SketchUp/UI/Toolbar.rb +1 -1
  136. data/SketchUp/UI/WebDialog.rb +38 -20
  137. data/SketchUp/_top_level.rb +32 -34
  138. data/SketchUp/array.rb +125 -112
  139. data/SketchUp/geom.rb +2 -2
  140. data/SketchUp/languagehandler.rb +1 -1
  141. data/SketchUp/length.rb +1 -1
  142. data/SketchUp/numeric.rb +3 -3
  143. data/SketchUp/sketchup.rb +11 -11
  144. data/SketchUp/sketchupextension.rb +6 -2
  145. data/SketchUp/string.rb +1 -1
  146. data/SketchUp/ui.rb +14 -14
  147. data/autoload/sketchup.rb +2 -0
  148. metadata +5 -3
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2017 Trimble Inc.
1
+ # Copyright:: Copyright 2019 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # The EdgeUse class defines how an Edge is used in the definition of a Face.
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2017 Trimble Inc.
1
+ # Copyright:: Copyright 2019 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # The Entities class is a container class for all entities in a model (it is a
@@ -76,12 +76,6 @@ class Sketchup::Entities
76
76
  # success = entities.add_3d_text('test', TextAlignLeft, "Arial",
77
77
  # true, false, 1.0, 0.0, 0.5, true, 5.0)
78
78
  #
79
- # @param [Boolean] is_bold
80
- # true for bold.
81
- #
82
- # @param [Numeric] extrusion
83
- # Extrusion depth in inches.
84
- #
85
79
  # @param [String] string
86
80
  # The text to create.
87
81
  #
@@ -93,11 +87,11 @@ class Sketchup::Entities
93
87
  # @param [String] font
94
88
  # font name.
95
89
  #
96
- # @param [Boolean] is_filled
97
- # true for filled, which will put a face between the edges of the letters.
90
+ # @param [Boolean] is_bold
91
+ # true for bold.
98
92
  #
99
- # @param [Numeric] z
100
- # z position in inches.
93
+ # @param [Boolean] is_italic
94
+ # true for italic.
101
95
  #
102
96
  # @param [Numeric] letter_height
103
97
  # Height of the text in inches.
@@ -106,8 +100,14 @@ class Sketchup::Entities
106
100
  # Tolerance of the curve creation. Defaults to
107
101
  # 0.0, which creates the highest possible curve quality.
108
102
  #
109
- # @param [Boolean] is_italic
110
- # true for italic.
103
+ # @param [Numeric] z
104
+ # z position in inches.
105
+ #
106
+ # @param [Boolean] is_filled
107
+ # true for filled, which will put a face between the edges of the letters.
108
+ #
109
+ # @param [Numeric] extrusion
110
+ # Extrusion depth in inches.
111
111
  #
112
112
  # @return [Boolean] true if successful
113
113
  #
@@ -167,14 +167,14 @@ class Sketchup::Entities
167
167
  # @param [Geom::Point3d] center
168
168
  # A Point3d object representing the center.
169
169
  #
170
- # @param [Integer] numsegs
171
- # The number of segments.
170
+ # @param [Geom::Vector3d] normal
171
+ # A Vector3d object representing normal for the arc.
172
172
  #
173
173
  # @param [Numeric] radius
174
174
  # The radius of the arc.
175
175
  #
176
- # @param [Geom::Vector3d] normal
177
- # A Vector3d object representing normal for the arc.
176
+ # @param [Integer] numsegs
177
+ # The number of segments.
178
178
  #
179
179
  # @return [Array<Sketchup::Edge>] an Array object containing edges if successful
180
180
  #
@@ -182,7 +182,8 @@ class Sketchup::Entities
182
182
  def add_circle(center, normal, radius, numsegs = 24)
183
183
  end
184
184
 
185
- # The add_cline method is used to create a construction line.
185
+ # The {#add_cline} method is used to create a construction line. This can be
186
+ # finite or infinite.
186
187
  #
187
188
  # @example
188
189
  # model = Sketchup.active_model
@@ -191,31 +192,23 @@ class Sketchup::Entities
191
192
  # point2 = Geom::Point3d.new(20, 20, 20)
192
193
  # cline = entities.add_cline(point1, point2)
193
194
  #
194
- # @overload add_cline(start_point, end_point)
195
+ # @overload add_cline(start_point, end_point, stipple = '-')
195
196
  #
197
+ # Creates a finite construction line.
196
198
  # @param [Geom::Point3d] start_point
197
- # A Point3d object where the line will start.
198
199
  # @param [Geom::Point3d] end_point
199
- # If a Vector3d, then an infinite line passing through
200
- # the start_point will be created in that direction. If a
201
- # Point3d, then a finite line will be created between the
202
- # two points.
200
+ # @param [String] stipple See {ConstructionLine#stipple=} for acceptable
201
+ # patterns.
203
202
  #
204
- # @overload add_cline(start_point, end_point, stipple)
203
+ # @overload add_cline(point, vector, stipple = '-')
205
204
  #
206
- # @param [Geom::Point3d] start_point
207
- # A Point3d object where the line will start.
208
- # @param [Geom::Point3d] end_point
209
- # If a Vector3d, then an infinite line passing through
210
- # the start_point will be created in that direction. If a
211
- # Point3d, then a finite line will be created between the
212
- # two points.
213
- # @param [String] stipple
214
- # Stipple pattern. See ConstructionLine.stipple
215
- # for acceptable patterns.
216
- #
217
- # @return [Sketchup::ConstructionLine] a ConstructionLine object if
218
- # successful
205
+ # Creates an infinite construction line.
206
+ # @param [Geom::Point3d] point
207
+ # @param [Geom::Point3d] vector
208
+ # @param [String] stipple See {ConstructionLine#stipple=} for acceptable
209
+ # patterns.
210
+ #
211
+ # @return [Sketchup::ConstructionLine]
219
212
  #
220
213
  # @version SketchUp 6.0
221
214
  def add_cline(*args)
@@ -264,7 +257,7 @@ class Sketchup::Entities
264
257
  def add_curve(pts_or_array)
265
258
  end
266
259
 
267
- # The add_dimension_linear method adds a linear dimension to the entities.
260
+ # The {#add_dimension_linear} method adds a linear dimension to the entities.
268
261
  #
269
262
  # @example
270
263
  # entities = Sketchup.active_model.entities
@@ -284,25 +277,71 @@ class Sketchup::Entities
284
277
  # # alternatively, the start params could be passed in separately
285
278
  # dim = entities.add_dimension_linear edge, mp, cp, [20, 0, 0]
286
279
  #
287
- # @param [Geom::Point3d, Sketchup::Entity] start_pt_or_entity
288
- # the reference point and/or entity at the start of
289
- # the dimension. This parameter can take several
290
- # forms:
291
- #
292
- # @param [Geom::Vector3d] offset_vector
293
- # the parallel offset vector from the reference line
294
- # to the dimension line measured from the 'start'
295
- # reference point.
296
- #
297
- # @param [Geom::Point3d, Sketchup::Entity] end_pt_or_entity
298
- # the reference point and/or entity at the end
299
- # of the dimension. This parameter takes the exact
300
- # same forms as 'start_pt_or_entity'.
280
+ # @example Instance path
281
+ # instance = Sketchup.active_model.active_entities.grep(Sketchup::ComponentInstance).first
282
+ # edge = instance.definition.entities.grep(Sketchup::Edge).first
283
+ # instance_path = Sketchup::InstancePath.new([instance, edge])
284
+ # start_point = edge.start.position
285
+ # end_point = edge.end.position
286
+ # vector = Geom::Vector3d.new(30, 30, 0)
287
+ # Sketchup.active_model.entities.add_dimension_linear([instance_path, start_point], [instance_path, end_point], vector)
288
+ #
289
+ # @example Instance path as an array
290
+ # instance = Sketchup.active_model.active_entities.grep(Sketchup::ComponentInstance).first
291
+ # edge = instance.definition.entities.grep(Sketchup::Edge).first
292
+ # path = [instance, edge]
293
+ # start_point = edge.start.position
294
+ # end_point = edge.end.position
295
+ # vector = Geom::Vector3d.new(30, 30, 0)
296
+ # Sketchup.active_model.entities.add_dimension_linear([path, start_point], [path, end_point], vector)
297
+ #
298
+ # @overload add_dimension_linear(start_pt_or_entity, end_pt_or_entity, offset_vector)
299
+ #
300
+ # @param [Geom::Point3d, Sketchup::Entity] start_pt_or_entity
301
+ # the reference point and/or entity at the start of
302
+ # the dimension. This parameter can take several
303
+ # forms:
304
+ # @param [Geom::Point3d, Sketchup::Entity] end_pt_or_entity
305
+ # the reference point and/or entity at the end
306
+ # of the dimension. This parameter takes the exact
307
+ # same forms as 'start_pt_or_entity'.
308
+ # @param [Geom::Vector3d] offset_vector
309
+ # the parallel offset vector from the reference line
310
+ # to the dimension line measured from the 'start'
311
+ # reference point.
312
+ #
313
+ # @overload add_dimension_linear(start_instance_path, end_instance_path, offset_vector)
314
+ #
315
+ # @note Added in SketchUp 2019.
316
+ # @param [Array<Sketchup::InstancePath, Geom::Point3d>] start_instance_path An array
317
+ # containing a {Sketchup::InstancePath} and a {Geom::Point3d}.
318
+ # @param [Array<Sketchup::InstancePath, Geom::Point3d>] end_instance_path An array
319
+ # containing a {Sketchup::InstancePath} and a {Geom::Point3d}.
320
+ # @param [Geom::Vector3d] offset_vector The parallel offset vector from the
321
+ # reference line to the dimension line measured from the start reference
322
+ # point.
323
+ #
324
+ # @overload add_dimension_linear(start_array, end_array, offset_vector)
325
+ #
326
+ # @note Added in SketchUp 2019.
327
+ # @param [Array(Array<Entity>, Geom::Point3d)] start_array
328
+ # The {Array<Entity>} must contain one or more {Sketchup::ComponentInstance}'s
329
+ # and a leaf entity. The leaf entity can be a {Sketchup::Vertex},
330
+ # {Sketchup::ConstructionPoint}, {Sketchup::ConstructionLine}, or
331
+ # {Sketchup::Edge}. The {Geom::Point3d} is the point associated with the leaf entity.
332
+ # @param [Array(Array<Entity>, Geom::Point3d)] end_array
333
+ # The {Array<Entity>} must contain one or more {Sketchup::ComponentInstance}'s
334
+ # and a leaf entity. The leaf entity can be a {Sketchup::Vertex},
335
+ # {Sketchup::ConstructionPoint}, {Sketchup::ConstructionLine}, or
336
+ # {Sketchup::Edge}. The {Geom::Point3d} is the point associated with the leaf entity.
337
+ # @param [Geom::Vector3d] offset_vector The parallel offset vector from the
338
+ # reference line to the dimension line measured form the start reference
339
+ # point.
301
340
  #
302
341
  # @return [Sketchup::DimensionLinear] the created dimension
303
342
  #
304
343
  # @version SketchUp 2014
305
- def add_dimension_linear(start_pt_or_entity, end_pt_or_entity, offset_vector)
344
+ def add_dimension_linear(*args)
306
345
  end
307
346
 
308
347
  # The add_dimension_radial method adds a radial dimension (i.e arc/circle
@@ -334,10 +373,6 @@ class Sketchup::Entities
334
373
  # The {#add_edges} method is used to add a set of connected edges to the
335
374
  # {Sketchup::Entities} collection.
336
375
  #
337
- # @overload add_edges(points)
338
- # @param [Array<Geom::Point3d>] points
339
- # @return [Array<Sketchup::Edge>]
340
- #
341
376
  # @example
342
377
  # model = Sketchup.active_model
343
378
  # entities = model.active_entities
@@ -349,8 +384,20 @@ class Sketchup::Entities
349
384
  # merge. If you intend to create a face from the edges, use {#add_face}
350
385
  # directly.
351
386
  #
387
+ # @overload add_edges(points)
388
+ #
389
+ # @param [Array<Geom::Point3d>] points At least two points required.
390
+ # @return [Array<Sketchup::Edge>]
391
+ #
392
+ # @overload add_edges(*points)
393
+ #
394
+ # @param [Array<Geom::Point3d>] points At least two points required.
395
+ # @return [Array<Sketchup::Edge>]
396
+ #
397
+ # @return [Array<Sketchup::Edge>] an array of Edge objects if successful
398
+ #
352
399
  # @version SketchUp 6.0
353
- def add_edges(point1, point2, *points)
400
+ def add_edges(*args)
354
401
  end
355
402
 
356
403
  # The add_face method is used to create a face. You can call this method a
@@ -427,12 +474,12 @@ class Sketchup::Entities
427
474
  # @param [Integer] smooth_flags
428
475
  # flags for softening and smoothing of edges.
429
476
  #
430
- # @param [Sketchup::Material, String] b_material
431
- # material to paint back faces with.
432
- #
433
477
  # @param [Sketchup::Material, String] f_material
434
478
  # material to paint front faces with.
435
479
  #
480
+ # @param [Sketchup::Material, String] b_material
481
+ # material to paint back faces with.
482
+ #
436
483
  # @return [Integer] Number of faces created
437
484
  #
438
485
  # @version SketchUp 6.0
@@ -485,16 +532,16 @@ class Sketchup::Entities
485
532
  # @param [String] filename
486
533
  # A filename for the image file.
487
534
  #
488
- # @param [Numeric] height
489
- # height for the image if you want to control
490
- # width and height independently.
535
+ # @param [Geom::Point3d] point
536
+ # A Point3d object representing the insertion point of
537
+ # the image.
491
538
  #
492
539
  # @param [Numeric] width
493
540
  # Width for the image.
494
541
  #
495
- # @param [Geom::Point3d] point
496
- # A Point3d object representing the insertion point of
497
- # the image.
542
+ # @param [Numeric] height
543
+ # height for the image if you want to control
544
+ # width and height independently.
498
545
  #
499
546
  # @return [Sketchup::Image] an Image object if successful.
500
547
  #
@@ -578,14 +625,14 @@ class Sketchup::Entities
578
625
  # @param [Geom::Point3d] center
579
626
  # A Point3d object representing the center of the polygon.
580
627
  #
581
- # @param [Integer] numsides
582
- # The number of sides for the polygon.
628
+ # @param [Geom::Vector3d] normal
629
+ # A Vector3d object.
583
630
  #
584
631
  # @param [Numeric] radius
585
632
  # A radius.
586
633
  #
587
- # @param [Geom::Vector3d] normal
588
- # A Vector3d object.
634
+ # @param [Integer] numsides
635
+ # The number of sides for the polygon.
589
636
  #
590
637
  # @return [Array<Sketchup::Edge>] an array of Edges that make up the polygon if
591
638
  # successful
@@ -632,7 +679,7 @@ class Sketchup::Entities
632
679
  def add_section_plane(plane)
633
680
  end
634
681
 
635
- # The add_text method adds a note or label text entity to the entities
682
+ # The {#add_text} method adds a note or label text entity to the entities
636
683
  #
637
684
  # @example
638
685
  # coordinates = [10, 10, 10]
@@ -641,19 +688,53 @@ class Sketchup::Entities
641
688
  # point = Geom::Point3d.new coordinates
642
689
  # text = entities.add_text "This is a Test", point
643
690
  #
644
- # @param [String] text
645
- # The text string to add.
646
- #
647
- # @param [Geom::Vector3d] vector
648
- # vector representing an arrow leader.
649
- #
650
- # @param [Geom::Point3d] point
651
- # A Point3d object representing the insertion point.
691
+ # @example Instance path
692
+ # instance = Sketchup.active_model.active_entities.grep(Sketchup::ComponentInstance).first
693
+ # edge = instance.definition.entities.grep(Sketchup::Edge).first
694
+ # instance_path = Sketchup::InstancePath.new([instance, edge])
695
+ # point = edge.start.position
696
+ # vector = Geom::Vector3d.new(30, 30, 0)
697
+ # Sketchup.active_model.entities.add_text("mytext", [instance_path, point], vector)
698
+ #
699
+ # @example Instance path as an array
700
+ # instance = Sketchup.active_model.active_entities.grep(Sketchup::ComponentInstance).first
701
+ # edge = instance.definition.entities.grep(Sketchup::Edge).first
702
+ # path = [instance, edge]
703
+ # point = edge.start.position
704
+ # vector = Geom::Vector3d.new(30, 30, 0)
705
+ # Sketchup.active_model.entities.add_text("mytext", [path, point], vector)
706
+ #
707
+ # @overload add_text(text, point, vector)
708
+ #
709
+ # @param [String] text The text string to add.
710
+ # @param [Geom::Point3d] point A Point3d object representing the insertion
711
+ # point.
712
+ # @param [Geom::Vector3d] vector The Vector representing an arrow leader.
713
+ #
714
+ # @overload add_text(text, instance_path_and_pt, vector)
715
+ #
716
+ # @note Added in SketchUp 2019.
717
+ # @param [String] text The text to add.
718
+ # @param [Array<Sketchup::InstancePath, Geom::Point3d>] instance_path_and_pt
719
+ # The array containing a {Sketchup::InstancePath} and a {Geom::Point3d}.
720
+ # @param [Geom::Vector3d] vector The vector representing an arrow leader.
721
+ #
722
+ # @overload add_text(text, instance_array_and_pt, vector)
723
+ #
724
+ # @note Added in SketchUp 2019.
725
+ # @param [String] text The text to add.
726
+ # @param [Array(Array<Sketchup::Entity>, Geom::Point3d)] instance_array_with_pt
727
+ # The array containing one or more {Sketchup::ComponentInstance}'s and a
728
+ # leaf entity. The leaf entity can be a {Sketchup::Vertex},
729
+ # {Sketchup::ConstructionPoint}, {Sketchup::ConstructionLine}, or
730
+ # {Sketchup::Edge}. The {Geom::Point3d} is the point associated with the
731
+ # leaf entity.
732
+ # @param [Geom::Vector3d] vector The vector representing an arrow leader.
652
733
  #
653
734
  # @return [Sketchup::Text] a Text object if successful
654
735
  #
655
736
  # @version SketchUp 6.0
656
- def add_text(text, point, vector)
737
+ def add_text(*args)
657
738
  end
658
739
 
659
740
  # The {#at} method is an alias for {#[]}.
@@ -797,21 +878,21 @@ class Sketchup::Entities
797
878
  # smooth_flags = Geom::PolygonMesh::HIDE_BASED_ON_INDEX
798
879
  # group.entities.fill_from_mesh(pm, true, smooth_flags, material)
799
880
  #
881
+ # @param [Geom::PolygonMesh] polygon_mesh
882
+ #
800
883
  # @param [Boolean] weld_vertices
801
884
  # This argument has no effect and is kept for
802
885
  # compatibility reasons. Points are always
803
886
  # merged.
804
887
  #
805
- # @param [Sketchup::Material, String] b_material
806
- # material to paint back faces with.
807
- #
808
- # @param [Geom::PolygonMesh] polygon_mesh
888
+ # @param [Integer] smooth_flags
889
+ # flags for softening and smoothing of edges.
809
890
  #
810
891
  # @param [Sketchup::Material, String] f_material
811
892
  # material to paint front faces with.
812
893
  #
813
- # @param [Integer] smooth_flags
814
- # flags for softening and smoothing of edges.
894
+ # @param [Sketchup::Material, String] b_material
895
+ # material to paint back faces with.
815
896
  #
816
897
  # @return [Boolean]
817
898
  #
@@ -826,28 +907,28 @@ class Sketchup::Entities
826
907
  # entities.intersect_with recurse, transformation1, entities1,
827
908
  # transformation2, hidden, entities2
828
909
  #
829
- # @param [Geom::Transformation] transform1
830
- # The transformation for this entities object.
831
- #
832
- # @param [Sketchup::Entity, Array<Sketchup::Entity>] entities2
833
- # A single entity, or an array of entities.
834
- #
835
910
  # @param [Boolean] recurse
836
911
  # true if you want this entities object to be recursed
837
912
  # (intersection lines will be put inside of groups and
838
913
  # components within this entities object).
839
914
  #
840
- # @param [Boolean] hidden
841
- # true if you want hidden geometry in this entities
842
- # object to be used in the intersection.
843
- #
844
- # @param [Geom::Transformation] transform2
845
- # The transformation for entities1.
915
+ # @param [Geom::Transformation] transform1
916
+ # The transformation for this entities object.
846
917
  #
847
918
  # @param [Sketchup::Entities] entities1
848
919
  # The entities object where you want the intersection
849
920
  # lines to appear.
850
921
  #
922
+ # @param [Geom::Transformation] transform2
923
+ # The transformation for entities1.
924
+ #
925
+ # @param [Boolean] hidden
926
+ # true if you want hidden geometry in this entities
927
+ # object to be used in the intersection.
928
+ #
929
+ # @param [Sketchup::Entity, Array<Sketchup::Entity>] entities2
930
+ # A single entity, or an array of entities.
931
+ #
851
932
  # @return [nil]
852
933
  #
853
934
  # @version SketchUp 6.0
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2017 Trimble Inc.
1
+ # Copyright:: Copyright 2019 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # This observer interface is implemented to react to {Sketchup::Entities}