sketchup-api-stubs 0.7.2 → 0.7.7
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 -1
- data/lib/sketchup-api-stubs/stubs/Geom/BoundingBox.rb +15 -11
- data/lib/sketchup-api-stubs/stubs/Geom/Bounds2d.rb +5 -5
- data/lib/sketchup-api-stubs/stubs/Geom/LatLong.rb +5 -5
- data/lib/sketchup-api-stubs/stubs/Geom/OrientedBounds2d.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Geom/Point2d.rb +5 -6
- data/lib/sketchup-api-stubs/stubs/Geom/Point3d.rb +18 -18
- data/lib/sketchup-api-stubs/stubs/Geom/PolygonMesh.rb +27 -10
- 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 +2 -3
- data/lib/sketchup-api-stubs/stubs/Geom/Vector3d.rb +4 -4
- data/lib/sketchup-api-stubs/stubs/Layout.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/AngularDimension.rb +5 -1
- data/lib/sketchup-api-stubs/stubs/Layout/AutoTextDefinition.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/AutoTextDefinitions.rb +7 -14
- data/lib/sketchup-api-stubs/stubs/Layout/ConnectionPoint.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Document.rb +61 -5
- data/lib/sketchup-api-stubs/stubs/Layout/Ellipse.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Entities.rb +7 -14
- data/lib/sketchup-api-stubs/stubs/Layout/Entity.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/FormattedText.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Grid.rb +189 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Group.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Image.rb +9 -4
- data/lib/sketchup-api-stubs/stubs/Layout/Label.rb +2 -3
- 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 +7 -14
- data/lib/sketchup-api-stubs/stubs/Layout/LinearDimension.rb +6 -2
- 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 +7 -14
- 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 +148 -5
- 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/Sketchup/Animation.rb +5 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/AppObserver.rb +4 -4
- data/lib/sketchup-api-stubs/stubs/Sketchup/ArcCurve.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/AttributeDictionaries.rb +3 -3
- data/lib/sketchup-api-stubs/stubs/Sketchup/AttributeDictionary.rb +6 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Axes.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Behavior.rb +32 -58
- data/lib/sketchup-api-stubs/stubs/Sketchup/Camera.rb +110 -209
- 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 +24 -11
- data/lib/sketchup-api-stubs/stubs/Sketchup/ComponentDefinition.rb +24 -9
- data/lib/sketchup-api-stubs/stubs/Sketchup/ComponentInstance.rb +58 -57
- 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 +16 -9
- data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionList.rb +135 -39
- data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionObserver.rb +6 -4
- data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionsObserver.rb +6 -4
- data/lib/sketchup-api-stubs/stubs/Sketchup/Dimension.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionLinear.rb +3 -9
- data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionObserver.rb +5 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionRadial.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Drawingelement.rb +10 -4
- data/lib/sketchup-api-stubs/stubs/Sketchup/Edge.rb +8 -14
- data/lib/sketchup-api-stubs/stubs/Sketchup/EdgeUse.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Entities.rb +55 -26
- data/lib/sketchup-api-stubs/stubs/Sketchup/EntitiesObserver.rb +6 -4
- data/lib/sketchup-api-stubs/stubs/Sketchup/Entity.rb +20 -15
- data/lib/sketchup-api-stubs/stubs/Sketchup/EntityObserver.rb +6 -5
- data/lib/sketchup-api-stubs/stubs/Sketchup/ExtensionsManager.rb +9 -8
- data/lib/sketchup-api-stubs/stubs/Sketchup/Face.rb +232 -65
- data/lib/sketchup-api-stubs/stubs/Sketchup/FrameChangeObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Group.rb +98 -45
- data/lib/sketchup-api-stubs/stubs/Sketchup/Http.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Http/Request.rb +48 -41
- data/lib/sketchup-api-stubs/stubs/Sketchup/Http/Response.rb +7 -7
- data/lib/sketchup-api-stubs/stubs/Sketchup/Image.rb +60 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/ImageRep.rb +47 -7
- data/lib/sketchup-api-stubs/stubs/Sketchup/Importer.rb +11 -12
- data/lib/sketchup-api-stubs/stubs/Sketchup/InputPoint.rb +33 -21
- data/lib/sketchup-api-stubs/stubs/Sketchup/InstanceObserver.rb +6 -4
- data/lib/sketchup-api-stubs/stubs/Sketchup/InstancePath.rb +5 -2
- data/lib/sketchup-api-stubs/stubs/Sketchup/Layer.rb +115 -68
- data/lib/sketchup-api-stubs/stubs/Sketchup/LayerFolder.rb +422 -0
- data/lib/sketchup-api-stubs/stubs/Sketchup/Layers.rb +225 -29
- data/lib/sketchup-api-stubs/stubs/Sketchup/LayersObserver.rb +118 -5
- data/lib/sketchup-api-stubs/stubs/Sketchup/Licensing.rb +2 -2
- data/lib/sketchup-api-stubs/stubs/Sketchup/Licensing/ExtensionLicense.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/LineStyle.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/LineStyles.rb +2 -13
- data/lib/sketchup-api-stubs/stubs/Sketchup/Loop.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Material.rb +8 -10
- data/lib/sketchup-api-stubs/stubs/Sketchup/Materials.rb +16 -9
- data/lib/sketchup-api-stubs/stubs/Sketchup/MaterialsObserver.rb +6 -5
- data/lib/sketchup-api-stubs/stubs/Sketchup/Menu.rb +9 -11
- data/lib/sketchup-api-stubs/stubs/Sketchup/Model.rb +126 -73
- data/lib/sketchup-api-stubs/stubs/Sketchup/ModelObserver.rb +5 -4
- data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsManager.rb +2 -3
- data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsProvider.rb +7 -7
- data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsProviderObserver.rb +4 -4
- data/lib/sketchup-api-stubs/stubs/Sketchup/Page.rb +143 -40
- data/lib/sketchup-api-stubs/stubs/Sketchup/Pages.rb +22 -12
- data/lib/sketchup-api-stubs/stubs/Sketchup/PagesObserver.rb +6 -5
- data/lib/sketchup-api-stubs/stubs/Sketchup/PickHelper.rb +37 -15
- 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 +5 -4
- data/lib/sketchup-api-stubs/stubs/Sketchup/SectionPlane.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Selection.rb +10 -5
- data/lib/sketchup-api-stubs/stubs/Sketchup/SelectionObserver.rb +20 -20
- data/lib/sketchup-api-stubs/stubs/Sketchup/Set.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/ShadowInfo.rb +5 -5
- data/lib/sketchup-api-stubs/stubs/Sketchup/ShadowInfoObserver.rb +6 -4
- data/lib/sketchup-api-stubs/stubs/Sketchup/Skp.rb +40 -0
- data/lib/sketchup-api-stubs/stubs/Sketchup/Style.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Styles.rb +9 -3
- data/lib/sketchup-api-stubs/stubs/Sketchup/Text.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Texture.rb +14 -22
- data/lib/sketchup-api-stubs/stubs/Sketchup/TextureWriter.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Tool.rb +31 -25
- data/lib/sketchup-api-stubs/stubs/Sketchup/Tools.rb +2 -2
- data/lib/sketchup-api-stubs/stubs/Sketchup/ToolsObserver.rb +6 -4
- data/lib/sketchup-api-stubs/stubs/Sketchup/UVHelper.rb +32 -22
- data/lib/sketchup-api-stubs/stubs/Sketchup/Vertex.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/View.rb +73 -67
- data/lib/sketchup-api-stubs/stubs/Sketchup/ViewObserver.rb +6 -4
- data/lib/sketchup-api-stubs/stubs/UI/Command.rb +13 -6
- data/lib/sketchup-api-stubs/stubs/UI/HtmlDialog.rb +132 -10
- data/lib/sketchup-api-stubs/stubs/UI/Notification.rb +94 -54
- data/lib/sketchup-api-stubs/stubs/UI/Toolbar.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/UI/WebDialog.rb +3 -3
- data/lib/sketchup-api-stubs/stubs/_top_level.rb +3 -1
- data/lib/sketchup-api-stubs/stubs/array.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/geom.rb +4 -1
- data/lib/sketchup-api-stubs/stubs/languagehandler.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.rb +66 -23
- data/lib/sketchup-api-stubs/stubs/sketchupextension.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/string.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/ui.rb +17 -12
- metadata +5 -3
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright:: Copyright
|
1
|
+
# Copyright:: Copyright 2021 Trimble Inc.
|
2
2
|
# License:: The MIT License (MIT)
|
3
3
|
|
4
4
|
# A raster image entity.
|
@@ -32,7 +32,9 @@ class Layout::Image < Layout::Entity
|
|
32
32
|
def clip_mask
|
33
33
|
end
|
34
34
|
|
35
|
-
# The {#clip_mask=} method sets the clip mask of the {Layout::Image}.
|
35
|
+
# The {#clip_mask=} method sets the clip mask of the {Layout::Image}. clip_mask
|
36
|
+
# can be a {Layout::Rectangle}, {Layout::Ellipse}, or {Layout::Path}, or +nil+,
|
37
|
+
# and it must not currently exist in a {Layout::Document}, or {Layout::Group}.
|
36
38
|
#
|
37
39
|
# @example
|
38
40
|
# image = Layout::Image.new("my_image.png", [[1, 1], [3, 3]])
|
@@ -42,11 +44,14 @@ class Layout::Image < Layout::Entity
|
|
42
44
|
# clip_mask = Layout::Rectangle.new(bounds)
|
43
45
|
# image.clip_mask = clip_mask
|
44
46
|
#
|
45
|
-
# @
|
47
|
+
# @note +clip_mask+ may be +nil+ as of LayOut 2020.1.
|
48
|
+
#
|
49
|
+
# @param [Layout::Entity, nil] clip_mask
|
46
50
|
# The clip mask can be a {Layout::Path},
|
47
51
|
# {Layout::Rectangle}, {Layout::Ellipse}, or +nil+.
|
48
52
|
#
|
49
|
-
# @raise [ArgumentError] if clip mask is already in a
|
53
|
+
# @raise [ArgumentError] if clip mask is already in a {Layout::Document} or
|
54
|
+
# {Layout::Group}
|
50
55
|
#
|
51
56
|
# @raise [ArgumentError] if clip mask is not a {Layout::Path},
|
52
57
|
# {Layout::Rectangle}, or {Layout::Ellipse}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright:: Copyright
|
1
|
+
# Copyright:: Copyright 2021 Trimble Inc.
|
2
2
|
# License:: The MIT License (MIT)
|
3
3
|
|
4
4
|
# This is an interface to a label entity. A {Layout::Label} consists of a
|
@@ -205,9 +205,8 @@ class Layout::Label < Layout::Entity
|
|
205
205
|
# @param [Geom::Bounds2d] bounds
|
206
206
|
# @return [Layout::Label]
|
207
207
|
#
|
208
|
-
# @overload initialize(text, leader_type, target_point, anchor_point,
|
208
|
+
# @overload initialize(text, leader_type, target_point, anchor_point, anchor_type)
|
209
209
|
#
|
210
|
-
# anchor_type)
|
211
210
|
# @param [String] text The label text
|
212
211
|
# @param [Integer] leader_type The leader line type
|
213
212
|
# @param [Geom::Point2d] target_point Where the label leader should point to
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright:: Copyright
|
1
|
+
# Copyright:: Copyright 2021 Trimble Inc.
|
2
2
|
# License:: The MIT License (MIT)
|
3
3
|
|
4
4
|
# The Layers class is a container class for all layers in a {Layout::Document}.
|
@@ -119,6 +119,11 @@ class Layout::Layers
|
|
119
119
|
# puts layer.name
|
120
120
|
# }
|
121
121
|
#
|
122
|
+
# @note Don't remove content from this collection while iterating over it with
|
123
|
+
# {#each}. This would change the size of the collection and cause elements to
|
124
|
+
# be skipped as the indices change. Instead copy the current collection to an
|
125
|
+
# array using +to_a+ and then use +each+ on the array, when removing content.
|
126
|
+
#
|
122
127
|
# @version LayOut 2018
|
123
128
|
#
|
124
129
|
# @yieldparam [Layout::Layer] layer
|
@@ -153,6 +158,7 @@ class Layout::Layers
|
|
153
158
|
# @version LayOut 2018
|
154
159
|
def length
|
155
160
|
end
|
161
|
+
alias_method :size, :length
|
156
162
|
|
157
163
|
# The {#remove} method deletes the given {Layout::Layer} from the
|
158
164
|
# {Layout::Document}.
|
@@ -216,17 +222,4 @@ class Layout::Layers
|
|
216
222
|
def reorder(layer, new_index)
|
217
223
|
end
|
218
224
|
|
219
|
-
# The {#length} method returns the number of {Layout::Layer}s.
|
220
|
-
#
|
221
|
-
# @example
|
222
|
-
# doc = Layout::Document.open("C:/path/to/document.layout")
|
223
|
-
# layers = doc.layers
|
224
|
-
# num_layers = layers.length
|
225
|
-
#
|
226
|
-
# @return [Integer]
|
227
|
-
#
|
228
|
-
# @version LayOut 2018
|
229
|
-
def size
|
230
|
-
end
|
231
|
-
|
232
225
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright:: Copyright
|
1
|
+
# Copyright:: Copyright 2021 Trimble Inc.
|
2
2
|
# License:: The MIT License (MIT)
|
3
3
|
|
4
4
|
# References a linear dimension entity. A {Layout::LinearDimension} is composed
|
@@ -77,7 +77,7 @@ class Layout::LinearDimension < Layout::Entity
|
|
77
77
|
# point_1 = Geom::Point2d.new(5, 7.5)
|
78
78
|
# point_2 = Geom::Point2d.new(8.5, 9)
|
79
79
|
# table = Layout::Rectangle.new([point_1, point_2])
|
80
|
-
# doc.add_entity(table,
|
80
|
+
# doc.add_entity(table, doc.layers.first, doc.pages.first)
|
81
81
|
# start_point = Layout::ConnectionPoint.new(table, point_1)
|
82
82
|
# end_point = Layout::ConnectionPoint.new(table, point_2)
|
83
83
|
# height = 1.0
|
@@ -532,6 +532,10 @@ class Layout::LinearDimension < Layout::Entity
|
|
532
532
|
# dim = Layout::LinearDimension.new(start_point, end_point, height)
|
533
533
|
# text = dim.text
|
534
534
|
#
|
535
|
+
# @note With the addition of auto-text in dimensions for LayOut 2019.2, the
|
536
|
+
# copy of the dimension text incorrectly provided the plain text when
|
537
|
+
# requesting the display text. This has been fixed for LayOut 2020.1.
|
538
|
+
#
|
535
539
|
# @return [Layout::FormattedText]
|
536
540
|
#
|
537
541
|
# @version LayOut 2018
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright:: Copyright
|
1
|
+
# Copyright:: Copyright 2021 Trimble Inc.
|
2
2
|
# License:: The MIT License (MIT)
|
3
3
|
|
4
4
|
# The Pages class is a container class for all pages in a {Layout::Document}.
|
@@ -65,6 +65,11 @@ class Layout::Pages
|
|
65
65
|
# puts page.name
|
66
66
|
# }
|
67
67
|
#
|
68
|
+
# @note Don't remove content from this collection while iterating over it with
|
69
|
+
# {#each}. This would change the size of the collection and cause elements to
|
70
|
+
# be skipped as the indices change. Instead copy the current collection to an
|
71
|
+
# array using +to_a+ and then use +each+ on the array, when removing content.
|
72
|
+
#
|
68
73
|
# @version LayOut 2018
|
69
74
|
#
|
70
75
|
# @yieldparam [Layout::Page] page
|
@@ -142,6 +147,7 @@ class Layout::Pages
|
|
142
147
|
# @version LayOut 2018
|
143
148
|
def length
|
144
149
|
end
|
150
|
+
alias_method :size, :length
|
145
151
|
|
146
152
|
# The {#remove} method deletes the given {Layout::Page} from the
|
147
153
|
# {Layout::Document}.
|
@@ -200,17 +206,4 @@ class Layout::Pages
|
|
200
206
|
def reorder(page, new_index)
|
201
207
|
end
|
202
208
|
|
203
|
-
# The {#length} method returns the number of {Layout::Page}s.
|
204
|
-
#
|
205
|
-
# @example
|
206
|
-
# doc = Layout::Document.open("C:/path/to/document.layout")
|
207
|
-
# pages = doc.pages
|
208
|
-
# num_pages = pages.length
|
209
|
-
#
|
210
|
-
# @return [Integer]
|
211
|
-
#
|
212
|
-
# @version LayOut 2018
|
213
|
-
def size
|
214
|
-
end
|
215
|
-
|
216
209
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright:: Copyright
|
1
|
+
# Copyright:: Copyright 2021 Trimble Inc.
|
2
2
|
# License:: The MIT License (MIT)
|
3
3
|
|
4
4
|
# A SketchUp Model entity. This is an instance of a SketchUp Model that is
|
@@ -44,6 +44,20 @@ class Layout::SketchUpModel < Layout::Entity
|
|
44
44
|
|
45
45
|
# Instance Methods
|
46
46
|
|
47
|
+
# The {#camera_modified?} method returns whether the camera of the
|
48
|
+
# {Layout::SketchUpModel} has been modified.
|
49
|
+
#
|
50
|
+
# @example
|
51
|
+
# bounds = Geom::Bounds2d.new(1, 1, 3, 3)
|
52
|
+
# model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
|
53
|
+
# modified = model.camera_modified?
|
54
|
+
#
|
55
|
+
# @return [Boolean]
|
56
|
+
#
|
57
|
+
# @version LayOut 2020.1
|
58
|
+
def camera_modified?
|
59
|
+
end
|
60
|
+
|
47
61
|
# The {#clip_mask} method returns the clip mask entity for the
|
48
62
|
# {Layout::SketchUpModel}, or +nil+ if it does not have one. clip_mask can be a
|
49
63
|
# {Layout::Rectangle}, {Layout::Ellipse}, or {Layout::Path}.
|
@@ -61,7 +75,8 @@ class Layout::SketchUpModel < Layout::Entity
|
|
61
75
|
|
62
76
|
# The {#clip_mask=} method sets a clip mask for the {Layout::SketchUpModel}.
|
63
77
|
# clip_mask can be a {Layout::Rectangle}, {Layout::Ellipse}, or {Layout::Path},
|
64
|
-
# and it must not currently exist in a {Layout::Document}
|
78
|
+
# or +nil+, and it must not currently exist in a {Layout::Document},
|
79
|
+
# or {Layout::Group}.
|
65
80
|
#
|
66
81
|
# @example
|
67
82
|
# bounds = Geom::Bounds2d.new(1, 1, 3, 3)
|
@@ -69,9 +84,14 @@ class Layout::SketchUpModel < Layout::Entity
|
|
69
84
|
# rect = Layout::Rectangle.new([[2, 2], [3, 3]]);
|
70
85
|
# model.clip_mask = rect
|
71
86
|
#
|
72
|
-
# @
|
87
|
+
# @note +clip_mask+ may be +nil+ as of LayOut 2020.1.
|
73
88
|
#
|
74
|
-
# @
|
89
|
+
# @param [Layout::Entity, nil] clip_mask
|
90
|
+
# The clip mask can be a {Layout::Path},
|
91
|
+
# {Layout::Rectangle}, {Layout::Ellipse}, or +nil+.
|
92
|
+
#
|
93
|
+
# @raise [ArgumentError] if clip_mask is already in a {Layout::Document} or
|
94
|
+
# {Layout::Group}
|
75
95
|
#
|
76
96
|
# @raise [ArgumentError] if clip_mask is not a {Layout::Rectangle},
|
77
97
|
# {Layout::Ellipse}, or {Layout::Path}
|
@@ -210,6 +230,20 @@ class Layout::SketchUpModel < Layout::Entity
|
|
210
230
|
def display_background?
|
211
231
|
end
|
212
232
|
|
233
|
+
# The {#effects_modified?} method returns whether the shadow or fog settings
|
234
|
+
# of the {Layout::SketchUpModel} have been modified.
|
235
|
+
#
|
236
|
+
# @example
|
237
|
+
# bounds = Geom::Bounds2d.new(1, 1, 3, 3)
|
238
|
+
# model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
|
239
|
+
# modified = model.effects_modified?
|
240
|
+
#
|
241
|
+
# @return [Boolean]
|
242
|
+
#
|
243
|
+
# @version LayOut 2020.1
|
244
|
+
def effects_modified?
|
245
|
+
end
|
246
|
+
|
213
247
|
# The {#entities} method returns the {Layout::Group} that represents the
|
214
248
|
# {Layout::SketchUpModel} in its exploded form. The {Layout::Group} will
|
215
249
|
# contain a {Layout::Image} for raster and hybrid-rendered models, and
|
@@ -248,6 +282,25 @@ class Layout::SketchUpModel < Layout::Entity
|
|
248
282
|
def initialize(path, bounds)
|
249
283
|
end
|
250
284
|
|
285
|
+
# The {#layers_modified?} method returns whether the layers of the
|
286
|
+
# {Layout::SketchUpModel} has been modified.
|
287
|
+
#
|
288
|
+
#
|
289
|
+
# @note: In SketchUp 2020, SketchUp "layers" were renamed to "tags". For
|
290
|
+
# consistency with the SketchUp API, this will continue to refer to
|
291
|
+
# "tags" as "layers".
|
292
|
+
#
|
293
|
+
# @example
|
294
|
+
# bounds = Geom::Bounds2d.new(1, 1, 3, 3)
|
295
|
+
# model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
|
296
|
+
# modified = model.layers_modified?
|
297
|
+
#
|
298
|
+
# @return [Boolean]
|
299
|
+
#
|
300
|
+
# @version LayOut 2020.1
|
301
|
+
def layers_modified?
|
302
|
+
end
|
303
|
+
|
251
304
|
# The {#line_weight} method returns the line weight for the
|
252
305
|
# {Layout::SketchUpModel}.
|
253
306
|
#
|
@@ -366,7 +419,10 @@ class Layout::SketchUpModel < Layout::Entity
|
|
366
419
|
def preserve_scale_on_resize?
|
367
420
|
end
|
368
421
|
|
369
|
-
# The {#render} method renders the {Layout::SketchUpModel}.
|
422
|
+
# The {#render} method renders the {Layout::SketchUpModel}. If the model
|
423
|
+
# belongs to a {Layout::Document}, then the render will be performed at the
|
424
|
+
# quality set in document.page_info (see {Layout::Document} and
|
425
|
+
# {Layout::PageInfo}). Otherwise, the render will be performed at Low quality.
|
370
426
|
#
|
371
427
|
# @example
|
372
428
|
# bounds = Geom::Bounds2d.new(1, 1, 3, 3)
|
@@ -441,6 +497,79 @@ class Layout::SketchUpModel < Layout::Entity
|
|
441
497
|
def render_needed?
|
442
498
|
end
|
443
499
|
|
500
|
+
# The {#reset_camera} method resets the {Layout::SketchUpModel}'s camera to
|
501
|
+
# the scene's setting.
|
502
|
+
#
|
503
|
+
# @example
|
504
|
+
# bounds = Geom::Bounds2d.new(1, 1, 3, 3)
|
505
|
+
# model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
|
506
|
+
# model.reset_camera if model.camera_modified?
|
507
|
+
#
|
508
|
+
# @raise [LockedLayerError] if the {Layout::SketchUpModel} is on a locked
|
509
|
+
# {Layout::Layer}
|
510
|
+
#
|
511
|
+
# @raise [LockedEntityError] if the {Layout::SketchUpModel} is locked
|
512
|
+
#
|
513
|
+
# @version LayOut 2020.1
|
514
|
+
def reset_camera
|
515
|
+
end
|
516
|
+
|
517
|
+
# The {#reset_effects} method resets the {Layout::SketchUpModel}'s shadow and
|
518
|
+
# fog settings to the scene's settings.
|
519
|
+
#
|
520
|
+
# @example
|
521
|
+
# bounds = Geom::Bounds2d.new(1, 1, 3, 3)
|
522
|
+
# model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
|
523
|
+
# model.reset_effects if model.effects_modified?
|
524
|
+
#
|
525
|
+
# @raise [LockedLayerError] if the {Layout::SketchUpModel} is on a locked
|
526
|
+
# {Layout::Layer}
|
527
|
+
#
|
528
|
+
# @raise [LockedEntityError] if the {Layout::SketchUpModel} is locked
|
529
|
+
#
|
530
|
+
# @version LayOut 2020.1
|
531
|
+
def reset_effects
|
532
|
+
end
|
533
|
+
|
534
|
+
# The {#reset_layers} method resets the {Layout::SketchUpModel}'s layers to
|
535
|
+
# the scene's setting.
|
536
|
+
#
|
537
|
+
#
|
538
|
+
# @note: In SketchUp 2020, SketchUp "layers" were renamed to "tags". For
|
539
|
+
# consistency with the SketchUp API, this will continue to refer to
|
540
|
+
# "tags" as "layers".
|
541
|
+
#
|
542
|
+
# @example
|
543
|
+
# bounds = Geom::Bounds2d.new(1, 1, 3, 3)
|
544
|
+
# model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
|
545
|
+
# model.reset_layers if model.layers_modified?
|
546
|
+
#
|
547
|
+
# @raise [LockedLayerError] if the {Layout::SketchUpModel} is on a locked
|
548
|
+
# {Layout::Layer}
|
549
|
+
#
|
550
|
+
# @raise [LockedEntityError] if the {Layout::SketchUpModel} is locked
|
551
|
+
#
|
552
|
+
# @version LayOut 2020.1
|
553
|
+
def reset_layers
|
554
|
+
end
|
555
|
+
|
556
|
+
# The {#reset_style} method resets the {Layout::SketchUpModel}'s style to
|
557
|
+
# the scene's setting.
|
558
|
+
#
|
559
|
+
# @example
|
560
|
+
# bounds = Geom::Bounds2d.new(1, 1, 3, 3)
|
561
|
+
# model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
|
562
|
+
# model.reset_style if model.style_modified?
|
563
|
+
#
|
564
|
+
# @raise [LockedLayerError] if the {Layout::SketchUpModel} is on a locked
|
565
|
+
# {Layout::Layer}
|
566
|
+
#
|
567
|
+
# @raise [LockedEntityError] if the {Layout::SketchUpModel} is locked
|
568
|
+
#
|
569
|
+
# @version LayOut 2020.1
|
570
|
+
def reset_style
|
571
|
+
end
|
572
|
+
|
444
573
|
# The {#scale} method returns the scale of the {Layout::SketchUpModel}.
|
445
574
|
#
|
446
575
|
# @example
|
@@ -492,6 +621,20 @@ class Layout::SketchUpModel < Layout::Entity
|
|
492
621
|
def scenes
|
493
622
|
end
|
494
623
|
|
624
|
+
# The {#style_modified?} method returns whether the style of the
|
625
|
+
# {Layout::SketchUpModel} has been modified.
|
626
|
+
#
|
627
|
+
# @example
|
628
|
+
# bounds = Geom::Bounds2d.new(1, 1, 3, 3)
|
629
|
+
# model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
|
630
|
+
# modified = model.style_modified?
|
631
|
+
#
|
632
|
+
# @return [Boolean]
|
633
|
+
#
|
634
|
+
# @version LayOut 2020.1
|
635
|
+
def style_modified?
|
636
|
+
end
|
637
|
+
|
495
638
|
# The {#view} method returns the standard view of the {Layout::SketchUpModel}.
|
496
639
|
#
|
497
640
|
# The standard view can be one of the following values:
|