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 UTM class lets you work with UTM map coordinates.
@@ -16,11 +16,10 @@ class Geom::UTM
16
16
  # instead of calling this method.
17
17
  #
18
18
  # @example
19
- # # Create a copy of an existing UTM object.
20
- # utm = Geom::UTM.new(utm2)
19
+ # utm1 = Geom::UTM.new
21
20
  #
22
21
  # # Create a new UTM object from scratch.
23
- # utm = Geom::UTM.new(13, "T", 475849.37521, 4429682.73749)
22
+ # utm2 = Geom::UTM.new(13, "T", 475849.37521, 4429682.73749)
24
23
  #
25
24
  # @overload initialize(zone_number, zone_letter, x, y)
26
25
  #
@@ -35,7 +34,7 @@ class Geom::UTM
35
34
  #
36
35
  # @overload initialize(array)
37
36
  #
38
- # @param [Array(Integer, String, Float, Float)] An array containing the zone
37
+ # @param [Array(Integer, String, Float, Float)] array contains the zone
39
38
  # number, zone letter, x and y positions.
40
39
  #
41
40
  # @return [Geom::UTM]
@@ -49,9 +48,8 @@ class Geom::UTM
49
48
  # coordinate.
50
49
  #
51
50
  # @example
52
- # # Create a new UTM object from scratch.
53
51
  # utm = Geom::UTM.new(13, "T", 475849.37521, 4429682.73749)
54
- # a = utm.to_a
52
+ # array = utm.to_a
55
53
  #
56
54
  # @return [Array(Integer, String, Float, Float)]
57
55
  #
@@ -63,9 +61,8 @@ class Geom::UTM
63
61
  # and longitude. See the LatLong class for more information.
64
62
  #
65
63
  # @example
66
- # # Create a new UTM object from scratch.
67
64
  # utm = Geom::UTM.new(13, "T", 475849.37521, 4429682.73749)
68
- # ll = utm.to_latlong
65
+ # latlong = utm.to_latlong
69
66
  #
70
67
  # @return [Geom::LatLong]
71
68
  #
@@ -76,7 +73,6 @@ class Geom::UTM
76
73
  # The {#to_s} method is used to retrieve a string representation of a UTM.
77
74
  #
78
75
  # @example
79
- # # Create a new UTM object from scratch.
80
76
  # utm = Geom::UTM.new(13, "T", 475849.37521, 4429682.73749)
81
77
  # string = utm.to_s
82
78
  #
@@ -89,7 +85,6 @@ class Geom::UTM
89
85
  # The {#x} method returns the UTM x coordinate.
90
86
  #
91
87
  # @example
92
- # # Create a new UTM object from scratch.
93
88
  # utm = Geom::UTM.new(13, "T", 475849.37521, 4429682.73749)
94
89
  # x = utm.x
95
90
  #
@@ -102,7 +97,6 @@ class Geom::UTM
102
97
  # The {#y} method returns the UTM y coordinate.
103
98
  #
104
99
  # @example
105
- # # Create a new UTM object from scratch.
106
100
  # utm = Geom::UTM.new(13, "T", 475849.37521, 4429682.73749)
107
101
  # y = utm.y
108
102
  #
@@ -115,9 +109,8 @@ class Geom::UTM
115
109
  # The {#zone_letter} method returns the UTM zone letter.
116
110
  #
117
111
  # @example
118
- # # Create a new UTM object from scratch.
119
112
  # utm = Geom::UTM.new(13, "T", 475849.37521, 4429682.73749)
120
- # zl = utm.zone_letter
113
+ # zone_letter = utm.zone_letter
121
114
  #
122
115
  # @return [String]
123
116
  #
@@ -128,9 +121,8 @@ class Geom::UTM
128
121
  # The {#zone_number} method returns the UTM zone number.
129
122
  #
130
123
  # @example
