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
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cadfe482d643fffdb3be271161180ba4a638b17c7a9288a7c3a79b7ca6ea3929
|
4
|
+
data.tar.gz: db6ee2cadbbbd51330bee20e157b6f103c8cf2f9edcb9834f75e41a0e353a178
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1044e24d7bd1012ce69b96c9b59f418c1f879be3e8fe35ab93ca8d39a3b06db6b7c43ce11ccf6d5e68a05e75c02aa5f60dee61a751bbf6aad8db18b8e7658d08
|
7
|
+
data.tar.gz: dacdb98cb9aced993ffec02a777929ef8774f93a98401edf2bfdbd673e7c21bf7b1e4ab077975688d39fde44ef63ec23dfcc38f53141e2410540ee7b55218b06
|
@@ -62,8 +62,8 @@ require 'sketchup-api-stubs/stubs/Sketchup/Camera.rb'
|
|
62
62
|
require 'sketchup-api-stubs/stubs/Sketchup/ClassificationSchema.rb'
|
63
63
|
require 'sketchup-api-stubs/stubs/Sketchup/Classifications.rb'
|
64
64
|
require 'sketchup-api-stubs/stubs/Sketchup/Color.rb'
|
65
|
-
require 'sketchup-api-stubs/stubs/Sketchup/Drawingelement.rb'
|
66
65
|
require 'sketchup-api-stubs/stubs/Sketchup/ComponentDefinition.rb'
|
66
|
+
require 'sketchup-api-stubs/stubs/Sketchup/Drawingelement.rb'
|
67
67
|
require 'sketchup-api-stubs/stubs/Sketchup/ComponentInstance.rb'
|
68
68
|
require 'sketchup-api-stubs/stubs/Sketchup/Console.rb'
|
69
69
|
require 'sketchup-api-stubs/stubs/Sketchup/ConstructionLine.rb'
|
@@ -94,6 +94,7 @@ require 'sketchup-api-stubs/stubs/Sketchup/InputPoint.rb'
|
|
94
94
|
require 'sketchup-api-stubs/stubs/Sketchup/InstanceObserver.rb'
|
95
95
|
require 'sketchup-api-stubs/stubs/Sketchup/InstancePath.rb'
|
96
96
|
require 'sketchup-api-stubs/stubs/Sketchup/Layer.rb'
|
97
|
+
require 'sketchup-api-stubs/stubs/Sketchup/LayerFolder.rb'
|
97
98
|
require 'sketchup-api-stubs/stubs/Sketchup/Layers.rb'
|
98
99
|
require 'sketchup-api-stubs/stubs/Sketchup/LayersObserver.rb'
|
99
100
|
require 'sketchup-api-stubs/stubs/Sketchup/Licensing.rb'
|
@@ -123,6 +124,7 @@ require 'sketchup-api-stubs/stubs/Sketchup/SelectionObserver.rb'
|
|
123
124
|
require 'sketchup-api-stubs/stubs/Sketchup/Set.rb'
|
124
125
|
require 'sketchup-api-stubs/stubs/Sketchup/ShadowInfo.rb'
|
125
126
|
require 'sketchup-api-stubs/stubs/Sketchup/ShadowInfoObserver.rb'
|
127
|
+
require 'sketchup-api-stubs/stubs/Sketchup/Skp.rb'
|
126
128
|
require 'sketchup-api-stubs/stubs/Sketchup/Style.rb'
|
127
129
|
require 'sketchup-api-stubs/stubs/Sketchup/Styles.rb'
|
128
130
|
require 'sketchup-api-stubs/stubs/Sketchup/Text.rb'
|
@@ -1,8 +1,8 @@
|
|
1
|
-
# Copyright:: Copyright
|
1
|
+
# Copyright:: Copyright 2021 Trimble Inc.
|
2
2
|
# License:: The MIT License (MIT)
|
3
3
|
|
4
4
|
# Bounding boxes are three-dimensional boxes (eight corners), aligned with the
|
5
|
-
#
|
5
|
+
# axes, that surround entities within your model. There is a default
|
6
6
|
# bounding box for any new model that will surround all entities,
|
7
7
|
# including all groups and components. Additionally, there are
|
8
8
|
# bounding boxes for Drawingelement objects, including components and groups.
|
@@ -154,15 +154,17 @@ class Geom::BoundingBox
|
|
154
154
|
def corner(corner_index)
|
155
155
|
end
|
156
156
|
|
157
|
-
# The {#depth} method is used to retrieve the
|
157
|
+
# The {#depth} method is used to retrieve the Z extents of the bounding box.
|
158
158
|
#
|
159
159
|
# @example
|
160
160
|
# boundingbox = Geom::BoundingBox.new
|
161
161
|
# boundingbox.add([100, 200, -400], [200, 400, 100])
|
162
162
|
# # This will return a Length of 500.0.
|
163
|
-
#
|
163
|
+
# height = boundingbox.depth
|
164
164
|
#
|
165
|
-
# @
|
165
|
+
# @note In SketchUp's coordinate system, this corresponds to the height.
|
166
|
+
#
|
167
|
+
# @return [Length]
|
166
168
|
#
|
167
169
|
# @version SketchUp 6.0
|
168
170
|
def depth
|
@@ -200,15 +202,17 @@ class Geom::BoundingBox
|
|
200
202
|
def empty?
|
201
203
|
end
|
202
204
|
|
203
|
-
# The {#height} method is used to retrieve the
|
205
|
+
# The {#height} method is used to retrieve the Y extent of the bounding box.
|
204
206
|
#
|
205
207
|
# @example
|
206
208
|
# boundingbox = Geom::BoundingBox.new
|
207
209
|
# boundingbox.add([100, 200, -400], [200, 400, 100])
|
208
210
|
# # This will return a Length of 200.0.
|
209
|
-
#
|
211
|
+
# depth = boundingbox.height
|
212
|
+
#
|
213
|
+
# @note In SketchUp's coordinate system, this corersponds to the depth.
|
210
214
|
#
|
211
|
-
# @return [Length]
|
215
|
+
# @return [Length]
|
212
216
|
#
|
213
217
|
# @version SketchUp 6.0
|
214
218
|
def height
|
@@ -301,15 +305,15 @@ class Geom::BoundingBox
|
|
301
305
|
def valid?
|
302
306
|
end
|
303
307
|
|
304
|
-
# The {#width} method is used to retrieve the
|
308
|
+
# The {#width} method is used to retrieve the X extent of the bounding box.
|
305
309
|
#
|
306
310
|
# @example
|
307
311
|
# boundingbox = Geom::BoundingBox.new
|
308
312
|
# boundingbox.add([100, 200, -400], [200, 400, 100])
|
309
313
|
# # This will return a Length of 100.0.
|
310
|
-
#
|
314
|
+
# width = boundingbox.width
|
311
315
|
#
|
312
|
-
# @return [Length]
|
316
|
+
# @return [Length]
|
313
317
|
#
|
314
318
|
# @version SketchUp 6.0
|
315
319
|
def width
|
@@ -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 bounds2d class represents an axis aligned bounding box represented by
|
@@ -27,7 +27,7 @@ class Geom::Bounds2d
|
|
27
27
|
# The {#height} method returns the height of the {Geom::Bounds2d}.
|
28
28
|
#
|
29
29
|
# @example
|
30
|
-
# bounds = Geom::Bounds2d.new(
|
30
|
+
# bounds = Geom::Bounds2d.new(0.0, 0.0, 1.0, 1.0)
|
31
31
|
# height = bounds.height
|
32
32
|
#
|
33
33
|
# @return [Geom::Point2d]
|
@@ -80,7 +80,7 @@ class Geom::Bounds2d
|
|
80
80
|
# corner of the {Geom::Bounds2d}.
|
81
81
|
#
|
82
82
|
# @example
|
83
|
-
# bounds = Geom::Bounds2d.new(
|
83
|
+
# bounds = Geom::Bounds2d.new(0.0, 0.0, 1.0, 1.0)
|
84
84
|
# l_r = bounds.lower_right
|
85
85
|
#
|
86
86
|
# @return [Geom::Point2d]
|
@@ -148,7 +148,7 @@ class Geom::Bounds2d
|
|
148
148
|
# of the {Geom::Bounds2d}.
|
149
149
|
#
|
150
150
|
# @example
|
151
|
-
# bounds = Geom::Bounds2d.new(
|
151
|
+
# bounds = Geom::Bounds2d.new(0.0, 0.0, 1.0, 1.0)
|
152
152
|
# u_l = bounds.upper_left
|
153
153
|
#
|
154
154
|
# @return [Geom::Point2d]
|
@@ -160,7 +160,7 @@ class Geom::Bounds2d
|
|
160
160
|
# The {#width} method returns the width of the {Geom::Bounds2d}.
|
161
161
|
#
|
162
162
|
# @example
|
163
|
-
# bounds = Geom::Bounds2d.new(
|
163
|
+
# bounds = Geom::Bounds2d.new(0.0, 0.0, 1.0, 1.0)
|
164
164
|
# width = bounds.width
|
165
165
|
#
|
166
166
|
# @return [Geom::Point2d]
|
@@ -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 LatLong class contains various methods for creating and manipulating
|
@@ -26,18 +26,18 @@ class Geom::LatLong
|
|
26
26
|
#
|
27
27
|
# @overload initialize(latlong)
|
28
28
|
#
|
29
|
-
# @param
|
29
|
+
# @param [Geom::LatLong] latlong
|
30
30
|
# @return [Geom::LatLong]
|
31
31
|
#
|
32
32
|
# @overload initialize(latlong_array)
|
33
33
|
#
|
34
|
-
# @param
|
34
|
+
# @param [Array(Numeric, Numeric)] latlong_array
|
35
35
|
# @return [Geom::LatLong]
|
36
36
|
#
|
37
37
|
# @overload initialize(lat, long)
|
38
38
|
#
|
39
|
-
# @param
|
40
|
-
# @param
|
39
|
+
# @param [Numeric] lat
|
40
|
+
# @param [Numeric] long
|
41
41
|
# @return [Geom::LatLong]
|
42
42
|
#
|
43
43
|
# @version SketchUp 6.0
|
@@ -1,12 +1,11 @@
|
|
1
|
-
# Copyright:: Copyright
|
1
|
+
# Copyright:: Copyright 2021 Trimble Inc.
|
2
2
|
# License:: The MIT License (MIT)
|
3
3
|
|
4
|
-
# The {Geom::
|
5
|
-
# {Geom::Point2d} is
|
6
|
-
# coordinates.
|
4
|
+
# The {Geom::Point2d} class allows you to work with a point in 2D space.
|
5
|
+
# {Geom::Point2d} is a series of values representing x and y coordinates.
|
7
6
|
#
|
8
|
-
# The values are specified as [x, y]
|
9
|
-
# To create a point call Geom::Point2d.new
|
7
|
+
# The values are specified as +[x, y]+. For example [1, 1].
|
8
|
+
# To create a point call +Geom::Point2d.new+, where the creation method
|
10
9
|
# can take a variety of arguments:
|
11
10
|
#
|
12
11
|
# @example
|
@@ -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 Point3d class allows you to work with a point in 3D space.
|
@@ -31,8 +31,10 @@ class Geom::Point3d
|
|
31
31
|
|
32
32
|
# Class Methods
|
33
33
|
|
34
|
-
# The linear_combination method is used to create a new point as a linear
|
35
|
-
# combination of two points.
|
34
|
+
# The {.linear_combination} method is used to create a new point as a linear
|
35
|
+
# combination of two points.
|
36
|
+
#
|
37
|
+
# This method is generally used to get a point at
|
36
38
|
# some percentage along a line connecting the two points.
|
37
39
|
#
|
38
40
|
# A linear combination is a standard term for vector math. It is defined as
|
@@ -41,26 +43,24 @@ class Geom::Point3d
|
|
41
43
|
# @example
|
42
44
|
# point1 = Geom::Point3d.new(1,1,1)
|
43
45
|
# point2 = Geom::Point3d.new(10,10,10)
|
44
|
-
#
|
45
|
-
# #
|
46
|
+
#
|
47
|
+
# # Get the point that is half the way from point1 to point2.
|
48
|
+
# points = Geom::Point3d.linear_combination(0.5, point1, 0.5, point2)
|
49
|
+
#
|
50
|
+
# # Get the point that is 3/4 the way from point1 to point2.
|
46
51
|
# point = Geom::Point3d.linear_combination(0.25, point1, 0.75, point2)
|
47
|
-
#
|
48
|
-
#
|
49
|
-
#
|
50
|
-
#
|
51
|
-
# end
|
52
|
+
#
|
53
|
+
# # Get the point that is 70% the way from point1 to point2.
|
54
|
+
# percentage = 0.7
|
55
|
+
# point = Geom::Point3d.linear_combination(1.0 - percentage, point1, percentage, point2)
|
52
56
|
#
|
53
57
|
# @param [Float] weight1
|
54
|
-
# A weight or percentage.
|
55
58
|
#
|
56
|
-
# @param [
|
57
|
-
# The start point on the line.
|
59
|
+
# @param [Geom::Point3d] point1
|
58
60
|
#
|
59
61
|
# @param [Float] weight2
|
60
|
-
# A weight or percentage.
|
61
62
|
#
|
62
|
-
# @param [
|
63
|
-
# The end point of the line.
|
63
|
+
# @param [Geom::Point3d] point2
|
64
64
|
#
|
65
65
|
# @return [Geom::Point3d]
|
66
66
|
#
|
@@ -226,7 +226,7 @@ class Geom::Point3d
|
|
226
226
|
# @param [Geom::Point3d] point2
|
227
227
|
# The Point3d object to compute the distance to.
|
228
228
|
#
|
229
|
-
# @return [Length]
|
229
|
+
# @return [Length]
|
230
230
|
#
|
231
231
|
# @version SketchUp 6.0
|
232
232
|
def distance(point2)
|
@@ -484,7 +484,7 @@ class Geom::Point3d
|
|
484
484
|
#
|
485
485
|
# @overload set!(point3d)
|
486
486
|
#
|
487
|
-
# @param
|
487
|
+
# @param [Geom::Point3d] point3d
|
488
488
|
# @return [Geom::Point3d]
|
489
489
|
#
|
490
490
|
# @version SketchUp 6.0
|
@@ -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 {#Geom::PolygonMesh} class contains methods to create polygon mesh
|
@@ -9,17 +9,18 @@
|
|
9
9
|
# a mesh from it, and draws faces based on the mesh.
|
10
10
|
#
|
11
11
|
# You can construct a mesh manually using the methods of this class, or you
|
12
|
-
# can get a mesh from a face by calling the Face
|
12
|
+
# can get a mesh from a face by calling the {Sketchup::Face#mesh} method. See
|
13
13
|
# {Sketchup::Entities#add_faces_from_mesh} for an easy way to convert a mesh
|
14
14
|
# back into faces.
|
15
15
|
#
|
16
16
|
# @example
|
17
|
-
#
|
18
|
-
#
|
17
|
+
# entities = Sketchup.active_model.active_entities
|
18
|
+
# face = entities.grep(Sketchup::Face).first
|
19
19
|
#
|
20
|
-
#
|
21
|
-
#
|
22
|
-
# group
|
20
|
+
# mesh = face.mesh
|
21
|
+
#
|
22
|
+
# group = entities.add_group
|
23
|
+
# group.entities.add_faces_from_mesh(mesh)
|
23
24
|
#
|
24
25
|
# @version SketchUp 6.0
|
25
26
|
class Geom::PolygonMesh
|
@@ -166,13 +167,23 @@ class Geom::PolygonMesh
|
|
166
167
|
def count_polygons
|
167
168
|
end
|
168
169
|
|
169
|
-
# Create a new empty polygon mesh.
|
170
|
-
#
|
171
|
-
#
|
170
|
+
# Create a new empty polygon mesh.
|
171
|
+
#
|
172
|
+
# The number of points and polygons are optional and are used as a hint to
|
173
|
+
# decide how much space to pre-allocate to speed up adding points and polygons.
|
174
|
+
#
|
175
|
+
# As of SketchUp 2021.1 the performance of looking up and inserting points is
|
176
|
+
# significantly better provided the mesh was initialized with roughly the
|
177
|
+
# correct number of total points.
|
172
178
|
#
|
173
179
|
# @example
|
174
180
|
# mesh = Geom::PolygonMesh.new
|
175
181
|
#
|
182
|
+
# @note When creating a mesh with normals and/or UVQ data it's critical that
|
183
|
+
# the number of points estimated is equal to or higher than the final number
|
184
|
+
# of points added. If fewer points are estimated the normals and UVQ data
|
185
|
+
# might end up out of sync.
|
186
|
+
#
|
176
187
|
# @overload initialize
|
177
188
|
#
|
178
189
|
# @return [Geom::PolygonMesh]
|
@@ -353,6 +364,8 @@ class Geom::PolygonMesh
|
|
353
364
|
# index = mesh.add_point(point1)
|
354
365
|
# mesh.set_point(index, point2)
|
355
366
|
#
|
367
|
+
# @note Index starts at 1.
|
368
|
+
#
|
356
369
|
# @param [Integer] index
|
357
370
|
# The index where the point will be set.
|
358
371
|
#
|
@@ -408,6 +421,8 @@ class Geom::PolygonMesh
|
|
408
421
|
# @note If you don't specify how many points you will be adding to the mesh
|
409
422
|
# when you initiate it you may risk the UV data becoming out of sync.
|
410
423
|
#
|
424
|
+
# @note Index starts at 1.
|
425
|
+
#
|
411
426
|
# @param [Integer] index
|
412
427
|
# An Integer representing the UV index.
|
413
428
|
#
|
@@ -458,6 +473,8 @@ class Geom::PolygonMesh
|
|
458
473
|
# @example
|
459
474
|
# point = mesh.uv_at(1, true)
|
460
475
|
#
|
476
|
+
# @note Index starts at 1.
|
477
|
+
#
|
461
478
|
# @param [Integer] index
|
462
479
|
# The index for the texture coordinate.
|
463
480
|
#
|
@@ -1,8 +1,7 @@
|
|
1
|
-
# Copyright:: Copyright
|
1
|
+
# Copyright:: Copyright 2021 Trimble Inc.
|
2
2
|
# License:: The MIT License (MIT)
|
3
3
|
|
4
|
-
# The Vector2d class represents vectors in a 2 dimensional space.
|
5
|
-
# Vectors in LayOut have a direction and a length, but not a starting point.
|
4
|
+
# The {Geom::Vector2d} class represents vectors in a 2 dimensional space.
|
6
5
|
#
|
7
6
|
# There are numerous tutorials on 2D vectors available on the internet.
|
8
7
|
#
|
@@ -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 Vector3d class is used to represent vectors in a 3 dimensional space.
|
@@ -333,7 +333,7 @@ class Geom::Vector3d
|
|
333
333
|
#
|
334
334
|
# @overload initialize(vector)
|
335
335
|
#
|
336
|
-
# @param
|
336
|
+
# @param [Geom::Vector3d] vector A Vector3d object.
|
337
337
|
# @return [Geom::Vector3d]
|
338
338
|
#
|
339
339
|
# @version SketchUp 6.0
|
@@ -504,12 +504,12 @@ class Geom::Vector3d
|
|
504
504
|
#
|
505
505
|
# @overload set!(array3d)
|
506
506
|
#
|
507
|
-
# @param
|
507
|
+
# @param [Array(Numeric, Numeric, Numeric)] array3d
|
508
508
|
# @return [Geom::Vector3d]
|
509
509
|
#
|
510
510
|
# @overload set!(vector)
|
511
511
|
#
|
512
|
-
# @param
|
512
|
+
# @param [Geom::Vector3d] vector
|
513
513
|
# @return [Geom::Vector3d]
|
514
514
|
#
|
515
515
|
# @overload set!(x, y, z)
|
@@ -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 an angular dimension entity. An {Layout::AngularDimension} is
|
@@ -536,6 +536,10 @@ class Layout::AngularDimension < Layout::Entity
|
|
536
536
|
# dim = Layout::AngularDimension.new(start_point, end_point, start_extent, end_extent, inner_angle)
|
537
537
|
# text = dim.text
|
538
538
|
#
|
539
|
+
# @note With the addition of auto-text in dimensions for LayOut 2019.2, the
|
540
|
+
# copy of the dimension text incorrectly provided the plain text when
|
541
|
+
# requesting the display text. This has been fixed for LayOut 2020.1.
|
542
|
+
#
|
539
543
|
# @return [Layout::FormattedText]
|
540
544
|
#
|
541
545
|
# @version LayOut 2018
|