sketchup-api-stubs 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/SketchUp/Geom/BoundingBox.rb +335 -0
- data/SketchUp/Geom/LatLong.rb +123 -0
- data/SketchUp/Geom/Point3d.rb +643 -0
- data/SketchUp/Geom/PolygonMesh.rb +478 -0
- data/SketchUp/Geom/Transformation.rb +476 -0
- data/SketchUp/Geom/UTM.rb +135 -0
- data/SketchUp/Geom/Vector3d.rb +684 -0
- data/SketchUp/Sketchup/Animation.rb +137 -0
- data/SketchUp/Sketchup/AppObserver.rb +157 -0
- data/SketchUp/Sketchup/ArcCurve.rb +209 -0
- data/SketchUp/Sketchup/AttributeDictionaries.rb +146 -0
- data/SketchUp/Sketchup/AttributeDictionary.rb +280 -0
- data/SketchUp/Sketchup/Axes.rb +149 -0
- data/SketchUp/Sketchup/Behavior.rb +338 -0
- data/SketchUp/Sketchup/Camera.rb +594 -0
- data/SketchUp/Sketchup/ClassificationSchema.rb +63 -0
- data/SketchUp/Sketchup/Classifications.rb +118 -0
- data/SketchUp/Sketchup/Color.rb +291 -0
- data/SketchUp/Sketchup/ComponentDefinition.rb +562 -0
- data/SketchUp/Sketchup/ComponentInstance.rb +597 -0
- data/SketchUp/Sketchup/Console.rb +78 -0
- data/SketchUp/Sketchup/ConstructionLine.rb +257 -0
- data/SketchUp/Sketchup/ConstructionPoint.rb +32 -0
- data/SketchUp/Sketchup/Curve.rb +196 -0
- data/SketchUp/Sketchup/DefinitionList.rb +312 -0
- data/SketchUp/Sketchup/DefinitionObserver.rb +73 -0
- data/SketchUp/Sketchup/DefinitionsObserver.rb +102 -0
- data/SketchUp/Sketchup/Dimension.rb +167 -0
- data/SketchUp/Sketchup/DimensionLinear.rb +232 -0
- data/SketchUp/Sketchup/DimensionObserver.rb +38 -0
- data/SketchUp/Sketchup/DimensionRadial.rb +87 -0
- data/SketchUp/Sketchup/Drawingelement.rb +400 -0
- data/SketchUp/Sketchup/Edge.rb +517 -0
- data/SketchUp/Sketchup/EdgeUse.rb +213 -0
- data/SketchUp/Sketchup/Entities.rb +1011 -0
- data/SketchUp/Sketchup/EntitiesObserver.rb +125 -0
- data/SketchUp/Sketchup/Entity.rb +522 -0
- data/SketchUp/Sketchup/EntityObserver.rb +59 -0
- data/SketchUp/Sketchup/ExtensionsManager.rb +129 -0
- data/SketchUp/Sketchup/Face.rb +737 -0
- data/SketchUp/Sketchup/FrameChangeObserver.rb +104 -0
- data/SketchUp/Sketchup/Group.rb +705 -0
- data/SketchUp/Sketchup/Http.rb +27 -0
- data/SketchUp/Sketchup/Http/Request.rb +285 -0
- data/SketchUp/Sketchup/Http/Response.rb +62 -0
- data/SketchUp/Sketchup/Image.rb +393 -0
- data/SketchUp/Sketchup/Importer.rb +192 -0
- data/SketchUp/Sketchup/InputPoint.rb +393 -0
- data/SketchUp/Sketchup/InstanceObserver.rb +82 -0
- data/SketchUp/Sketchup/InstancePath.rb +297 -0
- data/SketchUp/Sketchup/Layer.rb +240 -0
- data/SketchUp/Sketchup/Layers.rb +235 -0
- data/SketchUp/Sketchup/LayersObserver.rb +136 -0
- data/SketchUp/Sketchup/Licensing.rb +47 -0
- data/SketchUp/Sketchup/Licensing/ExtensionLicense.rb +88 -0
- data/SketchUp/Sketchup/Loop.rb +141 -0
- data/SketchUp/Sketchup/Material.rb +384 -0
- data/SketchUp/Sketchup/Materials.rb +283 -0
- data/SketchUp/Sketchup/MaterialsObserver.rb +141 -0
- data/SketchUp/Sketchup/Menu.rb +97 -0
- data/SketchUp/Sketchup/Model.rb +1459 -0
- data/SketchUp/Sketchup/ModelObserver.rb +356 -0
- data/SketchUp/Sketchup/OptionsManager.rb +135 -0
- data/SketchUp/Sketchup/OptionsProvider.rb +277 -0
- data/SketchUp/Sketchup/OptionsProviderObserver.rb +58 -0
- data/SketchUp/Sketchup/Page.rb +636 -0
- data/SketchUp/Sketchup/Pages.rb +349 -0
- data/SketchUp/Sketchup/PagesObserver.rb +76 -0
- data/SketchUp/Sketchup/PickHelper.rb +457 -0
- data/SketchUp/Sketchup/RegionalSettings.rb +43 -0
- data/SketchUp/Sketchup/RenderingOptions.rb +337 -0
- data/SketchUp/Sketchup/RenderingOptionsObserver.rb +44 -0
- data/SketchUp/Sketchup/SectionPlane.rb +88 -0
- data/SketchUp/Sketchup/Selection.rb +470 -0
- data/SketchUp/Sketchup/SelectionObserver.rb +115 -0
- data/SketchUp/Sketchup/Set.rb +253 -0
- data/SketchUp/Sketchup/ShadowInfo.rb +257 -0
- data/SketchUp/Sketchup/ShadowInfoObserver.rb +57 -0
- data/SketchUp/Sketchup/Style.rb +77 -0
- data/SketchUp/Sketchup/Styles.rb +204 -0
- data/SketchUp/Sketchup/Text.rb +241 -0
- data/SketchUp/Sketchup/Texture.rb +211 -0
- data/SketchUp/Sketchup/TextureWriter.rb +237 -0
- data/SketchUp/Sketchup/Tool.rb +808 -0
- data/SketchUp/Sketchup/Tools.rb +120 -0
- data/SketchUp/Sketchup/ToolsObserver.rb +154 -0
- data/SketchUp/Sketchup/UVHelper.rb +61 -0
- data/SketchUp/Sketchup/Vertex.rb +143 -0
- data/SketchUp/Sketchup/View.rb +965 -0
- data/SketchUp/Sketchup/ViewObserver.rb +40 -0
- data/SketchUp/UI/Command.rb +307 -0
- data/SketchUp/UI/HtmlDialog.rb +346 -0
- data/SketchUp/UI/Notification.rb +229 -0
- data/SketchUp/UI/Toolbar.rb +243 -0
- data/SketchUp/UI/WebDialog.rb +623 -0
- data/SketchUp/_top_level.rb +193 -0
- data/SketchUp/array.rb +593 -0
- data/SketchUp/geom.rb +231 -0
- data/SketchUp/languagehandler.rb +92 -0
- data/SketchUp/length.rb +210 -0
- data/SketchUp/numeric.rb +249 -0
- data/SketchUp/sketchup.rb +1290 -0
- data/SketchUp/sketchupextension.rb +355 -0
- data/SketchUp/string.rb +24 -0
- data/SketchUp/ui.rb +637 -0
- metadata +176 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 9e767a530efec610dbe924a90a2132297bf68bef
|
4
|
+
data.tar.gz: 9124efa94bc161ab407921398a40f6f05b22c6f5
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 63264aa870bb4c805b8bbf8eb3feff1cfa7388ec511e858694c0948d8910243a278a60818de5430367e1121ec8b67c8e41c4968815c7da37ab557ba559230c88
|
7
|
+
data.tar.gz: 45e6aca141709127131dd39233f92dae97c767d9315b9a5ebe6c9d928684b6d9bb18e2d15e9e9a49c931f87429b40d7fb79e81cc27202fdd968d68f7a3cd0b36
|
@@ -0,0 +1,335 @@
|
|
1
|
+
# Copyright:: Copyright 2017 Trimble Inc.
|
2
|
+
# License:: The MIT License (MIT)
|
3
|
+
|
4
|
+
# Bounding boxes are three-dimensional boxes (eight corners), aligned with the
|
5
|
+
# global axes, that surround entities within your model. There is a default
|
6
|
+
# bounding box for any new model that will surround all entities,
|
7
|
+
# including all groups and components. Additionally, there are
|
8
|
+
# bounding boxes for Drawingelement objects, including components and groups.
|
9
|
+
# Bounding boxes are only large enough to exactly bound the entities within
|
10
|
+
# your model, group, or component.
|
11
|
+
#
|
12
|
+
# You can also create arbitrary BoundingBox objects by calling BoundingBox.new.
|
13
|
+
#
|
14
|
+
# @example
|
15
|
+
# # You can get the bounding box on a model.
|
16
|
+
# model = Sketchup.active_model
|
17
|
+
# model_bb = model.bounds
|
18
|
+
#
|
19
|
+
# # Or you can get the bounding box on any Drawingelement object.
|
20
|
+
# first_entity = model.entities[0]
|
21
|
+
# first_entity_bb = first_entity.bounds
|
22
|
+
#
|
23
|
+
# # Or you can create an empty bounding box of your own.
|
24
|
+
# boundingbox = Geom::BoundingBox.new
|
25
|
+
#
|
26
|
+
# @note that the bounding box returned for face-me components is the center of
|
27
|
+
# its entire range of motion. This behavior changed in SketchUp 7.1. In 7.0
|
28
|
+
# and earlier, the .bounds method would return the bounds around the
|
29
|
+
# face-me component's current, visible center.
|
30
|
+
#
|
31
|
+
# @version SketchUp 6.0
|
32
|
+
class Geom::BoundingBox
|
33
|
+
|
34
|
+
# Instance Methods
|
35
|
+
|
36
|
+
# The add method is used to add a point, vertex, or other bounding boxes to the
|
37
|
+
# bounding box. The size of the bounding box will increase as necessary to
|
38
|
+
# accommodate the new items.
|
39
|
+
#
|
40
|
+
# Adding one point to an empty bounding box does not increase the size of the
|
41
|
+
# bounding box. You must add at least two points before methods such as
|
42
|
+
# BoundingBox.diagonal will return a size greater than zero.
|
43
|
+
#
|
44
|
+
# @example
|
45
|
+
# model = Sketchup.active_model
|
46
|
+
# boundingbox = model.bounds
|
47
|
+
# point1 = Geom::Point3d.new(100, 200, 300)
|
48
|
+
# point2 = Geom::Point3d.new(200, 400, 200)
|
49
|
+
# boundingbox.add(point1, point2)
|
50
|
+
#
|
51
|
+
# @overload add(point_or_bb)
|
52
|
+
#
|
53
|
+
# @param [Geom::Point3d, Geom::BoundingBox, Sketchup::Vertex] point_or_bb
|
54
|
+
#
|
55
|
+
# @overload add(points_or_bb)
|
56
|
+
#
|
57
|
+
# @param [Array<Geom::Point3d, Geom::BoundingBox, Sketchup::Vertex>]
|
58
|
+
# points_or_bb
|
59
|
+
#
|
60
|
+
# @return boundingbox - the new, resized, BoundingBox object if successful
|
61
|
+
#
|
62
|
+
# @version SketchUp 6.0
|
63
|
+
def add(*args)
|
64
|
+
end
|
65
|
+
|
66
|
+
# The center method is used to retrieve the Point3d object at the center of
|
67
|
+
# the bounding box.
|
68
|
+
#
|
69
|
+
# @example
|
70
|
+
# boundingbox = Geom::BoundingBox.new
|
71
|
+
# boundingbox.add([100, 200, -400], [200, 400, 100])
|
72
|
+
# # This will return a point Point3d(150, 300, -150).
|
73
|
+
# point = boundingbox.center
|
74
|
+
#
|
75
|
+
# @return point - the Point3d at the center of the bounding box
|
76
|
+
# if successful
|
77
|
+
#
|
78
|
+
# @version SketchUp 6.0
|
79
|
+
def center
|
80
|
+
end
|
81
|
+
|
82
|
+
# The clear method is used to clear a bounding box.
|
83
|
+
#
|
84
|
+
# A cleared BoundingBox does not have a size greater than zero until you add
|
85
|
+
# at least two points or another bounding box.
|
86
|
+
#
|
87
|
+
# @example
|
88
|
+
# boundingbox = Geom::BoundingBox.new
|
89
|
+
# boundingbox.add([100, 200, -400], [200, 400, 100])
|
90
|
+
#
|
91
|
+
# # This will return false.
|
92
|
+
# boundingbox.empty?
|
93
|
+
#
|
94
|
+
# boundingbox.clear
|
95
|
+
# # This will return true.
|
96
|
+
# boundingbox.empty?
|
97
|
+
#
|
98
|
+
# @return boundingbox - the BoundingBox object which was cleared
|
99
|
+
#
|
100
|
+
# @version SketchUp 6.0
|
101
|
+
def clear
|
102
|
+
end
|
103
|
+
|
104
|
+
# This method is used to determine if a bounding box contains a specific
|
105
|
+
# Point3d or BoundingBox object.
|
106
|
+
#
|
107
|
+
# @example
|
108
|
+
# boundingbox = Geom::BoundingBox.new
|
109
|
+
# boundingbox.add([100, 200, -400], [200, 400, 100])
|
110
|
+
# # This will return false.
|
111
|
+
# boundingbox.contains?([300, 100, 400])
|
112
|
+
# # This will return true.
|
113
|
+
# boundingbox.contains?([150, 300, -200])
|
114
|
+
#
|
115
|
+
# @param [Geom::Point3d, Geom::BoundingBox] point_or_bb
|
116
|
+
#
|
117
|
+
# @return status - true if successful (bounding box contains a
|
118
|
+
# Point3d or BoundingBox object), or false if unsuccessful.
|
119
|
+
#
|
120
|
+
# @return [Boolean]
|
121
|
+
#
|
122
|
+
# @version SketchUp 6.0
|
123
|
+
def contains?(point_or_bb)
|
124
|
+
end
|
125
|
+
|
126
|
+
# The corner method is used to retrieve a point object at a specified corner
|
127
|
+
# of the bounding box.
|
128
|
+
#
|
129
|
+
# There are 8 corners to a bounding box, identified by the numbers 0 through 7.
|
130
|
+
# Points are returned in the currently set units (inches, by default). These
|
131
|
+
# are which index refers to which corner:
|
132
|
+
#
|
133
|
+
# - 0 = [0, 0, 0] (left front bottom)
|
134
|
+
# - 1 = [1, 0, 0] (right front bottom)
|
135
|
+
# - 2 = [0, 1, 0] (left back bottom)
|
136
|
+
# - 3 = [1, 1, 0] (right back bottom)
|
137
|
+
# - 4 = [0, 0, 1] (left front top)
|
138
|
+
# - 5 = [1, 0, 1] (right front top)
|
139
|
+
# - 6 = [0, 1, 1] (left back top)
|
140
|
+
# - 7 = [1, 1, 1] (right back top)
|
141
|
+
#
|
142
|
+
# @example
|
143
|
+
# boundingbox = Geom::BoundingBox.new
|
144
|
+
# boundingbox.add([100, 200, -400], [200, 400, 100])
|
145
|
+
# # This will return Point3d(100, 200, -400).
|
146
|
+
# boundingbox.corner(0)
|
147
|
+
# # This will return Point3d(100, 200, -400).
|
148
|
+
# boundingbox.corner(6)
|
149
|
+
#
|
150
|
+
# @param corner_index
|
151
|
+
# A number (from 0 to 7) representing point at the
|
152
|
+
# corner you want to retrieve.
|
153
|
+
#
|
154
|
+
# @return point - a Point3d object if successful
|
155
|
+
#
|
156
|
+
# @version SketchUp 6.0
|
157
|
+
def corner(corner_index)
|
158
|
+
end
|
159
|
+
|
160
|
+
# The depth method is used to retrieve the depth of the bounding box.
|
161
|
+
#
|
162
|
+
# The depth is returned in the currently set units (inches, by default).
|
163
|
+
#
|
164
|
+
# @example
|
165
|
+
# boundingbox = Geom::BoundingBox.new
|
166
|
+
# boundingbox.add([100, 200, -400], [200, 400, 100])
|
167
|
+
# # This will return a Length of 500.0.
|
168
|
+
# length = boundingbox.depth
|
169
|
+
#
|
170
|
+
# @return depth - the depth of the bounding box if successful
|
171
|
+
#
|
172
|
+
# @version SketchUp 6.0
|
173
|
+
def depth
|
174
|
+
end
|
175
|
+
|
176
|
+
# The diagonal method is used to get the length of the diagonal of the
|
177
|
+
# bounding box.
|
178
|
+
#
|
179
|
+
# The diagonal is returned in the currently set units (inches, by default).
|
180
|
+
#
|
181
|
+
# @example
|
182
|
+
# boundingbox = Geom::BoundingBox.new
|
183
|
+
# boundingbox.add([100, 200, -400], [200, 400, 100])
|
184
|
+
# # This will return a point a Length of ~547.72.
|
185
|
+
# length = boundingbox.diagonal
|
186
|
+
#
|
187
|
+
# @return diagonal - the size of the diagonal for the bounding
|
188
|
+
# box if successful
|
189
|
+
#
|
190
|
+
# @version SketchUp 6.0
|
191
|
+
def diagonal
|
192
|
+
end
|
193
|
+
|
194
|
+
# The empty? method is used to determine if a bounding box is empty (such as
|
195
|
+
# if the bounds have not been set.) This returns the opposite of the valid?
|
196
|
+
# method.
|
197
|
+
#
|
198
|
+
# @example
|
199
|
+
# boundingbox = Geom::BoundingBox.new
|
200
|
+
# boundingbox.add([100, 200, -400], [200, 400, 100])
|
201
|
+
# # This will return false.
|
202
|
+
# boundingbox.empty?
|
203
|
+
#
|
204
|
+
# @return status - true if the bounding box is empty, false if it
|
205
|
+
# is not empty
|
206
|
+
#
|
207
|
+
# @return [Boolean]
|
208
|
+
#
|
209
|
+
# @version SketchUp 6.0
|
210
|
+
def empty?
|
211
|
+
end
|
212
|
+
|
213
|
+
# The height method is used to retrieve the height of the bounding box.
|
214
|
+
#
|
215
|
+
# The height is returned in the currently set units (inches, by default).
|
216
|
+
#
|
217
|
+
# @example
|
218
|
+
# boundingbox = Geom::BoundingBox.new
|
219
|
+
# boundingbox.add([100, 200, -400], [200, 400, 100])
|
220
|
+
# # This will return a Length of 200.0.
|
221
|
+
# length = boundingbox.height
|
222
|
+
#
|
223
|
+
# @return height - the height of the bounding box
|
224
|
+
#
|
225
|
+
# @version SketchUp 6.0
|
226
|
+
def height
|
227
|
+
end
|
228
|
+
|
229
|
+
# The new method is used to create a new, empty, bounding box.
|
230
|
+
#
|
231
|
+
# @example
|
232
|
+
# boundingbox = Geom::BoundingBox.new
|
233
|
+
#
|
234
|
+
# @return boundingbox - a BoundingBox object if successful
|
235
|
+
#
|
236
|
+
# @version SketchUp 6.0
|
237
|
+
def initialize
|
238
|
+
end
|
239
|
+
|
240
|
+
# The intersect method is used to retrieve a bounding box that is the result
|
241
|
+
# of intersecting one bounding box with another.
|
242
|
+
#
|
243
|
+
# @example
|
244
|
+
# boundingbox1 = Geom::BoundingBox.new
|
245
|
+
# boundingbox1.add([100, 200, -400], [200, 400, 300])
|
246
|
+
# boundingbox2 = Geom::BoundingBox.new
|
247
|
+
# boundingbox2.add([150, 350, 100], [200, 400, 500])
|
248
|
+
# # The returned boundingbox is a result of the intersection of the two.
|
249
|
+
# boundingbox = boundingbox1.intersect(boundingbox2)
|
250
|
+
#
|
251
|
+
# @note Prior to SU2015 this method would return incorrect result in some
|
252
|
+
# cases. For correct result in these versions you must first check if the
|
253
|
+
# boundingboxes actually overlap - then call this to get the resulting
|
254
|
+
# boundingbox.
|
255
|
+
#
|
256
|
+
# @param boundingbox
|
257
|
+
# A second boundbox which might intersect boundingbox1.
|
258
|
+
#
|
259
|
+
# @return boundingbox - the resulting BoundingBox object if
|
260
|
+
# successful, an empty BoundingBox object if unsuccessful.
|
261
|
+
#
|
262
|
+
# @version SketchUp 6.0
|
263
|
+
def intersect(boundingbox)
|
264
|
+
end
|
265
|
+
|
266
|
+
# The max method is used to retrieve the Point3d object where x, y and z are
|
267
|
+
# maximum in the bounding box.
|
268
|
+
#
|
269
|
+
# If you attempt to call the max method on an empty bounding box, you will
|
270
|
+
# receive a very large negative number.
|
271
|
+
#
|
272
|
+
# @example
|
273
|
+
# boundingbox = Geom::BoundingBox.new
|
274
|
+
# boundingbox.add([100, 200, -400], [700, 900, 800], [200, 400, 100])
|
275
|
+
# # This will return a point Point3d(700, 900, 800).
|
276
|
+
# point = boundingbox.max
|
277
|
+
#
|
278
|
+
# @return point - a Point3d object representing the point where
|
279
|
+
# x, y, and z are the maximum in the bounding box.
|
280
|
+
#
|
281
|
+
# @version SketchUp 6.0
|
282
|
+
def max
|
283
|
+
end
|
284
|
+
|
285
|
+
# The min method is used to retrieve the Point3d where x, y and z are minimum
|
286
|
+
# in the bounding box.
|
287
|
+
#
|
288
|
+
# @example
|
289
|
+
# boundingbox = Geom::BoundingBox.new
|
290
|
+
# boundingbox.add([100, 200, -400], [700, 900, 800], [200, 400, 100])
|
291
|
+
# # This will return a point Point3d(100, 200, -400).
|
292
|
+
# point = boundingbox.min
|
293
|
+
#
|
294
|
+
# @return point - a Point3d object representing the point where
|
295
|
+
# x, y, and z are the maximum in the bounding box.
|
296
|
+
#
|
297
|
+
# @version SketchUp 6.0
|
298
|
+
def min
|
299
|
+
end
|
300
|
+
|
301
|
+
# The valid method is used to determine if a bounding box is valid (contains
|
302
|
+
# points).
|
303
|
+
#
|
304
|
+
# @example
|
305
|
+
# boundingbox = Geom::BoundingBox.new
|
306
|
+
# boundingbox.add([100, 200, -400], [200, 400, 100])
|
307
|
+
# # This will return true.
|
308
|
+
# boundingbox.valid?
|
309
|
+
#
|
310
|
+
# @return status - true if the bounding box is valid (not empty),
|
311
|
+
# false if it is not valid (empty)
|
312
|
+
#
|
313
|
+
# @return [Boolean]
|
314
|
+
#
|
315
|
+
# @version SketchUp 6.0
|
316
|
+
def valid?
|
317
|
+
end
|
318
|
+
|
319
|
+
# The width method is used to retrieve the width of the bounding box.
|
320
|
+
#
|
321
|
+
# The width is returned in the currently set units (inches, by default).
|
322
|
+
#
|
323
|
+
# @example
|
324
|
+
# boundingbox = Geom::BoundingBox.new
|
325
|
+
# boundingbox.add([100, 200, -400], [200, 400, 100])
|
326
|
+
# # This will return a Length of 100.0.
|
327
|
+
# length = boundingbox.width
|
328
|
+
#
|
329
|
+
# @return width - the width of the bounding box
|
330
|
+
#
|
331
|
+
# @version SketchUp 6.0
|
332
|
+
def width
|
333
|
+
end
|
334
|
+
|
335
|
+
end
|
@@ -0,0 +1,123 @@
|
|
1
|
+
# Copyright:: Copyright 2017 Trimble Inc.
|
2
|
+
# License:: The MIT License (MIT)
|
3
|
+
|
4
|
+
# The LatLong class contains various methods for creating and manipulating
|
5
|
+
# latitude and longitude coordinates.
|
6
|
+
#
|
7
|
+
# @version SketchUp 6.0
|
8
|
+
class Geom::LatLong
|
9
|
+
|
10
|
+
# Instance Methods
|
11
|
+
|
12
|
+
# The new method creates a LatLong object.
|
13
|
+
#
|
14
|
+
# @example
|
15
|
+
# ll = [40.01700, 105.28300]
|
16
|
+
# latlong = Geom::LatLong.new(ll)
|
17
|
+
# if (latlong)
|
18
|
+
# UI.messagebox latlong
|
19
|
+
# else
|
20
|
+
# UI.messagebox "Failure"
|
21
|
+
# end
|
22
|
+
#
|
23
|
+
# @param latlong
|
24
|
+
# A latitude and longitude coordinate set as an Array.
|
25
|
+
#
|
26
|
+
# @return latlong - a LatLong object
|
27
|
+
#
|
28
|
+
# @version SketchUp 6.0
|
29
|
+
def initialize(latlong)
|
30
|
+
end
|
31
|
+
|
32
|
+
# The Latitude method retrieves the latitude coordinate from a LatLong object.
|
33
|
+
#
|
34
|
+
# @example
|
35
|
+
# ll = [40.01700, 105.28300]
|
36
|
+
# latlong = Geom::LatLong.new(ll)
|
37
|
+
# latitude = latlong.latitude
|
38
|
+
# if (latitude)
|
39
|
+
# UI.messagebox latitude
|
40
|
+
# else
|
41
|
+
# UI.messagebox "Failure"
|
42
|
+
# end
|
43
|
+
#
|
44
|
+
# @return latitude - a latitude coordinate value
|
45
|
+
#
|
46
|
+
# @version SketchUp 6.0
|
47
|
+
def latitude
|
48
|
+
end
|
49
|
+
|
50
|
+
# The Latitude method retrieves the longitude coordinate from a LatLong
|
51
|
+
# object.
|
52
|
+
#
|
53
|
+
# @example
|
54
|
+
# ll = [40.01700, 105.28300]
|
55
|
+
# latlong = Geom::LatLong.new(ll)
|
56
|
+
# longitude = latlong.longitude
|
57
|
+
# if (longitude)
|
58
|
+
# UI.messagebox longitude
|
59
|
+
# else
|
60
|
+
# UI.messagebox "Failure"
|
61
|
+
# end
|
62
|
+
#
|
63
|
+
# @return longitude - a latitude coordinate value
|
64
|
+
#
|
65
|
+
# @version SketchUp 6.0
|
66
|
+
def longitude
|
67
|
+
end
|
68
|
+
|
69
|
+
# The to_a method converts a LatLong object to an array of two values.
|
70
|
+
#
|
71
|
+
# @example
|
72
|
+
# ll = [40.01700, 105.28300]
|
73
|
+
# latlong = Geom::LatLong.new(ll)
|
74
|
+
# a = latlong.to_a
|
75
|
+
# if (a)
|
76
|
+
# UI.messagebox a
|
77
|
+
# else
|
78
|
+
# UI.messagebox "Failure"
|
79
|
+
# end
|
80
|
+
#
|
81
|
+
# @return array - an array of two values: latitude and longitude
|
82
|
+
#
|
83
|
+
# @version SketchUp 6.0
|
84
|
+
def to_a
|
85
|
+
end
|
86
|
+
|
87
|
+
# The to_a method converts a LatLong object to a string.
|
88
|
+
#
|
89
|
+
# @example
|
90
|
+
# ll = [40.01700, 105.28300]
|
91
|
+
# latlong = Geom::LatLong.new(ll)
|
92
|
+
# s = latlong.to_s
|
93
|
+
# if (s)
|
94
|
+
# UI.messagebox s
|
95
|
+
# else
|
96
|
+
# UI.messagebox "Failure"
|
97
|
+
# end
|
98
|
+
#
|
99
|
+
# @return string - a string representation of a LatLong object
|
100
|
+
#
|
101
|
+
# @version SketchUp 6.0
|
102
|
+
def to_s
|
103
|
+
end
|
104
|
+
|
105
|
+
# The to_utm method converts a LatLong object to an array of two values.
|
106
|
+
#
|
107
|
+
# @example
|
108
|
+
# ll = [40.01700, 105.28300]
|
109
|
+
# latlong = Geom::LatLong.new(ll)
|
110
|
+
# utm = latlong.to_utm
|
111
|
+
# if (utm)
|
112
|
+
# UI.messagebox utm
|
113
|
+
# else
|
114
|
+
# UI.messagebox "Failure"
|
115
|
+
# end
|
116
|
+
#
|
117
|
+
# @return array - an array of two values: latitude and longitude
|
118
|
+
#
|
119
|
+
# @version SketchUp 6.0
|
120
|
+
def to_utm
|
121
|
+
end
|
122
|
+
|
123
|
+
end
|