131
- # # Create a new UTM object from scratch.
132
124
  # utm = Geom::UTM.new(13, "T", 475849.37521, 4429682.73749)
133
- # zn = utm.zone_number
125
+ # zone_number = utm.zone_number
134
126
  #
135
127
  # @return [Integer]
136
128
  #
@@ -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 {Geom::Vector2d} class represents vectors in a 2 dimensional space.
@@ -10,19 +10,23 @@ class Geom::Vector2d
10
10
 
11
11
  # Instance Methods
12
12
 
13
- # The {#%} method returns the dot product between two {Geom::Vector2d}. This is
14
- # an alias of the dot method.
13
+ # The {#%} method is used to compute the dot product between two vectors.
14
+ #
15
+ # This is an alias of the {#dot} method.
15
16
  #
16
17
  # @example
17
- # vector = Geom::Vector2d.new(0, 2)
18
- # vector2 = Geom::Vector2d.new(1, 0)
19
- # d2 = vector % vector2
18
+ # vector1 = Geom::Vector2d.new(4, 5)
19
+ # vector2 = Geom::Vector2d.new(7, 1)
20
+ # # The result is 33
21
+ # dot = vector1 % vector2
20
22
  #
21
- # @param [Geom::Vector2d] vector
23
+ # @param [Geom::Vector2d, Array(Float, Float)] vector
22
24
  #
23
- # @return The dot product of the vectors
25
+ # @return [Float]
24
26
  #
25
- # @version LayOut 2018
27
+ # @see #dot
28
+ #
29
+ # @version SketchUp 6.0
26
30
  def %(vector)
27
31
  end
28
32
 
@@ -30,13 +34,16 @@ class Geom::Vector2d
30
34
  # is an alias of the cross method.
31
35
  #
32
36
  # @example
33
- # vector = Geom::Vector2d.new(1, 0)
34
- # vector2 = Geom::Vector2d.new(0, 1)
35
- # cross = vector * vector
37
+ # vector1 = Geom::Vector2d.new(2, 5)
38
+ # vector2 = Geom::Vector2d.new(5, 1)
39
+ # # The result is -23
40
+ # cross = vector1 * vector2
36
41
  #
37
- # @param [Geom::Vector2d] vector
42
+ # @param [Geom::Vector2d, Array(Float, Float)] vector
38
43
  #
39
- # @return [Geom::Vector2d]
44
+ # @return [Float]
45
+ #
46
+ # @see #cross
40
47
  #
41
48
  # @version LayOut 2018
42
49
  def *(vector)
@@ -45,11 +52,11 @@ class Geom::Vector2d
45
52
  # The {#+} method adds a {Geom::Vector2d} to this one.
46
53
  #
47
54
  # @example
48
- # vector = Geom::Vector2d.new(0, 2)
55
+ # vector1 = Geom::Vector2d.new(0, 2)
49
56
  # vector2 = Geom::Vector2d.new(1, 0)
50
- # new_vector = vector + vector2
57
+ # new_vector = vector1 + vector2
51
58
  #
52
- # @param [Geom::Vector2d] vector
59
+ # @param [Geom::Vector2d, Array(Float, Float)] vector
53
60
  #
54
61
  # @return [Geom::Vector2d]
55
62
  #
@@ -60,11 +67,11 @@ class Geom::Vector2d
60
67
  # The {#-} method subtracts a {Geom::Vector2d} from this one.
61
68
  #
62
69
  # @example
63
- # vector = Geom::Vector2d.new(0, 2)
70
+ # vector1 = Geom::Vector2d.new(0, 2)
64
71
  # vector2 = Geom::Vector2d.new(1, 0)
65
- # new_vector = vector - vector2
72
+ # new_vector = vector1 - vector2
66
73
  #
67
- # @param [Geom::Vector2d] vector
74
+ # @param [Geom::Vector2d, Array(Float, Float)] vector
68
75
  #
69
76
  # @return [Geom::Vector2d]
