sketchup-api-stubs 0.7.10 → 0.7.11

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 (159) hide show
  1. checksums.yaml +4 -4
  2. data/lib/sketchup-api-stubs/sketchup.rb +6 -0
  3. data/lib/sketchup-api-stubs/stubs/Array.rb +1 -1
  4. data/lib/sketchup-api-stubs/stubs/Geom/BoundingBox.rb +2 -2
  5. data/lib/sketchup-api-stubs/stubs/Geom/Bounds2d.rb +25 -15
  6. data/lib/sketchup-api-stubs/stubs/Geom/LatLong.rb +17 -32
  7. data/lib/sketchup-api-stubs/stubs/Geom/OrientedBounds2d.rb +1 -1
  8. data/lib/sketchup-api-stubs/stubs/Geom/Point2d.rb +62 -39
  9. data/lib/sketchup-api-stubs/stubs/Geom/Point3d.rb +136 -104
  10. data/lib/sketchup-api-stubs/stubs/Geom/PolygonMesh.rb +56 -30
  11. data/lib/sketchup-api-stubs/stubs/Geom/Transformation.rb +76 -52
  12. data/lib/sketchup-api-stubs/stubs/Geom/Transformation2d.rb +35 -31
  13. data/lib/sketchup-api-stubs/stubs/Geom/UTM.rb +8 -16
  14. data/lib/sketchup-api-stubs/stubs/Geom/Vector2d.rb +135 -110
  15. data/lib/sketchup-api-stubs/stubs/Geom/Vector3d.rb +207 -222
  16. data/lib/sketchup-api-stubs/stubs/Geom.rb +6 -6
  17. data/lib/sketchup-api-stubs/stubs/LanguageHandler.rb +1 -1
  18. data/lib/sketchup-api-stubs/stubs/Layout/AngularDimension.rb +1 -1
  19. data/lib/sketchup-api-stubs/stubs/Layout/AutoTextDefinition.rb +11 -7
  20. data/lib/sketchup-api-stubs/stubs/Layout/AutoTextDefinitions.rb +1 -1
  21. data/lib/sketchup-api-stubs/stubs/Layout/ConnectionPoint.rb +1 -1
  22. data/lib/sketchup-api-stubs/stubs/Layout/Dictionary.rb +234 -0
  23. data/lib/sketchup-api-stubs/stubs/Layout/Document.rb +124 -10
  24. data/lib/sketchup-api-stubs/stubs/Layout/Ellipse.rb +1 -1
  25. data/lib/sketchup-api-stubs/stubs/Layout/Entities.rb +1 -1
  26. data/lib/sketchup-api-stubs/stubs/Layout/Entity.rb +112 -4
  27. data/lib/sketchup-api-stubs/stubs/Layout/FormattedText.rb +1 -1
  28. data/lib/sketchup-api-stubs/stubs/Layout/Grid.rb +1 -1
  29. data/lib/sketchup-api-stubs/stubs/Layout/Group.rb +4 -4
  30. data/lib/sketchup-api-stubs/stubs/Layout/Image.rb +1 -1
  31. data/lib/sketchup-api-stubs/stubs/Layout/Label.rb +1 -1
  32. data/lib/sketchup-api-stubs/stubs/Layout/Layer.rb +1 -1
  33. data/lib/sketchup-api-stubs/stubs/Layout/LayerInstance.rb +1 -1
  34. data/lib/sketchup-api-stubs/stubs/Layout/Layers.rb +1 -1
  35. data/lib/sketchup-api-stubs/stubs/Layout/LinearDimension.rb +56 -9
  36. data/lib/sketchup-api-stubs/stubs/Layout/LockedEntityError.rb +1 -1
  37. data/lib/sketchup-api-stubs/stubs/Layout/LockedLayerError.rb +1 -1
  38. data/lib/sketchup-api-stubs/stubs/Layout/Page.rb +100 -1
  39. data/lib/sketchup-api-stubs/stubs/Layout/PageInfo.rb +13 -14
  40. data/lib/sketchup-api-stubs/stubs/Layout/Pages.rb +1 -1
  41. data/lib/sketchup-api-stubs/stubs/Layout/Path.rb +5 -3
  42. data/lib/sketchup-api-stubs/stubs/Layout/Rectangle.rb +1 -1
  43. data/lib/sketchup-api-stubs/stubs/Layout/ReferenceEntity.rb +1 -1
  44. data/lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb +1 -1
  45. data/lib/sketchup-api-stubs/stubs/Layout/Style.rb +47 -1
  46. data/lib/sketchup-api-stubs/stubs/Layout/Table.rb +1 -1
  47. data/lib/sketchup-api-stubs/stubs/Layout/TableCell.rb +1 -1
  48. data/lib/sketchup-api-stubs/stubs/Layout/TableColumn.rb +1 -1
  49. data/lib/sketchup-api-stubs/stubs/Layout/TableRow.rb +1 -1
  50. data/lib/sketchup-api-stubs/stubs/Layout.rb +1 -1
  51. data/lib/sketchup-api-stubs/stubs/Length.rb +9 -1
  52. data/lib/sketchup-api-stubs/stubs/Numeric.rb +1 -1
  53. data/lib/sketchup-api-stubs/stubs/Sketchup/Animation.rb +65 -13
  54. data/lib/sketchup-api-stubs/stubs/Sketchup/AppObserver.rb +1 -1
  55. data/lib/sketchup-api-stubs/stubs/Sketchup/ArcCurve.rb +1 -1
  56. data/lib/sketchup-api-stubs/stubs/Sketchup/AttributeDictionaries.rb +2 -7
  57. data/lib/sketchup-api-stubs/stubs/Sketchup/AttributeDictionary.rb +16 -3
  58. data/lib/sketchup-api-stubs/stubs/Sketchup/Axes.rb +13 -13
  59. data/lib/sketchup-api-stubs/stubs/Sketchup/Behavior.rb +8 -14
  60. data/lib/sketchup-api-stubs/stubs/Sketchup/Camera.rb +10 -15
  61. data/lib/sketchup-api-stubs/stubs/Sketchup/ClassificationSchema.rb +1 -1
  62. data/lib/sketchup-api-stubs/stubs/Sketchup/Classifications.rb +2 -2
  63. data/lib/sketchup-api-stubs/stubs/Sketchup/Color.rb +1 -1
  64. data/lib/sketchup-api-stubs/stubs/Sketchup/ComponentDefinition.rb +28 -14
  65. data/lib/sketchup-api-stubs/stubs/Sketchup/ComponentInstance.rb +15 -8
  66. data/lib/sketchup-api-stubs/stubs/Sketchup/Console.rb +1 -1
  67. data/lib/sketchup-api-stubs/stubs/Sketchup/ConstructionLine.rb +7 -12
  68. data/lib/sketchup-api-stubs/stubs/Sketchup/ConstructionPoint.rb +1 -1
  69. data/lib/sketchup-api-stubs/stubs/Sketchup/Curve.rb +1 -1
  70. data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionList.rb +4 -10
  71. data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionObserver.rb +1 -1
  72. data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionsObserver.rb +1 -1
  73. data/lib/sketchup-api-stubs/stubs/Sketchup/Dimension.rb +17 -15
  74. data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionLinear.rb +17 -17
  75. data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionObserver.rb +1 -1
  76. data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionRadial.rb +3 -3
  77. data/lib/sketchup-api-stubs/stubs/Sketchup/Drawingelement.rb +11 -14
  78. data/lib/sketchup-api-stubs/stubs/Sketchup/Edge.rb +2 -2
  79. data/lib/sketchup-api-stubs/stubs/Sketchup/EdgeUse.rb +10 -10
  80. data/lib/sketchup-api-stubs/stubs/Sketchup/Entities.rb +59 -19
  81. data/lib/sketchup-api-stubs/stubs/Sketchup/EntitiesBuilder.rb +1 -1
  82. data/lib/sketchup-api-stubs/stubs/Sketchup/EntitiesObserver.rb +1 -1
  83. data/lib/sketchup-api-stubs/stubs/Sketchup/Entity.rb +3 -3
  84. data/lib/sketchup-api-stubs/stubs/Sketchup/EntityObserver.rb +1 -1
  85. data/lib/sketchup-api-stubs/stubs/Sketchup/Environment.rb +406 -0
  86. data/lib/sketchup-api-stubs/stubs/Sketchup/Environments.rb +185 -0
  87. data/lib/sketchup-api-stubs/stubs/Sketchup/EnvironmentsObserver.rb +113 -0
  88. data/lib/sketchup-api-stubs/stubs/Sketchup/ExtensionsManager.rb +3 -6
  89. data/lib/sketchup-api-stubs/stubs/Sketchup/Face.rb +94 -25
  90. data/lib/sketchup-api-stubs/stubs/Sketchup/FrameChangeObserver.rb +2 -2
  91. data/lib/sketchup-api-stubs/stubs/Sketchup/Group.rb +16 -26
  92. data/lib/sketchup-api-stubs/stubs/Sketchup/Http/Request.rb +24 -17
  93. data/lib/sketchup-api-stubs/stubs/Sketchup/Http/Response.rb +11 -9
  94. data/lib/sketchup-api-stubs/stubs/Sketchup/Http.rb +1 -1
  95. data/lib/sketchup-api-stubs/stubs/Sketchup/Image.rb +4 -67
  96. data/lib/sketchup-api-stubs/stubs/Sketchup/ImageRep.rb +2 -2
  97. data/lib/sketchup-api-stubs/stubs/Sketchup/Importer.rb +2 -2
  98. data/lib/sketchup-api-stubs/stubs/Sketchup/InputPoint.rb +34 -8
  99. data/lib/sketchup-api-stubs/stubs/Sketchup/InstanceObserver.rb +1 -1
  100. data/lib/sketchup-api-stubs/stubs/Sketchup/InstancePath.rb +4 -3
  101. data/lib/sketchup-api-stubs/stubs/Sketchup/Layer.rb +14 -8
  102. data/lib/sketchup-api-stubs/stubs/Sketchup/LayerFolder.rb +3 -45
  103. data/lib/sketchup-api-stubs/stubs/Sketchup/Layers.rb +1 -19
  104. data/lib/sketchup-api-stubs/stubs/Sketchup/LayersObserver.rb +1 -9
  105. data/lib/sketchup-api-stubs/stubs/Sketchup/Licensing/ExtensionLicense.rb +1 -1
  106. data/lib/sketchup-api-stubs/stubs/Sketchup/Licensing.rb +10 -3
  107. data/lib/sketchup-api-stubs/stubs/Sketchup/LineStyle.rb +1 -1
  108. data/lib/sketchup-api-stubs/stubs/Sketchup/LineStyles.rb +1 -1
  109. data/lib/sketchup-api-stubs/stubs/Sketchup/LoadHandler.rb +70 -0
  110. data/lib/sketchup-api-stubs/stubs/Sketchup/Loop.rb +1 -1
  111. data/lib/sketchup-api-stubs/stubs/Sketchup/Material.rb +831 -130
  112. data/lib/sketchup-api-stubs/stubs/Sketchup/Materials.rb +35 -22
  113. data/lib/sketchup-api-stubs/stubs/Sketchup/MaterialsObserver.rb +1 -1
  114. data/lib/sketchup-api-stubs/stubs/Sketchup/Menu.rb +1 -1
  115. data/lib/sketchup-api-stubs/stubs/Sketchup/Model.rb +146 -88
  116. data/lib/sketchup-api-stubs/stubs/Sketchup/ModelObserver.rb +20 -5
  117. data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsManager.rb +14 -11
  118. data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsProvider.rb +1 -1
  119. data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsProviderObserver.rb +1 -1
  120. data/lib/sketchup-api-stubs/stubs/Sketchup/Overlay.rb +17 -44
  121. data/lib/sketchup-api-stubs/stubs/Sketchup/OverlaysManager.rb +1 -13
  122. data/lib/sketchup-api-stubs/stubs/Sketchup/Page.rb +158 -16
  123. data/lib/sketchup-api-stubs/stubs/Sketchup/Pages.rb +48 -21
  124. data/lib/sketchup-api-stubs/stubs/Sketchup/PagesObserver.rb +1 -1
  125. data/lib/sketchup-api-stubs/stubs/Sketchup/PickHelper.rb +61 -40
  126. data/lib/sketchup-api-stubs/stubs/Sketchup/RegionalSettings.rb +1 -1
  127. data/lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptions.rb +13 -1
  128. data/lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptionsObserver.rb +1 -1
  129. data/lib/sketchup-api-stubs/stubs/Sketchup/SectionPlane.rb +1 -1
  130. data/lib/sketchup-api-stubs/stubs/Sketchup/Selection.rb +84 -91
  131. data/lib/sketchup-api-stubs/stubs/Sketchup/SelectionObserver.rb +1 -1
  132. data/lib/sketchup-api-stubs/stubs/Sketchup/Set.rb +1 -2
  133. data/lib/sketchup-api-stubs/stubs/Sketchup/ShadowInfo.rb +9 -5
  134. data/lib/sketchup-api-stubs/stubs/Sketchup/ShadowInfoObserver.rb +1 -1
  135. data/lib/sketchup-api-stubs/stubs/Sketchup/Skp.rb +1 -1
  136. data/lib/sketchup-api-stubs/stubs/Sketchup/Snap.rb +125 -0
  137. data/lib/sketchup-api-stubs/stubs/Sketchup/Style.rb +20 -1
  138. data/lib/sketchup-api-stubs/stubs/Sketchup/Styles.rb +59 -13
  139. data/lib/sketchup-api-stubs/stubs/Sketchup/Text.rb +29 -8
  140. data/lib/sketchup-api-stubs/stubs/Sketchup/Texture.rb +13 -31
  141. data/lib/sketchup-api-stubs/stubs/Sketchup/TextureWriter.rb +9 -9
  142. data/lib/sketchup-api-stubs/stubs/Sketchup/Tool.rb +229 -139
  143. data/lib/sketchup-api-stubs/stubs/Sketchup/Tools.rb +1 -1
  144. data/lib/sketchup-api-stubs/stubs/Sketchup/ToolsObserver.rb +1 -1
  145. data/lib/sketchup-api-stubs/stubs/Sketchup/UVHelper.rb +1 -1
  146. data/lib/sketchup-api-stubs/stubs/Sketchup/Vertex.rb +23 -22
  147. data/lib/sketchup-api-stubs/stubs/Sketchup/View.rb +336 -99
  148. data/lib/sketchup-api-stubs/stubs/Sketchup/ViewObserver.rb +34 -8
  149. data/lib/sketchup-api-stubs/stubs/Sketchup.rb +71 -36
  150. data/lib/sketchup-api-stubs/stubs/SketchupExtension.rb +11 -11
  151. data/lib/sketchup-api-stubs/stubs/String.rb +1 -1
  152. data/lib/sketchup-api-stubs/stubs/UI/Command.rb +21 -9
  153. data/lib/sketchup-api-stubs/stubs/UI/HtmlDialog.rb +80 -5
  154. data/lib/sketchup-api-stubs/stubs/UI/Notification.rb +14 -3
  155. data/lib/sketchup-api-stubs/stubs/UI/Toolbar.rb +20 -3
  156. data/lib/sketchup-api-stubs/stubs/UI/WebDialog.rb +9 -6
  157. data/lib/sketchup-api-stubs/stubs/UI.rb +77 -14
  158. data/lib/sketchup-api-stubs/stubs/_top_level.rb +7 -7
  159. metadata +10 -24
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2024 Trimble Inc.
1
+ # Copyright:: Copyright 2026 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.
@@ -16,15 +16,15 @@
16
16
  # See the Array class for details.
