sketchup-api-stubs 0.3.1 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
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,17 +1,20 @@
1
- # Copyright:: Copyright 2017 Trimble Inc.
1
+ # Copyright:: Copyright 2019 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
 
5
5
 
6
6
  # Constants
7
7
 
8
- ALT_MODIFIER_KEY = nil # Stub value.
9
- ALT_MODIFIER_MASK = nil # Stub value.
10
-
11
8
  ALeaderModel = nil # Stub value.
12
9
  ALeaderNone = nil # Stub value.
13
10
  ALeaderView = nil # Stub value.
14
11
 
12
+ ALT_MODIFIER_KEY = nil # Stub value.
13
+ ALT_MODIFIER_MASK = nil # Stub value.
14
+
15
+ COPY_MODIFIER_KEY = nil # Stub value.
16
+ COPY_MODIFIER_MASK = nil # Stub value.
17
+
15
18
  CMD_ARC = nil # Stub value.
16
19
  CMD_CAMERA_UNDO = nil # Stub value.
17
20
  CMD_CIRCLE = nil # Stub value.
@@ -80,9 +83,6 @@
80
83
  CMD_ZOOM_EXTENTS = nil # Stub value.
81
84
  CMD_ZOOM_WINDOW = nil # Stub value.
82
85
 
83
- COPY_MODIFIER_KEY = nil # Stub value.
84
- COPY_MODIFIER_MASK = nil # Stub value.
85
-
86
86
  CONSTRAIN_MODIFIER_KEY = nil # Stub value.
87
87
  CONSTRAIN_MODIFIER_MASK = nil # Stub value.
88
88
 
@@ -107,10 +107,6 @@
107
107
  GL_TRIANGLE_FAN = nil # Stub value.
108
108
  GL_TRIANGLE_STRIP = nil # Stub value.
109
109
 
110
- IDENTITY = nil # Stub value.
111
-
112
- IDENTITY_2D = nil # Stub value.
113
-
114
110
  IDABORT = nil # Stub value.
115
111
  IDCANCEL = nil # Stub value.
116
112
  IDIGNORE = nil # Stub value.
@@ -119,18 +115,15 @@
119
115
  IDRETRY = nil # Stub value.
120
116
  IDYES = nil # Stub value.
121
117
 
118
+ IDENTITY = nil # Stub value.
119
+ IDENTITY_2D = nil # Stub value.
120
+
122
121
  LAYER_HIDDEN_BY_DEFAULT = nil # Stub value.
123
122
  LAYER_IS_HIDDEN_ON_NEW_PAGES = nil # Stub value.
124
123
  LAYER_IS_VISIBLE_ON_NEW_PAGES = nil # Stub value.
125
124
  LAYER_USES_DEFAULT_VISIBILITY_ON_NEW_PAGES = nil # Stub value.
126
125
  LAYER_VISIBLE_BY_DEFAULT = nil # Stub value.
127
126
 
128
- MF_CHECKED = nil # Stub value.
129
- MF_DISABLED = nil # Stub value.
130
- MF_ENABLED = nil # Stub value.
131
- MF_GRAYED = nil # Stub value.
132
- MF_UNCHECKED = nil # Stub value.
133
-
134
127
  MB_ABORTRETRYIGNORE = nil # Stub value.
135
128
  MB_MULTILINE = nil # Stub value.
136
129
  MB_OK = nil # Stub value.
@@ -139,6 +132,12 @@
139
132
  MB_YESNO = nil # Stub value.
140
133
  MB_YESNOCANCEL = nil # Stub value.
141
134
 
135
+ MF_CHECKED = nil # Stub value.
136
+ MF_DISABLED = nil # Stub value.
137
+ MF_ENABLED = nil # Stub value.
138
+ MF_GRAYED = nil # Stub value.
139
+ MF_UNCHECKED = nil # Stub value.
140
+
142
141
  ORIGIN = nil # Stub value.
143
142
  ORIGIN_2D = nil # Stub value.