70
77
  #
@@ -76,12 +83,12 @@ class Geom::Vector2d
76
83
  # tolerance.
77
84
  #
78
85
  # @example
79
- # vector = Geom::Vector2d.new(1, 0)
80
- # vector2 = Geom::Vector2d.new(0,1)
86
+ # vector1 = Geom::Vector2d.new(1, 0)
87
+ # vector2 = Geom::Vector2d.new(0, 1)
81
88
  # # Returns false
82
- # status = vector == vector2
89
+ # status = vector1 == vector2
83
90
  #
84
- # @param [Geom::Vector2d] vector
91
+ # @param [Geom::Vector2d, Array(Float, Float)] vector
85
92
  #
86
93
  # @return [Boolean]
87
94
  #
@@ -94,13 +101,13 @@ class Geom::Vector2d
94
101
  #
95
102
  # @example
96
103
  # vector = Geom::Vector2d.new(1, 2)
97
- # # retrieves the y value of 2
104
+ # # Retrieves the y value of 2
98
105
  # yvalue = vector[1]
99
106
  #
100
107
  # @param [Integer] index
101
108
  # The index into an array of two coordinates.
102
109
  #
103
- # @return [Numeric] The value for the x or y coordinate.
110
+ # @return [Float] The value for the x or y coordinate.
104
111
  #
105
112
  # @version LayOut 2018
106
113
  def [](index)
@@ -110,17 +117,17 @@ class Geom::Vector2d
110
117
  # specific index of the value.
111
118
  #
112
119
  # @example
113
- # point = Geom::Vector2d.new(1,2)
114
- # point[1] = 4
120
+ # vector = Geom::Vector2d.new(1, 2)
121
+ # vector[1] = 4
115
122
  #
116
- # @param [Numeric] index
123
+ # @param [Integer] index
117
124
  # The index for a specific x or y value in the
118
125
  # {Geom::Vector2d} to set
119
126
  #
120
- # @param [Numeric] value
127
+ # @param [Float] value
121
128
  # The value to set for x or y
122
129
  #
123
- # @return [Numeric] The new x or y value if successful
130
+ # @return [Float] The new x or y value if successful
124
131
  #
125
132
  # @version LayOut 2018
126
133
  def []=(index, value)
@@ -130,14 +137,14 @@ class Geom::Vector2d
130
137
  # the {Geom::Vector2d} and another {Geom::Vector2d}.
131
138
  #
132
139
  # @example
133
- # vector = Geom::Vector2d.new(1, 0)
140
+ # vector1 = Geom::Vector2d.new(1, 0)
134
141
  # vector2 = Geom::Vector2d.new(-1, 0)
135
- # # returns PI
136
- # angle = vector.angle_between(vector2)
142
+ # # Returns PI
143
+ # angle = vector1.angle_between(vector2)
137
144
  #
138
- # @param [Geom::Vector2d] vector
145
+ # @param [Geom::Vector2d, Array(Float, Float)] vector
139
146
  #
140
- # @return [Numeric] The angle (in radians)
147
+ # @return [Float] The angle (in radians)
141
148
  #
142
149
  # @version LayOut 2018
143
150
  def angle_between(vector)
@@ -148,7 +155,7 @@ class Geom::Vector2d
148
155
  #
149
156
  # @example
150
157
  # vector = Geom::Vector2d.new(1, 0)
151
- # vector2 = vector.clone
158
+ # new_vector = vector.clone
152
159
  #
153
160
  # @return [Geom::Vector2d]
154
161
  #
@@ -156,35 +163,43 @@ class Geom::Vector2d
156
163
  def clone
157
164
  end
158
165
 
159
- # The {#*} method returns the cross product between two {Geom::Vector2d}. This
160
- # is an alias of the cross method.
166
+ # The {#cross} method returns the cross product between two {Geom::Vector2d}s.
167
+ #
168
+ # The cross product, also called the vector product, is an operation on two
169
+ # vectors. The cross product of two vectors produces a third vector which is
170
+ # perpendicular to the plane in which the first two lie.
161
171
  #
