sketchup-api-stubs 0.7.10 → 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.
- checksums.yaml +4 -4
- data/lib/sketchup-api-stubs/sketchup.rb +12 -0
- data/lib/sketchup-api-stubs/stubs/Array.rb +5 -1
- data/lib/sketchup-api-stubs/stubs/Geom/BoundingBox.rb +37 -13
- data/lib/sketchup-api-stubs/stubs/Geom/Bounds2d.rb +25 -15
- data/lib/sketchup-api-stubs/stubs/Geom/LatLong.rb +17 -32
- data/lib/sketchup-api-stubs/stubs/Geom/OrientedBounds2d.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Geom/Point2d.rb +63 -40
- data/lib/sketchup-api-stubs/stubs/Geom/Point3d.rb +145 -109
- data/lib/sketchup-api-stubs/stubs/Geom/PolygonMesh.rb +56 -30
- data/lib/sketchup-api-stubs/stubs/Geom/Transformation.rb +81 -52
- data/lib/sketchup-api-stubs/stubs/Geom/Transformation2d.rb +45 -31
- data/lib/sketchup-api-stubs/stubs/Geom/UTM.rb +8 -16
- data/lib/sketchup-api-stubs/stubs/Geom/Vector2d.rb +135 -110
- data/lib/sketchup-api-stubs/stubs/Geom/Vector3d.rb +212 -224
- data/lib/sketchup-api-stubs/stubs/Geom.rb +8 -6
- data/lib/sketchup-api-stubs/stubs/LanguageHandler.rb +5 -5
- data/lib/sketchup-api-stubs/stubs/Layout/AngularDimension.rb +54 -52
- data/lib/sketchup-api-stubs/stubs/Layout/AutoTextDefinition.rb +13 -8
- 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/Dictionary.rb +234 -0
- data/lib/sketchup-api-stubs/stubs/Layout/Document.rb +125 -11
- 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 +112 -4
- data/lib/sketchup-api-stubs/stubs/Layout/FormattedText.rb +7 -9
- data/lib/sketchup-api-stubs/stubs/Layout/Grid.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Group.rb +54 -4
- data/lib/sketchup-api-stubs/stubs/Layout/Image.rb +9 -11
- 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 +56 -9
- 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 +100 -1
- data/lib/sketchup-api-stubs/stubs/Layout/PageInfo.rb +13 -14
- data/lib/sketchup-api-stubs/stubs/Layout/Pages.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Path.rb +6 -4
- data/lib/sketchup-api-stubs/stubs/Layout/Rectangle.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/ReferenceEntity.rb +9 -11
- data/lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb +7 -10
- data/lib/sketchup-api-stubs/stubs/Layout/Style.rb +48 -2
- data/lib/sketchup-api-stubs/stubs/Layout/Table.rb +18 -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 +9 -1
- data/lib/sketchup-api-stubs/stubs/Numeric.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Animation.rb +65 -13
- data/lib/sketchup-api-stubs/stubs/Sketchup/AppObserver.rb +110 -22
- data/lib/sketchup-api-stubs/stubs/Sketchup/ArcCurve.rb +18 -12
- data/lib/sketchup-api-stubs/stubs/Sketchup/AttributeDictionaries.rb +2 -7
- data/lib/sketchup-api-stubs/stubs/Sketchup/AttributeDictionary.rb +16 -3
- data/lib/sketchup-api-stubs/stubs/Sketchup/Axes.rb +13 -13
- data/lib/sketchup-api-stubs/stubs/Sketchup/Behavior.rb +8 -14
- data/lib/sketchup-api-stubs/stubs/Sketchup/CRSLocation.rb +402 -0
- data/lib/sketchup-api-stubs/stubs/Sketchup/CRSMapUnit.rb +83 -0
- data/lib/sketchup-api-stubs/stubs/Sketchup/Camera.rb +10 -15
- data/lib/sketchup-api-stubs/stubs/Sketchup/ClassificationSchema.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Classifications.rb +2 -2
- data/lib/sketchup-api-stubs/stubs/Sketchup/Color.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/ComponentDefinition.rb +247 -21
- data/lib/sketchup-api-stubs/stubs/Sketchup/ComponentInstance.rb +100 -24
- data/lib/sketchup-api-stubs/stubs/Sketchup/Console.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/ConstructionLine.rb +7 -12
- data/lib/sketchup-api-stubs/stubs/Sketchup/ConstructionPoint.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Curve.rb +12 -10
- data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionList.rb +9 -11
- 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 +23 -21
- data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionLinear.rb +36 -28
- data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionRadial.rb +11 -12
- data/lib/sketchup-api-stubs/stubs/Sketchup/Drawingelement.rb +11 -14
- data/lib/sketchup-api-stubs/stubs/Sketchup/Edge.rb +2 -2
- data/lib/sketchup-api-stubs/stubs/Sketchup/EdgeUse.rb +10 -10
- data/lib/sketchup-api-stubs/stubs/Sketchup/Entities.rb +237 -49
- data/lib/sketchup-api-stubs/stubs/Sketchup/EntitiesBuilder.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/EntitiesObserver.rb +1 -6
- data/lib/sketchup-api-stubs/stubs/Sketchup/Entity.rb +10 -3
- data/lib/sketchup-api-stubs/stubs/Sketchup/EntityObserver.rb +1 -6
- data/lib/sketchup-api-stubs/stubs/Sketchup/Environment.rb +406 -0
- data/lib/sketchup-api-stubs/stubs/Sketchup/Environments.rb +185 -0
- data/lib/sketchup-api-stubs/stubs/Sketchup/EnvironmentsObserver.rb +113 -0
- data/lib/sketchup-api-stubs/stubs/Sketchup/ExtensionsManager.rb +3 -6
- data/lib/sketchup-api-stubs/stubs/Sketchup/Face.rb +104 -33
- data/lib/sketchup-api-stubs/stubs/Sketchup/FrameChangeObserver.rb +2 -2
- data/lib/sketchup-api-stubs/stubs/Sketchup/Group.rb +116 -45
- data/lib/sketchup-api-stubs/stubs/Sketchup/HatchPattern.rb +277 -0
- data/lib/sketchup-api-stubs/stubs/Sketchup/HatchPatternData.rb +245 -0
- data/lib/sketchup-api-stubs/stubs/Sketchup/HatchPatterns.rb +155 -0
- data/lib/sketchup-api-stubs/stubs/Sketchup/Http/Request.rb +24 -17
- data/lib/sketchup-api-stubs/stubs/Sketchup/Http/Response.rb +11 -9
- data/lib/sketchup-api-stubs/stubs/Sketchup/Http.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Image.rb +6 -69
- data/lib/sketchup-api-stubs/stubs/Sketchup/ImageRep.rb +2 -2
- data/lib/sketchup-api-stubs/stubs/Sketchup/Importer.rb +2 -2
- data/lib/sketchup-api-stubs/stubs/Sketchup/InputPoint.rb +34 -8
- data/lib/sketchup-api-stubs/stubs/Sketchup/InstanceObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/InstancePath.rb +148 -3
- data/lib/sketchup-api-stubs/stubs/Sketchup/Layer.rb +20 -8
- data/lib/sketchup-api-stubs/stubs/Sketchup/LayerFolder.rb +15 -45
- data/lib/sketchup-api-stubs/stubs/Sketchup/Layers.rb +3 -23
- data/lib/sketchup-api-stubs/stubs/Sketchup/LayersObserver.rb +1 -9
- data/lib/sketchup-api-stubs/stubs/Sketchup/Licensing/ExtensionLicense.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Licensing.rb +10 -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/LoadHandler.rb +70 -0
- data/lib/sketchup-api-stubs/stubs/Sketchup/Loop.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Material.rb +894 -130
- data/lib/sketchup-api-stubs/stubs/Sketchup/Materials.rb +39 -26
- 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 +253 -108
- data/lib/sketchup-api-stubs/stubs/Sketchup/ModelObserver.rb +150 -9
- data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsManager.rb +14 -11
- data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsProvider.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsProviderObserver.rb +1 -2
- data/lib/sketchup-api-stubs/stubs/Sketchup/Overlay.rb +17 -44
- data/lib/sketchup-api-stubs/stubs/Sketchup/OverlaysManager.rb +1 -13
- data/lib/sketchup-api-stubs/stubs/Sketchup/Page.rb +247 -93
- data/lib/sketchup-api-stubs/stubs/Sketchup/Pages.rb +58 -31
- data/lib/sketchup-api-stubs/stubs/Sketchup/PagesObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/PickHelper.rb +61 -40
- data/lib/sketchup-api-stubs/stubs/Sketchup/Procedure.rb +452 -0
- data/lib/sketchup-api-stubs/stubs/Sketchup/RegionalSettings.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptions.rb +40 -2
- data/lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptionsObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/SectionPlane.rb +31 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Selection.rb +84 -91
- data/lib/sketchup-api-stubs/stubs/Sketchup/SelectionObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Set.rb +1 -2
- data/lib/sketchup-api-stubs/stubs/Sketchup/ShadowInfo.rb +22 -16
- 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/Snap.rb +125 -0
- data/lib/sketchup-api-stubs/stubs/Sketchup/Style.rb +36 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Styles.rb +59 -13
- data/lib/sketchup-api-stubs/stubs/Sketchup/Text.rb +103 -8
- data/lib/sketchup-api-stubs/stubs/Sketchup/Texture.rb +13 -31
- data/lib/sketchup-api-stubs/stubs/Sketchup/TextureWriter.rb +9 -9
- data/lib/sketchup-api-stubs/stubs/Sketchup/Tool.rb +276 -145
- data/lib/sketchup-api-stubs/stubs/Sketchup/Tools.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/ToolsObserver.rb +26 -13
- data/lib/sketchup-api-stubs/stubs/Sketchup/UVHelper.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Vertex.rb +23 -22
- data/lib/sketchup-api-stubs/stubs/Sketchup/View.rb +411 -118
- data/lib/sketchup-api-stubs/stubs/Sketchup/ViewObserver.rb +34 -8
- data/lib/sketchup-api-stubs/stubs/Sketchup.rb +126 -40
- data/lib/sketchup-api-stubs/stubs/SketchupExtension.rb +83 -69
- data/lib/sketchup-api-stubs/stubs/String.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/UI/Command.rb +120 -153
- data/lib/sketchup-api-stubs/stubs/UI/HtmlDialog.rb +130 -14
- data/lib/sketchup-api-stubs/stubs/UI/Notification.rb +14 -3
- data/lib/sketchup-api-stubs/stubs/UI/Toolbar.rb +20 -3
- data/lib/sketchup-api-stubs/stubs/UI/WebDialog.rb +13 -7
- data/lib/sketchup-api-stubs/stubs/UI.rb +92 -22
- data/lib/sketchup-api-stubs/stubs/_top_level.rb +15 -7
- metadata +16 -28
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright:: Copyright
|
|
1
|
+
# Copyright:: Copyright 2026 Trimble Inc.
|
|
2
2
|
# License:: The MIT License (MIT)
|
|
3
3
|
|
|
4
4
|
# A group is a special type of {Layout::Entity} that does not belong to a
|
|
@@ -19,6 +19,56 @@ class Layout::Group < Layout::Entity
|
|
|
19
19
|
|
|
20
20
|
# Instance Methods
|
|
21
21
|
|
|
22
|
+
# The {#clip_mask} method returns the clip mask entity for the
|
|
23
|
+
# {Layout::Group}, or +nil+ if it does not have one.
|
|
24
|
+
#
|
|
25
|
+
# @example
|
|
26
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
|
27
|
+
# entities = doc.shared_entities
|
|
28
|
+
# entities.each { |entity|
|
|
29
|
+
# entity_array.push(entity)
|
|
30
|
+
# }
|
|
31
|
+
# group = Layout::Group.new(entity_array)
|
|
32
|
+
# clip_mask = group.clip_mask
|
|
33
|
+
#
|
|
34
|
+
# @return [Layout::Ellipse, Layout::Path, Layout::Rectangle, nil]
|
|
35
|
+
#
|
|
36
|
+
# @version LayOut 2026.2
|
|
37
|
+
def clip_mask
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# The {#clip_mask=} method sets a clip mask for the {Layout::Group}.
|
|
41
|
+
# It must not currently exist in a {Layout::Document} or {Layout::Group}.
|
|
42
|
+
#
|
|
43
|
+
# @example
|
|
44
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
|
45
|
+
# entities = doc.shared_entities
|
|
46
|
+
# entities.each { |entity|
|
|
47
|
+
# entity_array.push(entity)
|
|
48
|
+
# }
|
|
49
|
+
# group = Layout::Group.new(entity_array)
|
|
50
|
+
# rect = Layout::Rectangle.new([[2, 2], [3, 3]]);
|
|
51
|
+
# model.clip_mask = rect
|
|
52
|
+
#
|
|
53
|
+
# @param [Layout::Ellipse, Layout::Path, Layout::Rectangle, nil] clip_mask
|
|
54
|
+
#
|
|
55
|
+
# @raise [ArgumentError] if clip_mask is already in a {Layout::Document} or
|
|
56
|
+
# {Layout::Group}
|
|
57
|
+
#
|
|
58
|
+
# @raise [ArgumentError] if clip_mask is not a {Layout::Rectangle},
|
|
59
|
+
# {Layout::Ellipse}, or {Layout::Path}
|
|
60
|
+
#
|
|
61
|
+
# @raise [ArgumentError] if clip_mask and group bounds do not overlap
|
|
62
|
+
#
|
|
63
|
+
# @raise [LockedLayerError] if the {Layout::Group} is on a locked
|
|
64
|
+
# {Layout::Layer}
|
|
65
|
+
#
|
|
66
|
+
# @raise [LockedEntityError] if the {Layout::Group} is locked
|
|
67
|
+
#
|
|
68
|
+
# @version LayOut 2026.2
|
|
69
|
+
def clip_mask=(clip_mask)
|
|
70
|
+
end
|
|
71
|
+
|
|
22
72
|
# The {#entities} method returns the {Layout::Entities} that belong to the
|
|
23
73
|
# {Layout::Group}.
|
|
24
74
|
#
|
|
@@ -92,7 +142,7 @@ class Layout::Group < Layout::Entity
|
|
|
92
142
|
def remove_scale_factor(resize_behavior)
|
|
93
143
|
end
|
|
94
144
|
|
|
95
|
-
# The {#scale_factor} method returns the
|
|
145
|
+
# The {#scale_factor} method returns the scale factor associated with the
|
|
96
146
|
# {Layout::Group}.
|
|
97
147
|
#
|
|
98
148
|
# @example
|
|
@@ -166,7 +216,7 @@ class Layout::Group < Layout::Entity
|
|
|
166
216
|
def scale_units
|
|
167
217
|
end
|
|
168
218
|
|
|
169
|
-
# The {#scale_units=} method sets the
|
|
219
|
+
# The {#scale_units=} method sets the units format for the scale of the
|
|
170
220
|
# {Layout::Group}.
|
|
171
221
|
#
|
|
172
222
|
# The units format can be any of the following values:
|
|
@@ -197,7 +247,7 @@ class Layout::Group < Layout::Entity
|
|
|
197
247
|
def scale_units=(units_format)
|
|
198
248
|
end
|
|
199
249
|
|
|
200
|
-
# The {#set_scale_factor} method sets the
|
|
250
|
+
# The {#set_scale_factor} method sets the scale factor for the
|
|
201
251
|
# {Layout::Group}.
|
|
202
252
|
#
|
|
203
253
|
# The units format can be any of the following values:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright:: Copyright
|
|
1
|
+
# Copyright:: Copyright 2026 Trimble Inc.
|
|
2
2
|
# License:: The MIT License (MIT)
|
|
3
3
|
|
|
4
4
|
# A raster image entity.
|
|
@@ -18,23 +18,21 @@ class Layout::Image < Layout::Entity
|
|
|
18
18
|
|
|
19
19
|
# Instance Methods
|
|
20
20
|
|
|
21
|
-
# The {#clip_mask} method returns the clip mask
|
|
22
|
-
# +nil+ if it does not have
|
|
21
|
+
# The {#clip_mask} method returns the clip mask entity for the
|
|
22
|
+
# {Layout::Image}, or +nil+ if it does not have one.
|
|
23
23
|
#
|
|
24
24
|
# @example
|
|
25
25
|
# image = Layout::Image.new("my_image.png", [[1, 1], [3, 3]])
|
|
26
26
|
# clip_mask = image.clip_mask
|
|
27
27
|
#
|
|
28
|
-
# @return [Layout::
|
|
29
|
-
# {Layout::Rectangle}, or {Layout::Ellipse}.
|
|
28
|
+
# @return [Layout::Ellipse, Layout::Path, Layout::Rectangle, nil]
|
|
30
29
|
#
|
|
31
30
|
# @version LayOut 2018
|
|
32
31
|
def clip_mask
|
|
33
32
|
end
|
|
34
33
|
|
|
35
|
-
# The {#clip_mask=} method sets the clip mask of the {Layout::Image}.
|
|
36
|
-
#
|
|
37
|
-
# and it must not currently exist in a {Layout::Document}, or {Layout::Group}.
|
|
34
|
+
# The {#clip_mask=} method sets the clip mask of the {Layout::Image}.
|
|
35
|
+
# +clip_mask+ must not currently exist in a {Layout::Document} or {Layout::Group}.
|
|
38
36
|
#
|
|
39
37
|
# @example
|
|
40
38
|
# image = Layout::Image.new("my_image.png", [[1, 1], [3, 3]])
|
|
@@ -46,9 +44,7 @@ class Layout::Image < Layout::Entity
|
|
|
46
44
|
#
|
|
47
45
|
# @note +clip_mask+ may be +nil+ as of LayOut 2020.1.
|
|
48
46
|
#
|
|
49
|
-
# @param [Layout::
|
|
50
|
-
# The clip mask can be a {Layout::Path},
|
|
51
|
-
# {Layout::Rectangle}, {Layout::Ellipse}, or +nil+.
|
|
47
|
+
# @param [Layout::Ellipse, Layout::Path, Layout::Rectangle, nil] clip_mask
|
|
52
48
|
#
|
|
53
49
|
# @raise [ArgumentError] if clip mask is already in a {Layout::Document} or
|
|
54
50
|
# {Layout::Group}
|
|
@@ -56,6 +52,8 @@ class Layout::Image < Layout::Entity
|
|
|
56
52
|
# @raise [ArgumentError] if clip mask is not a {Layout::Path},
|
|
57
53
|
# {Layout::Rectangle}, or {Layout::Ellipse}
|
|
58
54
|
#
|
|
55
|
+
# @raise [ArgumentError] if clip_mask and image bounds do not overlap
|
|
56
|
+
#
|
|
59
57
|
# @raise [LockedLayerError] if the {Layout::Image} is on a locked {Layout::Layer}
|
|
60
58
|
#
|
|
61
59
|
# @raise [LockedEntityError] if the {Layout::Image} is locked
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright:: Copyright
|
|
1
|
+
# Copyright:: Copyright 2026 Trimble Inc.
|
|
2
2
|
# License:: The MIT License (MIT)
|
|
3
3
|
|
|
4
4
|
# References a linear dimension entity. A {Layout::LinearDimension} is composed
|
|
@@ -22,6 +22,10 @@ class Layout::LinearDimension < Layout::Entity
|
|
|
22
22
|
|
|
23
23
|
# Constants
|
|
24
24
|
|
|
25
|
+
DIMENSION_LINE_ALIGNED = nil # Stub value.
|
|
26
|
+
DIMENSION_LINE_HORIZONTAL = nil # Stub value.
|
|
27
|
+
DIMENSION_LINE_VERTICAL = nil # Stub value.
|
|
28
|
+
|
|
25
29
|
LEADER_LINE_TYPE_BEZIER = nil # Stub value.
|
|
26
30
|
LEADER_LINE_TYPE_HIDDEN = nil # Stub value.
|
|
27
31
|
LEADER_LINE_TYPE_SINGLE_SEGMENT = nil # Stub value.
|
|
@@ -302,18 +306,33 @@ class Layout::LinearDimension < Layout::Entity
|
|
|
302
306
|
# height = 1.0
|
|
303
307
|
# dim = Layout::LinearDimension.new(start_point, end_point, height)
|
|
304
308
|
#
|
|
305
|
-
# @
|
|
309
|
+
# @overload initialize(start_point, end_point, height)
|
|
306
310
|
#
|
|
307
|
-
#
|
|
311
|
+
# @version LayOut 2018
|
|
312
|
+
# @param [Geom::Point2d] start_point
|
|
313
|
+
# @param [Geom::Point2d] end_point
|
|
314
|
+
# @param [Numeric] height Distance from the start and end points to the
|
|
315
|
+
# dimension line
|
|
308
316
|
#
|
|
309
|
-
# @
|
|
310
|
-
# Distance from the start and end points to the
|
|
311
|
-
# dimension line
|
|
317
|
+
# @overload initialize(start_point, end_point, height, alignment)
|
|
312
318
|
#
|
|
313
|
-
#
|
|
319
|
+
# @version LayOut 2026.0
|
|
320
|
+
# @param [Geom::Point2d] start_point
|
|
321
|
+
# @param [Geom::Point2d] end_point
|
|
322
|
+
# @param [Numeric] height Distance from the start and end points to the
|
|
323
|
+
# dimension line
|
|
324
|
+
# @param [Integer] alignment The alignment type for the dimension line
|
|
314
325
|
#
|
|
315
|
-
#
|
|
316
|
-
|
|
326
|
+
# alignment can be one of the following:
|
|
327
|
+
# [+Layout::LinearDimension::DIMENSION_LINE_ALIGNED+]
|
|
328
|
+
# [+Layout::LinearDimension::DIMENSION_LINE_VERTICAL+]
|
|
329
|
+
# [+Layout::LinearDimension::DIMENSION_LINE_HORIZONTAL+]
|
|
330
|
+
#
|
|
331
|
+
# @raise [RangeError] if alignment is not a valid alignment type
|
|
332
|
+
# @raise [ArgumentError] if a dimension couldn't be created with the provided arguments
|
|
333
|
+
#
|
|
334
|
+
# @return [Layout::LinearDimension]
|
|
335
|
+
def initialize(*args)
|
|
317
336
|
end
|
|
318
337
|
|
|
319
338
|
# The {#leader_line_type} method returns the type of leader line the
|
|
@@ -368,6 +387,34 @@ class Layout::LinearDimension < Layout::Entity
|
|
|
368
387
|
def leader_line_type=(type)
|
|
369
388
|
end
|
|
370
389
|
|
|
390
|
+
# The {#leader_line_visible?} method returns whether the leader line is currently visible.
|
|
391
|
+
#
|
|
392
|
+
# @example
|
|
393
|
+
# start_point = Geom::Point2d.new(1, 1)
|
|
394
|
+
# end_point = Geom::Point2d.new(1, 1.2)
|
|
395
|
+
# height = 1.0
|
|
396
|
+
# dim = Layout::LinearDimension.new(start_point, end_point, height)
|
|
397
|
+
# dim.leader_line_type = Layout::LinearDimension::LEADER_LINE_TYPE_TWO_SEGMENT
|
|
398
|
+
# # Will be false since the text is not automatically positioned away from the dimension line
|
|
399
|
+
# visible = dim.leader_line_visible?
|
|
400
|
+
#
|
|
401
|
+
# # Position the text away from the dimension line.
|
|
402
|
+
# text_pos = Geom::Point2d.new(1, 1.5)
|
|
403
|
+
# anchor_type = Layout::FormattedText::ANCHOR_TYPE_TOP_LEFT
|
|
404
|
+
# dim.text = Layout::FormattedText.new("<>", text_pos, anchor_type)
|
|
405
|
+
# # Will be true since the text is positioned away from the dimension line
|
|
406
|
+
# visible = dim.leader_line_visible?
|
|
407
|
+
#
|
|
408
|
+
# dim.leader_line_type = Layout::LinearDimension::LEADER_LINE_TYPE_HIDDEN
|
|
409
|
+
# # Will be false, even though the text is positioned away from the dimension line
|
|
410
|
+
# visible = dim.leader_line_visible?
|
|
411
|
+
#
|
|
412
|
+
# @return [Boolean]
|
|
413
|
+
#
|
|
414
|
+
# @version LayOut 2026.0
|
|
415
|
+
def leader_line_visible?
|
|
416
|
+
end
|
|
417
|
+
|
|
371
418
|
# The {#scale} method returns the scale being used for the
|
|
372
419
|
# {Layout::LinearDimension}.
|
|
373
420
|
#
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright:: Copyright
|
|
1
|
+
# Copyright:: Copyright 2026 Trimble Inc.
|
|
2
2
|
# License:: The MIT License (MIT)
|
|
3
3
|
|
|
4
4
|
# Class for a single page in a LayOut document.
|
|
@@ -25,6 +25,56 @@ class Layout::Page
|
|
|
25
25
|
def ==(other)
|
|
26
26
|
end
|
|
27
27
|
|
|
28
|
+
# The {#attribute_dictionary} method returns a copy of the page's attribute dictionary with the
|
|
29
|
+
# given name.
|
|
30
|
+
#
|
|
31
|
+
# @example
|
|
32
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
|
33
|
+
# page = doc.pages.first
|
|
34
|
+
# page.set_attribute("jane_doe_doc_maker", "made_by_doc_maker", true)
|
|
35
|
+
# attributes = page.attribute_dictionary("jane_doe_doc_maker")
|
|
36
|
+
# # Adding to this Layout::Dictionary does not apply to the page's attribute dictionary, use
|
|
37
|
+
# # Layout::Page#set_attribute.
|
|
38
|
+
# attributes.merge!(doc_id: 42)
|
|
39
|
+
#
|
|
40
|
+
# @param [String] name
|
|
41
|
+
#
|
|
42
|
+
# @return [Layout::Dictionary, nil] A copy of the page's attribute dictionary, or nil if there is
|
|
43
|
+
# no attribute dictionary
|
|
44
|
+
#
|
|
45
|
+
# @version LayOut 2026.0
|
|
46
|
+
def attribute_dictionary(name)
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# The {#delete_attribute} method is used to delete an attribute from a page.
|
|
50
|
+
#
|
|
51
|
+
# @overload delete_attribute(dictionary_name)
|
|
52
|
+
#
|
|
53
|
+
# @param [String] dictionary_name The name of an attribute dictionary.
|
|
54
|
+
# @return [Boolean]
|
|
55
|
+
#
|
|
56
|
+
# @example
|
|
57
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
|
58
|
+
# page = doc.pages.first
|
|
59
|
+
# page.set_attribute("jane_doe_doc_maker", "made_by_doc_maker", true)
|
|
60
|
+
# page.delete_attribute("jane_doe_doc_maker")
|
|
61
|
+
#
|
|
62
|
+
# @overload delete_attribute(dictionary_name, key)
|
|
63
|
+
#
|
|
64
|
+
# @param [String] dictionary_name The name of an attribute dictionary.
|
|
65
|
+
# @param [String] key An attribute key.
|
|
66
|
+
# @return [Boolean]
|
|
67
|
+
#
|
|
68
|
+
# @example
|
|
69
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
|
70
|
+
# page = doc.pages.first
|
|
71
|
+
# page.set_attribute("jane_doe_doc_maker", "made_by_doc_maker", true)
|
|
72
|
+
# page.delete_attribute("jane_doe_doc_maker", "made_by_doc_maker")
|
|
73
|
+
#
|
|
74
|
+
# @version LayOut 2026.0
|
|
75
|
+
def delete_attribute(*args)
|
|
76
|
+
end
|
|
77
|
+
|
|
28
78
|
# The {#document} method returns the {Layout::Document} that the {Layout::Page}
|
|
29
79
|
# belongs to.
|
|
30
80
|
#
|
|
@@ -55,6 +105,38 @@ class Layout::Page
|
|
|
55
105
|
def entities
|
|
56
106
|
end
|
|
57
107
|
|
|
108
|
+
# The {#get_attribute} method is used to retrieve the value of an attribute in
|
|
109
|
+
# the page's attribute dictionary.
|
|
110
|
+
#
|
|
111
|
+
# If the third parameter, +default_value+, is not passed and there is no
|
|
112
|
+
# attribute that matches the given name, it returns +nil+.
|
|
113
|
+
#
|
|
114
|
+
# If +default_value+ is provided and there is no matching attribute it returns
|
|
115
|
+
# the given value. It does not create an attribute with that name though.
|
|
116
|
+
#
|
|
117
|
+
# @example
|
|
118
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
|
119
|
+
# page = doc.pages.first
|
|
120
|
+
# # Read an attribute value from the page. In this case this will return the
|
|
121
|
+
# # default value provided: 42.
|
|
122
|
+
# page.get_attribute("jane_doe_doc_maker", "doc_id", 42)
|
|
123
|
+
#
|
|
124
|
+
# @param [String] name
|
|
125
|
+
# The name of an attribute dictionary.
|
|
126
|
+
#
|
|
127
|
+
# @param [String] key
|
|
128
|
+
# An attribute key.
|
|
129
|
+
#
|
|
130
|
+
# @param [String, Boolean, Integer, Float, Hash, Layout::Dictionary, nil] default_value
|
|
131
|
+
# A default
|
|
132
|
+
# value to return if no attribute is found.
|
|
133
|
+
#
|
|
134
|
+
# @return [String, Boolean, Integer, Float, Layout::Dictionary, nil] the retrieved value.
|
|
135
|
+
#
|
|
136
|
+
# @version LayOut 2026.0
|
|
137
|
+
def get_attribute(name, key, default_value = nil)
|
|
138
|
+
end
|
|
139
|
+
|
|
58
140
|
# The {#in_presentation=} method sets whether the {Layout::Page} is included in
|
|
59
141
|
# presentations.
|
|
60
142
|
#
|
|
@@ -156,6 +238,23 @@ class Layout::Page
|
|
|
156
238
|
def nonshared_entities
|
|
157
239
|
end
|
|
158
240
|
|
|
241
|
+
# The {#set_attribute} method adds an attribute to the page's attribute dictionary.
|
|
242
|
+
#
|
|
243
|
+
# @example
|
|
244
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
|
245
|
+
# page = doc.pages.first
|
|
246
|
+
# page.set_attribute("jane_doe_doc_maker", "doc_id", 42)
|
|
247
|
+
#
|
|
248
|
+
# @param [String] name
|
|
249
|
+
# The name of an attribute dictionary.
|
|
250
|
+
# @param [String] key An attribute key.
|
|
251
|
+
# @param [String, Boolean, Integer, Float, Hash, Layout::Dictionary, nil] value The value for the
|
|
252
|
+
# attribute.
|
|
253
|
+
#
|
|
254
|
+
# @version LayOut 2026.0
|
|
255
|
+
def set_attribute(name, key, value)
|
|
256
|
+
end
|
|
257
|
+
|
|
159
258
|
# The {#set_layer_visibility} method sets whether a {Layout::Layer} is visible
|
|
160
259
|
# on the {Layout::Page}.
|
|
161
260
|
#
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright:: Copyright
|
|
1
|
+
# Copyright:: Copyright 2026 Trimble Inc.
|
|
2
2
|
# License:: The MIT License (MIT)
|
|
3
3
|
|
|
4
4
|
# This is the interface to a {Layout::Document}'s paper space information. The
|
|
@@ -24,8 +24,7 @@ class Layout::PageInfo
|
|
|
24
24
|
|
|
25
25
|
# Instance Methods
|
|
26
26
|
|
|
27
|
-
# The {bottom_margin} method returns the paper's bottom margin in
|
|
28
|
-
# units.
|
|
27
|
+
# The {bottom_margin} method returns the paper's bottom margin in inches.
|
|
29
28
|
#
|
|
30
29
|
# @example
|
|
31
30
|
# doc = Layout::Document.open("C:/path/to/document.layout")
|
|
@@ -37,7 +36,7 @@ class Layout::PageInfo
|
|
|
37
36
|
def bottom_margin
|
|
38
37
|
end
|
|
39
38
|
|
|
40
|
-
# The {#bottom_margin=} method sets the paper's bottom margin in
|
|
39
|
+
# The {#bottom_margin=} method sets the paper's bottom margin in inches.
|
|
41
40
|
#
|
|
42
41
|
# @example
|
|
43
42
|
# doc = Layout::Document.open("C:/path/to/document.layout")
|
|
@@ -114,7 +113,7 @@ class Layout::PageInfo
|
|
|
114
113
|
def display_resolution=(resolution)
|
|
115
114
|
end
|
|
116
115
|
|
|
117
|
-
# The {#height} method returns the paper height in
|
|
116
|
+
# The {#height} method returns the paper height in inches.
|
|
118
117
|
#
|
|
119
118
|
# @example
|
|
120
119
|
# doc = Layout::Document.open("C:/path/to/document.layout")
|
|
@@ -126,7 +125,7 @@ class Layout::PageInfo
|
|
|
126
125
|
def height
|
|
127
126
|
end
|
|
128
127
|
|
|
129
|
-
# The {#height=} method sets the paper height in
|
|
128
|
+
# The {#height=} method sets the paper height in inches.
|
|
130
129
|
#
|
|
131
130
|
# @example
|
|
132
131
|
# doc = Layout::Document.open("C:/path/to/document.layout")
|
|
@@ -212,7 +211,7 @@ class Layout::PageInfo
|
|
|
212
211
|
def image_output_resolution=(resolution)
|
|
213
212
|
end
|
|
214
213
|
|
|
215
|
-
# The {#left_margin} method returns the paper's left margin in
|
|
214
|
+
# The {#left_margin} method returns the paper's left margin in inches.
|
|
216
215
|
#
|
|
217
216
|
# @example
|
|
218
217
|
# doc = Layout::Document.open("C:/path/to/document.layout")
|
|
@@ -224,7 +223,7 @@ class Layout::PageInfo
|
|
|
224
223
|
def left_margin
|
|
225
224
|
end
|
|
226
225
|
|
|
227
|
-
# The {#left_margin=} method sets the paper's left margin in
|
|
226
|
+
# The {#left_margin=} method sets the paper's left margin in inches.
|
|
228
227
|
#
|
|
229
228
|
# @example
|
|
230
229
|
# doc = Layout::Document.open("C:/path/to/document.layout")
|
|
@@ -352,7 +351,7 @@ class Layout::PageInfo
|
|
|
352
351
|
def print_paper_color?
|
|
353
352
|
end
|
|
354
353
|
|
|
355
|
-
# The {#right_margin} method returns the paper's right margin in
|
|
354
|
+
# The {#right_margin} method returns the paper's right margin in inches.
|
|
356
355
|
#
|
|
357
356
|
# @example
|
|
358
357
|
# doc = Layout::Document.open("C:/path/to/document.layout")
|
|
@@ -364,7 +363,7 @@ class Layout::PageInfo
|
|
|
364
363
|
def right_margin
|
|
365
364
|
end
|
|
366
365
|
|
|
367
|
-
# The {#right_margin=} sets the paper's right margin in
|
|
366
|
+
# The {#right_margin=} sets the paper's right margin in inches.
|
|
368
367
|
#
|
|
369
368
|
# @example
|
|
370
369
|
# doc = Layout::Document.open("C:/path/to/document.layout")
|
|
@@ -403,7 +402,7 @@ class Layout::PageInfo
|
|
|
403
402
|
def show_margins?
|
|
404
403
|
end
|
|
405
404
|
|
|
406
|
-
# The {#top_margin} method returns the paper's top margin in
|
|
405
|
+
# The {#top_margin} method returns the paper's top margin in inches.
|
|
407
406
|
#
|
|
408
407
|
# @example
|
|
409
408
|
# doc = Layout::Document.open("C:/path/to/document.layout")
|
|
@@ -415,7 +414,7 @@ class Layout::PageInfo
|
|
|
415
414
|
def top_margin
|
|
416
415
|
end
|
|
417
416
|
|
|
418
|
-
# The {#top_margin} method sets the paper's top margin in
|
|
417
|
+
# The {#top_margin} method sets the paper's top margin in inches.
|
|
419
418
|
#
|
|
420
419
|
# @example
|
|
421
420
|
# doc = Layout::Document.open("C:/path/to/document.layout")
|
|
@@ -430,7 +429,7 @@ class Layout::PageInfo
|
|
|
430
429
|
def top_margin=(margin)
|
|
431
430
|
end
|
|
432
431
|
|
|
433
|
-
# The {#width} method returns the paper width in
|
|
432
|
+
# The {#width} method returns the paper width in inches.
|
|
434
433
|
#
|
|
435
434
|
# @example
|
|
436
435
|
# doc = Layout::Document.open("C:/path/to/document.layout")
|
|
@@ -442,7 +441,7 @@ class Layout::PageInfo
|
|
|
442
441
|
def width
|
|
443
442
|
end
|
|
444
443
|
|
|
445
|
-
# The {#width=} method sets the paper width in
|
|
444
|
+
# The {#width=} method sets the paper width in inches.
|
|
446
445
|
#
|
|
447
446
|
# @example
|
|
448
447
|
# doc = Layout::Document.open("C:/path/to/document.layout")
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright:: Copyright
|
|
1
|
+
# Copyright:: Copyright 2026 Trimble Inc.
|
|
2
2
|
# License:: The MIT License (MIT)
|
|
3
3
|
|
|
4
4
|
# A path entity represents a continuous, multi-segment polyline or bezier
|
|
@@ -27,8 +27,8 @@ class Layout::Path < Layout::Entity
|
|
|
27
27
|
# @example
|
|
28
28
|
# center = Geom::Point2d.new(5, 5)
|
|
29
29
|
# radius = 2.0
|
|
30
|
-
# start_angle =
|
|
31
|
-
# end_angle =
|
|
30
|
+
# start_angle = 3.14159
|
|
31
|
+
# end_angle = 6.28319
|
|
32
32
|
# arc = Layout::Path.new_arc(center, radius, start_angle, end_angle)
|
|
33
33
|
#
|
|
34
34
|
# @param [Geom::Point2d] center_point
|
|
@@ -36,8 +36,10 @@ class Layout::Path < Layout::Entity
|
|
|
36
36
|
# @param [Float] radius
|
|
37
37
|
#
|
|
38
38
|
# @param [Float] start_angle
|
|
39
|
+
# in radians
|
|
39
40
|
#
|
|
40
41
|
# @param [Float] end_angle
|
|
42
|
+
# in radians
|
|
41
43
|
#
|
|
42
44
|
# @raise [ArgumentError] if radius is less than or equal to zero
|
|
43
45
|
#
|
|
@@ -82,7 +84,7 @@ class Layout::Path < Layout::Entity
|
|
|
82
84
|
# or +nil+ if path is not an arc.
|
|
83
85
|
#
|
|
84
86
|
# @example
|
|
85
|
-
#
|
|
87
|
+
# center, radius, start_angle, end_angle = path.arc
|
|
86
88
|
#
|
|
87
89
|
# @return [Array(Geom::Point2d, Float, Float, Float), nil] The center point,
|
|
88
90
|
# radius, start angle, and end angle
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright:: Copyright
|
|
1
|
+
# Copyright:: Copyright 2026 Trimble Inc.
|
|
2
2
|
# License:: The MIT License (MIT)
|
|
3
3
|
|
|
4
4
|
# An entity that represents the data inserted from an external file.
|
|
@@ -19,24 +19,22 @@ class Layout::ReferenceEntity < Layout::Entity
|
|
|
19
19
|
|
|
20
20
|
# Instance Methods
|
|
21
21
|
|
|
22
|
-
# The {#clip_mask} method returns the clip mask
|
|
23
|
-
# +nil+ if it does not have
|
|
22
|
+
# The {#clip_mask} method returns the clip mask entity for the
|
|
23
|
+
# {Layout::ReferenceEntity}, or +nil+ if it does not have one.
|
|
24
24
|
#
|
|
25
25
|
# @example
|
|
26
26
|
# doc = Layout::Document.open("C:/path/to/document.layout")
|
|
27
27
|
# reference_entity = doc.pages.first.entities.first
|
|
28
28
|
# clip_mask = image.clip_mask
|
|
29
29
|
#
|
|
30
|
-
# @return [Layout::
|
|
31
|
-
# {Layout::Rectangle}, or {Layout::Ellipse}.
|
|
30
|
+
# @return [Layout::Ellipse, Layout::Path, Layout::Rectangle, nil]
|
|
32
31
|
#
|
|
33
32
|
# @version LayOut 2023.0
|
|
34
33
|
def clip_mask
|
|
35
34
|
end
|
|
36
35
|
|
|
37
|
-
# The {#clip_mask=} method sets the clip mask of the {Layout::ReferenceEntity}.
|
|
38
|
-
#
|
|
39
|
-
# and it must not currently exist in a {Layout::Document}, or {Layout::Group}.
|
|
36
|
+
# The {#clip_mask=} method sets the clip mask of the {Layout::ReferenceEntity}.
|
|
37
|
+
# +clip_mask+ must not currently exist in a {Layout::Document} or {Layout::Group}.
|
|
40
38
|
#
|
|
41
39
|
# @example
|
|
42
40
|
# doc = Layout::Document.open("C:/path/to/document.layout")
|
|
@@ -47,9 +45,7 @@ class Layout::ReferenceEntity < Layout::Entity
|
|
|
47
45
|
# clip_mask = Layout::Rectangle.new(bounds)
|
|
48
46
|
# reference_entity.clip_mask = clip_mask
|
|
49
47
|
#
|
|
50
|
-
# @param [Layout::
|
|
51
|
-
# The clip mask can be a {Layout::Path},
|
|
52
|
-
# {Layout::Rectangle}, {Layout::Ellipse}, or +nil+.
|
|
48
|
+
# @param [Layout::Ellipse, Layout::Path, Layout::Rectangle, nil] clip_mask
|
|
53
49
|
#
|
|
54
50
|
# @raise [ArgumentError] if clip mask is already in a {Layout::Document} or
|
|
55
51
|
# {Layout::Group}
|
|
@@ -57,6 +53,8 @@ class Layout::ReferenceEntity < Layout::Entity
|
|
|
57
53
|
# @raise [ArgumentError] if clip mask is not a {Layout::Path},
|
|
58
54
|
# {Layout::Rectangle}, or {Layout::Ellipse}
|
|
59
55
|
#
|
|
56
|
+
# @raise [ArgumentError] if clip_mask and reference entity bounds do not overlap
|
|
57
|
+
#
|
|
60
58
|
# @raise [LockedLayerError] if the {Layout::ReferenceEntity} is on a locked {Layout::Layer}
|
|
61
59
|
#
|
|
62
60
|
# @raise [LockedEntityError] if the {Layout::ReferenceEntity} is locked
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright:: Copyright
|
|
1
|
+
# Copyright:: Copyright 2026 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
|
|
@@ -61,24 +61,21 @@ class Layout::SketchUpModel < Layout::Entity
|
|
|
61
61
|
end
|
|
62
62
|
|
|
63
63
|
# The {#clip_mask} method returns the clip mask entity for the
|
|
64
|
-
# {Layout::SketchUpModel}, or +nil+ if it does not have one.
|
|
65
|
-
# {Layout::Rectangle}, {Layout::Ellipse}, or {Layout::Path}.
|
|
64
|
+
# {Layout::SketchUpModel}, or +nil+ if it does not have one.
|
|
66
65
|
#
|
|
67
66
|
# @example
|
|
68
67
|
# bounds = Geom::Bounds2d.new(1, 1, 3, 3)
|
|
69
68
|
# model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
|
|
70
69
|
# clip_mask = model.clip_mask
|
|
71
70
|
#
|
|
72
|
-
# @return [Layout::
|
|
71
|
+
# @return [Layout::Ellipse, Layout::Path, Layout::Rectangle, nil]
|
|
73
72
|
#
|
|
74
73
|
# @version LayOut 2018
|
|
75
74
|
def clip_mask
|
|
76
75
|
end
|
|
77
76
|
|
|
78
77
|
# The {#clip_mask=} method sets a clip mask for the {Layout::SketchUpModel}.
|
|
79
|
-
# clip_mask
|
|
80
|
-
# or +nil+, and it must not currently exist in a {Layout::Document},
|
|
81
|
-
# or {Layout::Group}.
|
|
78
|
+
# +clip_mask+ must not currently exist in a {Layout::Document} or {Layout::Group}.
|
|
82
79
|
#
|
|
83
80
|
# @example
|
|
84
81
|
# bounds = Geom::Bounds2d.new(1, 1, 3, 3)
|
|
@@ -88,9 +85,7 @@ class Layout::SketchUpModel < Layout::Entity
|
|
|
88
85
|
#
|
|
89
86
|
# @note +clip_mask+ may be +nil+ as of LayOut 2020.1.
|
|
90
87
|
#
|
|
91
|
-
# @param [Layout::
|
|
92
|
-
# The clip mask can be a {Layout::Path},
|
|
93
|
-
# {Layout::Rectangle}, {Layout::Ellipse}, or +nil+.
|
|
88
|
+
# @param [Layout::Ellipse, Layout::Path, Layout::Rectangle, nil] clip_mask
|
|
94
89
|
#
|
|
95
90
|
# @raise [ArgumentError] if clip_mask is already in a {Layout::Document} or
|
|
96
91
|
# {Layout::Group}
|
|
@@ -98,6 +93,8 @@ class Layout::SketchUpModel < Layout::Entity
|
|
|
98
93
|
# @raise [ArgumentError] if clip_mask is not a {Layout::Rectangle},
|
|
99
94
|
# {Layout::Ellipse}, or {Layout::Path}
|
|
100
95
|
#
|
|
96
|
+
# @raise [ArgumentError] if clip_mask and model bounds do not overlap
|
|
97
|
+
#
|
|
101
98
|
# @raise [LockedLayerError] if the {Layout::SketchUpModel} is on a locked
|
|
102
99
|
# {Layout::Layer}
|
|
103
100
|
#
|