144
143
 
@@ -152,30 +151,24 @@
152
151
  PAGE_USE_SHADOWINFO = nil # Stub value.
153
152
  PAGE_USE_SKETCHCS = nil # Stub value.
154
153
 
155
- SnapTo_Arbitrary = nil # Stub value.
156
- SnapTo_Horizontal = nil # Stub value.
157
- SnapTo_Sloped = nil # Stub value.
158
- SnapTo_Vertical = nil # Stub value.
159
-
160
154
  SKETCHUP_CONSOLE = nil # Stub value.
161
155
 
162
156
  SB_PROMPT = nil # Stub value.
163
157
  SB_VCB_LABEL = nil # Stub value.
164
158
  SB_VCB_VALUE = nil # Stub value.
165
159
 
166
- TextAlignCenter = nil # Stub value.
167
- TextAlignLeft = nil # Stub value.
168
- TextAlignRight = nil # Stub value.
160
+ SnapTo_Arbitrary = nil # Stub value.
161
+ SnapTo_Horizontal = nil # Stub value.
162
+ SnapTo_Sloped = nil # Stub value.
163
+ SnapTo_Vertical = nil # Stub value.
169
164
 
170
165
  TB_HIDDEN = nil # Stub value.
171
166
  TB_NEVER_SHOWN = nil # Stub value.
172
167
  TB_VISIBLE = nil # Stub value.
173
168
 
174
- VK_ALT = nil # Stub value.
175
- VK_COMMAND = nil # Stub value.
176
- VK_CONTROL = nil # Stub value.
177
- VK_MENU = nil # Stub value.
178
- VK_SHIFT = nil # Stub value.
169
+ TextAlignCenter = nil # Stub value.
170
+ TextAlignLeft = nil # Stub value.
171
+ TextAlignRight = nil # Stub value.
179
172
 
180
173
  VK_DELETE = nil # Stub value.
181
174
  VK_DOWN = nil # Stub value.
@@ -189,14 +182,19 @@
189
182
  VK_SPACE = nil # Stub value.
190
183
  VK_UP = nil # Stub value.
191
184
 
192
- X_AXIS = nil # Stub value.
193
- Y_AXIS = nil # Stub value.
194
- Z_AXIS = nil # Stub value.
185
+ VK_ALT = nil # Stub value.
186
+ VK_COMMAND = nil # Stub value.
187
+ VK_CONTROL = nil # Stub value.
188
+ VK_MENU = nil # Stub value.
189
+ VK_SHIFT = nil # Stub value.
195
190
 
196
191
  X_AXIS_2D = nil # Stub value.
197
-
198
192
  Y_AXIS_2D = nil # Stub value.
199
193
 
194
+ X_AXIS = nil # Stub value.
195
+ Y_AXIS = nil # Stub value.
196
+ Z_AXIS = nil # Stub value.
197
+
200
198
  # Instance Methods
201
199
 
202
200
  # This function will add a separator to a given menu the first
data/SketchUp/array.rb CHANGED
@@ -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 SketchUp Array class adds additional methods to the standard Ruby Array
@@ -35,6 +35,12 @@ class Array
35
35
 
36
36
  # The {#cross} method is used to compute the cross product between two vectors.
37
37
  #
38
+ # @example With 3d array
39
+ # vector1 = Geom::Vector3d.new(0, 1, 0)
40
+ # array = [1, 0, 0]
41
+ # # This will return a new Vector3d
42
+ # vector2 = array.cross(vector1)
43
+ #
38
44
  # @example With 2d array
39
45
  # vector1 = Geom::Vector2d.new(0, 1)
40
46
  # array = [1, 0]
@@ -44,12 +50,6 @@ class Array
44
50
  # array = [1, 0]
45
51
  # vector2 = array.cross(vector1) # This will force array to be [1, 0, 0]
46
52
  #