162
172
  # @example
163
- # vector = Geom::Vector2d.new(1, 0)
164
- # vector2 = Geom::Vector2d.new(0, 1)
165
- # cross = vector * vector
173
+ # vector1 = Geom::Vector2d.new(3, 3)
174
+ # vector2 = Geom::Vector2d.new(2, 5)
175
+ # # The result is 9
176
+ # cross = vector1.cross(vector2)
166
177
  #
167
- # @param [Geom::Vector2d] vector
178
+ # @param [Geom::Vector2d, Array(Float, Float)] vector
168
179
  #
169
- # @return [Geom::Vector2d]
180
+ # @return [Float]
181
+ #
182
+ # @see #*
170
183
  #
171
184
  # @version LayOut 2018
172
185
  def cross(vector)
173
186
  end
174
187
 
175
- # The {#%} method returns the dot product between two {Geom::Vector2d}. This is
176
- # an alias of the dot method.
188
+ # The {#dot} method is used to compute the dot product between two vectors.
177
189
  #
178
190
  # @example
179
- # vector = Geom::Vector2d.new(0, 2)
180
- # vector2 = Geom::Vector2d.new(1, 0)
181
- # d2 = vector % vector2
191
+ # vector1 = Geom::Vector2d.new(4, 1)
192
+ # # The result is 14
193
+ # vector2 = Geom::Vector2d.new(3, 2)
194
+ # dot = vector1.dot(vector2)
182
195
  #
183
- # @param [Geom::Vector2d] vector
196
+ # @param [Geom::Vector2d, Array(Float, Float)] vector
184
197
  #
185
- # @return The dot product of the vectors
198
+ # @return [Float]
186
199
  #
187
- # @version LayOut 2018
200
+ # @see #%
201
+ #
202
+ # @version SketchUp 6.0
188
203
  def dot(vector)
189
204
  end
190
205
 
@@ -192,7 +207,9 @@ class Geom::Vector2d
192
207
  #
193
208
  # @example
194
209
  # # A vector that runs along the X axis.
195
- # vector = Geom::Vector2d.new(1, 0)
210
+ # vector1 = Geom::Vector2d.new(1, 0)
211
+ #
212
+ # vector2 = Geom::Vector2d.new([5, 6])
196
213
  #
197
214
  # @overload initialize
198
215
  #
@@ -200,13 +217,13 @@ class Geom::Vector2d
200
217
  #
201
218
  # @overload initialize(x, y)
202
219
  #
203
- # @param [Numeric] x The length in the x direction
204
- # @param [Numeric] y The length in the y direction
220
+ # @param [Float] x The length in the x direction
221
+ # @param [Float] y The length in the y direction
205
222
  # @return [Geom::Vector2d]
206
223
  #
207
224
  # @overload initialize(vector)
208
225
  #
209
- # @param [Geom::Vector2d, Array(Numeric, Numeric)] vector
226
+ # @param [Geom::Vector2d, Array(Float, Float)] vector
210
227
  # @return [Geom::Vector2d]
211
228
  #
212
229
  # @version LayOut 2018
@@ -216,8 +233,8 @@ class Geom::Vector2d
216
233
  # The {#inspect} method formats the {Geom::Vector2d} as a string.
217
234
  #
218
235
  # @example
219
- # point = Geom::Point2d.new(1, 2)
220
- # string = point.inspect
236
+ # vector = Geom::Vector2d.new(1, 2)
237
+ # string = vector.inspect
221
238
  #
222
239
  # @return [String] the string representation of the {Geom::Vector2d}
223
240
  #
@@ -229,8 +246,8 @@ class Geom::Vector2d
229
246
  #
230
247
  # @example
