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
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA256:
3
- metadata.gz: fcf4a6a29a08187ad0c998fa4267fe93668631a6b6809b390e33cb00c38271b5
4
- data.tar.gz: 4ae462a23300aba5b2eb3bb9c8e31c5b9cd5b310b2814b416b2a553b4e2f1820
2
+ SHA1:
3
+ metadata.gz: 2a743ad1c6d1c7150a4eb0adcc8888ffbc65dd9c
4
+ data.tar.gz: e3630910a907338ae16857ec747c73aa6b75035f
5
5
  SHA512:
6
- metadata.gz: 6446929d6bfc2575cafa50436253a0554fb5b11d39daebc20e61aca04a4b4cd9c5a1aa02cc232afeaee59b1ed4cc01f2b89f1ee9aab747b876259711e1defe91
7
- data.tar.gz: 1a79f2773808b57e683d24830a5c80fadcf6abddbb51b79854d22f4656f2732e5619f5bad96ffbc9df28423fe7b6c13c57eaf3cfb70ba36eb17aed95d715707a
6
+ metadata.gz: cdf38818748b0d56d4bfed840039b0a5cf7647cfe807ea25bf43ac5c5f44fe972e15d9414e044aa38a6b569e77b749b6c0bca6ac4299a349550390ceaecc241f
7
+ data.tar.gz: 386d1a9096e721fd4bf1ae587fc33b001e573bfe805d25ad5b08959900a9df8d53dbfe71ab3e5704974256f8b14ddd9c4522352418c66add645fe6ba6c5c58f3
data/.yardopts CHANGED
@@ -1,7 +1,7 @@
1
- --title "SketchUp Ruby API Documentation"
2
- --no-api
3
- --no-private
4
- -p su-template
5
- SketchUp/**/*.rb
6
- -
7
- pages/*.md
1
+ --title "SketchUp Ruby API Documentation"
2
+ --no-api
3
+ --no-private
4
+ -p su-template
5
+ SketchUp/**/*.rb
6
+ -
7
+ pages/*.md
@@ -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
  # Bounding boxes are three-dimensional boxes (eight corners), aligned with the
@@ -156,9 +156,7 @@ class Geom::BoundingBox
156
156
  def corner(corner_index)
157
157
  end
158
158
 
159
- # The depth method is used to retrieve the depth of the bounding box.
160
- #
161
- # The depth is returned in the currently set units (inches, by default).
159
+ # The {#depth} method is used to retrieve the depth of the bounding box.
162
160
  #
163
161
  # @example
164
162
  # boundingbox = Geom::BoundingBox.new
@@ -166,17 +164,15 @@ class Geom::BoundingBox
166
164
  # # This will return a Length of 500.0.
167
165
  # length = boundingbox.depth
168
166
  #
169
- # @return [Length] the depth of the bounding box if successful
167
+ # @return [Length] the depth of the bounding box
170
168
  #
171
169
  # @version SketchUp 6.0
172
170
  def depth
173
171
  end
174
172
 
175
- # The diagonal method is used to get the length of the diagonal of the
173
+ # The {#diagonal} method is used to get the length of the diagonal of the
176
174
  # bounding box.
177
175
  #
178
- # The diagonal is returned in the currently set units (inches, by default).
179
- #
180
176
  # @example
181
177
  # boundingbox = Geom::BoundingBox.new
182
178
  # boundingbox.add([100, 200, -400], [200, 400, 100])
@@ -184,7 +180,7 @@ class Geom::BoundingBox
184
180
  # length = boundingbox.diagonal
185
181
  #
186
182
  # @return [Length] the size of the diagonal for the bounding
187
- # box if successful
183
+ # box
188
184
  #
189
185
  # @version SketchUp 6.0
190
186
  def diagonal
@@ -208,9 +204,7 @@ class Geom::BoundingBox
208
204
  def empty?
209
205
  end
210
206
 
211
- # The height method is used to retrieve the height of the bounding box.
212
- #
213
- # The height is returned in the currently set units (inches, by default).
207
+ # The {#height} method is used to retrieve the height of the bounding box.
214
208
  #
215
209
  # @example
216
210
  # boundingbox = Geom::BoundingBox.new
@@ -313,9 +307,7 @@ class Geom::BoundingBox
313
307
  def valid?
314
308
  end
315
309
 
316
- # The width method is used to retrieve the width of the bounding box.
317
- #
318
- # The width is returned in the currently set units (inches, by default).
310
+ # The {#width} method is used to retrieve the width of the bounding box.
319
311
  #
320
312
  # @example
321
313
  # boundingbox = Geom::BoundingBox.new
@@ -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 bounds2d class represents an axis aligned bounding box represented by
@@ -39,7 +39,7 @@ class Geom::Bounds2d
39
39
  # The {#initialize} method creates a new {Geom::Bounds2d}.
40
40
  #
41
41
  # @example
42
- # bounds = Geom::Bounds2d.new({0.0, 0.0, 1.0, 1.0})
42
+ # bounds = Geom::Bounds2d.new(0.0, 0.0, 1.0, 1.0)
43
43
  #
44
44
  # @overload initialize(other_bounds)
45
45
  #
@@ -52,10 +52,12 @@ class Geom::Bounds2d
52
52
  # @param [Geom::Point2d] lower_right
53
53
  # @return [Geom::Bounds2d]
54
54
  #
55
- # @overload initialize(float_array)
55
+ # @overload initialize(x, y, width, height)
56
56
  #
57
- # @param [Array(Float, Float, Float, Float)] float_array An array of four
58
- # floats (x, y, width, height)
57
+ # @param [Float] x
58
+ # @param [Float] y
59
+ # @param [Float] width
60
+ # @param [Float] height
59
61
  # @return [Geom::Bounds2d]
60
62
  #
61
63
  # @overload initialize(point_array)
@@ -64,12 +66,10 @@ class Geom::Bounds2d
64
66
  # {Geom::Point2d}s
65
67
  # @return [Geom::Bounds2d]
66
68
  #
67
- # @overload initialize(x, y, width, height)
69
+ # @overload initialize(float_array)
68
70
  #
69
- # @param [Float] x
70
- # @param [Float] y
71
- # @param [Float] width
72
- # @param [Float] height
71
+ # @param [Array(Float, Float, Float, Float)] float_array An array of four
72
+ # floats (x, y, width, height)
73
73
  # @return [Geom::Bounds2d]
74
74
  #
75
75
  # @version LayOut 2018
@@ -107,10 +107,12 @@ class Geom::Bounds2d
107
107
  # @param [Geom::Point2d] lower_right
108
108
  # @return [Geom::Bounds2d]
109
109
  #
110
- # @overload set!(float_array)
110
+ # @overload set!(x, y, width, height)
111
111
  #
112
- # @param [Array(Float, Float, Float, Float)] float_array An array of four
113
- # floats (x, y, width, height)
112
+ # @param [Float] x
113
+ # @param [Float] y
114
+ # @param [Float] width
115
+ # @param [Float] height
114
116
  # @return [Geom::Bounds2d]
115
117
  #
116
118
  # @overload set!(point_array)
@@ -119,12 +121,10 @@ class Geom::Bounds2d
119
121
  # {Geom::Point2d}s
120
122
  # @return [Geom::Bounds2d]
121
123
  #
122
- # @overload set!(x, y, width, height)
124
+ # @overload set!(float_array)
123
125
  #
124
- # @param [Float] x
125
- # @param [Float] y
126
- # @param [Float] width
127
- # @param [Float] height
126
+ # @param [Array(Float, Float, Float, Float)] float_array An array of four
127
+ # floats (x, y, width, height)
128
128
  # @return [Geom::Bounds2d]
129
129
  #
130
130
  # @version LayOut 2018
@@ -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 LatLong class contains various methods for creating and manipulating
@@ -29,15 +29,15 @@ class Geom::LatLong
29
29
  # @param latlong [Geom::LatLong]
30
30
  # @return [Geom::LatLong]
31
31
  #
32
- # @overload initialize(lat, long)
32
+ # @overload initialize(latlong_array)
33
33
  #
34
- # @param lat [Numeric]
35
- # @param long [Numeric]
34
+ # @param latlong_array [Array(Numeric, Numeric)]
36
35
  # @return [Geom::LatLong]
37
36
  #
38
- # @overload initialize(latlong_array)
37
+ # @overload initialize(lat, long)
39
38
  #
40
- # @param latlong_array [Array(Numeric, Numeric)]
39
+ # @param lat [Numeric]
40
+ # @param long [Numeric]
41
41
  # @return [Geom::LatLong]
42
42
  #
43
43
  # @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
  # The OrientedBounds2d class is a bounding box represented by four
@@ -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 {Geom::Vector2d} class allows you to work with a point in 2D space.
@@ -169,17 +169,17 @@ class Geom::Point2d
169
169
  #
170
170
  # @return [Geom::Point2d]
171
171
  #
172
- # @overload initialize(point)
173
- #
174
- # @param [Geom::Point2d, Array(Numeric, Numeric)] point
175
- # @return [Geom::Point2d]
176
- #
177
172
  # @overload initialize(x, y)
178
173
  #
179
174
  # @param [Numeric] x The location along the x axis
180
175
  # @param [Numeric] y The location along the y axis
181
176
  # @return [Geom::Point2d]
182
177
  #
178
+ # @overload initialize(point)
179
+ #
180
+ # @param [Geom::Point2d, Array(Numeric, Numeric)] point
181
+ # @return [Geom::Point2d]
182
+ #
183
183
  # @version LayOut 2018
184
184
  def initialize(*args)
185
185
  end
@@ -291,6 +291,42 @@ class Geom::Point2d
291
291
  def to_s
292
292
  end
293
293
 
294
+ # The {#transform} method applies a transformation to a point, returning a new
295
+ # point. The original point is unchanged by this method.
296
+ #
297
+ # @example
298
+ # point = Geom::Point2d.new(4, 5)
299
+ # transformation = Geom::Transformation2d.new([1, 0, 0, 1, 2, 3])
300
+ # # pt will be (6, 8)
301
+ # pt = point.transform(transformation)
302
+ #
303
+ # @param [Geom::Transformation2d] transform
304
+ # A Transformation object to apply to the point.
305
+ #
306
+ # @return [Geom::Point2d] the transformed point
307
+ #
308
+ # @version LayOut 2019
309
+ def transform(transform)
310
+ end
311
+
312
+ # The {#transform!} method applies a transformation to a point. The point
313
+ # itself is modified.
314
+ #
315
+ # @example
316
+ # point = Geom::Point2d.new(4, 5)
317
+ # transformation = Geom::Transformation2d.new([1, 0, 0, 1, 2, 3])
318
+ # # point will be (6, 8)
319
+ # point.transform!(transformation)
320
+ #
321
+ # @param [Geom::Transformation2d] transform
322
+ # A Transformation object to apply to the point.
323
+ #
324
+ # @return [Geom::Point2d] the transformed point
325
+ #
326
+ # @version LayOut 2019
327
+ def transform!(transform)
328
+ end
329
+
294
330
  # The {#vector_to} method returns the vector between points.
295
331
  #
296
332
  # @example
@@ -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 Point3d class allows you to work with a point in 3D space.
@@ -53,14 +53,14 @@ class Geom::Point3d
53
53
  # @param [Float] weight1
54
54
  # A weight or percentage.
55
55
  #
56
- # @param [Float] point2
57
- # The end point of the line.
56
+ # @param [Float] point1
57
+ # The start point on the line.
58
58
  #
59
59
  # @param [Float] weight2
60
60
  # A weight or percentage.
61
61
  #
62
- # @param [Float] point1
63
- # The start point on the line.
62
+ # @param [Float] point2
63
+ # The end point of the line.
64
64
  #
65
65
  # @return [Geom::Point3d]
66
66
  #
@@ -70,20 +70,31 @@ class Geom::Point3d
70
70
 
71
71
  # Instance Methods
72
72
 
73
- # The '+' operator is a fast way to add to the current x, y and z values of
74
- # a point, or to set the values of a point by adding to other points together.
73
+ # The {#+} operator is a fast way to add to the current x, y and z values of
74
+ # a vector.
75
75
  #
76
- # @example
77
- # pt2 = pt + vec
78
- # pt = pt + [10,10,10]
76
+ # @example Using vector
77
+ # point1 = Geom::Point3d.new(1, 2, 3)
78
+ # vector = Geom::Vector3d.new(4, 5, 6)
79
+ # point2 = point1 + vector
79
80
  #
80
- # @param [Geom::Point3d] point2
81
- # A Point3d object.
81
+ # @example Using array
82
+ # point1 = Geom::Point3d.new(1, 2, 3)
83
+ # point2 = point1 + [10,10,10]
84
+ #
85
+ # @example Using point
86
+ # point1 = Geom::Point3d.new(1, 2, 3)
87
+ # point2 = Geom::Point3d.new(4, 5, 6)
88
+ # # This works because SketchUp treats the array of tripple numerics as
89
+ # # a vector in this case.
90
+ # point3 = point1 + point2.to_a
91
+ #
92
+ # @param [Geom::Vector3d] vector
82
93
  #
83
94
  # @return [Geom::Point3d]
84
95
  #
85
96
  # @version SketchUp 6.0
86
- def +(point2)
97
+ def +(vector)
87
98
  end
88
99
 
89
100
  # The '-' operator is a fast way to subtract from the current x, y and z values
@@ -292,9 +303,9 @@ class Geom::Point3d
292
303
  # @param [Geom::Point3d] point3d
293
304
  # @return [Geom::Point3d]
294
305
  #
295
- # @overload initialize(vertex)
306
+ # @overload initialize(array3d)
296
307
  #
297
- # @param [Sketchup::Vertex] vertex
308
+ # @param [Array(Numeric, Numeric, Numeric)] array3d
298
309
  # @return [Geom::Point3d]
299
310
  #
300
311
  # @overload initialize(array2d)
@@ -307,9 +318,9 @@ class Geom::Point3d
307
318
  # @param [Sketchup::InputPoint] input_point
308
319
  # @return [Geom::Point3d]
309
320
  #
310
- # @overload initialize(array3d)
321
+ # @overload initialize(vertex)
311
322
  #
312
- # @param [Array(Numeric, Numeric, Numeric)] array3d
323
+ # @param [Sketchup::Vertex] vertex
313
324
  # @return [Geom::Point3d]
314
325
  #
315
326
  # @version SketchUp 6.0
@@ -470,14 +481,14 @@ class Geom::Point3d
470
481
  # @param [Numeric] z The z value for the point.
471
482
  # @return [Geom::Point3d] The newly set Point3d object
472
483
  #
473
- # @overload set!(point3d)
484
+ # @overload set!(array3d)
474
485
  #
475
- # @param point3d [Geom::Point3d]
486
+ # @param [Array(Numeric, Numeric, Numeric)] array3d
476
487
  # @return [Geom::Point3d]
477
488
  #
478
- # @overload set!(array3d)
489
+ # @overload set!(point3d)
479
490
  #
480
- # @param [Array(Numeric, Numeric, Numeric)] array3d
491
+ # @param point3d [Geom::Point3d]
481
492
  # @return [Geom::Point3d]
482
493
  #
483
494
  # @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
  # The {#Geom::PolygonMesh} class contains methods to create polygon mesh
@@ -177,17 +177,19 @@ class Geom::PolygonMesh
177
177
  #
178
178
  # @return [Geom::PolygonMesh]
179
179
  #
180
- # @overload initialize(numpts, numpolys)
180
+ # @overload initialize(numpts)
181
181
  #
182
182
  # @param [Integer] numpts How many points will be in the mesh.
183
- # @param [Integer] numpolys How many polygons will be in the mesh.
184
183
  # @return [Geom::PolygonMesh]
185
184
  #
186
- # @overload initialize(numpts)
185
+ # @overload initialize(numpts, numpolys)
187
186
  #
188
187
  # @param [Integer] numpts How many points will be in the mesh.
188
+ # @param [Integer] numpolys How many polygons will be in the mesh.
189
189
  # @return [Geom::PolygonMesh]
190
190
  #
191
+ # @raise [RangeError] If number of points or polygons are negative numbers.
192
+ #
191
193
  # @version SketchUp 6.0
192
194
  def initialize(*args)
193
195
  end
@@ -201,7 +203,7 @@ class Geom::PolygonMesh
201
203
  # mesh = face.mesh(flags)
202
204
  # normal = mesh.normal_at(1)
203
205
  #
204
- # @note Index is 1 based (starts at 1).
206
+ # @note Index starts at 1.
205
207
  #
206
208
  # @param [Integer] index
207
209
  # The index in the mesh for the vertex normal to be
@@ -224,7 +226,7 @@ class Geom::PolygonMesh
224
226
  # mesh.add_point(point2)
225
227
  # point_from_index = mesh.point_at(1)
226
228
  #
227
- # @note Index is 1 based (starts at 1).
229
+ # @note Index starts at 1.
228
230
  #
229
231
  # @param [Integer] index
230
232
  # The index in the mesh for the point to be retrieved
@@ -277,12 +279,6 @@ class Geom::PolygonMesh
277
279
  # The {#polygon_at} method is used to retrieve an array of vertex index values
278
280
  # for a polygon at a specific index.
279
281
  #
280
- # values with the sign indicating a hidden edge. For example, a return value of
281
- # +[-1, 2, 3]+ indicates that the edge from +1+ to +2+ is hidden. The negative
282
- # values should not be used as an index for point_at, take the positive value
283
- # of the index value in the polygon array. So if you get +[-1, 2,3]+ use +1+
284
- # as the argument to {#point_at}.
285
- #
286
282
  # @example
287
283
  # mesh = Geom::PolygonMesh.new
288
284
  # point1 = Geom::Point3d.new(0, 1, 2)
@@ -291,7 +287,14 @@ class Geom::PolygonMesh
291
287
  # index = mesh.add_polygon(point1, point2, point3)
292
288
  # polygon = mesh.polygon_at(index)
293
289
  #
294
- # @note Index is 1 based (starts at 1).The returned array can contain negative
290
+ # @note Index starts at 1.
291
+ #
292
+ # @note The returned array can contain negative
293
+ # values with the sign indicating a hidden edge. For example, a return value
294
+ # of +[-1, 2, 3]+ indicates that the edge from +1+ to +2+ is hidden. The
295
+ # negative values should not be used as an index for {#point_at}, take the
296
+ # absolute value of the index value in the polygon array. So if you
297
+ # get +[-1, 2,3]+ use +1+ as the argument to {#point_at}.
295
298
  #
296
299
  # @param [Integer] index
297
300
  # The index of the desired polygon.
@@ -313,6 +316,8 @@ class Geom::PolygonMesh
313
316
  # index = mesh.add_polygon(point1, point2, point3)
314
317
  # points = mesh.polygon_points_at(index)
315
318
  #
319
+ # @note Index starts at 1.
320
+ #
316
321
  # @param [Integer] index
317
322
  # An index for a polygon in the mesh.
318
323
  #
@@ -403,14 +408,14 @@ class Geom::PolygonMesh
403
408
  # @note If you don't specify how many points you will be adding to the mesh
404
409
  # when you initiate it you may risk the UV data becoming out of sync.
405
410
  #
406
- # @param [Boolean] front
407
- # A boolean representing the front or back.
411
+ # @param [Integer] index
412
+ # An Integer representing the UV index.
408
413
  #
409
414
  # @param [Geom::Point3d] point
410
415
  # A Point3d object representing UV coordinates.
411
416
  #
412
- # @param [Integer] index
413
- # An Integer representing the UV index.
417
+ # @param [Boolean] front
418
+ # A boolean representing the front or back.
414
419
  #
415
420
  # @return [nil]
416
421
  #