17
17
  #
18
18
  # @example
19
- # # No arguments, creates a point at the origin [0,0,0]
20
- # pt1 = Geom::Point3d.new
19
+ # # No arguments, creates a point at the origin [0, 0, 0]
20
+ # point1 = Geom::Point3d.new
21
21
  #
22
22
  # # Creates a point at x of 100, y of 200, z of 300.
23
- # pt2 = Geom::Point3d.new(100,200,300)
23
+ # point2 = Geom::Point3d.new(100, 200, 300)
24
24
  #
25
25
  # # You can also create a point directly by simply assigning the x, y and z
26
26
  # # values to a variable as an array:
27
- # pt3 = [100,200,300]
27
+ # point3 = [100, 200, 300]
28
28
  #
29
29
  # @version SketchUp 6.0
30
30
  class Geom::Point3d
@@ -41,8 +41,8 @@ class Geom::Point3d
41
41
  # point = weight1 * point1 + weight2 * point2.
42
42
  #
43
43
  # @example
44
- # point1 = Geom::Point3d.new(1,1,1)
45
- # point2 = Geom::Point3d.new(10,10,10)
44
+ # point1 = Geom::Point3d.new(1, 1, 1)
45
+ # point2 = Geom::Point3d.new(10, 10, 10)
46
46
  #