231
248
  # vector = Geom::Vector2d.new(0, 4)
232
- # # returns 4
233
- # l = vector.length
249
+ # # The result is 4
250
+ # length = vector.length
234
251
  #
235
252
  # @return [Length] The length of the {Geom::Vector2d}
236
253
  #
@@ -243,13 +260,12 @@ class Geom::Vector2d
243
260
  #
244
261
  # @example
245
262
  # vector = Geom::Vector2d.new(0, 4)
246
- # l = vector.length
247
263
  # vector.length = 2
248
264
  #
249
- # @param [Numeric] length
265
+ # @param [Float] length
250
266
  # The new length for the {Geom::Vector2d}
251
267
  #
252
- # @return [Numeric] The new length
268
+ # @return [Length] The new length
253
269
  #
254
270
  # @version LayOut 2018
255
271
  def length=(length)
@@ -260,8 +276,8 @@ class Geom::Vector2d
260
276
  #
261
277
  # @example
262
278
  # vector = Geom::Vector2d.new(0, 4)
263
- # # returns a new Vector2d(0, 1)
264
- # vector2 = vector.normalize
279
+ # # The result is a Vector2d(0, 1)
280
+ # new_vector = vector.normalize
265
281
  #
266
282
  # @return [Geom::Vector2d]
267
283
  #
@@ -270,27 +286,27 @@ class Geom::Vector2d
270
286
  end
271
287
 
272
288
  # The {#normalize!} method converts a {Geom::Vector2d} vector into a unit
273
- # vector. Another way to do this is vector.length = 1
289
+ # vector. Another way to do this is +vector.length = 1.0+
274
290
  #
275
291
  # @example
276
292
  # vector = Geom::Vector2d.new(0, 4)
277
- # # modifies vector to be the Vector2d(0, 1)
293
+ # # Modifies vector to be the Vector2d(0, 1)
278
294
  # vector.normalize!
279
295
  #
280
296
  # @version LayOut 2018
281
297
  def normalize!
282
298
  end
283
299
 
284
- # The {#parallel?} method determines if the {Geom::Vector2d} is parallel to
285
- # another {Geom::Vector2d} to within tolerance.
300
+ # The {#parallel?} method determines if two {Geom::Vector2d}s are parallel within a
301
+ # tolerance. Two vectors are parallel if there exists a scalar multiple between them.
286
302
  #
287
303
  # @example
288
- # vector = Geom::Vector2d.new(0, 1)
289
- # vector2 = Geom::Vector2d.new(1, 2)
290
- # # returns true
291
- # status = vector.parallel?(vector2)
304
+ # vector1 = Geom::Vector2d.new(0, 1)
305
+ # vector2 = Geom::Vector2d.new(0, -9)
306
+ # # Returns true
307
+ # status = vector1.parallel?(vector2)
292
308
  #
293
- # @param [Geom::Vector2d] vector
309
+ # @param [Geom::Vector2d, Array(Float, Float)] vector
294
310
  #
295
311
  # @return [Boolean]
296
312
  #
@@ -298,16 +314,17 @@ class Geom::Vector2d
298
314
  def parallel?(vector)
299
315
  end
300
316
 
301
- # The {#perpendicular?} method determines if the {Geom::Vector2d} is
302
- # perpendicular to another {Geom::Vector2d} to within tolerance.
317
+ # The {#perpendicular?} method determines if two {Geom::Vector2d}s are
318
+ # perpendicular within a tolerance. Two vectors are considered
319
+ # perpendicular if their dot product is zero.
303
320
  #
304
321
  # @example
305
- # vector = Geom::Vector2d.new(0, 1)
306
- # vector2 = Geom::Vector2d.new(1, 2)
307
- # # returns false
308
- # status = vector.perpendicular?(vector2)
322
+ # vector1 = Geom::Vector2d.new(0, 5)
323
+ # vector2 = Geom::Vector2d.new(1, 0)
324
+ # # Returns true
325
+ # status = vector1.perpendicular?(vector2)
309
326
  #