47
- # @example With 3d array
48
- # vector1 = Geom::Vector3d.new(0, 1, 0)
49
- # array = [1, 0, 0]
50
- # # This will return a new Vector3d
51
- # vector2 = array.cross(vector1)
52
- #
53
53
  # @overload cross(vector)
54
54
  #
55
55
  # @param [Geom::Vector3d] vector
@@ -68,6 +68,12 @@ class Array
68
68
 
69
69
  # The {#distance} method is used to compute the distance between two points.
70
70
  #
71
+ # @example With 3d array
72
+ # point = Geom::Point3d.new(10, 10, 10)
73
+ # array = [1, 1, 1]
74
+ # # This will return a Length
75
+ # distance = array.distance(point)
76
+ #
71
77
  # @example With 2d array
72
78
  # point = Geom::Point2d.new(10, 10)
73
79
  # array = [1, 2]
@@ -76,12 +82,6 @@ class Array
76
82
  # point = Geom::Point3d.new(10, 10, 10)
77
83
  # distance = array.distance(point)
78
84
  #
79
- # @example With 3d array
80
- # point = Geom::Point3d.new(10, 10, 10)
81
- # array = [1, 1, 1]
82
- # # This will return a Length
83
- # distance = array.distance(point)
84
- #
85
85
  # @overload distance(point)
86
86
  #
87
87
  # @param [Geom::Point3d] point
@@ -107,18 +107,18 @@ class Array
107
107
  # # This will return a Length
108
108
  # distance = array.distance_to_line(line)
109
109
  #
110
- # @overload distance_to_line(point1, point2)
111
- #
112
- # @param [Geom::Point3d] point1
113
- # @param [Geom::Point3d] point1
114
- # @return [Length]
115
- #
116
110
  # @overload distance_to_line(point, vector)
117
111
  #
118
112
  # @param [Geom::Point3d] point
119
113
  # @param [Geom::Vector3d] vector
120
114
  # @return [Length]
121
115
  #
116
+ # @overload distance_to_line(point1, point2)
117
+ #
118
+ # @param [Geom::Point3d] point1
119
+ # @param [Geom::Point3d] point1
120
+ # @return [Length]
121
+ #
122
122
  # @see Geom
123
123
  # The Geom module for instructions on how to create a line.
124
124
  #
@@ -135,12 +135,6 @@ class Array
135
135
  # # This will return a Length
136
136
  # distance = array.distance_to_plane(plane)
137
137
  #
138
- # @overload distance_to_plane(array)
139
- #
140
- # Plane defined by its coefficents.
141
- # @param [Array<Float, Float, Float, Float>] point
142
- # @return [Length] The distance between the two points.
143
- #
144
138
  # @overload distance_to_plane(point, vector)
145
139
  #
146
140
  # Plane defined by
@@ -157,10 +151,13 @@ class Array
157
151
  # @param [Geom::Point3d] point3
158
152
  # @return [Length] The distance between the two points.
159
153
  #
160
- # @overload distance_to_plane(array)
154
+ # @overload distance_to_plane(float1, float2, float3, float4)
161
155
  #
162
- # Plane defined by three points.
163
- # @param [Array<Geom::Point3d, Geom::Point3d, Geom::Point3d>] point
156
+ # Plane defined by its coefficents.
157
+ # @param [Float] float1
158
+ # @param [Float] float2
159
+ # @param [Float] float3
160
+ # @param [Float] float4
164
161
  # @return [Length] The distance between the two points.
165
162
  #
166
163
  # @overload distance_to_plane(array)
@@ -170,13 +167,16 @@ class Array
170
167
  # @param [Array<Geom::Point3d, Geom::Vector3d>] point
171
168
  # @return [Length] The distance between the two points.
172
169
  #
173
- # @overload distance_to_plane(float1, float2, float3, float4)
170
+ # @overload distance_to_plane(array)
171
+ #
172
+ # Plane defined by three points.
173
+ # @param [Array<Geom::Point3d, Geom::Point3d, Geom::Point3d>] point
174
+ # @return [Length] The distance between the two points.
175
+ #
176
+ # @overload distance_to_plane(array)
174
177
  #