47
47
  # # Get the point that is half the way from point1 to point2.
48
48
  # points = Geom::Point3d.linear_combination(0.5, point1, 0.5, point2)
@@ -73,23 +73,25 @@ class Geom::Point3d
73
73
  # The {#+} operator is a fast way to add to the current x, y and z values of
74
74
  # a vector.
75
75
  #
76
- # @example Using vector
77
- # point1 = Geom::Point3d.new(1, 2, 3)
76
+ # @example Translate Point3d with Vector3d
77
+ # point = Geom::Point3d.new(1, 2, 3)
78
78
  # vector = Geom::Vector3d.new(4, 5, 6)
79
- # point2 = point1 + vector
79
+ # # The result is a Point3d(5, 7, 9)
80
+ # new_point = point + vector
80
81
  #
81
- # @example Using array
82
- # point1 = Geom::Point3d.new(1, 2, 3)
83
- # point2 = point1 + [10,10,10]
82
+ # @example Translate Point3d with vector in Array form
83
+ # point = Geom::Point3d.new(1, 2, 3)
84
+ # # the result is a Point3d(11, 12, 13)
85
+ # new_point = point + [10, 10, 10]
84
86
  #
85
- # @example Using point
87
+ # @example Translate Point3d with function in Array form
86
88
  # point1 = Geom::Point3d.new(1, 2, 3)
