sketchup-api-stubs 0.7.8 → 0.7.10
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.
- checksums.yaml +4 -4
- data/lib/sketchup-api-stubs/sketchup.rb +3 -0
- data/lib/sketchup-api-stubs/stubs/Array.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Geom/BoundingBox.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Geom/Bounds2d.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Geom/LatLong.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Geom/OrientedBounds2d.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Geom/Point2d.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Geom/Point3d.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Geom/PolygonMesh.rb +4 -18
- data/lib/sketchup-api-stubs/stubs/Geom/Transformation.rb +17 -19
- data/lib/sketchup-api-stubs/stubs/Geom/Transformation2d.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Geom/UTM.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Geom/Vector2d.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Geom/Vector3d.rb +3 -3
- data/lib/sketchup-api-stubs/stubs/Geom.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/LanguageHandler.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/AngularDimension.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/AutoTextDefinition.rb +50 -1
- data/lib/sketchup-api-stubs/stubs/Layout/AutoTextDefinitions.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/ConnectionPoint.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Document.rb +56 -3
- data/lib/sketchup-api-stubs/stubs/Layout/Ellipse.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Entities.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Entity.rb +4 -1
- data/lib/sketchup-api-stubs/stubs/Layout/FormattedText.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Grid.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Group.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Image.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Label.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Layer.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/LayerInstance.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Layers.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/LinearDimension.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/LockedEntityError.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/LockedLayerError.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Page.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/PageInfo.rb +73 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Pages.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Path.rb +7 -7
- data/lib/sketchup-api-stubs/stubs/Layout/Rectangle.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/ReferenceEntity.rb +82 -0
- data/lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb +24 -2
- data/lib/sketchup-api-stubs/stubs/Layout/Style.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Table.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/TableCell.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/TableColumn.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/TableRow.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Length.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Numeric.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Animation.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/AppObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/ArcCurve.rb +18 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/AttributeDictionaries.rb +3 -5
- data/lib/sketchup-api-stubs/stubs/Sketchup/AttributeDictionary.rb +4 -9
- data/lib/sketchup-api-stubs/stubs/Sketchup/Axes.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Behavior.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Camera.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/ClassificationSchema.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Classifications.rb +4 -5
- data/lib/sketchup-api-stubs/stubs/Sketchup/Color.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/ComponentDefinition.rb +44 -4
- data/lib/sketchup-api-stubs/stubs/Sketchup/ComponentInstance.rb +2 -2
- data/lib/sketchup-api-stubs/stubs/Sketchup/Console.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/ConstructionLine.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/ConstructionPoint.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Curve.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionList.rb +25 -2
- data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionsObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Dimension.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionLinear.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionRadial.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Drawingelement.rb +13 -3
- data/lib/sketchup-api-stubs/stubs/Sketchup/Edge.rb +62 -167
- data/lib/sketchup-api-stubs/stubs/Sketchup/EdgeUse.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Entities.rb +246 -209
- data/lib/sketchup-api-stubs/stubs/Sketchup/EntitiesBuilder.rb +3 -14
- data/lib/sketchup-api-stubs/stubs/Sketchup/EntitiesObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Entity.rb +10 -36
- data/lib/sketchup-api-stubs/stubs/Sketchup/EntityObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/ExtensionsManager.rb +4 -5
- data/lib/sketchup-api-stubs/stubs/Sketchup/Face.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/FrameChangeObserver.rb +1 -3
- data/lib/sketchup-api-stubs/stubs/Sketchup/Group.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Http/Request.rb +16 -26
- data/lib/sketchup-api-stubs/stubs/Sketchup/Http/Response.rb +2 -2
- data/lib/sketchup-api-stubs/stubs/Sketchup/Http.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Image.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/ImageRep.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Importer.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/InputPoint.rb +29 -30
- data/lib/sketchup-api-stubs/stubs/Sketchup/InstanceObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/InstancePath.rb +2 -2
- data/lib/sketchup-api-stubs/stubs/Sketchup/Layer.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/LayerFolder.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Layers.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/LayersObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Licensing/ExtensionLicense.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Licensing.rb +2 -2
- data/lib/sketchup-api-stubs/stubs/Sketchup/LineStyle.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/LineStyles.rb +9 -7
- data/lib/sketchup-api-stubs/stubs/Sketchup/Loop.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Material.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Materials.rb +2 -3
- data/lib/sketchup-api-stubs/stubs/Sketchup/MaterialsObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Menu.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Model.rb +28 -23
- data/lib/sketchup-api-stubs/stubs/Sketchup/ModelObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsManager.rb +4 -5
- data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsProvider.rb +5 -18
- data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsProviderObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Overlay.rb +490 -0
- data/lib/sketchup-api-stubs/stubs/Sketchup/OverlaysManager.rb +116 -0
- data/lib/sketchup-api-stubs/stubs/Sketchup/Page.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Pages.rb +15 -17
- data/lib/sketchup-api-stubs/stubs/Sketchup/PagesObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/PickHelper.rb +21 -18
- data/lib/sketchup-api-stubs/stubs/Sketchup/RegionalSettings.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptions.rb +18 -9
- data/lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptionsObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/SectionPlane.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Selection.rb +4 -5
- data/lib/sketchup-api-stubs/stubs/Sketchup/SelectionObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Set.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/ShadowInfo.rb +15 -20
- data/lib/sketchup-api-stubs/stubs/Sketchup/ShadowInfoObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Skp.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Style.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Styles.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Text.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Texture.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/TextureWriter.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Tool.rb +17 -20
- data/lib/sketchup-api-stubs/stubs/Sketchup/Tools.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/ToolsObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/UVHelper.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Vertex.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/View.rb +30 -18
- data/lib/sketchup-api-stubs/stubs/Sketchup/ViewObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup.rb +48 -14
- data/lib/sketchup-api-stubs/stubs/SketchupExtension.rb +2 -2
- data/lib/sketchup-api-stubs/stubs/String.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/UI/Command.rb +29 -31
- data/lib/sketchup-api-stubs/stubs/UI/HtmlDialog.rb +18 -9
- data/lib/sketchup-api-stubs/stubs/UI/Notification.rb +3 -3
- data/lib/sketchup-api-stubs/stubs/UI/Toolbar.rb +5 -4
- data/lib/sketchup-api-stubs/stubs/UI/WebDialog.rb +16 -18
- data/lib/sketchup-api-stubs/stubs/UI.rb +71 -26
- data/lib/sketchup-api-stubs/stubs/_top_level.rb +1 -9
- metadata +10 -7
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright:: Copyright
|
1
|
+
# Copyright:: Copyright 2024 Trimble Inc.
|
2
2
|
# License:: The MIT License (MIT)
|
3
3
|
|
4
4
|
# The {Sketchup::EntitiesBuilder} is an interface to generate bulk geometry
|
@@ -24,8 +24,6 @@
|
|
24
24
|
#
|
25
25
|
# rdoc-image:../images/entities-builder-grid-example.png
|
26
26
|
#
|
27
|
-
# @api EntitiesBuilder
|
28
|
-
#
|
29
27
|
# @example Creating a triangulated grid
|
30
28
|
# model = Sketchup.active_model
|
31
29
|
# model.start_operation('Create Grid', true)
|
@@ -82,8 +80,6 @@ class Sketchup::EntitiesBuilder
|
|
82
80
|
|
83
81
|
# Adds a {Sketchup::Edge} to the {#entities} collection.
|
84
82
|
#
|
85
|
-
# @api EntitiesBuilder
|
86
|
-
#
|
87
83
|
# @example
|
88
84
|
# model = Sketchup.active_model
|
89
85
|
# model.entities.build { |builder|
|
@@ -117,8 +113,6 @@ class Sketchup::EntitiesBuilder
|
|
117
113
|
|
118
114
|
# Adds a continuous set of {Sketchup::Edge}'s to the {#entities} collection.
|
119
115
|
#
|
120
|
-
# @api EntitiesBuilder
|
121
|
-
#
|
122
116
|
# @example
|
123
117
|
# model = Sketchup.active_model
|
124
118
|
# model.entities.build { |builder|
|
@@ -151,8 +145,6 @@ class Sketchup::EntitiesBuilder
|
|
151
145
|
|
152
146
|
# Adds a {Sketchup::Face} to the {#entities} collection.
|
153
147
|
#
|
154
|
-
# @api EntitiesBuilder
|
155
|
-
#
|
156
148
|
# @example Adding a simple face
|
157
149
|
# model = Sketchup.active_model
|
158
150
|
# model.entities.build { |builder|
|
@@ -210,8 +202,6 @@ class Sketchup::EntitiesBuilder
|
|
210
202
|
# The {Sketchup::Entities} collection the {Sketchup::EntitiesBuilder} will add
|
211
203
|
# the geometry to.
|
212
204
|
#
|
213
|
-
# @api EntitiesBuilder
|
214
|
-
#
|
215
205
|
# @example
|
216
206
|
# model = Sketchup.active_model
|
217
207
|
# model.entities.build { |builder|
|
@@ -234,7 +224,8 @@ class Sketchup::EntitiesBuilder
|
|
234
224
|
# When this return +false+, calling any other method on the builder will raise
|
235
225
|
# an error.
|
236
226
|
#
|
237
|
-
# @
|
227
|
+
# @bug Prior to SketchUp 2023.0 this returned +0+ for success instead of +true+.
|
228
|
+
# In Ruby +0+ evaluates as +true+ so conditional logic still worked.
|
238
229
|
#
|
239
230
|
# @example
|
240
231
|
# model = Sketchup.active_model
|
@@ -253,8 +244,6 @@ class Sketchup::EntitiesBuilder
|
|
253
244
|
|
254
245
|
# Finds an existing {Sketchup::Vertex} for the given position, otherwise returns +nil+.
|
255
246
|
#
|
256
|
-
# @api EntitiesBuilder
|
257
|
-
#
|
258
247
|
# @example
|
259
248
|
# model = Sketchup.active_model
|
260
249
|
# model.entities.build { |builder|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright:: Copyright
|
1
|
+
# Copyright:: Copyright 2024 Trimble Inc.
|
2
2
|
# License:: The MIT License (MIT)
|
3
3
|
|
4
4
|
# This is the base class for all SketchUp entities. Entities are basically
|
@@ -252,29 +252,17 @@ class Sketchup::Entity
|
|
252
252
|
def get_attribute(dict_name, key, default_value = nil)
|
253
253
|
end
|
254
254
|
|
255
|
-
# The
|
255
|
+
# The {#inspect} method is used to retrieve the string representation of the entity.
|
256
256
|
#
|
257
257
|
# @example
|
258
|
-
# depth = 100
|
259
|
-
# width = 100
|
260
258
|
# model = Sketchup.active_model
|
261
259
|
# entities = model.active_entities
|
262
|
-
#
|
263
|
-
#
|
264
|
-
# pts[1] = [width, 0, 0]
|
265
|
-
# pts[2] = [width, depth, 0]
|
266
|
-
# pts[3] = [0, depth, 0]
|
260
|
+
# edge = entities.add_line(Geom::Point3d.new(0, 0, 0), Geom::Point3d.new(9, 9, 9))
|
261
|
+
# string = edge.inspect
|
267
262
|
#
|
268
|
-
#
|
269
|
-
# face = entities.add_face pts
|
263
|
+
# @return [String]
|
270
264
|
#
|
271
|
-
#
|
272
|
-
# # entities objects are edges.
|
273
|
-
# entity1 = entities[1]
|
274
|
-
# st = entity1.to_s
|
275
|
-
#
|
276
|
-
# @return [String] the string representation of the entity if
|
277
|
-
# successful
|
265
|
+
# @see #to_s
|
278
266
|
#
|
279
267
|
# @version SketchUp 6.0
|
280
268
|
def inspect
|
@@ -457,29 +445,15 @@ class Sketchup::Entity
|
|
457
445
|
def set_attribute(dict_name, key, value)
|
458
446
|
end
|
459
447
|
|
460
|
-
# The to_s method is used to retrieve the string representation of the entity.
|
448
|
+
# The {#to_s} method is used to retrieve the string representation of the entity.
|
461
449
|
#
|
462
450
|
# @example
|
463
|
-
# depth = 100
|
464
|
-
# width = 100
|
465
451
|
# model = Sketchup.active_model
|
466
452
|
# entities = model.active_entities
|
467
|
-
#
|
468
|
-
#
|
469
|
-
# pts[1] = [width, 0, 0]
|
470
|
-
# pts[2] = [width, depth, 0]
|
471
|
-
# pts[3] = [0, depth, 0]
|
472
|
-
#
|
473
|
-
# # Add the face to the entities in the model
|
474
|
-
# face = entities.add_face pts
|
475
|
-
#
|
476
|
-
# # I just happen to know that the second and third entities in the
|
477
|
-
# # entities objects are edges.
|
478
|
-
# entity1 = entities[1]
|
479
|
-
# st = entity1.to_s
|
453
|
+
# edge = entities.add_line(Geom::Point3d.new(0, 0, 0), Geom::Point3d.new(9, 9, 9))
|
454
|
+
# string = edge.to_s
|
480
455
|
#
|
481
|
-
# @return [String]
|
482
|
-
# successful
|
456
|
+
# @return [String]
|
483
457
|
#
|
484
458
|
# @version SketchUp 6.0
|
485
459
|
def to_s
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright:: Copyright
|
1
|
+
# Copyright:: Copyright 2024 Trimble Inc.
|
2
2
|
# License:: The MIT License (MIT)
|
3
3
|
|
4
4
|
# The ExtensionsManager class provides a way of accessing the
|
@@ -62,19 +62,18 @@ class Sketchup::ExtensionsManager
|
|
62
62
|
def count
|
63
63
|
end
|
64
64
|
|
65
|
-
# The each method is used to iterate through extensions.
|
65
|
+
# The {#each} method is used to iterate through extensions.
|
66
66
|
#
|
67
67
|
# @example
|
68
68
|
# manager = Sketchup.extensions
|
69
69
|
# # Retrieves each extension
|
70
70
|
# manager.each { |extension| puts extension.name }
|
71
71
|
#
|
72
|
-
# @return nil
|
72
|
+
# @return [nil]
|
73
73
|
#
|
74
74
|
# @version SketchUp 8.0 M2
|
75
75
|
#
|
76
|
-
# @
|
77
|
-
# as they are found.
|
76
|
+
# @yieldparam [SketchupExtension] extension
|
78
77
|
def each
|
79
78
|
end
|
80
79
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright:: Copyright
|
1
|
+
# Copyright:: Copyright 2024 Trimble Inc.
|
2
2
|
# License:: The MIT License (MIT)
|
3
3
|
|
4
4
|
# This observer interface is implemented to react to changes in camera
|
@@ -95,8 +95,6 @@ class Sketchup::FrameChangeObserver
|
|
95
95
|
# @param [Float] percent_done
|
96
96
|
# The percentage of transition between the two scene pages.
|
97
97
|
#
|
98
|
-
# @return [void] Value can be anything, but is ignored by SketchUp.
|
99
|
-
#
|
100
98
|
# @version SketchUp 6.0
|
101
99
|
def frameChange(from_scene, to_scene, percent_done)
|
102
100
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright:: Copyright
|
1
|
+
# Copyright:: Copyright 2024 Trimble Inc.
|
2
2
|
# License:: The MIT License (MIT)
|
3
3
|
|
4
4
|
# Http::Request objects allows you to send HTTP request to HTTP servers.
|
@@ -8,7 +8,7 @@ class Sketchup::Http::Request
|
|
8
8
|
|
9
9
|
# Instance Methods
|
10
10
|
|
11
|
-
# Gets the
|
11
|
+
# Gets the HTTP body that is going to be used when sending the request.
|
12
12
|
#
|
13
13
|
# @example
|
14
14
|
# @request = Sketchup::Http::Request.new("http://localhost:8080")
|
@@ -23,7 +23,7 @@ class Sketchup::Http::Request
|
|
23
23
|
def body
|
24
24
|
end
|
25
25
|
|
26
|
-
# Sets the
|
26
|
+
# Sets the HTTP body that is going to be used when sending the request.
|
27
27
|
#
|
28
28
|
# @example
|
29
29
|
# @request = Sketchup::Http::Request.new("http://localhost:8080")
|
@@ -58,7 +58,7 @@ class Sketchup::Http::Request
|
|
58
58
|
def cancel
|
59
59
|
end
|
60
60
|
|
61
|
-
# Returns the
|
61
|
+
# Returns the HTTP headers that are going to be used when sending the request.
|
62
62
|
#
|
63
63
|
# @example
|
64
64
|
# @request = Sketchup::Http::Request.new("http://localhost:8080")
|
@@ -74,7 +74,7 @@ class Sketchup::Http::Request
|
|
74
74
|
def headers
|
75
75
|
end
|
76
76
|
|
77
|
-
# Sets the
|
77
|
+
# Sets the HTTP headers that are going to be used when sending the request.
|
78
78
|
#
|
79
79
|
# @example
|
80
80
|
# @request = Sketchup::Http::Request.new("http://localhost:8080")
|
@@ -93,12 +93,10 @@ class Sketchup::Http::Request
|
|
93
93
|
def headers=(headers)
|
94
94
|
end
|
95
95
|
|
96
|
-
# The new method is used to create a new Sketchup::Http::Request.
|
97
|
-
#
|
98
96
|
# The default port is 80, to use a different port define it in the URL when
|
99
97
|
# creating a new {Sketchup::Http::Request}.
|
100
98
|
#
|
101
|
-
# The +method+ parameter accepts any custom
|
99
|
+
# The +method+ parameter accepts any custom HTTP method or one of the
|
102
100
|
# following:
|
103
101
|
# * +Sketchup::Http::GET+
|
104
102
|
# * +Sketchup::Http::POST+
|
@@ -119,19 +117,16 @@ class Sketchup::Http::Request
|
|
119
117
|
# takes longer time.
|
120
118
|
#
|
121
119
|
# @param [String] url
|
122
|
-
# The targetted URL.
|
123
120
|
#
|
124
121
|
# @param [String] method
|
125
|
-
# Optionally, the request method to use, the
|
126
|
-
# default is Sketchup::Http::GET
|
127
122
|
#
|
128
|
-
# @return [Request]
|
123
|
+
# @return [Sketchup::Http::Request]
|
129
124
|
#
|
130
125
|
# @version SketchUp 2017
|
131
|
-
def initialize(url, method)
|
126
|
+
def initialize(url, method = Sketchup::Http::GET)
|
132
127
|
end
|
133
128
|
|
134
|
-
# Returns the
|
129
|
+
# Returns the HTTP method that is going to be used when sending the request.
|
135
130
|
#
|
136
131
|
# @example
|
137
132
|
# @request = Sketchup::Http::Request.new("http://localhost:8080")
|
@@ -146,8 +141,8 @@ class Sketchup::Http::Request
|
|
146
141
|
def method
|
147
142
|
end
|
148
143
|
|
149
|
-
# Sets the
|
150
|
-
# The value can be any custom
|
144
|
+
# Sets the HTTP method that is going to be used when sending the request.
|
145
|
+
# The value can be any custom HTTP method or one of the following:
|
151
146
|
# * +Sketchup::Http::GET+
|
152
147
|
# * +Sketchup::Http::POST+
|
153
148
|
# * +Sketchup::Http::PUT+
|
@@ -164,7 +159,7 @@ class Sketchup::Http::Request
|
|
164
159
|
# end
|
165
160
|
#
|
166
161
|
# @param [String] method
|
167
|
-
# A string containing the
|
162
|
+
# A string containing the HTTP method name.
|
168
163
|
#
|
169
164
|
# @return [Boolean]
|
170
165
|
#
|
@@ -232,7 +227,7 @@ class Sketchup::Http::Request
|
|
232
227
|
def set_upload_progress_callback
|
233
228
|
end
|
234
229
|
|
235
|
-
# Starts the request
|
230
|
+
# Starts the request with optionally a response callback block.
|
236
231
|
#
|
237
232
|
# @example
|
238
233
|
# @request = Sketchup::Http::Request.new("http://localhost:8080")
|
@@ -245,14 +240,9 @@ class Sketchup::Http::Request
|
|
245
240
|
#
|
246
241
|
# @version SketchUp 2017
|
247
242
|
#
|
248
|
-
# @
|
249
|
-
#
|
250
|
-
# @yieldparam [Request] request
|
251
|
-
# The request object.
|
243
|
+
# @yieldparam [Sketchup::Http::Request] request
|
252
244
|
#
|
253
|
-
# @yieldparam [Response] response
|
254
|
-
# The response object, use this to read the
|
255
|
-
# server response.
|
245
|
+
# @yieldparam [Sketchup::Http::Response] response
|
256
246
|
def start
|
257
247
|
end
|
258
248
|
|
@@ -268,7 +258,7 @@ class Sketchup::Http::Request
|
|
268
258
|
# @request.start
|
269
259
|
# puts "response.status: #{@request.status}"
|
270
260
|
#
|
271
|
-
# @return [
|
261
|
+
# @return [Integer]
|
272
262
|
#
|
273
263
|
# @version SketchUp 2017
|
274
264
|
def status
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright:: Copyright
|
1
|
+
# Copyright:: Copyright 2024 Trimble Inc.
|
2
2
|
# License:: The MIT License (MIT)
|
3
3
|
|
4
4
|
# Http::Response objects allows you to get the response information from the
|
@@ -53,7 +53,7 @@ class Sketchup::Http::Response
|
|
53
53
|
# puts "http status code: #{response.status_code}"
|
54
54
|
# end
|
55
55
|
#
|
56
|
-
# @return [
|
56
|
+
# @return [Integer]
|
57
57
|
#
|
58
58
|
# @version SketchUp 2017
|
59
59
|
def status_code
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright:: Copyright
|
1
|
+
# Copyright:: Copyright 2024 Trimble Inc.
|
2
2
|
# License:: The MIT License (MIT)
|
3
3
|
|
4
4
|
# The {Sketchup::InputPoint} class is used to pick 3d points and/or entities
|
@@ -266,44 +266,43 @@ class Sketchup::InputPoint
|
|
266
266
|
def instance_path
|
267
267
|
end
|
268
268
|
|
269
|
-
# The pick method is used to get
|
269
|
+
# The {#pick} method is used to get a input point at a specific screen
|
270
270
|
# position.
|
271
271
|
#
|
272
|
-
# The first form just uses the screen position to compute the InputPoint. It
|
273
|
-
# is used when you don't want the InputPoint to be dependent on another
|
274
|
-
# InputPoint.
|
275
|
-
#
|
276
|
-
# The second form uses the screen position and another InputPoint. It will
|
277
|
-
# find additional inferences such as along one of the axis directions from the
|
278
|
-
# first point.
|
279
|
-
#
|
280
272
|
# @example
|
281
273
|
# view = Sketchup.active_model.active_view
|
282
274
|
# x = 100
|
283
275
|
# y = 100
|
284
|
-
# inputpoint = view.inputpoint
|
285
|
-
# inputpoint2 = Sketchup::InputPoint.new
|
286
|
-
# inputpoint.pick
|
287
|
-
# inputpoint.pick
|
288
|
-
#
|
289
|
-
# @
|
290
|
-
#
|
291
|
-
#
|
292
|
-
#
|
293
|
-
#
|
294
|
-
#
|
295
|
-
#
|
296
|
-
#
|
297
|
-
#
|
298
|
-
# @
|
299
|
-
#
|
300
|
-
#
|
301
|
-
#
|
302
|
-
#
|
276
|
+
# inputpoint = view.inputpoint(x, y)
|
277
|
+
# inputpoint2 = Sketchup::InputPoint.new(Geom::Point3d.new(100, 200, 300))
|
278
|
+
# inputpoint.pick(view, x, y)
|
279
|
+
# inputpoint.pick(view, x, y, inputpoint2)
|
280
|
+
#
|
281
|
+
# @overload pick(view, x, y)
|
282
|
+
#
|
283
|
+
# The first form just uses the screen position to compute the InputPoint. It
|
284
|
+
# is used when you don't want the InputPoint to be dependent on another
|
285
|
+
# InputPoint.
|
286
|
+
# @param [Sketchup::View] view
|
287
|
+
# @param [Integer] x
|
288
|
+
# @param [Integer] y
|
289
|
+
#
|
290
|
+
# @overload pick(view, x, y, inputpoint)
|
291
|
+
#
|
292
|
+
# The second form uses the screen position and another InputPoint. It will
|
293
|
+
# find additional inferences such as along one of the axis directions from the
|
294
|
+
# first point.
|
295
|
+
# @param [Sketchup::View] view
|
296
|
+
# @param [Integer] x
|
297
|
+
# @param [Integer] y
|
298
|
+
# @param [Sketchup::InputPoint] inputpoint
|
299
|
+
# A second input point used as a reference for the pick.
|
300
|
+
#
|
301
|
+
# @return [Boolean] +true+ if a valid input point was picked and it
|
303
302
|
# is different than it was before.
|
304
303
|
#
|
305
304
|
# @version SketchUp 6.0
|
306
|
-
def pick(
|
305
|
+
def pick(*args)
|
307
306
|
end
|
308
307
|
|
309
308
|
# The position method is used to get the 3D point from the input point.
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright:: Copyright
|
1
|
+
# Copyright:: Copyright 2024 Trimble Inc.
|
2
2
|
# License:: The MIT License (MIT)
|
3
3
|
|
4
4
|
# The {Sketchup::InstancePath} class represent the instance path to a given
|
@@ -74,7 +74,7 @@ class Sketchup::InstancePath
|
|
74
74
|
#
|
75
75
|
# @version SketchUp 2017
|
76
76
|
#
|
77
|
-
# @
|
77
|
+
# @yieldparam [Sketchup::Entity] entity
|
78
78
|
def each
|
79
79
|
end
|
80
80
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright:: Copyright
|
1
|
+
# Copyright:: Copyright 2024 Trimble Inc.
|
2
2
|
# License:: The MIT License (MIT)
|
3
3
|
|
4
4
|
# The +Sketchup::Licensing+ module contains methods for
|
@@ -37,7 +37,7 @@ module Sketchup::Licensing
|
|
37
37
|
# @param [String] extension_id
|
38
38
|
# The Extension Warehouse UUID for the desired extension.
|
39
39
|
#
|
40
|
-
# @return [ExtensionLicense] An object representing
|
40
|
+
# @return [Sketchup::Licensing::ExtensionLicense] An object representing
|
41
41
|
# licensing state for the extension. Do not store this object, retrieve
|
42
42
|
# it again when needed since licensing state may have changed.
|
43
43
|
#
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright:: Copyright
|
1
|
+
# Copyright:: Copyright 2024 Trimble Inc.
|
2
2
|
# License:: The MIT License (MIT)
|
3
3
|
|
4
4
|
# Provides access to the different line style objects in the model.
|
@@ -26,12 +26,12 @@ class Sketchup::LineStyles < Sketchup::Entity
|
|
26
26
|
#
|
27
27
|
# @overload [](index)
|
28
28
|
#
|
29
|
-
# @param [
|
29
|
+
# @param [Integer] index The index of the line style to retrieve.
|
30
30
|
#
|
31
31
|
# @raise [IndexError] If index is out of bounds.
|
32
32
|
#
|
33
|
-
# @return [Sketchup::LineStyle, nil] The line style retrieved.
|
34
|
-
# couldn't be
|
33
|
+
# @return [Sketchup::LineStyle, nil] The line style retrieved. +nil+ if the name
|
34
|
+
# couldn't be retrieved.
|
35
35
|
#
|
36
36
|
# @version SketchUp 2019
|
37
37
|
def [](arg)
|
@@ -51,12 +51,12 @@ class Sketchup::LineStyles < Sketchup::Entity
|
|
51
51
|
#
|
52
52
|
# @overload [](index)
|
53
53
|
#
|
54
|
-
# @param [
|
54
|
+
# @param [Integer] index The index of the line style to retrieve.
|
55
55
|
#
|
56
56
|
# @raise [IndexError] If index is out of bounds.
|
57
57
|
#
|
58
|
-
# @return [Sketchup::LineStyle, nil] The line style retrieved.
|
59
|
-
# couldn't be
|
58
|
+
# @return [Sketchup::LineStyle, nil] The line style retrieved. +nil+ if the name
|
59
|
+
# couldn't be retrieved.
|
60
60
|
#
|
61
61
|
# @version SketchUp 2019
|
62
62
|
def at(arg)
|
@@ -71,6 +71,8 @@ class Sketchup::LineStyles < Sketchup::Entity
|
|
71
71
|
# @return [nil]
|
72
72
|
#
|
73
73
|
# @version SketchUp 2019
|
74
|
+
#
|
75
|
+
# @yieldparam [Sketchup::LineStyle] linestyle
|
74
76
|
def each
|
75
77
|
end
|
76
78
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright:: Copyright
|
1
|
+
# Copyright:: Copyright 2024 Trimble Inc.
|
2
2
|
# License:: The MIT License (MIT)
|
3
3
|
|
4
4
|
# A collection of Materials objects. Each model contains a Materials collection
|
@@ -166,8 +166,7 @@ class Sketchup::Materials < Sketchup::Entity
|
|
166
166
|
#
|
167
167
|
# @version SketchUp 6.0
|
168
168
|
#
|
169
|
-
# @
|
170
|
-
# are found.
|
169
|
+
# @yieldparam [Sketchup::Material] material
|
171
170
|
def each
|
172
171
|
end
|
173
172
|
|