310
- # @param [Geom::Vector2d] vector
327
+ # @param [Geom::Vector2d, Array(Float, Float)] vector
311
328
  #
312
329
  # @return [Boolean]
313
330
  #
@@ -320,8 +337,8 @@ class Geom::Vector2d
320
337
  #
321
338
  # @example
322
339
  # vector = Geom::Vector2d.new(1, 2)
323
- # # returns the Vector2d(-1, -2)
324
- # vector2 = vector.reverse
340
+ # # The result is a Vector2d(-1, -2)
341
+ # new_vector = vector.reverse
325
342
  #
326
343
  # @return [Geom::Vector2d]
327
344
  #
@@ -333,7 +350,7 @@ class Geom::Vector2d
333
350
  #
334
351
  # @example
335
352
  # vector = Geom::Vector2d.new(1, 2)
336
- # # modifies vector to be the Vector2d(-1, -2)
353
+ # # Modifies vector to be the Vector2d(-1, -2)
337
354
  # vector.reverse!
338
355
  #
339
356
  # @version LayOut 2018
@@ -344,12 +361,17 @@ class Geom::Vector2d
344
361
  # to and in the same direction as another {Geom::Vector2d} within tolerance.
345
362
  #
346
363
  # @example
347
- # vector = Geom::Vector2d.new(0, 1)
364
+ # vector1 = Geom::Vector2d.new(0, 1)
348
365
  # vector2 = Geom::Vector2d.new(1, 2)
349
- # # returns true
350
- # status = vector.sime_direction?(vector2)
366
+ # # Returns false
367
+ # status = vector1.same_direction?(vector2)
368
+ #
369
+ # @example
370
+ # vector = Geom::Vector2d.new(0, 2)
371
+ # # Returns true
372
+ # status = vector.same_direction?([0, 4])
351
373
  #
352
- # @param [Geom::Vector2d] vector
374
+ # @param [Geom::Vector2d, Array(Float, Float)] vector
353
375
  #
354
376
  # @return [Boolean]
355
377
  #
@@ -365,13 +387,13 @@ class Geom::Vector2d
365
387
  #
366
388
  # @overload set!(vector)
367
389
  #
368
- # @param [Geom::Vector2d, Array(Numeric, Numeric)] vector
390
+ # @param [Geom::Vector2d, Array(Float, Float)] vector
369
391
  # @return [Geom::Vector2d]
370
392
  #
371
393
  # @overload set!(x, y)
372
394
  #
373
- # @param [Numeric] x
374
- # @param [Numeric] y
395
+ # @param [Float] x
396
+ # @param [Float] y
375
397
  # @return [Geom::Vector2d]
376
398
  #
377
399
  # @version LayOut 2018
@@ -382,9 +404,10 @@ class Geom::Vector2d
382
404
  # Array.
383
405
  #
384
406
  # @example
385
- # a = vector.to_a
407
+ # vector = Geom::Vector2d.new(1, 2)
408
+ # array = vector.to_a
386
409
  #
387
- # @return [Array(Numeric, Numeric)]
410
+ # @return [Array(Float, Float)]
388
411
  #
389
412
  # @version LayOut 2018
390
413
  def to_a
@@ -393,8 +416,8 @@ class Geom::Vector2d
393
416
  # The {#to_s} method returns a string representation of the {Geom::Vector2d}.
394
417
  #
395
418
  # @example
396
- # point = Geom::Vector2d.new(1, 2)
397
- # str = point.to_s
419
+ # vector = Geom::Vector2d.new(1, 2)
420
+ # string = vector.to_s
398
421
  #
399
422
  # @return [String] the string representation of the {Geom::Vector2d}
400
423
  #
@@ -406,10 +429,11 @@ class Geom::Vector2d
406
429
  # vector. The original vector is unchanged by this method.