87
89
  # point2 = Geom::Point3d.new(4, 5, 6)
88
- # # This works because SketchUp treats the array of triple numerics as
89
- # # a vector in this case.
90
- # point3 = point1 + point2.to_a
90
+ # # This works because SketchUp treats the array of triple numerics as a vector in this case.
91
+ # # The result is a Point3d(5, 7, 9)
92
+ # new_point = point1 + point2.to_a
91
93
  #
92
- # @param [Geom::Vector3d] vector
94
+ # @param [Geom::Vector3d, Array(Numeric, Numeric, Numeric)] vector
93
95
  #
94
96
  # @return [Geom::Point3d]
95
97
  #
@@ -100,31 +102,56 @@ class Geom::Point3d
100
102
  # The '-' operator is a fast way to subtract from the current x, y and z values
101
103
  # of a point.
102
104
  #
103
- # @example
104
- # pt2 = pt - vec
105
- # pt = pt - [10,10,10]
105
+ # @example Translate a point by a vector in array form
106
+ # point = Geom::Point3d.new(12, 11, 12)
107
+ # # The result is a Vector3d(2, 1, 2)
108
+ # new_point = point - [10, 10, 10]
106
109
  #
107
- # @param [Geom::Point3d] point2
108
- # A Point3d object.
110
+ # @example Calculate the Vector3d between two Point2d
111
+ # point1 = Geom::Point2d.new(4, 2, 5)
112
+ # point2 = Geom::Point2d.new(1, 2, 4)
113
+ # # The result is a Vector3d(3, 0, 1)
114
+ # vector = point1 - point2
115
+ #
116
+ # @example Translate Point3d with Vector3d
117
+ # point = Geom::Point2d.new(4, 2)
118
+ # vector = Geom::Vector2d.new(3, 0)
119
+ # # The result is a Point3d(1, 2)
120
+ # new_point = point - vector
121
+ #
122
+ # @overload -(array3d)
123
+ #
124
+ # @param [Array(Numeric, Numeric, Numeric)] array3d
125
+ # @return [Geom::Vector3d]
126
+ #
127
+ # @overload -(point3d)
128
+ #
129
+ # @param [Geom::Point3d] point3d A Point3d object.
130
+ # @return [Geom::Vector3d]
131
+ #
132
+ # @overload -(vector3d)
109
133
  #
