sketchup-api-stubs 0.7.8 → 0.7.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/sketchup-api-stubs/sketchup.rb +3 -0
- data/lib/sketchup-api-stubs/stubs/Array.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Geom/BoundingBox.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Geom/Bounds2d.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Geom/LatLong.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Geom/OrientedBounds2d.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Geom/Point2d.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Geom/Point3d.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Geom/PolygonMesh.rb +4 -18
- data/lib/sketchup-api-stubs/stubs/Geom/Transformation.rb +17 -19
- data/lib/sketchup-api-stubs/stubs/Geom/Transformation2d.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Geom/UTM.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Geom/Vector2d.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Geom/Vector3d.rb +3 -3
- data/lib/sketchup-api-stubs/stubs/Geom.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/LanguageHandler.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/AngularDimension.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/AutoTextDefinition.rb +50 -1
- data/lib/sketchup-api-stubs/stubs/Layout/AutoTextDefinitions.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/ConnectionPoint.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Document.rb +56 -3
- data/lib/sketchup-api-stubs/stubs/Layout/Ellipse.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Entities.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Entity.rb +4 -1
- data/lib/sketchup-api-stubs/stubs/Layout/FormattedText.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Grid.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Group.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Image.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Label.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Layer.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/LayerInstance.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Layers.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/LinearDimension.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/LockedEntityError.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/LockedLayerError.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Page.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/PageInfo.rb +73 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Pages.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Path.rb +7 -7
- data/lib/sketchup-api-stubs/stubs/Layout/Rectangle.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/ReferenceEntity.rb +82 -0
- data/lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb +24 -2
- data/lib/sketchup-api-stubs/stubs/Layout/Style.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Table.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/TableCell.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/TableColumn.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/TableRow.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Length.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Numeric.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Animation.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/AppObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/ArcCurve.rb +18 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/AttributeDictionaries.rb +3 -5
- data/lib/sketchup-api-stubs/stubs/Sketchup/AttributeDictionary.rb +4 -9
- data/lib/sketchup-api-stubs/stubs/Sketchup/Axes.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Behavior.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Camera.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/ClassificationSchema.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Classifications.rb +4 -5
- data/lib/sketchup-api-stubs/stubs/Sketchup/Color.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/ComponentDefinition.rb +44 -4
- data/lib/sketchup-api-stubs/stubs/Sketchup/ComponentInstance.rb +2 -2
- data/lib/sketchup-api-stubs/stubs/Sketchup/Console.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/ConstructionLine.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/ConstructionPoint.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Curve.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionList.rb +25 -2
- data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionsObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Dimension.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionLinear.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionRadial.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Drawingelement.rb +13 -3
- data/lib/sketchup-api-stubs/stubs/Sketchup/Edge.rb +62 -167
- data/lib/sketchup-api-stubs/stubs/Sketchup/EdgeUse.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Entities.rb +246 -209
- data/lib/sketchup-api-stubs/stubs/Sketchup/EntitiesBuilder.rb +3 -14
- data/lib/sketchup-api-stubs/stubs/Sketchup/EntitiesObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Entity.rb +10 -36
- data/lib/sketchup-api-stubs/stubs/Sketchup/EntityObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/ExtensionsManager.rb +4 -5
- data/lib/sketchup-api-stubs/stubs/Sketchup/Face.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/FrameChangeObserver.rb +1 -3
- data/lib/sketchup-api-stubs/stubs/Sketchup/Group.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Http/Request.rb +16 -26
- data/lib/sketchup-api-stubs/stubs/Sketchup/Http/Response.rb +2 -2
- data/lib/sketchup-api-stubs/stubs/Sketchup/Http.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Image.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/ImageRep.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Importer.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/InputPoint.rb +29 -30
- data/lib/sketchup-api-stubs/stubs/Sketchup/InstanceObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/InstancePath.rb +2 -2
- data/lib/sketchup-api-stubs/stubs/Sketchup/Layer.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/LayerFolder.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Layers.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/LayersObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Licensing/ExtensionLicense.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Licensing.rb +2 -2
- data/lib/sketchup-api-stubs/stubs/Sketchup/LineStyle.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/LineStyles.rb +9 -7
- data/lib/sketchup-api-stubs/stubs/Sketchup/Loop.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Material.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Materials.rb +2 -3
- data/lib/sketchup-api-stubs/stubs/Sketchup/MaterialsObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Menu.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Model.rb +28 -23
- data/lib/sketchup-api-stubs/stubs/Sketchup/ModelObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsManager.rb +4 -5
- data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsProvider.rb +5 -18
- data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsProviderObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Overlay.rb +490 -0
- data/lib/sketchup-api-stubs/stubs/Sketchup/OverlaysManager.rb +116 -0
- data/lib/sketchup-api-stubs/stubs/Sketchup/Page.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Pages.rb +15 -17
- data/lib/sketchup-api-stubs/stubs/Sketchup/PagesObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/PickHelper.rb +21 -18
- data/lib/sketchup-api-stubs/stubs/Sketchup/RegionalSettings.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptions.rb +18 -9
- data/lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptionsObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/SectionPlane.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Selection.rb +4 -5
- data/lib/sketchup-api-stubs/stubs/Sketchup/SelectionObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Set.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/ShadowInfo.rb +15 -20
- data/lib/sketchup-api-stubs/stubs/Sketchup/ShadowInfoObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Skp.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Style.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Styles.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Text.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Texture.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/TextureWriter.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Tool.rb +17 -20
- data/lib/sketchup-api-stubs/stubs/Sketchup/Tools.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/ToolsObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/UVHelper.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Vertex.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/View.rb +30 -18
- data/lib/sketchup-api-stubs/stubs/Sketchup/ViewObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup.rb +48 -14
- data/lib/sketchup-api-stubs/stubs/SketchupExtension.rb +2 -2
- data/lib/sketchup-api-stubs/stubs/String.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/UI/Command.rb +29 -31
- data/lib/sketchup-api-stubs/stubs/UI/HtmlDialog.rb +18 -9
- data/lib/sketchup-api-stubs/stubs/UI/Notification.rb +3 -3
- data/lib/sketchup-api-stubs/stubs/UI/Toolbar.rb +5 -4
- data/lib/sketchup-api-stubs/stubs/UI/WebDialog.rb +16 -18
- data/lib/sketchup-api-stubs/stubs/UI.rb +71 -26
- data/lib/sketchup-api-stubs/stubs/_top_level.rb +1 -9
- metadata +10 -7
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright:: Copyright
|
1
|
+
# Copyright:: Copyright 2024 Trimble Inc.
|
2
2
|
# License:: The MIT License (MIT)
|
3
3
|
|
4
4
|
# This is the interface to a {Layout::Document}'s paper space information. The
|
@@ -140,6 +140,78 @@ class Layout::PageInfo
|
|
140
140
|
def height=(height)
|
141
141
|
end
|
142
142
|
|
143
|
+
# The {#image_display_resolution} method returns the on screen image quality.
|
144
|
+
#
|
145
|
+
# The resolution can be one of the following values:
|
146
|
+
# [+Layout::PageInfo::RESOLUTION_LOW+]
|
147
|
+
# [+Layout::PageInfo::RESOLUTION_MEDIUM+]
|
148
|
+
# [+Layout::PageInfo::RESOLUTION_HIGH+]
|
149
|
+
#
|
150
|
+
# @example
|
151
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
152
|
+
# image_quality = doc.page_info.image_display_resolution
|
153
|
+
#
|
154
|
+
# @return [Integer]
|
155
|
+
#
|
156
|
+
# @version LayOut 2023.1
|
157
|
+
def image_display_resolution
|
158
|
+
end
|
159
|
+
|
160
|
+
# The {#image_display_resolution=} method sets the on screen image quality.
|
161
|
+
#
|
162
|
+
# The resolution can be one of the following values:
|
163
|
+
# [+Layout::PageInfo::RESOLUTION_LOW+]
|
164
|
+
# [+Layout::PageInfo::RESOLUTION_MEDIUM+]
|
165
|
+
# [+Layout::PageInfo::RESOLUTION_HIGH+]
|
166
|
+
#
|
167
|
+
# @example
|
168
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
169
|
+
# doc.page_info.image_display_resolution = Layout::PageInfo::RESOLUTION_LOW
|
170
|
+
#
|
171
|
+
# @param [Integer] resolution
|
172
|
+
#
|
173
|
+
# @raise [ArgumentError] if resolution is not a valid resolution value
|
174
|
+
#
|
175
|
+
# @version LayOut 2023.1
|
176
|
+
def image_display_resolution=(resolution)
|
177
|
+
end
|
178
|
+
|
179
|
+
# The {#image_output_resolution} method returns the output image quality.
|
180
|
+
#
|
181
|
+
# The resolution can be one of the following values:
|
182
|
+
# [+Layout::PageInfo::RESOLUTION_LOW+]
|
183
|
+
# [+Layout::PageInfo::RESOLUTION_MEDIUM+]
|
184
|
+
# [+Layout::PageInfo::RESOLUTION_HIGH+]
|
185
|
+
#
|
186
|
+
# @example
|
187
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
188
|
+
# image_quality = doc.page_info.image_output_resolution
|
189
|
+
#
|
190
|
+
# @return [Integer]
|
191
|
+
#
|
192
|
+
# @version LayOut 2023.1
|
193
|
+
def image_output_resolution
|
194
|
+
end
|
195
|
+
|
196
|
+
# The {#image_output_resolution=} method sets the output image quality.
|
197
|
+
#
|
198
|
+
# The resolution can be one of the following values:
|
199
|
+
# [+Layout::PageInfo::RESOLUTION_LOW+]
|
200
|
+
# [+Layout::PageInfo::RESOLUTION_MEDIUM+]
|
201
|
+
# [+Layout::PageInfo::RESOLUTION_HIGH+]
|
202
|
+
#
|
203
|
+
# @example
|
204
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
205
|
+
# doc.page_info.image_output_resolution = Layout::PageInfo::RESOLUTION_HIGH
|
206
|
+
#
|
207
|
+
# @param [Integer] resolution
|
208
|
+
#
|
209
|
+
# @raise [ArgumentError] if resolution is not a valid resolution value
|
210
|
+
#
|
211
|
+
# @version LayOut 2023.1
|
212
|
+
def image_output_resolution=(resolution)
|
213
|
+
end
|
214
|
+
|
143
215
|
# The {#left_margin} method returns the paper's left margin in document units.
|
144
216
|
#
|
145
217
|
# @example
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright:: Copyright
|
1
|
+
# Copyright:: Copyright 2024 Trimble Inc.
|
2
2
|
# License:: The MIT License (MIT)
|
3
3
|
|
4
4
|
# A path entity represents a continuous, multi-segment polyline or bezier
|
@@ -175,8 +175,8 @@ class Layout::Path < Layout::Entity
|
|
175
175
|
#
|
176
176
|
# @overload initialize(start_point, end_point)
|
177
177
|
#
|
178
|
-
# @param [Geom::
|
179
|
-
# @param [Geom::
|
178
|
+
# @param [Geom::Point2d] start_point
|
179
|
+
# @param [Geom::Point2d] end_point
|
180
180
|
# @return [Layout::Path] a straight path
|
181
181
|
#
|
182
182
|
# @raise [ArgumentError] if the length between start point and end point is
|
@@ -184,10 +184,10 @@ class Layout::Path < Layout::Entity
|
|
184
184
|
#
|
185
185
|
# @overload initialize(start_point, control_point_1, control_point_2, end_point)
|
186
186
|
#
|
187
|
-
# @param [Geom::
|
188
|
-
# @param [Geom::
|
189
|
-
# @param [Geom::
|
190
|
-
# @param [Geom::
|
187
|
+
# @param [Geom::Point2d] start_point
|
188
|
+
# @param [Geom::Point2d] control_point_1 The first bezier control point
|
189
|
+
# @param [Geom::Point2d] control_point_2 The second bezier control point
|
190
|
+
# @param [Geom::Point2d] end_point
|
191
191
|
# @return [Layout::Path] a bezier path
|
192
192
|
#
|
193
193
|
# @raise [ArgumentError] if the length between start point and end point is
|
@@ -0,0 +1,82 @@
|
|
1
|
+
# Copyright:: Copyright 2024 Trimble Inc.
|
2
|
+
# License:: The MIT License (MIT)
|
3
|
+
|
4
|
+
# An entity that represents the data inserted from an external file.
|
5
|
+
#
|
6
|
+
# @example
|
7
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
8
|
+
# reference_entity = doc.pages.first.entities.first
|
9
|
+
# clip_mask = reference_entity.clip_mask
|
10
|
+
# if clip_mask.is_a?(Layout::Rectangle)
|
11
|
+
# point1 = Geom::Point2d.new(1, 1)
|
12
|
+
# point2 = Geom::Point2d.new(2, 2)
|
13
|
+
# bounds = [point1, point2]
|
14
|
+
# reference_entity.clip_mask = Layout::Ellipse.new(bounds)
|
15
|
+
# end
|
16
|
+
#
|
17
|
+
# @version LayOut 2023.0
|
18
|
+
class Layout::ReferenceEntity < Layout::Entity
|
19
|
+
|
20
|
+
# Instance Methods
|
21
|
+
|
22
|
+
# The {#clip_mask} method returns the clip mask of the {Layout::ReferenceEntity}, or
|
23
|
+
# +nil+ if it does not have a clip mask.
|
24
|
+
#
|
25
|
+
# @example
|
26
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
27
|
+
# reference_entity = doc.pages.first.entities.first
|
28
|
+
# clip_mask = image.clip_mask
|
29
|
+
#
|
30
|
+
# @return [Layout::Entity] The clip mask can be a {Layout::Path},
|
31
|
+
# {Layout::Rectangle}, or {Layout::Ellipse}.
|
32
|
+
#
|
33
|
+
# @version LayOut 2023.0
|
34
|
+
def clip_mask
|
35
|
+
end
|
36
|
+
|
37
|
+
# The {#clip_mask=} method sets the clip mask of the {Layout::ReferenceEntity}. clip_mask
|
38
|
+
# can be a {Layout::Rectangle}, {Layout::Ellipse}, or {Layout::Path}, or +nil+,
|
39
|
+
# and it must not currently exist in a {Layout::Document}, or {Layout::Group}.
|
40
|
+
#
|
41
|
+
# @example
|
42
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
43
|
+
# reference_entity = doc.pages.first.entities.first
|
44
|
+
# point1 = Geom::Point2d.new(1, 1)
|
45
|
+
# point2 = Geom::Point2d.new(2, 2)
|
46
|
+
# bounds = [point1, point2]
|
47
|
+
# clip_mask = Layout::Rectangle.new(bounds)
|
48
|
+
# reference_entity.clip_mask = clip_mask
|
49
|
+
#
|
50
|
+
# @param [Layout::Entity, nil] clip_mask
|
51
|
+
# The clip mask can be a {Layout::Path},
|
52
|
+
# {Layout::Rectangle}, {Layout::Ellipse}, or +nil+.
|
53
|
+
#
|
54
|
+
# @raise [ArgumentError] if clip mask is already in a {Layout::Document} or
|
55
|
+
# {Layout::Group}
|
56
|
+
#
|
57
|
+
# @raise [ArgumentError] if clip mask is not a {Layout::Path},
|
58
|
+
# {Layout::Rectangle}, or {Layout::Ellipse}
|
59
|
+
#
|
60
|
+
# @raise [LockedLayerError] if the {Layout::ReferenceEntity} is on a locked {Layout::Layer}
|
61
|
+
#
|
62
|
+
# @raise [LockedEntityError] if the {Layout::ReferenceEntity} is locked
|
63
|
+
#
|
64
|
+
# @version LayOut 2023.0
|
65
|
+
def clip_mask=(clip_mask)
|
66
|
+
end
|
67
|
+
|
68
|
+
# The {#entities} method returns the {Layout::Group} that represents the
|
69
|
+
# {Layout::ReferenceEntity} in its exploded form.
|
70
|
+
#
|
71
|
+
# @example
|
72
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
73
|
+
# reference_entity = doc.pages.first.entities.first
|
74
|
+
# entities = reference_entity.entities
|
75
|
+
#
|
76
|
+
# @return [Layout::Group]
|
77
|
+
#
|
78
|
+
# @version LayOut 2023.0
|
79
|
+
def entities
|
80
|
+
end
|
81
|
+
|
82
|
+
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright:: Copyright
|
1
|
+
# Copyright:: Copyright 2024 Trimble Inc.
|
2
2
|
# License:: The MIT License (MIT)
|
3
3
|
|
4
4
|
# A SketchUp Model entity. This is an instance of a SketchUp Model that is
|
@@ -33,6 +33,8 @@ class Layout::SketchUpModel < Layout::Entity
|
|
33
33
|
|
34
34
|
LEFT_VIEW = nil # Stub value.
|
35
35
|
|
36
|
+
NO_OVERRIDE = nil # Stub value.
|
37
|
+
|
36
38
|
RASTER_RENDER = nil # Stub value.
|
37
39
|
|
38
40
|
RIGHT_VIEW = nil # Stub value.
|
@@ -352,6 +354,26 @@ class Layout::SketchUpModel < Layout::Entity
|
|
352
354
|
def model_to_paper_point(model_point)
|
353
355
|
end
|
354
356
|
|
357
|
+
# The {#output_entities} method returns the {Layout::Group} that represents the
|
358
|
+
# {Layout::SketchUpModel} in its exported form. The {Layout::Group} will contain a {Layout::Image}
|
359
|
+
# for raster and hybrid-rendered models, and will contain a {Layout::Group} of LayOut entities for
|
360
|
+
# vector and hybrid-rendered models. This takes into account the output resolution set in the
|
361
|
+
# document's {Layout::PageInfo}, and the render mode override set on the document.
|
362
|
+
#
|
363
|
+
# @example
|
364
|
+
# doc = Layout::Document.open("C:/path/to/document.layout")
|
365
|
+
# bounds = Geom::Bounds2d.new(1, 1, 3, 3)
|
366
|
+
# model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
|
367
|
+
# doc.add_entity(model, doc.layers.first, doc.pages.first)
|
368
|
+
# doc.render_mode_override = Layout::SketchUpModel::HYBRID_RENDER
|
369
|
+
# entities = model.output_entities
|
370
|
+
#
|
371
|
+
# @return [Layout::Entity]
|
372
|
+
#
|
373
|
+
# @version LayOut 2023.1
|
374
|
+
def output_entities
|
375
|
+
end
|
376
|
+
|
355
377
|
# The {#perspective=} method sets whether the {Layout::SketchUpModel}'s view
|
356
378
|
# is perspective or orthographic.
|
357
379
|
#
|
@@ -473,7 +495,7 @@ class Layout::SketchUpModel < Layout::Entity
|
|
473
495
|
#
|
474
496
|
# @raise [ArgumentError] if render_mode is not a valid render mode
|
475
497
|
#
|
476
|
-
# @raise [
|
498
|
+
# @raise [LockedLayerError] if the {Layout::SketchUpModel} is on a locked
|
477
499
|
# {Layout::Layer}
|
478
500
|
#
|
479
501
|
# @raise [LockedEntityError] if the {Layout::SketchUpModel} is locked
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright:: Copyright
|
1
|
+
# Copyright:: Copyright 2024 Trimble Inc.
|
2
2
|
# License:: The MIT License (MIT)
|
3
3
|
|
4
4
|
# An ArcCurve is a Curve that makes up part of a circle. This is the
|
@@ -53,6 +53,23 @@ class Sketchup::ArcCurve < Sketchup::Curve
|
|
53
53
|
def center
|
54
54
|
end
|
55
55
|
|
56
|
+
# Checks if the ArcCurve is a circle.
|
57
|
+
#
|
58
|
+
# @example
|
59
|
+
# entities = Sketchup.active_model.entities
|
60
|
+
# center_point = Geom::Point3d.new(0, 0, 0)
|
61
|
+
# normal_vector = Geom::Vector3d.new(0, 0, 1)
|
62
|
+
# radius = 10
|
63
|
+
# edges = entities.add_circle(center_point, normal_vector, radius)
|
64
|
+
# curve = edges[0].curve
|
65
|
+
# is_circular = curve.circular?
|
66
|
+
#
|
67
|
+
# @return [Boolean]
|
68
|
+
#
|
69
|
+
# @version SketchUp 2023.1
|
70
|
+
def circular?
|
71
|
+
end
|
72
|
+
|
56
73
|
# The {#end_angle} method is used to retrieve the angle of the end of the arc
|
57
74
|
# measured from the X axis in radians.
|
58
75
|
#
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright:: Copyright
|
1
|
+
# Copyright:: Copyright 2024 Trimble Inc.
|
2
2
|
# License:: The MIT License (MIT)
|
3
3
|
|
4
4
|
# The AttributeDictionaries class is a collection of all of the
|
@@ -96,11 +96,9 @@ class Sketchup::AttributeDictionaries < Sketchup::Entity
|
|
96
96
|
def delete(key_or_dict)
|
97
97
|
end
|
98
98
|
|
99
|
-
# The each method is used to iterate through all of the attributes
|
99
|
+
# The {#each} method is used to iterate through all of the attributes
|
100
100
|
# dictionaries.
|
101
101
|
#
|
102
|
-
# Throws an exception if there are no keys.
|
103
|
-
#
|
104
102
|
# @example
|
105
103
|
# model = Sketchup.active_model
|
106
104
|
# dictionaries = model.attribute_dictionaries
|
@@ -111,7 +109,7 @@ class Sketchup::AttributeDictionaries < Sketchup::Entity
|
|
111
109
|
#
|
112
110
|
# @version SketchUp 6.0
|
113
111
|
#
|
114
|
-
# @
|
112
|
+
# @yieldparam [Sketchup::AttributeDictionary] dictionary
|
115
113
|
def each
|
116
114
|
end
|
117
115
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright:: Copyright
|
1
|
+
# Copyright:: Copyright 2024 Trimble Inc.
|
2
2
|
# License:: The MIT License (MIT)
|
3
3
|
|
4
4
|
# The AttributeDictionary class allows you to attach arbitrary collections of
|
@@ -48,23 +48,18 @@ class Sketchup::AttributeDictionary < Sketchup::Entity
|
|
48
48
|
#
|
49
49
|
# @example
|
50
50
|
# model = Sketchup.active_model
|
51
|
-
# value = model.set_attribute
|
51
|
+
# value = model.set_attribute("testdictionary", "test", 110)
|
52
52
|
# attrdicts = model.attribute_dictionaries
|
53
53
|
# attrdict = attrdicts["testdictionary"]
|
54
54
|
# value = attrdict["test2"] = 120
|
55
|
-
#
|
56
|
-
# UI.messagebox value
|
57
|
-
# end
|
55
|
+
# p value
|
58
56
|
#
|
59
57
|
# @param [String] key
|
60
58
|
# The valid key.
|
61
59
|
#
|
62
|
-
# @param [Boolean,
|
60
|
+
# @param [Boolean, Integer, Float, Length, nil, String, Time, Array, Geom::Point3d, Geom::Vector3d] value
|
63
61
|
# The value to be set.
|
64
62
|
#
|
65
|
-
# @return [Object, nil] the value that was set if successful, or false
|
66
|
-
# if unsuccessful.
|
67
|
-
#
|
68
63
|
# @version SketchUp 6.0
|
69
64
|
def []=(key, value)
|
70
65
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright:: Copyright
|
1
|
+
# Copyright:: Copyright 2024 Trimble Inc.
|
2
2
|
# License:: The MIT License (MIT)
|
3
3
|
|
4
4
|
# The Classifications class is a container/manager for all classifications in
|
@@ -32,19 +32,18 @@ class Sketchup::Classifications
|
|
32
32
|
def [](index_or_name)
|
33
33
|
end
|
34
34
|
|
35
|
-
# The each method is used to iterate through loaded classification schemas.
|
35
|
+
# The {#each} method is used to iterate through loaded classification schemas.
|
36
36
|
#
|
37
37
|
# @example
|
38
38
|
# Sketchup.active_model.classifications.each { |schema|
|
39
39
|
# puts schema.name
|
40
40
|
# }
|
41
41
|
#
|
42
|
-
# @return nil
|
42
|
+
# @return [nil]
|
43
43
|
#
|
44
44
|
# @version SketchUp 2015
|
45
45
|
#
|
46
|
-
# @
|
47
|
-
# object as they are found.
|
46
|
+
# @yieldparam [Sketchup::ClassificationSchema] schema
|
48
47
|
def each
|
49
48
|
end
|
50
49
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright:: Copyright
|
1
|
+
# Copyright:: Copyright 2024 Trimble Inc.
|
2
2
|
# License:: The MIT License (MIT)
|
3
3
|
|
4
4
|
# The {Sketchup::ComponentDefinition} class is used to define the contents for
|
@@ -424,7 +424,13 @@ class Sketchup::ComponentDefinition < Sketchup::Drawingelement
|
|
424
424
|
def name
|
425
425
|
end
|
426
426
|
|
427
|
-
# The name= method is used to set the name of the component definition.
|
427
|
+
# The {name=} method is used to set the name of the component definition.
|
428
|
+
#
|
429
|
+
# The name should be unique to the model, if it's not the name will automatically
|
430
|
+
# be made unique.
|
431
|
+
#
|
432
|
+
# @bug In SketchUp 2022.0 a bug might lead to an available name being incorrectly renamed. Or
|
433
|
+
# a name that should be unavailable would be duplicated. This was fixed in SketchUp 2022.0.1.
|
428
434
|
#
|
429
435
|
# @example
|
430
436
|
# path = Sketchup.find_support_file "Bed.skp",
|
@@ -436,8 +442,7 @@ class Sketchup::ComponentDefinition < Sketchup::Drawingelement
|
|
436
442
|
#
|
437
443
|
# @param [String] name
|
438
444
|
#
|
439
|
-
# @return [String]
|
440
|
-
# successful
|
445
|
+
# @return [String]
|
441
446
|
#
|
442
447
|
# @version SketchUp 6.0
|
443
448
|
def name=(name)
|
@@ -616,4 +621,39 @@ class Sketchup::ComponentDefinition < Sketchup::Drawingelement
|
|
616
621
|
def set_classification_value(path, value)
|
617
622
|
end
|
618
623
|
|
624
|
+
# The {#thumbnail_camera} method is used to retrieve a camera representing
|
625
|
+
# the thumbnail associated with the component definition.
|
626
|
+
#
|
627
|
+
# @example
|
628
|
+
# # Get the thumbnail camera
|
629
|
+
# componentdefinition = Sketchup.active_model.definitions[0]
|
630
|
+
# thumbnail_camera = componentdefinition.thumbnail_camera
|
631
|
+
#
|
632
|
+
# @return [Sketchup::Camera] the camera associated with the thumbnail.
|
633
|
+
#
|
634
|
+
# @version SketchUp 2023.0
|
635
|
+
def thumbnail_camera
|
636
|
+
end
|
637
|
+
|
638
|
+
# The {#thumbnail_camera=} method is used to set the camera for the
|
639
|
+
# thumbnail associated with the component definition.
|
640
|
+
#
|
641
|
+
# @example
|
642
|
+
# componentdefinition = Sketchup.active_model.definitions[0]
|
643
|
+
# eye = Geom::Point3d.new(20, 5, 30)
|
644
|
+
# target = Geom::Point3d.new(20, 60, 25)
|
645
|
+
# up = Z_AXIS
|
646
|
+
# camera = Sketchup::Camera.new(eye, target, up)
|
647
|
+
# # Assign camera to the thumbnail's camera and refresh.
|
648
|
+
# componentdefinition.thumbnail_camera = camera
|
649
|
+
# componentdefinition.refresh_thumbnail
|
650
|
+
#
|
651
|
+
# @param [Sketchup::Camera] camera
|
652
|
+
#
|
653
|
+
# @raise [TypeError] if the passed argument is not of {#Sketchup::Camera} type.
|
654
|
+
#
|
655
|
+
# @version SketchUp 2023.0
|
656
|
+
def thumbnail_camera=(camera)
|
657
|
+
end
|
658
|
+
|
619
659
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright:: Copyright
|
1
|
+
# Copyright:: Copyright 2024 Trimble Inc.
|
2
2
|
# License:: The MIT License (MIT)
|
3
3
|
|
4
4
|
# The {Sketchup::ComponentInstance} class is used to represent component
|
@@ -116,7 +116,7 @@ class Sketchup::ComponentInstance < Sketchup::Drawingelement
|
|
116
116
|
# UI.messagebox "Failure"
|
117
117
|
# end
|
118
118
|
#
|
119
|
-
# @return [Array<Sketchup
|
119
|
+
# @return [Array<Sketchup::Entity>, false] An array of entity objects if successful, +false+ if
|
120
120
|
# unsuccessful
|
121
121
|
#
|
122
122
|
# @version SketchUp 6.0
|