sketchup-api-stubs 0.7.11 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) 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 +4 -0
  4. data/lib/sketchup-api-stubs/stubs/Geom/BoundingBox.rb +35 -11
  5. data/lib/sketchup-api-stubs/stubs/Geom/Point2d.rb +1 -1
  6. data/lib/sketchup-api-stubs/stubs/Geom/Point3d.rb +9 -5
  7. data/lib/sketchup-api-stubs/stubs/Geom/Transformation.rb +5 -0
  8. data/lib/sketchup-api-stubs/stubs/Geom/Transformation2d.rb +10 -0
  9. data/lib/sketchup-api-stubs/stubs/Geom/Vector3d.rb +5 -2
  10. data/lib/sketchup-api-stubs/stubs/Geom.rb +2 -0
  11. data/lib/sketchup-api-stubs/stubs/LanguageHandler.rb +4 -4
  12. data/lib/sketchup-api-stubs/stubs/Layout/AngularDimension.rb +53 -51
  13. data/lib/sketchup-api-stubs/stubs/Layout/AutoTextDefinition.rb +2 -1
  14. data/lib/sketchup-api-stubs/stubs/Layout/Document.rb +1 -1
  15. data/lib/sketchup-api-stubs/stubs/Layout/FormattedText.rb +6 -8
  16. data/lib/sketchup-api-stubs/stubs/Layout/Group.rb +50 -0
  17. data/lib/sketchup-api-stubs/stubs/Layout/Image.rb +8 -10
  18. data/lib/sketchup-api-stubs/stubs/Layout/Path.rb +1 -1
  19. data/lib/sketchup-api-stubs/stubs/Layout/ReferenceEntity.rb +8 -10
  20. data/lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb +6 -9
  21. data/lib/sketchup-api-stubs/stubs/Layout/Style.rb +1 -1
  22. data/lib/sketchup-api-stubs/stubs/Layout/Table.rb +17 -0
  23. data/lib/sketchup-api-stubs/stubs/Sketchup/AppObserver.rb +109 -21
  24. data/lib/sketchup-api-stubs/stubs/Sketchup/ArcCurve.rb +17 -11
  25. data/lib/sketchup-api-stubs/stubs/Sketchup/CRSLocation.rb +402 -0
  26. data/lib/sketchup-api-stubs/stubs/Sketchup/CRSMapUnit.rb +83 -0
  27. data/lib/sketchup-api-stubs/stubs/Sketchup/ComponentDefinition.rb +220 -8
  28. data/lib/sketchup-api-stubs/stubs/Sketchup/ComponentInstance.rb +85 -16
  29. data/lib/sketchup-api-stubs/stubs/Sketchup/Curve.rb +11 -9
  30. data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionList.rb +5 -1
  31. data/lib/sketchup-api-stubs/stubs/Sketchup/Dimension.rb +6 -6
  32. data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionLinear.rb +19 -11
  33. data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionRadial.rb +8 -9
  34. data/lib/sketchup-api-stubs/stubs/Sketchup/Entities.rb +181 -33
  35. data/lib/sketchup-api-stubs/stubs/Sketchup/EntitiesObserver.rb +0 -5
  36. data/lib/sketchup-api-stubs/stubs/Sketchup/Entity.rb +8 -1
  37. data/lib/sketchup-api-stubs/stubs/Sketchup/EntityObserver.rb +0 -5
  38. data/lib/sketchup-api-stubs/stubs/Sketchup/Face.rb +14 -12
  39. data/lib/sketchup-api-stubs/stubs/Sketchup/Group.rb +100 -19
  40. data/lib/sketchup-api-stubs/stubs/Sketchup/HatchPattern.rb +277 -0
  41. data/lib/sketchup-api-stubs/stubs/Sketchup/HatchPatternData.rb +245 -0
  42. data/lib/sketchup-api-stubs/stubs/Sketchup/HatchPatterns.rb +155 -0
  43. data/lib/sketchup-api-stubs/stubs/Sketchup/Image.rb +2 -2
  44. data/lib/sketchup-api-stubs/stubs/Sketchup/InstancePath.rb +144 -0
  45. data/lib/sketchup-api-stubs/stubs/Sketchup/Layer.rb +6 -0
  46. data/lib/sketchup-api-stubs/stubs/Sketchup/LayerFolder.rb +13 -1
  47. data/lib/sketchup-api-stubs/stubs/Sketchup/Layers.rb +2 -4
  48. data/lib/sketchup-api-stubs/stubs/Sketchup/Material.rb +66 -3
  49. data/lib/sketchup-api-stubs/stubs/Sketchup/Materials.rb +4 -4
  50. data/lib/sketchup-api-stubs/stubs/Sketchup/Model.rb +112 -25
  51. data/lib/sketchup-api-stubs/stubs/Sketchup/ModelObserver.rb +130 -4
  52. data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsProviderObserver.rb +0 -1
  53. data/lib/sketchup-api-stubs/stubs/Sketchup/Page.rb +95 -83
  54. data/lib/sketchup-api-stubs/stubs/Sketchup/Pages.rb +11 -11
  55. data/lib/sketchup-api-stubs/stubs/Sketchup/Procedure.rb +452 -0
  56. data/lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptions.rb +29 -3
  57. data/lib/sketchup-api-stubs/stubs/Sketchup/SectionPlane.rb +30 -0
  58. data/lib/sketchup-api-stubs/stubs/Sketchup/ShadowInfo.rb +15 -13
  59. data/lib/sketchup-api-stubs/stubs/Sketchup/Style.rb +16 -0
  60. data/lib/sketchup-api-stubs/stubs/Sketchup/Text.rb +74 -0
  61. data/lib/sketchup-api-stubs/stubs/Sketchup/Tool.rb +49 -8
  62. data/lib/sketchup-api-stubs/stubs/Sketchup/ToolsObserver.rb +25 -12
  63. data/lib/sketchup-api-stubs/stubs/Sketchup/View.rb +78 -22
  64. data/lib/sketchup-api-stubs/stubs/Sketchup.rb +55 -4
  65. data/lib/sketchup-api-stubs/stubs/SketchupExtension.rb +73 -59
  66. data/lib/sketchup-api-stubs/stubs/UI/Command.rb +119 -164
  67. data/lib/sketchup-api-stubs/stubs/UI/HtmlDialog.rb +50 -9
  68. data/lib/sketchup-api-stubs/stubs/UI/WebDialog.rb +4 -1
  69. data/lib/sketchup-api-stubs/stubs/UI.rb +15 -8
  70. data/lib/sketchup-api-stubs/stubs/_top_level.rb +8 -0
  71. metadata +9 -7
