sketchup-api-stubs 0.7.7 → 0.7.8
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 +2 -1
- data/lib/sketchup-api-stubs/stubs/{array.rb → 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 +18 -4
- data/lib/sketchup-api-stubs/stubs/Geom/Transformation.rb +1 -1
- 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 +16 -14
- data/lib/sketchup-api-stubs/stubs/{geom.rb → Geom.rb} +1 -1
- data/lib/sketchup-api-stubs/stubs/{languagehandler.rb → LanguageHandler.rb} +5 -4
- data/lib/sketchup-api-stubs/stubs/Layout/AngularDimension.rb +76 -54
- data/lib/sketchup-api-stubs/stubs/Layout/AutoTextDefinition.rb +311 -24
- data/lib/sketchup-api-stubs/stubs/Layout/AutoTextDefinitions.rb +8 -4
- data/lib/sketchup-api-stubs/stubs/Layout/ConnectionPoint.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Document.rb +2 -1
- 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 +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/FormattedText.rb +16 -11
- 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 +2 -2
- 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 +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Pages.rb +2 -2
- data/lib/sketchup-api-stubs/stubs/Layout/Path.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Rectangle.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb +9 -11
- 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 → Length.rb} +1 -1
- data/lib/sketchup-api-stubs/stubs/{numeric.rb → Numeric.rb} +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Animation.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/AppObserver.rb +13 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/ArcCurve.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/AttributeDictionaries.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/AttributeDictionary.rb +1 -1
- 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 +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Color.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/ComponentDefinition.rb +50 -8
- data/lib/sketchup-api-stubs/stubs/Sketchup/ComponentInstance.rb +7 -8
- 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 +7 -6
- 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 +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Edge.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/EdgeUse.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Entities.rb +120 -41
- data/lib/sketchup-api-stubs/stubs/Sketchup/EntitiesBuilder.rb +272 -0
- data/lib/sketchup-api-stubs/stubs/Sketchup/EntitiesObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Entity.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/EntityObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/ExtensionsManager.rb +2 -2
- data/lib/sketchup-api-stubs/stubs/Sketchup/Face.rb +27 -7
- data/lib/sketchup-api-stubs/stubs/Sketchup/FrameChangeObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Group.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Http/Request.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Http/Response.rb +1 -1
- 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 +4 -2
- data/lib/sketchup-api-stubs/stubs/Sketchup/InstanceObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/InstancePath.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Layer.rb +7 -8
- data/lib/sketchup-api-stubs/stubs/Sketchup/LayerFolder.rb +8 -8
- data/lib/sketchup-api-stubs/stubs/Sketchup/Layers.rb +2 -2
- 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 +3 -3
- data/lib/sketchup-api-stubs/stubs/Sketchup/LineStyle.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/LineStyles.rb +1 -1
- 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 -2
- 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 +68 -71
- data/lib/sketchup-api-stubs/stubs/Sketchup/ModelObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsManager.rb +2 -2
- data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsProvider.rb +2 -2
- data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsProviderObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Page.rb +7 -7
- data/lib/sketchup-api-stubs/stubs/Sketchup/Pages.rb +2 -2
- data/lib/sketchup-api-stubs/stubs/Sketchup/PagesObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/PickHelper.rb +4 -5
- data/lib/sketchup-api-stubs/stubs/Sketchup/RegionalSettings.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptions.rb +1 -1
- 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 +2 -2
- 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 +7 -4
- 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 +2 -2
- 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 +5 -3
- 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 +9 -5
- data/lib/sketchup-api-stubs/stubs/Sketchup/Vertex.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/View.rb +14 -4
- data/lib/sketchup-api-stubs/stubs/Sketchup/ViewObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/{sketchup.rb → Sketchup.rb} +10 -3
- data/lib/sketchup-api-stubs/stubs/{sketchupextension.rb → SketchupExtension.rb} +1 -1
- data/lib/sketchup-api-stubs/stubs/{string.rb → String.rb} +1 -1
- data/lib/sketchup-api-stubs/stubs/UI/Command.rb +79 -7
- data/lib/sketchup-api-stubs/stubs/UI/HtmlDialog.rb +26 -8
- data/lib/sketchup-api-stubs/stubs/UI/Notification.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/UI/Toolbar.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/UI/WebDialog.rb +18 -16
- data/lib/sketchup-api-stubs/stubs/{ui.rb → UI.rb} +25 -14
- data/lib/sketchup-api-stubs/stubs/_top_level.rb +1 -1
- metadata +12 -11
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright:: Copyright
|
|
1
|
+
# Copyright:: Copyright 2022 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
|
|
@@ -14,7 +14,9 @@
|
|
|
14
14
|
# {Sketchup::InputPoints} are best picked from mouse move, as you want them to
|
|
15
15
|
# draw them to the view.
|
|
16
16
|
#
|
|
17
|
-
# For an example, see
|
|
17
|
+
# For an example, see
|
|
18
|
+
# {Tool
|
|
19
|
+
# Example}[https://github.com/SketchUp/sketchup-ruby-api-tutorials/tree/main/examples/02_custom_tool].
|
|
18
20
|
#
|
|
19
21
|
# To lock inference similar to native SketchUp tools, see
|
|
20
22
|
# {View#lock_inference}.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright:: Copyright
|
|
1
|
+
# Copyright:: Copyright 2022 Trimble Inc.
|
|
2
2
|
# License:: The MIT License (MIT)
|
|
3
3
|
|
|
4
4
|
# The Layer class contains methods modifying and extracting information for a
|
|
@@ -34,8 +34,8 @@ class Sketchup::Layer < Sketchup::Entity
|
|
|
34
34
|
|
|
35
35
|
# Instance Methods
|
|
36
36
|
|
|
37
|
-
# The {#<=>} method is used to compare two layers based on their names.
|
|
38
|
-
#
|
|
37
|
+
# The {#<=>} method is used to compare two layers based on their names.
|
|
38
|
+
# This enables the Ruby +Array#sort+ method to sort SketchUp layers.
|
|
39
39
|
#
|
|
40
40
|
# @example
|
|
41
41
|
# model = Sketchup.active_model
|
|
@@ -120,11 +120,10 @@ class Sketchup::Layer < Sketchup::Entity
|
|
|
120
120
|
# @example
|
|
121
121
|
# model = Sketchup.active_model
|
|
122
122
|
# layers = model.layers
|
|
123
|
-
# folder1 = layers.
|
|
124
|
-
#
|
|
125
|
-
#
|
|
126
|
-
#
|
|
127
|
-
# parent_folder = folder2.folder # Returns: folder1
|
|
123
|
+
# folder1 = layers.add_folder('Folder1')
|
|
124
|
+
# layer1 = layers.add('Layer1')
|
|
125
|
+
# layer1.folder = folder1
|
|
126
|
+
# parent_folder = layer1.folder # Returns: folder1
|
|
128
127
|
#
|
|
129
128
|
# @return [Sketchup::LayerFolder, nil] +nil+ if the folder is a direct child to
|
|
130
129
|
# the layer manager.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright:: Copyright
|
|
1
|
+
# Copyright:: Copyright 2022 Trimble Inc.
|
|
2
2
|
# License:: The MIT License (MIT)
|
|
3
3
|
|
|
4
4
|
# Allows layers to be organized in folders. Folders may have duplicate names.
|
|
@@ -19,15 +19,15 @@ class Sketchup::LayerFolder < Sketchup::Entity
|
|
|
19
19
|
# Instance Methods
|
|
20
20
|
|
|
21
21
|
# The {#<=>} method is used to compare two layer folders based on their names.
|
|
22
|
-
#
|
|
22
|
+
# This enables the Ruby +Array#sort+ method to sort SketchUp layer folders.
|
|
23
23
|
#
|
|
24
24
|
# @api TagFolder
|
|
25
25
|
#
|
|
26
26
|
# @example
|
|
27
27
|
# model = Sketchup.active_model
|
|
28
28
|
# layers = model.layers
|
|
29
|
-
# folder1 = layers.
|
|
30
|
-
# folder2 = layers.
|
|
29
|
+
# folder1 = layers.add_folder('Folder1')
|
|
30
|
+
# folder2 = layers.add_folder('Folder2')
|
|
31
31
|
# comparison = folder1 <=> folder2 # Returns: -1
|
|
32
32
|
# comparison = folder1 <=> folder1 # Returns: 0
|
|
33
33
|
# comparison = folder2 <=> folder1 # Returns: 1
|
|
@@ -206,10 +206,10 @@ class Sketchup::LayerFolder < Sketchup::Entity
|
|
|
206
206
|
# @example
|
|
207
207
|
# model = Sketchup.active_model
|
|
208
208
|
# layers = model.layers
|
|
209
|
-
# folder1 = layers.
|
|
209
|
+
# folder1 = layers.add_folder('Folder1')
|
|
210
210
|
# parent_folder = folder1.folder # Returns: nil
|
|
211
211
|
#
|
|
212
|
-
# folder2 = folder1.
|
|
212
|
+
# folder2 = folder1.add_folder('Folder2')
|
|
213
213
|
# parent_folder = folder2.folder # Returns: folder1
|
|
214
214
|
#
|
|
215
215
|
# @return [Sketchup::LayerFolder, nil] +nil+ if the folder is a direct child to
|
|
@@ -229,8 +229,8 @@ class Sketchup::LayerFolder < Sketchup::Entity
|
|
|
229
229
|
# @example
|
|
230
230
|
# model = Sketchup.active_model
|
|
231
231
|
# layers = model.layers
|
|
232
|
-
# folder1 = layers.
|
|
233
|
-
# folder2 = layers.
|
|
232
|
+
# folder1 = layers.add_folder('Folder1')
|
|
233
|
+
# folder2 = layers.add_folder('Folder2')
|
|
234
234
|
#
|
|
235
235
|
# folder2.folder = folder1
|
|
236
236
|
#
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright:: Copyright
|
|
1
|
+
# Copyright:: Copyright 2022 Trimble Inc.
|
|
2
2
|
# License:: The MIT License (MIT)
|
|
3
3
|
|
|
4
4
|
# The Layers collection allows you to see and manage all of the layers in a
|
|
@@ -129,7 +129,7 @@ class Sketchup::Layers < Sketchup::Entity
|
|
|
129
129
|
# number = layers.count
|
|
130
130
|
#
|
|
131
131
|
# @note Since SketchUp 2014 the count method is inherited from Ruby's
|
|
132
|
-
# +
|
|
132
|
+
# +Enumerable+ mix-in module. Prior to that the {#count} method is an alias
|
|
133
133
|
# for {#length}.
|
|
134
134
|
#
|
|
135
135
|
# @return integer - the number of layers in the collection
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright:: Copyright
|
|
1
|
+
# Copyright:: Copyright 2022 Trimble Inc.
|
|
2
2
|
# License:: The MIT License (MIT)
|
|
3
3
|
|
|
4
4
|
# The +Sketchup::Licensing+ module contains methods for
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
# native code should prefer using the native API, which should be more secure
|
|
10
10
|
# than their Ruby API counterparts.
|
|
11
11
|
#
|
|
12
|
-
# For more details, see
|
|
13
|
-
# {Licensing Example}[https://github.com/SketchUp/sketchup-ruby-api-tutorials/tree/
|
|
12
|
+
# For more details, see
|
|
13
|
+
# {Licensing Example}[https://github.com/SketchUp/sketchup-ruby-api-tutorials/tree/main/examples/99_license]
|
|
14
14
|
#
|
|
15
15
|
# @version SketchUp 2015
|
|
16
16
|
module Sketchup::Licensing
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright:: Copyright
|
|
1
|
+
# Copyright:: Copyright 2022 Trimble Inc.
|
|
2
2
|
# License:: The MIT License (MIT)
|
|
3
3
|
|
|
4
4
|
# A collection of Materials objects. Each model contains a Materials collection
|
|
@@ -110,7 +110,7 @@ class Sketchup::Materials < Sketchup::Entity
|
|
|
110
110
|
# count = materials.count
|
|
111
111
|
#
|
|
112
112
|
# @note Since SketchUp 2014 the count method is inherited from Ruby's
|
|
113
|
-
# +
|
|
113
|
+
# +Enumerable+ mix-in module. Prior to that the {#count} method is an alias
|
|
114
114
|
# for {#length}.
|
|
115
115
|
#
|
|
116
116
|
# @return [Integer]
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright:: Copyright
|
|
1
|
+
# Copyright:: Copyright 2022 Trimble Inc.
|
|
2
2
|
# License:: The MIT License (MIT)
|
|
3
3
|
|
|
4
4
|
# This is the interface to a SketchUp model. The model is the 3D drawing that
|
|
@@ -186,15 +186,15 @@ class Sketchup::Model
|
|
|
186
186
|
# If the API user tries to do this:
|
|
187
187
|
#
|
|
188
188
|
# model.start_operation('...', true)
|
|
189
|
-
# model.
|
|
189
|
+
# model.active_entities.add_face(...)
|
|
190
190
|
# model.active_path = instance_path
|
|
191
|
-
# model.
|
|
191
|
+
# model.active_entities.add_face(...)
|
|
192
192
|
# model.commit_operation
|
|
193
193
|
#
|
|
194
194
|
# Then SketchUp will automatically break it up to something like to this:
|
|
195
195
|
#
|
|
196
196
|
# model.start_operation('...', true)
|
|
197
|
-
# model.
|
|
197
|
+
# model.active_entities.add_face(...)
|
|
198
198
|
# model.commit_operation
|
|
199
199
|
#
|
|
200
200
|
# model.start_operation('...', true, false, true)
|
|
@@ -202,7 +202,7 @@ class Sketchup::Model
|
|
|
202
202
|
# model.commit_operation
|
|
203
203
|
#
|
|
204
204
|
# model.start_operation('...', true, false, true)
|
|
205
|
-
# model.
|
|
205
|
+
# model.active_entities.add_face(...)
|
|
206
206
|
# model.commit_operation
|
|
207
207
|
#
|
|
208
208
|
# For the end user this will be experienced as a single operation.
|
|
@@ -1034,7 +1034,11 @@ class Sketchup::Model
|
|
|
1034
1034
|
def modified?
|
|
1035
1035
|
end
|
|
1036
1036
|
|
|
1037
|
-
# The name method retrieves the
|
|
1037
|
+
# The {#name} method retrieves the name of the model.
|
|
1038
|
+
#
|
|
1039
|
+
# This property can be seen in Model Info and maps to the component
|
|
1040
|
+
# name if the model is inserted into another model. This property should not
|
|
1041
|
+
# be confused with the model {#path}.
|
|
1038
1042
|
#
|
|
1039
1043
|
# @example
|
|
1040
1044
|
# model = Sketchup.active_model
|
|
@@ -1046,15 +1050,12 @@ class Sketchup::Model
|
|
|
1046
1050
|
def name
|
|
1047
1051
|
end
|
|
1048
1052
|
|
|
1049
|
-
# The name= method sets the string name of the model.
|
|
1053
|
+
# The {#name=} method sets the string name of the model.
|
|
1050
1054
|
#
|
|
1051
1055
|
# @example
|
|
1052
1056
|
# Sketchup.active_model.name = "My New Model Name"
|
|
1053
1057
|
#
|
|
1054
1058
|
# @param [String] name
|
|
1055
|
-
# new name of the model
|
|
1056
|
-
#
|
|
1057
|
-
# @return [String] the new name
|
|
1058
1059
|
#
|
|
1059
1060
|
# @version SketchUp 6.0
|
|
1060
1061
|
def name=(name)
|
|
@@ -1111,15 +1112,13 @@ class Sketchup::Model
|
|
|
1111
1112
|
# The path method retrieves the path of the file from which the model was
|
|
1112
1113
|
# opened.
|
|
1113
1114
|
#
|
|
1114
|
-
# An empty string is returned for a
|
|
1115
|
-
# and opened.)
|
|
1115
|
+
# An empty string is returned for a model that has not been saved.
|
|
1116
1116
|
#
|
|
1117
1117
|
# @example
|
|
1118
1118
|
# model = Sketchup.active_model
|
|
1119
1119
|
# path = model.path
|
|
1120
1120
|
#
|
|
1121
|
-
# @return [String]
|
|
1122
|
-
# opened model.
|
|
1121
|
+
# @return [String]
|
|
1123
1122
|
#
|
|
1124
1123
|
# @version SketchUp 6.0
|
|
1125
1124
|
def path
|
|
@@ -1196,6 +1195,14 @@ class Sketchup::Model
|
|
|
1196
1195
|
# normalized (e.g. direction = [0, 0, 0]), direction is taken as a point the
|
|
1197
1196
|
# ray intersects.
|
|
1198
1197
|
#
|
|
1198
|
+
# first value is a Point3d where the item that the ray passed through exists. The second element is
|
|
1199
|
+
# the instance path array of the entity that the ray hit. For example, if the ray hits a face that
|
|
1200
|
+
# is contained by a component instance the instance path would be [Component1]. If the ray hit a
|
|
1201
|
+
# face that is contained by a component instance, which
|
|
1202
|
+
# is contained by another component instance and so on,
|
|
1203
|
+
# the instance path would be [Component1, Component2,
|
|
1204
|
+
# Component3...].
|
|
1205
|
+
#
|
|
1199
1206
|
# @example
|
|
1200
1207
|
# model = Sketchup.active_model
|
|
1201
1208
|
# ray = [Geom::Point3d.new(1, 2, 3), Geom::Vector3d.new(4, 5, 6)]
|
|
@@ -1214,16 +1221,7 @@ class Sketchup::Model
|
|
|
1214
1221
|
# defaults to true (WYSIWYG) - i.e. hidden geometry is
|
|
1215
1222
|
# not intersected against.
|
|
1216
1223
|
#
|
|
1217
|
-
# @return [Array(Geom::Point3d, Array<Sketchup::Drawingelement>), nil] an array of two values. The
|
|
1218
|
-
# Point3d where the item that the ray passed through
|
|
1219
|
-
# exists. The second element is the instance path array
|
|
1220
|
-
# of the entity that the ray hit. For example, if the ray
|
|
1221
|
-
# hits a face that is contained by a component instance the
|
|
1222
|
-
# instance path would be [Component1]. If the ray hit a
|
|
1223
|
-
# face that is contained by a component instance, which
|
|
1224
|
-
# is contained by another component instance and so on,
|
|
1225
|
-
# the instance path would be [Component1, Component2,
|
|
1226
|
-
# Component3...].
|
|
1224
|
+
# @return [Array(Geom::Point3d, Array<Sketchup::Drawingelement>), nil] an array of two values. The
|
|
1227
1225
|
#
|
|
1228
1226
|
# @version SketchUp 6.0
|
|
1229
1227
|
def raytest(ray, wysiwyg_flag = true)
|
|
@@ -1267,10 +1265,13 @@ class Sketchup::Model
|
|
|
1267
1265
|
# # Save the model using the current SketchUp format
|
|
1268
1266
|
# path = File.join(ENV['HOME'], 'Desktop', 'mysketchup.skp')
|
|
1269
1267
|
# status = model.save(path)
|
|
1268
|
+
#
|
|
1270
1269
|
# # Save the model to the current file using the current SketchUp format
|
|
1271
1270
|
# status = model.save
|
|
1271
|
+
#
|
|
1272
1272
|
# # Save the model to the current file in SketchUp 8 format
|
|
1273
1273
|
# status = model.save("", Sketchup::Model::VERSION_8)
|
|
1274
|
+
#
|
|
1274
1275
|
# # Save the model in SketchUp 8 format
|
|
1275
1276
|
# path = File.join(ENV['Home'], 'Desktop', 'mysketchup_v8.skp')
|
|
1276
1277
|
# status = model.save(path, Sketchup::Model::VERSION_8)
|
|
@@ -1280,50 +1281,41 @@ class Sketchup::Model
|
|
|
1280
1281
|
#
|
|
1281
1282
|
# @overload save
|
|
1282
1283
|
#
|
|
1283
|
-
#
|
|
1284
|
-
#
|
|
1285
|
-
#
|
|
1286
|
-
# already been saved to a file.
|
|
1284
|
+
# Save model to the path it is already associated with.
|
|
1285
|
+
# @raise ArgumentError if the model is not previosly saved.
|
|
1286
|
+
# @version SketchUp 2014
|
|
1287
1287
|
#
|
|
1288
1288
|
# @overload save(path)
|
|
1289
1289
|
#
|
|
1290
|
+
# Save the model to a given path.
|
|
1291
|
+
# @version SketchUp 6.0
|
|
1290
1292
|
# @param [String] path
|
|
1291
|
-
#
|
|
1292
|
-
# Starting with SketchUp 2014, this parameter is optional.
|
|
1293
|
-
# If not provided or an empty string, model will be saved
|
|
1294
|
-
# to the file to which it is associated. It must have
|
|
1295
|
-
# already been saved to a file.
|
|
1293
|
+
# If empty, the model saves to the path it is already associated with.
|
|
1296
1294
|
#
|
|
1297
1295
|
# @overload save(path, version)
|
|
1298
1296
|
#
|
|
1297
|
+
# Save the model as a specific SketchUp file version to a given path.
|
|
1298
|
+
# @version SketchUp 2014
|
|
1299
1299
|
# @param [String] path
|
|
1300
|
-
# The path of the file to save to.
|
|
1301
|
-
# Starting with SketchUp 2014, this parameter is optional.
|
|
1302
|
-
# If not provided or an empty string, model will be saved
|
|
1303
|
-
# to the file to which it is associated. It must have
|
|
1304
|
-
# already been saved to a file.
|
|
1305
|
-
#
|
|
1306
1300
|
# @param [Integer] version
|
|
1307
|
-
# (SketchUp 2014+)
|
|
1308
|
-
# Optional SketchUp file format to save.
|
|
1309
|
-
# If not provided, latest file format will be used.
|
|
1310
1301
|
# Possible values are:
|
|
1311
|
-
# Sketchup::Model::VERSION_3,
|
|
1312
|
-
#
|
|
1313
|
-
#
|
|
1314
|
-
# Sketchup::Model::
|
|
1315
|
-
# Sketchup::Model::
|
|
1316
|
-
# Sketchup::Model::
|
|
1317
|
-
# Sketchup::Model::
|
|
1318
|
-
# Sketchup::Model::
|
|
1319
|
-
# Sketchup::Model::
|
|
1320
|
-
# Sketchup::Model::
|
|
1321
|
-
# Sketchup::Model::
|
|
1322
|
-
# Sketchup::Model::
|
|
1302
|
+
# - Sketchup::Model::VERSION_3,
|
|
1303
|
+
# - Sketchup::Model::VERSION_4,
|
|
1304
|
+
# - Sketchup::Model::VERSION_5,
|
|
1305
|
+
# - Sketchup::Model::VERSION_6,
|
|
1306
|
+
# - Sketchup::Model::VERSION_7,
|
|
1307
|
+
# - Sketchup::Model::VERSION_8,
|
|
1308
|
+
# - Sketchup::Model::VERSION_2013,
|
|
1309
|
+
# - Sketchup::Model::VERSION_2014,
|
|
1310
|
+
# - Sketchup::Model::VERSION_2015,
|
|
1311
|
+
# - Sketchup::Model::VERSION_2016,
|
|
1312
|
+
# - Sketchup::Model::VERSION_2017,
|
|
1313
|
+
# - Sketchup::Model::VERSION_2018,
|
|
1314
|
+
# - Sketchup::Model::VERSION_2019,
|
|
1315
|
+
# - Sketchup::Model::VERSION_2020,
|
|
1316
|
+
# - Sketchup::Model::VERSION_2021
|
|
1323
1317
|
#
|
|
1324
|
-
# @return [Boolean] true if successful, false if unsuccessful
|
|
1325
|
-
#
|
|
1326
|
-
# @version SketchUp 6.0
|
|
1318
|
+
# @return [Boolean] +true+ if successful, +false+ if unsuccessful
|
|
1327
1319
|
def save(*args)
|
|
1328
1320
|
end
|
|
1329
1321
|
|
|
@@ -1334,6 +1326,7 @@ class Sketchup::Model
|
|
|
1334
1326
|
# # Save copy of the model using the current SketchUp format
|
|
1335
1327
|
# path = File.join(ENV['Home'], 'Desktop', 'myModelCopy.skp')
|
|
1336
1328
|
# status = model.save_copy(path)
|
|
1329
|
+
#
|
|
1337
1330
|
# # Save copy of the model in SketchUp 8 format
|
|
1338
1331
|
# path = File.join(ENV['Home'], 'Desktop', 'mysketchupcopy_v8.skp')
|
|
1339
1332
|
# status = model.save_copy(path, Sketchup::Model::VERSION_8)
|
|
@@ -1342,22 +1335,24 @@ class Sketchup::Model
|
|
|
1342
1335
|
# The path of the file to save the model copy to.
|
|
1343
1336
|
#
|
|
1344
1337
|
# @param [Integer] version
|
|
1345
|
-
#
|
|
1346
|
-
# Optional SketchUp file format to save.
|
|
1338
|
+
# Optional SketchUp file format to use.
|
|
1347
1339
|
# If not provided, latest file format will be used.
|
|
1348
1340
|
# Possible values are:
|
|
1349
|
-
# Sketchup::Model::VERSION_3,
|
|
1350
|
-
#
|
|
1351
|
-
#
|
|
1352
|
-
# Sketchup::Model::
|
|
1353
|
-
# Sketchup::Model::
|
|
1354
|
-
# Sketchup::Model::
|
|
1355
|
-
# Sketchup::Model::
|
|
1356
|
-
# Sketchup::Model::
|
|
1357
|
-
# Sketchup::Model::
|
|
1358
|
-
# Sketchup::Model::
|
|
1359
|
-
# Sketchup::Model::
|
|
1360
|
-
# Sketchup::Model::
|
|
1341
|
+
# - Sketchup::Model::VERSION_3,
|
|
1342
|
+
# - Sketchup::Model::VERSION_4,
|
|
1343
|
+
# - Sketchup::Model::VERSION_5,
|
|
1344
|
+
# - Sketchup::Model::VERSION_6,
|
|
1345
|
+
# - Sketchup::Model::VERSION_7,
|
|
1346
|
+
# - Sketchup::Model::VERSION_8,
|
|
1347
|
+
# - Sketchup::Model::VERSION_2013,
|
|
1348
|
+
# - Sketchup::Model::VERSION_2014,
|
|
1349
|
+
# - Sketchup::Model::VERSION_2015,
|
|
1350
|
+
# - Sketchup::Model::VERSION_2016,
|
|
1351
|
+
# - Sketchup::Model::VERSION_2017,
|
|
1352
|
+
# - Sketchup::Model::VERSION_2018,
|
|
1353
|
+
# - Sketchup::Model::VERSION_2019,
|
|
1354
|
+
# - Sketchup::Model::VERSION_2020,
|
|
1355
|
+
# - Sketchup::Model::VERSION_2021
|
|
1361
1356
|
#
|
|
1362
1357
|
# @return [Boolean] true if successful, false if unsuccessful
|
|
1363
1358
|
#
|
|
@@ -1540,6 +1535,8 @@ class Sketchup::Model
|
|
|
1540
1535
|
# creating observers that react to user actions without littering the
|
|
1541
1536
|
# undo stack with extra steps that Ruby is performing.
|
|
1542
1537
|
#
|
|
1538
|
+
# @raise [RuntimeError] if called within the context of {Sketchup::Entities#build}.
|
|
1539
|
+
#
|
|
1543
1540
|
# @return [Boolean] +true+ if successful, +false+ if unsuccessful
|
|
1544
1541
|
#
|
|
1545
1542
|
# @version SketchUp 6.0
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright:: Copyright
|
|
1
|
+
# Copyright:: Copyright 2022 Trimble Inc.
|
|
2
2
|
# License:: The MIT License (MIT)
|
|
3
3
|
|
|
4
4
|
# The OptionsManager class manages various kinds of OptionsProviders on a
|
|
@@ -53,7 +53,7 @@ class Sketchup::OptionsManager
|
|
|
53
53
|
# number = manager.count
|
|
54
54
|
#
|
|
55
55
|
# @note Since SketchUp 2014 the count method is inherited from Ruby's
|
|
56
|
-
# +
|
|
56
|
+
# +Enumerable+ mix-in module. Prior to that the {#count} method is an alias
|
|
57
57
|
# for {#length}.
|
|
58
58
|
#
|
|
59
59
|
# @return integer - number of OptionsProvider objects if
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright:: Copyright
|
|
1
|
+
# Copyright:: Copyright 2022 Trimble Inc.
|
|
2
2
|
# License:: The MIT License (MIT)
|
|
3
3
|
|
|
4
4
|
# An +OptionsProvider+ class provides various kinds of options on a
|
|
@@ -87,7 +87,7 @@ class Sketchup::OptionsProvider
|
|
|
87
87
|
# number = optionsprovider.count
|
|
88
88
|
#
|
|
89
89
|
# @note Since SketchUp 2014 the count method is inherited from Ruby's
|
|
90
|
-
# +
|
|
90
|
+
# +Enumerable+ mix-in module. Prior to that the {#count} method is an alias
|
|
91
91
|
# for {#length}.
|
|
92
92
|
#
|
|
93
93
|
# @return [Integer]
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright:: Copyright
|
|
1
|
+
# Copyright:: Copyright 2022 Trimble Inc.
|
|
2
2
|
# License:: The MIT License (MIT)
|
|
3
3
|
|
|
4
4
|
# The Page class contains methods to extract information and modify the
|
|
@@ -169,7 +169,7 @@ class Sketchup::Page < Sketchup::Entity
|
|
|
169
169
|
# The {#include_in_animation?} method determines whether the page should be
|
|
170
170
|
# included when exporting an animation from the model.
|
|
171
171
|
#
|
|
172
|
-
# @example
|
|
172
|
+
# @example
|
|
173
173
|
# model = Sketchup.active_model
|
|
174
174
|
# in_animation = model.pages.select { |page| page.include_in_animation? }
|
|
175
175
|
#
|
|
@@ -202,7 +202,7 @@ class Sketchup::Page < Sketchup::Entity
|
|
|
202
202
|
# page = pages.add("My Page")
|
|
203
203
|
# folders = page.layer_folders
|
|
204
204
|
#
|
|
205
|
-
# @return [Array<Sketchup::LayerFolder>, nil] Returns +nil+ if {#
|
|
205
|
+
# @return [Array<Sketchup::LayerFolder>, nil] Returns +nil+ if {#use_hidden_layers?}
|
|
206
206
|
# returns +false+
|
|
207
207
|
#
|
|
208
208
|
# @version SketchUp 2021.0
|
|
@@ -227,8 +227,8 @@ class Sketchup::Page < Sketchup::Entity
|
|
|
227
227
|
# layer.page_behavior & LAYER_HIDDEN_BY_DEFAULT == LAYER_HIDDEN_BY_DEFAULT
|
|
228
228
|
# end
|
|
229
229
|
#
|
|
230
|
-
# @return [Array<Sketchup::Layer>, nil] Returns +nil+ if {#
|
|
231
|
-
# +false+
|
|
230
|
+
# @return [Array<Sketchup::Layer>, nil] Returns +nil+ if {#use_hidden_layers?}
|
|
231
|
+
# returns +false+
|
|
232
232
|
#
|
|
233
233
|
# @version SketchUp 6.0
|
|
234
234
|
def layers
|
|
@@ -321,11 +321,11 @@ class Sketchup::Page < Sketchup::Entity
|
|
|
321
321
|
#
|
|
322
322
|
# @overload set_visibility(layer_folder, visible_for_page)
|
|
323
323
|
#
|
|
324
|
-
# @version SketchUp
|
|
324
|
+
# @version SketchUp 2021.0
|
|
325
325
|
# @param [Sketchup::LayerFolder] layer_folder
|
|
326
326
|
# @param [Boolean] visible_for_page
|
|
327
327
|
#
|
|
328
|
-
#
|
|
328
|
+
# @return [Sketchup::Page] the page whose visibility was set.
|
|
329
329
|
#
|
|
330
330
|
# @version SketchUp 6.0
|
|
331
331
|
def set_visibility(arg1, arg2)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright:: Copyright
|
|
1
|
+
# Copyright:: Copyright 2022 Trimble Inc.
|
|
2
2
|
# License:: The MIT License (MIT)
|
|
3
3
|
|
|
4
4
|
# The Pages class contains methods for manipulating a collection of Pages
|
|
@@ -183,7 +183,7 @@ class Sketchup::Pages < Sketchup::Entity
|
|
|
183
183
|
# number = pages.count
|
|
184
184
|
#
|
|
185
185
|
# @note Since SketchUp 2014 the count method is inherited from Ruby's
|
|
186
|
-
# +
|
|
186
|
+
# +Enumerable+ mix-in module. Prior to that the {#count} method is an alias
|
|
187
187
|
# for {#length}.
|
|
188
188
|
#
|
|
189
189
|
# @return [Integer]
|