110
- # @return [Geom::Vector3d]
134
+ # @param [Geom::Vector3d] vector3d A Vector3d object.
135
+ # @return [Geom::Point3d]
111
136
  #
112
137
  # @version SketchUp 6.0
113
- def -(point2)
138
+ def -(arg)
114
139
  end
115
140
 
116
- # The '<' operator is a fast way to determine if another point is closer to the
117
- # origin.
141
+ # The {#<} compare method is used to compare two points to determine if
142
+ # the left-hand point is less than the right-hand point.
118
143
  #
119
144
  # @example
120
- # pt1 = Geom::Point3d.new(10,10,10)
121
- # pt2 = Geom::Point3d.new(20,20,20)
122
- # result = pt1 < pt2
145
+ # point1 = Geom::Point3d.new(10, 10, 10)
146
+ # point2 = Geom::Point3d.new(20, 20, 20)
147
+ # result = point1 < point2
123
148
  #
124
- # @param [Geom::Point3d] point2
149
+ # @note The comparison is performed in the order x, y and z coordinates.
150
+ #
151
+ # @param [Geom::Point3d, Array(Numeric, Numeric, Numeric)] point2
125
152
  # A Point3d object.
126
153
  #
127
- # @return [Boolean] true if the point2 is closer to the origin.
154
+ # @return [Boolean] true if the point1 is smaller than point2
128
155
  #
129
156
  # @version SketchUp 6.0
130
157
  def <(point2)
@@ -139,28 +166,30 @@ class Geom::Point3d
139
166
  # x, y and z coordinates, as in the following examples:
140
167
  #
141
168
  # @example
142
- # if( pt1 == pt2 )
143
- # UI.messagebox('equal')
144
- # end
169
+ # point1 = Geom::Point3d.new(3, 4, 3)
170
+ # point2 = Geom::Point3d.new(3, 4, 3)
171
+ # # Return true
172
+ # point1 == point2
145
173
  #
146
174
  # # ... or ...
147
- # if( pt1 == [100,200,300] ) ...
148
- # UI.messagebox('equal')
149
- # end
175
+ # point3 = Geom::Point3d.new(100, 200, 301)
176
+ # # Return false
177
+ # point3 == [100, 200, 300]
150
178
  #
151
179
  # @example
152
- # point1 = Geom::Point3d.new(1,1,1)
153
- # point2 = Geom::Point3d.new(10,10,10)
180
+ # point1 = Geom::Point3d.new(1, 1, 1)
181
+ # point2 = Geom::Point3d.new(10, 10, 10)
182
+ # # Return false
154
183
  # status = point1 == point2
155
184
  #
156
- # @param [Geom::Point3d] point2
185
+ # @param [Geom::Point3d, Array(Numeric, Numeric, Numeric)] point
157
186
  # A Point3d object.
158
187
  #
159
188
  # @return [Boolean] true if both points are equal; false if points are not
160
189
  # equal
161
190
  #
162
191
  # @version SketchUp 6.0
163
- def ==(point2)
192
+ def ==(point)
164
193
  end
165
194
 
166
195
  # The [] method is used to retrieve the value of the point at the specified
@@ -169,7 +198,7 @@ class Geom::Point3d
169
198
  # @example
170
199
  # point = Geom::Point3d.new(1, 2, 3)
171
200
  #
172
- # # retrieves the y value of 2
201
+ # # Retrieves the y value of 2
173
202
  # yvalue = point[1]
174
203
  #
175
204
  # @param [Integer] index
@@ -186,7 +215,7 @@ class Geom::Point3d
186
215
  # specific index of the value.
187
216
  #
188
217
  # @example
189
- # point = Geom::Point3d.new(1,2,3)
218
+ # point = Geom::Point3d.new(1, 2, 3)
190
219
  # yvalue = point[1] = 4