@@ -0,0 +1,402 @@
1
+ # Copyright:: Copyright 2026 Trimble Inc.
2
+ # License:: The MIT License (MIT)
3
+
4
+ # The CRSLocation class contains information that maps the SketchUp model into a projection
5
+ # coordinate system.
6
+ #
7
+ # @version SketchUp 2027.0
8
+ class Sketchup::CRSLocation
9
+
10
+ # Constants
11
+
12
+ FEET = nil # Stub value.
13
+
14
+ METERS = nil # Stub value.
15
+
16
+ US_SURVEY_FEET = nil # Stub value.
17
+
18
+ # Instance Methods
19
+
20
+ # The {#==} method returns whether two {Sketchup::CRSLocation} are equal within tolerance.
21
+ #
22
+ # @param [Sketchup::CRSLocation] other
23
+ #
24
+ # @return [Boolean]
25
+ #
26
+ # @version SketchUp 2027.0
27
+ def ==(other)
28
+ end
29
+
30
+ # The {#calibration_file_name} method is used to retrieve the name of the
31
+ # calibration file used in the construction of the CRSLocation.
32
+ #
33
+ # @return [String, nil]
34
+ #
35
+ # @version SketchUp 2027.0
36
+ def calibration_file_name
37
+ end
38
+
39
+ # The {#calibration_file_name=} method is used to set the name of the
40
+ # calibration file used in the construction of the CRSLocation.
41
+ #
42
+ # @param [String, nil] calibration_file_name
43
+ #
44
+ #
45
+ # @version SketchUp 2027.0
46
+ def calibration_file_name=(calibration_file_name)
47
+ end
48
+
49
+ # The {#description} method is used to retrieve the description of the CRSLocation.
50
+ #
51
+ # @example
52
+ # Sketchup.active_model.crs_location.description
53
+ #
54
+ # @return [String, nil]
55
+ #
56
+ # @version SketchUp 2027.0
57
+ def description
58
+ end
59
+
60
+ # The {#description=} method is used to set the description of the CRSLocation.
61
+ #
62
+ # @example
63
+ # Sketchup.active_model.crs_location.description = "British National Grid"
64
+ #
65
+ # @param [String, nil] description
66
+ #
67
+ #
68
+ # @version SketchUp 2027.0
69
+ def description=(description)
70
+ end
71
+
72
+ # The {#eastings} method is used to retrieve the eastings of the CRSLocation.
73
+ #
74
+ # The eastings represents the offset in the "X" direction of this models origin from the
75
+ # origin of the coordinate system
76
+ #
77
+ # @return [Float]
78
+ #
79
+ # @version SketchUp 2027.0
80
+ def eastings
81
+ end
82
+
83
+ # The {#eastings=} method is used to set the eastings of the CRSLocation.
84
+ #
85
+ # Typically {#eastings}, {#northings} and {#height} need to be set together to
86
+ # properly position the model.
87
+ #
88
+ # @return [Float]
89
+ #
90
+ # @version SketchUp 2027.0
91
+ def eastings=(eastings)
92
+ end
93
+
94
+ # The {#geodetic_datum} method is used to retrieve the name of the geodetic datum of the
95
+ # CRSLocation.
96
+ #
97
+ # @return [String, nil]
98
+ #
99
+ # @version SketchUp 2027.0
100
+ def geodetic_datum
101
+ end
102
+
103
+ # The {#geodetic_datum=} method is used to set the name of the geodetic datum of the CRSLocation.
104
+ #
105
+ # @note If the {#name} is specific enough this may be unnecessary to set.
106
+ #
107
+ # @param [String, nil] geodetic_datum
108
+ #
109
+ # @version SketchUp 2027.0
110
+ def geodetic_datum=(geodetic_datum)
111
+ end
112
+
113
+ # The {#height} method is used to retrieve the height of the CRSLocation.
114
+ #
115
+ # The height represents the offset in the "Z" direction of this models origin from
116
+ # some base height.
117
+ #
118
+ # @note this is equivalent to "Orthogonal Height" from the IFC spec.
119
+ #
120
+ # @return [Float]
121
+ #
122
+ # @version SketchUp 2027.0
123
+ def height
124
+ end
125
+
126
+ # The {#height=} method is used to set the height of the CRSLocation.
127
+ #
128
+ # Typically {#eastings}, {#northings} and {#height} need to be set together to
129
+ # properly position the model.
130
+ #
131
+ # @return [Float]
132
+ #
133
+ # @version SketchUp 2027.0
134
+ def height=(height)
135
+ end
136
+
137
+ # Creates a CRSLocation object.
138
+ #
139
+ # @example
140
+ # # No arguments, creates an empty CRSLocation
141
+ # crs_location1 = Sketchup::CRSLocation.new
142
+ #
143
+ # # Creates a clone of the CRSLocation
144
+ # crs_location2 = Sketchup::CRSLocation.new(crs_location1)
145
+ #
146
+ # Sketchup.active_model.crs_location = crs_location2
147
+ #
148
+ # @overload initialize
149
+ #
150
+ # @return [Sketchup::CRSLocation]
151
+ #
152
+ # @overload initialize(crslocation)
153
+ #
154
+ # @param [Sketchup::CRSLocation] crs_location
155
+ # @return [Sketchup::CRSLocation]
156
+ #
157
+ # @version SketchUp 2027.0
158
+ def initialize(*args)
159
+ end
160
+
161
+ # The {#map_projection} method is used to retrieve the name of the map projection of the
162
+ # CRSLocation.
163
+ #
164
+ # @return [String, nil]
165
+ #
166
+ # @version SketchUp 2027.0
167
+ def map_projection
168
+ end
169
+
170
+ # The {#map_projection=} method is used to set the name of the map projection of the CRSLocation.
171
+ #
172
+ # @note If the {#name} is specific enough this may be unnecessary to set.
173
+ #
174
+ # @param [String, nil] map_projection
175
+ #
176
+ # @version SketchUp 2027.0
177
+ def map_projection=(map_projection)
178
+ end
179
+
180
+ # The {#map_unit} method is used to retrieve the map unit of the CRSLocation.
181
+ #
182
+ # @note If there is no map unit defined, meters can be assumed.
183
+ #
184
+ # @return [Sketchup::CRSMapUnit, nil]
185
+ #
186
+ # @version SketchUp 2027.0
187
+ def map_unit
188
+ end
189
+
190
+ # The {#map_unit=} method is used to set the map unit of the CRSLocation.
191
+ #
192
+ # @param [Sketchup::CRSMapUnit, nil] map_unit
193
+ #
194
+ # @see Sketchup::CRSMapUnit::METERS
195
+ #
196
+ # @see Sketchup::CRSMapUnit::FEET
197
+ #
198
+ # @see Sketchup::CRSMapUnit::US_SURVEY_FEET
199
+ #
200
+ # @version SketchUp 2027.0
201
+ def map_unit=(map_unit)
202
+ end
203
+
204
+ # The {#map_zone} method is used to retrieve the name of the map zone of the CRSLocation.
205
+ #
206
+ # @return [String, nil]
207
+ #
208
+ # @version SketchUp 2027.0
209
+ def map_zone
210
+ end
211
+
212
+ # The {#map_zone=} method is used to set the name of the map zone of the CRSLocation.
213
+ #
214
+ # @note If the {#name} is specific enough this may be unnecessary to set.
215
+ #
216
+ # @param [String, nil] map_zone
217
+ #
218
+ # @version SketchUp 2027.0
219
+ def map_zone=(map_zone)
220
+ end
221
+
222
+ # The {#name} method is used to retrieve the name of the CRSLocation.
223
+ #
224
+ # @example
225
+ # Sketchup.active_model.crs_location.name
226
+ #
227
+ # @return [String]
228
+ #
229
+ # @version SketchUp 2027.0
230
+ def name
231
+ end
232
+
233
+ # The {#name=} method is used to set the name of the CRSLocation.
234
+ #
235
+ # For the best interoperability with other BIM and GIS software this should follow the IFC
236
+ # standard.
237
+ #
238
+ # @example
239
+ # Sketchup.active_model.crs_location.name = "EPSG:27700"
240
+ #
241
+ # @param [String] name
242
+ #
243
+ #
244
+ # @version SketchUp 2027.0
245
+ def name=(name)
246
+ end
247
+
248
+ # The {#northings} method is used to retrieve the northings of the CRSLocation.
249
+ #
250
+ # The northings represents the offset in the "Y" direction of this models origin from the
251
+ # origin of the coordinate system
252
+ #
253
+ # @return [Float]
254
+ #
255
+ # @version SketchUp 2027.0
256
+ def northings
257
+ end
258
+
259
+ # The {#northings=} method is used to set the northings of the CRSLocation.
260
+ #
261
+ # Typically {#eastings}, {#northings} and {#height} need to be set together to
262
+ # properly position the model.
263
+ #
264
+ # @return [Float]
265
+ #
266
+ # @version SketchUp 2027.0
267
+ def northings=(northings)
268
+ end
269
+
270
+ # The {#scale} method is used to retrieve the scale of the CRSLocation.
271
+ #
272
+ # The scale represents the ratio between the Sketchup modelling units (inches) and the
273
+ # modelling units of the coordinate system.
274
+ #
275
+ # For example, if the CRS is in meters, the scale would be +1.m+
276
+ #
277
+ # @note The {#scale} and {#map_unit} properties are related.
278
+ #
279
+ # @return [Float]
280
+ #
281
+ # @see Sketchup::CRSLocation::METERS
282
+ #
283
+ # @see Sketchup::CRSLocation::FEET
284
+ #
285
+ # @see Sketchup::CRSLocation::US_SURVEY_FEET
286
+ #
287
+ # @version SketchUp 2027.0
288
+ def scale
289
+ end
290
+
291
+ # The {#scale=} method is used to set the scale of the CRSLocation.
292
+ #
293
+ # @example
294
+ # crs_location = model.crs_location
295
+ # crs_location.scale = Sketchup::CRSLocation::FEET
296
+ # # Alternatively:
297
+ # crs_location.scale = 1.to_feet
298
+ #
299
+ # @note When calling this method also considering calling {#map_unit=}
300
+ #
301
+ # @param scale
302
+ #
303
+ # @raise [ArgumentError] If the scale is less than or equal to 0.
304
+ #
305
+ # @see Sketchup::CRSLocation::METERS
306
+ #
307
+ # @see Sketchup::CRSLocation::FEET
308
+ #
309
+ # @see Sketchup::CRSLocation::US_SURVEY_FEET
310
+ #
311
+ # @version SketchUp 2027.0
312
+ def scale=(scale)
313
+ end
314
+
315
+ # The {#tgl_id} method is used to retrieve the TGL (Trimble Geodetic Library) ID of the
316
+ # CRSLocation.
317
+ #
318
+ # This ID encodes all of the information about the CRS in a compact encoded string.
319
+ #
320
+ # @return [String, nil]
321
+ #
322
+ # @see https://cloud.api.trimble.com/coordinates/1.0/swagger
323
+ # for the TGL cloud API.
324
+ #
325
+ # @version SketchUp 2027.0
326
+ def tgl_id
327
+ end
328
+
329
+ # The {#tgl_id=} method is used to set the TGL (Trimble Geodetic Library) ID of the CRSLocation.
330
+ #
331
+ # @note This is currently a mandatory field when setting the CRSLocation on the model.
332
+ #
333
+ # @param [String, nil] tgl_id
334
+ #
335
+ #
336
+ # @see https://cloud.api.trimble.com/coordinates/1.0/swagger
337
+ # for the TGL cloud API.
338
+ #
339
+ # @version SketchUp 2027.0
340
+ def tgl_id=(tgl_id)
341
+ end
342
+
343
+ # The {#to_s} method converts a CRSLocation object to a {String}.
344
+ #
345
+ # @example
346
+ # crs_location = Sketchup::CRSLocation.new
347
+ # str = crs_location.to_s
348
+ #
349
+ # @return [String]
350
+ #
351
+ # @version SketchUp 2027.0
352
+ def to_s
353
+ end
354
+
355
+ # The {#vertical_datum} method is used to retrieve the name of the vertical datum of the
356
+ # CRSLocation.
357
+ #
358
+ # @return [String, nil]
359
+ #
360
+ # @version SketchUp 2027.0
361
+ def vertical_datum
362
+ end
363
+
364
+ # The {#vertical_datum=} method is used to set the name of the vertical datum of the CRSLocation.
365
+ #
366
+ # @note If the {#name} is specific enough this may be unnecessary to set.
367
+ #
368
+ # @param [String, nil] vertical_datum
369
+ #
370
+ # @version SketchUp 2027.0
371
+ def vertical_datum=(vertical_datum)
372
+ end
373
+
374
+ # The {#x_axis} method is used to retrieve the x_axis of the CRSLocation.
375
+ #
376
+ # The x_axis represents the direction of the local "X" axis in terms of the coordinate system.
377
+ #
378
+ # The default value is (1, 0), which means that the local orientation matches the coordinate
379
+ # system.
380
+ #
381
+ # @return [Geom::Vector2d]
382
+ #
383
+ # @version SketchUp 2027.0
384
+ def x_axis
385
+ end
386
+
387
+ # The {#x_axis=} method is used to set the x_axis of the CRSLocation.
388
+ #
389
+ # @example Orienting the model so that the local "X" axis points north:
390
+ # model = Sketchup.active_model
391
+ # crs_location = model.crs_location
392
+ # crs_location.x_axis = [0, 1]
393
+ # model.crs_location = crs_location
394
+ #
395
+ # @param [Geom::Vector2d] x_axis
396
+ #
397
+ #
398
+ # @version SketchUp 2027.0
399
+ def x_axis=(x_axis)
400
+ end
401
+
402
+ end
@@ -0,0 +1,83 @@
1
+ # Copyright:: Copyright 2026 Trimble Inc.
2
+ # License:: The MIT License (MIT)
3
+
4
+ # The CRSMapUnit class represents a length unit and the conversion factor from that unit to meters.
5
+ #
6
+ # @version SketchUp 2027.0
7
+ class Sketchup::CRSMapUnit
8
+
9
+ # Constants
10
+
11
+ FEET = nil # Stub value.
12
+
13
+ METERS = nil # Stub value.
14
+
15
+ US_SURVEY_FEET = nil # Stub value.
16
+
17
+ # Instance Methods
18
+
19
+ # The {#==} method returns whether two {Sketchup::CRSMapUnit} are equal within tolerance.
20
+ #
21
+ # @param [Sketchup::CRSMapUnit] other
22
+ #
23
+ # @return [Boolean]
24
+ #
25
+ # @version SketchUp 2027.0
26
+ def ==(other)
27
+ end
28
+
29
+ # The {#conversion} method is used to retrieve the conversion factor between this map unit and
30
+ # meters.
31
+ #
32
+ # @return [Float]
33
+ #
34
+ # @version SketchUp 2027.0
35
+ def conversion
36
+ end
37
+
38
+ # Creates a CRSMapUnit object.
39
+ #
40
+ # @example
41
+ # map_unit = Sketchup::CRSMapUnit.new("METRE", 1.0)
42
+ #
43
+ # @param [String] name
44
+ #
45
+ # @param [Float] conversion
46
+ #
47
+ # @raise [ArgumentError] If +name+ is empty or +conversion+ is <= 0.
48
+ #
49
+ # @return [Sketchup::CRSMapUnit]
50
+ #
51
+ # @version SketchUp 2027.0
52
+ def initialize(name, conversion)
53
+ end
54
+
55
+ # The {#inspect} method returns a string representation of the CRSMapUnit.
56
+ #
57
+ # @return [String]
58
+ #
59
+ # @version SketchUp 2027.0
60
+ def inspect
61
+ end
62
+
63
+ # The {#name} method is used to retrieve the name of the CRSMapUnit.
64
+ #
65
+ # standard.
66
+ #
67
+ # @note For best interoperability with other BIM and GIS software this should follow the IFC
68
+ #
69
+ # @return [String]
70
+ #
71
+ # @version SketchUp 2027.0
72
+ def name
73
+ end
74
+
75
+ # The {#to_s} method returns a string containing a human-readable representation of the CRSMapUnit.
76
+ #
77
+ # @return [String]
78
+ #
79
+ # @version SketchUp 2027.0
80
+ def to_s
81
+ end
82
+
83
+ end