175
178
  # Plane defined by its coefficents.
176
- # @param [Float] float1
177
- # @param [Float] float2
178
- # @param [Float] float3
179
- # @param [Float] float4
179
+ # @param [Array<Float, Float, Float, Float>] point
180
180
  # @return [Length] The distance between the two points.
181
181
  #
182
182
  # @see Geom
@@ -188,18 +188,18 @@ class Array
188
188
 
189
189
  # The {#dot} method is used to compute the dot product between two vectors.
190
190
  #
191
- # @example With 2d array
192
- # vector = Geom::Vector2d.new(12, 12)
193
- # array = [12, 0]
194
- # # This will return a float
195
- # dot_product = array.dot(vector)
196
- #
197
191
  # @example With 3d array
198
192
  # vector = Geom::Vector3d.new(12, 12, 0)
199
193
  # array = [12, 0, 0]
200
194
  # # This will return a Float, in this case 144.0
201
195
  # dot_product = array.dot(vector)
202
196
  #
197
+ # @example With 2d array
198
+ # vector = Geom::Vector2d.new(12, 12)
199
+ # array = [12, 0]
200
+ # # This will return a float
201
+ # dot_product = array.dot(vector)
202
+ #
203
203
  # @overload dot(vector)
204
204
  #
205
205
  # @param [Geom::Vector3d] vector
@@ -220,15 +220,15 @@ class Array
220
220
  # length to 1). It returns a new array rather than changing the original in
221
221
  # place.
222
222
  #
223
- # @example With 2d array
224
- # array = [1, 2]
225
- # normal_vector = array.normalize
226
- #
227
223
  # @example With 3d array
228
224
  # array = [1, 2, 3]
229
225
  # # This will return a new Vector3d
230
226
  # normal_vector = array.normalize
231
227
  #
228
+ # @example With 2d array
229
+ # array = [1, 2]
230
+ # normal_vector = array.normalize
231
+ #
232
232
  # @note The arguments and return value will be converted to a floating point
233
233
  # value. (Unlike in the {Geom::Vector3d#normalize!} method.)
234
234
  #
@@ -247,15 +247,15 @@ class Array
247
247
  # The {#normalize!} method is used to normalize a vector in place (setting its
248
248
  # length to 1).
249
249
  #
250
- # @example With 2d array
251
- # array = [1, 2]
252
- # array.normalize!
253
- #
254
250
  # @example With 3d array
255
251
  # array = [1, 2, 3]
256
252
  # # This will modify 'array' in place
257
253
  # array.normalize!
258
254
  #
255
+ # @example With 2d array
256
+ # array = [1, 2]
257
+ # array.normalize!
258
+ #
259
259
  # @overload normalize!
260
260
  #
261
261
  # @return [Array(Float, Float, Float)] an array object representing a vector
@@ -287,10 +287,9 @@ class Array
287
287
  # vector = Geom::Vector3d.new(0, 0, 1)
288
288
  # length_array = array.offset(vector)
289
289
  #
290
- # @overload offset(vector, length)
290
+ # @overload offset(vector)
291
291
  #
292
292
  # @param [Geom::Vector3d] vector A Vector3d object used to offset the point.
293
- # @param [Length] length An overriding distance for how far to offset.
294
293
  # @return [Array(Length, Length, Length)] The newly offset array representing
295
294
  # a point or vector.
296
295
  #
@@ -300,9 +299,10 @@ class Array
300
299
  # @return [Array(Length, Length)] The newly offset array representing a point
301
300
  # or vector.
302
301
  #
303
- # @overload offset(vector)
302
+ # @overload offset(vector, length)
304
303
  #
305
304
  # @param [Geom::Vector3d] vector A Vector3d object used to offset the point.
305
+ # @param [Length] length An overriding distance for how far to offset.
306
306
  # @return [Array(Length, Length, Length)] The newly offset array representing