191
220
  #
192
221
  # @param [Integer] index
@@ -206,8 +235,8 @@ class Geom::Point3d
206
235
  # being cloned.
207
236
  #
208
237
  # @example
209
- # point = Geom::Point3d.new(1,2,3)
210
- # newpoint = point.clone
238
+ # point = Geom::Point3d.new(1, 2, 3)
239
+ # new_point = point.clone
211
240
  #
212
241
  # @return [Geom::Point3d] the cloned Point3d object
213
242
  #
@@ -219,8 +248,8 @@ class Geom::Point3d
219
248
  # point.
220
249
  #
221
250
  # @example
222
- # point1 = Geom::Point3d.new(1,1,1)
223
- # point2 = Geom::Point3d.new(10,10,10)
251
+ # point1 = Geom::Point3d.new(1, 1, 1)
252
+ # point2 = Geom::Point3d.new(10, 10, 10)
224
253
  # distance = point1.distance(point2)
225
254
  #
226
255
  # @param [Geom::Point3d] point2
@@ -238,9 +267,9 @@ class Geom::Point3d
238
267
  # See Geom module for how to specify a line.
239
268
  #
240
269
  # @example
241
- # point1 = Geom::Point3d.new(1,1,1)
242
- # line = [Geom::Point3d.new(0,0,0), Geom::Vector3d.new(0,0,1)]
243
- # distance = point1.distance_to_line(line)
270
+ # point = Geom::Point3d.new(1, 1, 1)
271
+ # line = [Geom::Point3d.new(0, 0, 0), Geom::Vector3d.new(0, 0, 1)]
272
+ # distance = point.distance_to_line(line)
244
273
  #
245
274
  # @note This function returns a `Float` value, not a `Length`.
246
275
  #
@@ -260,6 +289,9 @@ class Geom::Point3d
260
289
  # See module Geom for how to specify a plane.
261
290
  #
262
291
  # @example
292
+ # point = Geom::Point3d.new(10, 10, 10)
293
+ # plane = [Geom::Point3d.new(0, 0, 0), Geom::Vector3d.new(0, 0, 1)]
294
+ # # The result is 10
263
295
  # distance = point.distance_to_plane(plane)
264
296
  #
265
297
  # @note This function returns a `Float` value, not a `Length`.
@@ -278,14 +310,14 @@ class Geom::Point3d
278
310
  #
279
311
  # @example
280
312
  # # No arguments, creates a point at the origin [0,0,0]
281
- # pt1 = Geom::Point3d.new
313
+ # point1 = Geom::Point3d.new
282
314
  #
283
315
  # # Creates a point at x of 100, y of 200, z of 300.
284
- # pt2 = Geom::Point3d.new(100,200,300)
316
+ # point2 = Geom::Point3d.new(100, 200, 300)
285
317
  #
286
318
  # # You can also create a point directly by simply assigning the x, y and z
287
319
  # # values to a variable as an array:
288
- # pt3 = [100,200,300]
320
+ # point3 = [100, 200, 300]
289
321
  #
290
322
  # @overload initialize
291
323
  #
@@ -334,7 +366,7 @@ class Geom::Point3d
334
366
  # which writes to the Ruby console.
335
367
  #
336
368
  # @example
337
- # point = Geom::Point3d.new(10,10,10)
369
+ # point = Geom::Point3d.new(10, 10, 10)
338
370
  # string = point.inspect
339
371
  #
340
372
  # @return [String] a string point representation
@@ -347,9 +379,9 @@ class Geom::Point3d
347
379
  # point. The length of the vector must not be zero.
348
380
  #
349
381
  # @example
350
- # point1 = Geom::Point3d.new(10,10,10)
382
+ # point = Geom::Point3d.new(10, 10, 10)
351
383
  # vector = Geom::Vector3d.new(0, 0, 1)
352
- # point2 = point1.offset(vector)
384
+ # new_point = point.offset(vector)
353
385
  #
354
386
  # @param [Geom::Vector3d] vector
355
387
  # A Vector3d object to offset the point by.
@@ -370,9 +402,9 @@ class Geom::Point3d
370
402
  # Unlike offset, the point itself is modified.
371
403
  #
372
404
  # @example
373
- # point1 = Geom::Point3d.new(10,10,10)
374
- # vector = Geom::Vector3d.new(0,0,1)
375
- # point2 = point1.offset!(vector)
405
+ # point = Geom::Point3d.new(10, 10, 10)
406
+ # vector = Geom::Vector3d.new(0, 0, 1)
407
+ # new_point = point.offset!(vector)
376
408
  #
377
409
  # @param [Geom::Vector3d] vector
378
410
  # A Vector3d object to offset the point by.
@@ -392,8 +424,8 @@ class Geom::Point3d
392
424
  # See module Geom for the various ways to specify a line.
393
425
  #
394
426
  # @example