407
430
  #
408
431
  # @example
409
- # vector = Geom::Vector2d.new(4, 5)
410
- # transformation = Geom::Transformation2d.new([1, 0, 0, 1, 2, 3])
411
- # # vector2 will be (6, 8)
412
- # vector2 = vector.transform(transformation)
432
+ # vector = Geom::Vector2d.new(3, 2)
433
+ # point = Geom::Point2d.new(0, 1)
434
+ # transformation = Geom::Transformation2d.scaling(point, 2)
435
+ # # The result is a Vector2d(6, 4)
436
+ # new_vector = vector.transform(transformation)
413
437
  #
414
438
  # @param [Geom::Transformation2d] transform
415
439
  # A transformation object to apply to the vector.
@@ -425,8 +449,9 @@ class Geom::Vector2d
425
449
  #
426
450
  # @example
427
451
  # vector = Geom::Vector2d.new(4, 5)
428
- # transformation = Geom::Transformation2d.new([1, 0, 0, 1, 2, 3])
429
- # # vector will be (6, 8)
452
+ # point = Geom::Point2d.new(8, 9)
453
+ # transformation = Geom::Transformation2d.scaling(point, 3)
454
+ # # The result is a Vector2d(12, 15)
430
455
  # vector.transform!(transformation)
431
456
  #
432
457
  # @param [Geom::Transformation2d] transform
@@ -443,8 +468,8 @@ class Geom::Vector2d
443
468
  #
444
469
  # @example
445
470
  # vector = Geom::Vector2d.new(1, 0)
446
- # # returns true
447
- # status = vector.unit_vector
471
+ # # Returns true
472
+ # status = vector.unit_vector?
448
473
  #
449
474
  # @return [Boolean]
450
475
  #
@@ -457,7 +482,7 @@ class Geom::Vector2d
457
482
  #
458
483
  # @example
459
484
  # vector = Geom::Vector2d.new(0, 4)
460
- # status = vector.valid
485
+ # status = vector.valid?
461
486
  #
462
487
  # @return [Boolean]
463
488
  #
@@ -471,7 +496,7 @@ class Geom::Vector2d
471
496
  # vector = Geom::Vector2d.new(1, 2)
472
497
  # x = vector.x
473
498
  #
474
- # @return [Numeric]
499
+ # @return [Float]
475
500
  #
476
501
  # @version LayOut 2018
477
502
  def x
@@ -483,10 +508,10 @@ class Geom::Vector2d
483
508
  # vector = Geom::Vector2d.new(1, 2)
484
509
  # vector.x = 7
485
510
  #
486
- # @param [Numeric] x
511
+ # @param [Float] x
487
512
  # The desired x value of the {Geom::Vector2d}
488
513
  #
489
- # @return [Numeric] The new x value of the {Geom::Vector2d}
514
+ # @return [Float] The new x value of the {Geom::Vector2d}
490
515
  #
491
516
  # @version LayOut 2018
492
517
  def x=(x)
@@ -498,7 +523,7 @@ class Geom::Vector2d
498
523
  # vector = Geom::Vector2d.new(1, 2)
499
524
  # y = vector.y
500
525
  #
501
- # @return [Numeric]
526
+ # @return [Float]
502
527
  #
503
528
  # @version LayOut 2018
504
529
  def y
@@ -510,10 +535,10 @@ class Geom::Vector2d
510
535
  # vector = Geom::Vector2d.new(1, 2)
511
536
  # vector.y = 7
512
537
  #
513
- # @param [Numeric] y
538
+ # @param [Float] y
514
539
  # The desired y value of the {Geom::Vector2d}
515
540
  #
516
- # @return [Numeric] The new y value of the {Geom::Vector2d}
541
+ # @return [Float] The new y value of the {Geom::Vector2d}
517
542
  #
518
543
  # @version LayOut 2018
519
544
  def y=(y)