307
307
  # a point or vector.
308
308
  #
@@ -322,6 +322,12 @@ class Array
322
322
  # The {#offset!} method is used to offset a point by a vector. The array is
323
323
  # modified in place.
324
324
  #
325
+ # @example With 3d array
326
+ # array = [10, 10, 10]
327
+ # vector = Geom::Vector3d.new(0, 0, 1)
328
+ # # This will modify 'array' in place
329
+ # array.offset!(vector)
330
+ #
325
331
  # @example With 2d array
326
332
  # array = [10, 10]
327
333
  # vector = Geom::Vector2d.new(0, 1)
@@ -332,18 +338,18 @@ class Array
332
338
  # vector = Geom::Vector3d.new(0, 0, 1)
333
339
  # array.offset!(vector)
334
340
  #
335
- # @example With 3d array
336
- # array = [10, 10, 10]
337
- # vector = Geom::Vector3d.new(0, 0, 1)
338
- # # This will modify 'array' in place
339
- # array.offset!(vector)
340
- #
341
341
  # @overload offset!(vector)
342
342
  #
343
343
  # @param [Geom::Vector3d] vector A Vector3d object used to offset the point.
344
344
  # @return [Array(Length, Length, Length)] The newly offset array representing
345
345
  # a point or vector.
346
346
  #
347
+ # @overload offset!(vector)
348
+ #
349
+ # @param [Geom::Vector2d] vector A Vector2d object used to offset the point.
350
+ # @return [Array(Length, Length)] The newly offset array representing a point
351
+ # or vector.
352
+ #
347
353
  # @overload offset!(vector, length)
348
354
  #
349
355
  # @param [Geom::Vector3d] vector A Vector3d object used to offset the point.
@@ -351,12 +357,6 @@ class Array
351
357
  # @return [Array(Length, Length, Length)] The newly offset array representing
352
358
  # a point or vector.
353
359
  #
354
- # @overload offset!(vector)
355
- #
356
- # @param [Geom::Vector2d] vector A Vector2d object used to offset the point.
357
- # @return [Array(Length, Length)] The newly offset array representing a point
358
- # or vector.
359
- #
360
360
  # @overload offset!(vector, length)
361
361
  #
362
362
  # @param [Geom::Vector2d] vector A Vector2d object used to offset the point.
@@ -379,17 +379,17 @@ class Array
379
379
  # # This will return a true or false value
380
380
  # on_plane = array.on_line?(line)
381
381
  #
382
- # @overload on_line?(point1, point2)
382
+ # @overload on_line?(point, vector)
383
383
  #
384
- # @param [Geom::Point3d] point1
385
- # @param [Geom::Point3d] point1
384
+ # @param [Geom::Point3d] point
385
+ # @param [Geom::Vector3d] vector
386
386
  # @return [Boolean] +true+ if the point is on the line, +false+ if the
387
387
  # point is not on the line.
388
388
  #
389
- # @overload on_line?(point, vector)
389
+ # @overload on_line?(point1, point2)
390
390
  #
391
- # @param [Geom::Point3d] point
392
- # @param [Geom::Vector3d] vector
391
+ # @param [Geom::Point3d] point1
392
+ # @param [Geom::Point3d] point1
393
393
  # @return [Boolean] +true+ if the point is on the line, +false+ if the
394
394
  # point is not on the line.
395
395
  #
@@ -411,25 +411,19 @@ class Array
411
411
  # # This will return a true or false value
412
412
  # on_plane = array.on_plane?(plane)
413
413
  #
414
- # @overload on_plane?(point1, point2, point3)
415
- #
416
- # Plane defined by three points.
417
- # @note The three points should not be co-linear or duplicate.
418
- # @param [Geom::Point3d] point1
419
- # @param [Geom::Point3d] point2
420
- # @param [Geom::Point3d] point3
421
- #
422
414
  # @overload on_plane?(point, vector)
423
415
  #
424
416
  # Plane defined by
425
417
  # @param [Geom::Point3d] point