395
- # line = [Geom::Point3d.new(0,0,0), Geom::Vector3d.new(0,0,1)]
396
- # point = Geom::Point3d.new(10,10,10)
427
+ # line = [Geom::Point3d.new(0, 0, 0), Geom::Vector3d.new(0, 0, 1)]
428
+ # point = Geom::Point3d.new(10, 10, 10)
397
429
  # status = point.on_line?(line)
398
430
  #
399
431
  # @param line
@@ -410,8 +442,8 @@ class Geom::Point3d
410
442
  # See module Geom for the various ways to specify a plane.
411
443
  #
412
444
  # @example
413
- # plane = [Geom::Point3d.new(0,0,0), Geom::Vector3d.new(0,0,1)]
414
- # point = Geom::Point3d.new(10,10,10)
445
+ # plane = [Geom::Point3d.new(0, 0, 0), Geom::Vector3d.new(0, 0, 1)]
446
+ # point = Geom::Point3d.new(10, 10, 10)
415
447
  # status = point.on_plane?(plane)
416
448
  #
417
449
  # @param plane
@@ -428,8 +460,8 @@ class Geom::Point3d
428
460
  # The line may be defined by either a point and a vector or by two points.
429
461
  #
430
462
  # @example
431
- # line = [Geom::Point3d.new(0,0,0), Geom::Vector3d.new(0,0,1)]
432
- # point = Geom::Point3d.new(10,10,10)
463
+ # line = [Geom::Point3d.new(0, 0, 0), Geom::Vector3d.new(0, 0, 1)]
464
+ # point = Geom::Point3d.new(10, 10, 10)
433
465
  # projected_point = point.project_to_line(line)
434
466
  #
435
467
  # @param line
@@ -450,8 +482,8 @@ class Geom::Point3d
450
482
  # BY + CZ + D = 0. See Geom for details.
451
483
  #
452
484
  # @example
453
- # plane = [Geom::Point3d.new(0,0,0), Geom::Vector3d.new(0,0,1)]
454
- # point = Geom::Point3d.new(10,10,10)
485
+ # plane = [Geom::Point3d.new(0, 0, 0), Geom::Vector3d.new(0, 0, 1)]
486
+ # point = Geom::Point3d.new(10, 10, 10)
455
487
  # projected_point = point.project_to_plane(plane)
456
488
  #
457
489
  # @param plane
@@ -467,8 +499,8 @@ class Geom::Point3d
467
499
  # The {#set!} method is used to set the values of the Point3d.
468
500
  #
469
501
  # @example
470
- # point = Geom::Point3d.new(10,10,10)
471
- # point = point.set!(100,200,300)
502
+ # point = Geom::Point3d.new(10, 10, 10)
503
+ # point = point.set!(100, 200, 300)
472
504
  #
473
505
  # @overload set!(x, y, z)
474
506
  #
@@ -494,14 +526,12 @@ class Geom::Point3d
494
526
  # The to_a method is used to convert the point to an array of 3 numbers
495
527
  #
496
528
  # @example
497
- # point = Geom::Point3d.new(10,20,30)
529
+ # point = Geom::Point3d.new(10, 20, 30)
498
530
  # array = point.to_a
531
+ # # The result is [10, 20, 30]
532
+ # p array
499
533
  #
500
- # pt = [100,200,300]
501
- # # outputs [100.0,200.0,300.0]
502
- # UI.messagebox(pt.to_a)
503
- #
504
- # @return [Array(Length, Length, Length)] an array of three numbers representing x,y,z of
534
+ # @return [Array(Length, Length, Length)] an array of three numbers representing x, y, z of
505
535
  # the Point3d
506
536
  #
507
537
  # @version SketchUp 6.0
@@ -511,8 +541,8 @@ class Geom::Point3d
511
541
  # The to_s method is used to retrieve a string representation of a point.
512
542
  #
513
543
  # @example
514
- # point = Geom::Point3d.new(10,10,10)
515
- # str = point.to_s
544
+ # point = Geom::Point3d.new(10, 10, 10)
545
+ # string = point.to_s
516
546
  #
517
547
  # @return [String] the string representation of the Point3d
518
548
  #
@@ -524,10 +554,11 @@ class Geom::Point3d
524
554
  # vector is unchanged by this method.
525
555
  #
526
556
  # @example
557
+ # point1 = Geom::Point3d.new(10, 10, 10)
558
+ # point2 = Geom::Point3d.new(100, 200, 300)
527
559
  # transform = Geom::Transformation.new(point2)
528
- # point2 = Geom::Point3d.new(100,200,300)
529
- # point1 = Geom::Point3d.new(10,10,10)
530
- # point3 = point1.transform(transform)
560
+ # # The result is a Point3d(110, 210, 310)
561
+ # transformed_point = point1.transform(transform)
531
562
  #
532
563
  # @param [Geom::Transformation] transform
533
564
  # A Transformation object.
@@ -541,9 +572,10 @@ class Geom::Point3d
541
572
  # Apply a Transformation to a point. The point itself is modified.
542
573
  #