426
418
  # @param [Geom::Vector3d] vector
427
419
  #
428
- # @overload on_plane?(array)
420
+ # @overload on_plane?(point1, point2, point3)
429
421
  #
430
422
  # Plane defined by three points.
431
423
  # @note The three points should not be co-linear or duplicate.
432
- # @param [Array<Geom::Point3d, Geom::Vector3d>] point
424
+ # @param [Geom::Point3d] point1
425
+ # @param [Geom::Point3d] point2
426
+ # @param [Geom::Point3d] point3
433
427
  #
434
428
  # @overload on_plane?(float1, float2, float3, float4)
435
429
  #
@@ -441,14 +435,20 @@ class Array
441
435
  #
442
436
  # @overload on_plane?(array)
443
437
  #
444
- # Plane defined by its coefficents.
445
- # @param [Array<Float, Float, Float, Float>] point
438
+ # Plane defined by three points.
439
+ # @note The three points should not be co-linear or duplicate.
440
+ # @param [Array<Geom::Point3d, Geom::Vector3d>] point
446
441
  #
447
442
  # @overload on_plane?(array)
448
443
  #
449
444
  # Plane defined by three points.
450
445
  # @param [Array<Geom::Point3d, Geom::Point3d, Geom::Point3d>] point
451
446
  #
447
+ # @overload on_plane?(array)
448
+ #
449
+ # Plane defined by its coefficents.
450
+ # @param [Array<Float, Float, Float, Float>] point
451
+ #
452
452
  # @return [Boolean]
453
453
  #
454
454
  # @see Geom
@@ -467,17 +467,17 @@ class Array
467
467
  # # This will return a new Array
468
468
  # point_on_line = array.project_to_line(line)
469
469
  #
470
- # @overload project_to_line(point1, point2)
470
+ # @overload project_to_line(point, vector)
471
471
  #
472
- # @param [Geom::Point3d] point1
473
- # @param [Geom::Point3d] point1
472
+ # @param [Geom::Point3d] point
473
+ # @param [Geom::Vector3d] vector
474
474
  # @return [Array(Length, Length, Length)] A new point on the line that is
475
475
  # closest to this point
476
476
  #
477
- # @overload project_to_line(point, vector)
477
+ # @overload project_to_line(point1, point2)
478
478
  #
479
- # @param [Geom::Point3d] point
480
- # @param [Geom::Vector3d] vector
479
+ # @param [Geom::Point3d] point1
480
+ # @param [Geom::Point3d] point1
481
481
  # @return [Array(Length, Length, Length)] A new point on the line that is
482
482
  # closest to this point
483
483
  #
@@ -496,12 +496,6 @@ class Array
496
496
  # array = [10, 10, 10]
497
497
  # point_on_plane = array.project_to_plane(plane)
498
498
  #
499
- # @overload project_to_plane(array)
500
- #
501
- # Plane defined by its coefficents.
502
- # @param [Array(Float, Float, Float, Float)] point
503
- # @return [Array(Length, Length, Length)]
504
- #
505
499
  # @overload project_to_plane(point, vector)
506
500
  #
507
501
  # Plane defined by
@@ -518,10 +512,13 @@ class Array
518
512
  # @param [Geom::Point3d] point3
519
513
  # @return [Array(Length, Length, Length)]
520
514
  #
521
- # @overload project_to_plane(array)
515
+ # @overload project_to_plane(float1, float2, float3, float4)
522
516
  #
523
- # Plane defined by three points.
524
- # @param [Array(Geom::Point3d, Geom::Point3d, Geom::Point3d)] point
517
+ # Plane defined by its coefficents.
518
+ # @param [Float] float1
519
+ # @param [Float] float2
520
+ # @param [Float] float3
521
+ # @param [Float] float4
525
522
  # @return [Array(Length, Length, Length)]
526
523
  #
527
524
  # @overload project_to_plane(array)
@@ -531,13 +528,16 @@ class Array
531
528
  # @param [Array(Geom::Point3d, Geom::Vector3d)] point
532
529
  # @return [Array(Length, Length, Length)]
533
530
  #
534
- # @overload project_to_plane(float1, float2, float3, float4)
531
+ # @overload project_to_plane(array)
532
+ #
533
+ # Plane defined by three points.
534
+ # @param [Array(Geom::Point3d, Geom::Point3d, Geom::Point3d)] point
535
+ # @return [Array(Length, Length, Length)]
536
+ #
537
+ # @overload project_to_plane(array)
535
538
  #
536
539
  # Plane defined by its coefficents.
537
- # @param [Float] float1
538
- # @param [Float] float2
539
- # @param [Float] float3
540
- # @param [Float] float4
540
+ # @param [Array(Float, Float, Float, Float)] point
541
541
  # @return [Array(Length, Length, Length)]
542
542
  #
543
543
  # @see Geom
@@ -547,8 +547,9 @@ class Array
547
547
  def project_to_plane(*args)
548
548
  end
549
549
 
550
- # The {#transform} method is used to apply a {Geom::Transformation} object to a
551
- # {Geom::Point3d} object defined by an {Array} object.
550
+ # The {#transform} method is used to apply a {Geom::Transformation} or
551
+ # {Geom::Transformation2d} object to a {Geom::Point3d} or {Geom::Point2d} object
552
+ # defined by an {Array} object.
552
553
  #
553
554
  # This method returns a new {Array} object instead of modifying the original.
554
555
  #
@@ -559,9 +560,15 @@ class Array
559
560
  # # This will return a new Array
560
561
  # point2 = array.transform(transform)
561
562
  #
562
- # @param [Geom::Transformation] transform
563
+ # @overload transform(transform)
563
564
  #
564
- # @return [Array(Length, Length, Length)] The newly transformed point.
565
+ # @param [Geom::Transformation2d] transform
566
+ # @return [Array<Length, Length>] The newly transformed point.
567
+ #
568
+ # @overload transform(transform)
569
+ #
570
+ # @param [Geom::Transformation] transform
571
+ # @return [Array<Length, Length, Length>] The newly transformed point.
565
572
  #
566
573
  # @version SketchUp 6.0
567
574
  def transform(transform)
@@ -579,9 +586,15 @@ class Array
579
586
  #
580
587
  # @note This method modifies the original.
581
588
  #
582
- # @param [Geom::Transformation] transform
589
+ # @overload transform!(transform)
590
+ #
591
+ # @param [Geom::Transformation2d] transform
592
+ # @return [Array] The newly transformed point.
583
593
  #
584
- # @return [Array] The newly transformed point.
594
+ # @overload transform!(transform)
595
+ #
596
+ # @param [Geom::Transformation] transform
597
+ # @return [Array] The newly transformed point.
585
598
  #
586
599
  # @version SketchUp 6.0
587
600
  def transform!(transform)
@@ -590,6 +603,12 @@ class Array
590
603
  # The {#vector_to} method is used to create an array as a vector from one point
591
604
  # to a second point.
592
605
  #
606
+ # @example With 3d array
607
+ # point = Geom::Point3d.new(10, 20, 30)
608
+ # array = [1, 2, 3]
609
+ # # This will return a new Vector3d
610
+ # vector = array.vector_to(point)
611
+ #
593
612
  # @example With 2d array
594
613
  # point = Geom::Point2d.new(10, 20)
595
614
  # array = [1, 2]
@@ -600,12 +619,6 @@ class Array
600
619
  # # This will return a new Vector3d
601
620
  # vector = array.vector_to(point)
602
621
  #
603
- # @example With 3d array
604
- # point = Geom::Point3d.new(10, 20, 30)
605
- # array = [1, 2, 3]
606
- # # This will return a new Vector3d
607
- # vector = array.vector_to(point)
608
- #
609
622
  # @overload vector_to(point)
610
623
  #
611
624
  # @param [Geom::Point3d] point