543
574
  # @example
575
+ # point1 = Geom::Point3d.new(10, 10, 10)
576
+ # point2 = Geom::Point3d.new(100, 200, 300)
544
577
  # transform = Geom::Transformation.new(point2)
545
- # point2 = Geom::Point3d.new(100,200,300)
546
- # point1 = Geom::Point3d.new(10,10,10)
578
+ # # The result is a Point3d(110, 210, 310)
547
579
  # point1.transform!(transform)
548
580
  #
549
581
  # @param [Geom::Transformation] transform
@@ -558,29 +590,29 @@ class Geom::Point3d
558
590
  # The vector_to team method retrieves the vector between points.
559
591
  #
560
592
  # @example
561
- # point2 = Geom::Point3d.new(100,200,300)
562
- # point1 = Geom::Point3d.new(10,10,10)
593
+ # point2 = Geom::Point3d.new(100, 200, 300)
594
+ # point1 = Geom::Point3d.new(10, 10, 10)
563
595
  # vector = point1.vector_to(point2)
564
596
  #
565
597
  # # Another example...
566
- # pt1 = [1,1,0]
567
- # pt2 = [3,1,0]
568
- # pt1.vector_to(pt2) # returns the vector (2,0,0)
569
- # pt1.vector_to(pt2) # is equivalent to (pt2 - pt1)
598
+ # point1 = [1, 1, 0]
599
+ # point2 = [3, 1, 0]
600
+ # # The result is a Vector3d(2, 0, 0)
601
+ # point1.vector_to(point2) # is equivalent to (point2 - point1)
570
602
  #
571
- # @param [Geom::Point3d] point2
603
+ # @param [Geom::Point3d, Array(Numeric, Numeric, Numeric)] point3d
572
604
  # A Point3d object.
573
605
  #
574
606
  # @return [Geom::Vector3d] a Vector object
575
607
  #
576
608
  # @version SketchUp 6.0
577
- def vector_to(point2)
609
+ def vector_to(point3d)
578
610
  end
579
611
 
580
- # The x method retrieves the x value of the 3D point.
612
+ # The {#x} method retrieves the x value of the 3D point.
581
613
  #
582
614
  # @example
583
- # point = Geom::Point3d.new(1,2,3)
615
+ # point = Geom::Point3d.new(1, 2, 3)
584
616
  # x = point.x
585
617
  #
586
618
  # @return [Length] the x value
@@ -589,10 +621,10 @@ class Geom::Point3d
589
621
  def x
590
622
  end
591
623
 
592
- # The x= method is used to set the x value of a 3D point.
624
+ # The {#x=} method is used to set the x value of a 3D point.
593
625
  #
594
626
  # @example
595
- # point = Geom::Point3d.new(1,2,3)
627
+ # point = Geom::Point3d.new(1, 2, 3)
596
628
  # x = point.x = 2
597
629
  #
598
630
  # @param [Numeric] value
@@ -604,10 +636,10 @@ class Geom::Point3d
604
636
  def x=(value)
605
637
  end
606
638
 
607
- # The y method retrieves the y value of the 3D point.
639
+ # The {#y} method retrieves the y value of the 3D point.
608
640
  #
609
641
  # @example
610
- # point = Geom::Point3d.new(1,2,3)
642
+ # point = Geom::Point3d.new(1, 2, 3)
611
643
  # y = point.y
612
644
  #
613
645
  # @return [Length] the y value
@@ -616,10 +648,10 @@ class Geom::Point3d
616
648
  def y
617
649
  end
618
650
 
619
- # The y= method is used to set the y value of a 3D point.
651
+ # The {#y=} method is used to set the y value of a 3D point.
620
652
  #
621
653
  # @example
622
- # point = Geom::Point3d.new(1,2,3)
654
+ # point = Geom::Point3d.new(1, 2, 3)
623
655
  # y = point.y = 2
624
656
  #
625
657
  # @param [Numeric] value
@@ -631,11 +663,11 @@ class Geom::Point3d
631
663
  def y=(value)
632
664
  end
633
665
 
634
- # The z method retrieves the z value of the 3D point.
666
+ # The {#z} method retrieves the z value of the 3D point.
635
667
  #
636
668
  # @example
637
- # point = Geom::Point3d.new(1,2,3)
638
- # z = point.x
669
+ # point = Geom::Point3d.new(1, 2, 3)
670
+ # z = point.z
639
671
  #
640
672
  # @return [Length] the z value
641
673
  #
@@ -643,10 +675,10 @@ class Geom::Point3d
643
675
  def z
644
676
  end
645
677
 
646
- # The z= method is used to set the z value of a 3D point.
678
+ # The {#z=} method is used to set the z value of a 3D point.
647
679
  #
648
680
  # @example
649
- # point = Geom::Point3d.new(1,2,3)
681
+ # point = Geom::Point3d.new(1, 2, 3)
650
682
  # z = point.z = 2
651
683
  #
652
684
  # @param [Numeric] value