sketchup-api-stubs 0.6.1 → 0.7.4
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/.yardopts +2 -0
- data/lib/sketchup-api-stubs.rb +1 -1
- data/lib/sketchup-api-stubs/sketchup.rb +145 -145
- data/lib/sketchup-api-stubs/stubs/Geom/BoundingBox.rb +318 -318
- data/lib/sketchup-api-stubs/stubs/Geom/Bounds2d.rb +172 -172
- data/lib/sketchup-api-stubs/stubs/Geom/LatLong.rb +126 -126
- data/lib/sketchup-api-stubs/stubs/Geom/OrientedBounds2d.rb +102 -102
- data/lib/sketchup-api-stubs/stubs/Geom/Point2d.rb +400 -401
- data/lib/sketchup-api-stubs/stubs/Geom/Point3d.rb +661 -661
- data/lib/sketchup-api-stubs/stubs/Geom/PolygonMesh.rb +492 -492
- data/lib/sketchup-api-stubs/stubs/Geom/Transformation.rb +478 -478
- data/lib/sketchup-api-stubs/stubs/Geom/Transformation2d.rb +263 -263
- data/lib/sketchup-api-stubs/stubs/Geom/UTM.rb +141 -141
- data/lib/sketchup-api-stubs/stubs/Geom/Vector2d.rb +522 -523
- data/lib/sketchup-api-stubs/stubs/Geom/Vector3d.rb +691 -691
- data/lib/sketchup-api-stubs/stubs/Layout.rb +25 -25
- data/lib/sketchup-api-stubs/stubs/Layout/AngularDimension.rb +573 -569
- data/lib/sketchup-api-stubs/stubs/Layout/AutoTextDefinition.rb +411 -411
- data/lib/sketchup-api-stubs/stubs/Layout/AutoTextDefinitions.rb +174 -186
- data/lib/sketchup-api-stubs/stubs/Layout/ConnectionPoint.rb +70 -70
- data/lib/sketchup-api-stubs/stubs/Layout/Document.rb +514 -455
- data/lib/sketchup-api-stubs/stubs/Layout/Ellipse.rb +29 -29
- data/lib/sketchup-api-stubs/stubs/Layout/Entities.rb +143 -155
- data/lib/sketchup-api-stubs/stubs/Layout/Entity.rb +353 -359
- data/lib/sketchup-api-stubs/stubs/Layout/FormattedText.rb +349 -349
- data/lib/sketchup-api-stubs/stubs/Layout/Grid.rb +311 -123
- data/lib/sketchup-api-stubs/stubs/Layout/Group.rb +261 -261
- data/lib/sketchup-api-stubs/stubs/Layout/Image.rb +91 -86
- data/lib/sketchup-api-stubs/stubs/Layout/Label.rb +371 -371
- data/lib/sketchup-api-stubs/stubs/Layout/Layer.rb +218 -218
- data/lib/sketchup-api-stubs/stubs/Layout/LayerInstance.rb +128 -128
- data/lib/sketchup-api-stubs/stubs/Layout/Layers.rb +220 -232
- data/lib/sketchup-api-stubs/stubs/Layout/LinearDimension.rb +567 -563
- data/lib/sketchup-api-stubs/stubs/Layout/LockedEntityError.rb +10 -10
- data/lib/sketchup-api-stubs/stubs/Layout/LockedLayerError.rb +11 -11
- data/lib/sketchup-api-stubs/stubs/Layout/Page.rb +183 -183
- data/lib/sketchup-api-stubs/stubs/Layout/PageInfo.rb +387 -387
- data/lib/sketchup-api-stubs/stubs/Layout/Pages.rb +204 -216
- data/lib/sketchup-api-stubs/stubs/Layout/Path.rb +344 -344
- data/lib/sketchup-api-stubs/stubs/Layout/Rectangle.rb +174 -174
- data/lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb +694 -547
- data/lib/sketchup-api-stubs/stubs/Layout/Style.rb +1519 -1519
- data/lib/sketchup-api-stubs/stubs/Layout/Table.rb +290 -290
- data/lib/sketchup-api-stubs/stubs/Layout/TableCell.rb +149 -149
- data/lib/sketchup-api-stubs/stubs/Layout/TableColumn.rb +139 -139
- data/lib/sketchup-api-stubs/stubs/Layout/TableRow.rb +135 -135
- data/lib/sketchup-api-stubs/stubs/Sketchup/Animation.rb +140 -140
- data/lib/sketchup-api-stubs/stubs/Sketchup/AppObserver.rb +157 -157
- data/lib/sketchup-api-stubs/stubs/Sketchup/ArcCurve.rb +209 -209
- data/lib/sketchup-api-stubs/stubs/Sketchup/AttributeDictionaries.rb +152 -152
- data/lib/sketchup-api-stubs/stubs/Sketchup/AttributeDictionary.rb +281 -281
- data/lib/sketchup-api-stubs/stubs/Sketchup/Axes.rb +149 -149
- data/lib/sketchup-api-stubs/stubs/Sketchup/Behavior.rb +328 -328
- data/lib/sketchup-api-stubs/stubs/Sketchup/Camera.rb +577 -577
- data/lib/sketchup-api-stubs/stubs/Sketchup/ClassificationSchema.rb +63 -63
- data/lib/sketchup-api-stubs/stubs/Sketchup/Classifications.rb +122 -122
- data/lib/sketchup-api-stubs/stubs/Sketchup/Color.rb +281 -281
- data/lib/sketchup-api-stubs/stubs/Sketchup/ComponentDefinition.rb +562 -554
- data/lib/sketchup-api-stubs/stubs/Sketchup/ComponentInstance.rb +593 -593
- data/lib/sketchup-api-stubs/stubs/Sketchup/Console.rb +76 -76
- data/lib/sketchup-api-stubs/stubs/Sketchup/ConstructionLine.rb +257 -257
- data/lib/sketchup-api-stubs/stubs/Sketchup/ConstructionPoint.rb +32 -32
- data/lib/sketchup-api-stubs/stubs/Sketchup/Curve.rb +194 -194
- data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionList.rb +329 -329
- data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionObserver.rb +72 -72
- data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionsObserver.rb +102 -102
- data/lib/sketchup-api-stubs/stubs/Sketchup/Dimension.rb +165 -165
- data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionLinear.rb +312 -312
- data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionObserver.rb +38 -38
- data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionRadial.rb +87 -87
- data/lib/sketchup-api-stubs/stubs/Sketchup/Drawingelement.rb +390 -390
- data/lib/sketchup-api-stubs/stubs/Sketchup/Edge.rb +508 -508
- data/lib/sketchup-api-stubs/stubs/Sketchup/EdgeUse.rb +211 -211
- data/lib/sketchup-api-stubs/stubs/Sketchup/Entities.rb +1119 -1097
- data/lib/sketchup-api-stubs/stubs/Sketchup/EntitiesObserver.rb +125 -125
- data/lib/sketchup-api-stubs/stubs/Sketchup/Entity.rb +544 -537
- data/lib/sketchup-api-stubs/stubs/Sketchup/EntityObserver.rb +59 -59
- data/lib/sketchup-api-stubs/stubs/Sketchup/ExtensionsManager.rb +125 -125
- data/lib/sketchup-api-stubs/stubs/Sketchup/Face.rb +750 -750
- data/lib/sketchup-api-stubs/stubs/Sketchup/FrameChangeObserver.rb +104 -104
- data/lib/sketchup-api-stubs/stubs/Sketchup/Group.rb +697 -697
- data/lib/sketchup-api-stubs/stubs/Sketchup/Http.rb +27 -27
- data/lib/sketchup-api-stubs/stubs/Sketchup/Http/Request.rb +285 -285
- data/lib/sketchup-api-stubs/stubs/Sketchup/Http/Response.rb +62 -62
- data/lib/sketchup-api-stubs/stubs/Sketchup/Image.rb +409 -409
- data/lib/sketchup-api-stubs/stubs/Sketchup/ImageRep.rb +226 -226
- data/lib/sketchup-api-stubs/stubs/Sketchup/Importer.rb +190 -190
- data/lib/sketchup-api-stubs/stubs/Sketchup/InputPoint.rb +393 -393
- data/lib/sketchup-api-stubs/stubs/Sketchup/InstanceObserver.rb +82 -82
- data/lib/sketchup-api-stubs/stubs/Sketchup/InstancePath.rb +303 -303
- data/lib/sketchup-api-stubs/stubs/Sketchup/Layer.rb +285 -262
- data/lib/sketchup-api-stubs/stubs/Sketchup/Layers.rb +244 -231
- data/lib/sketchup-api-stubs/stubs/Sketchup/LayersObserver.rb +136 -136
- data/lib/sketchup-api-stubs/stubs/Sketchup/Licensing.rb +48 -48
- data/lib/sketchup-api-stubs/stubs/Sketchup/Licensing/ExtensionLicense.rb +86 -86
- data/lib/sketchup-api-stubs/stubs/Sketchup/LineStyle.rb +24 -24
- data/lib/sketchup-api-stubs/stubs/Sketchup/LineStyles.rb +112 -123
- data/lib/sketchup-api-stubs/stubs/Sketchup/Loop.rb +137 -137
- data/lib/sketchup-api-stubs/stubs/Sketchup/Material.rb +416 -416
- data/lib/sketchup-api-stubs/stubs/Sketchup/Materials.rb +311 -311
- data/lib/sketchup-api-stubs/stubs/Sketchup/MaterialsObserver.rb +141 -141
- data/lib/sketchup-api-stubs/stubs/Sketchup/Menu.rb +95 -95
- data/lib/sketchup-api-stubs/stubs/Sketchup/Model.rb +1638 -1483
- data/lib/sketchup-api-stubs/stubs/Sketchup/ModelObserver.rb +356 -356
- data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsManager.rb +132 -132
- data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsProvider.rb +284 -282
- data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsProviderObserver.rb +58 -58
- data/lib/sketchup-api-stubs/stubs/Sketchup/Page.rb +770 -650
- data/lib/sketchup-api-stubs/stubs/Sketchup/Pages.rb +353 -353
- data/lib/sketchup-api-stubs/stubs/Sketchup/PagesObserver.rb +76 -76
- data/lib/sketchup-api-stubs/stubs/Sketchup/PickHelper.rb +456 -456
- data/lib/sketchup-api-stubs/stubs/Sketchup/RegionalSettings.rb +43 -43
- data/lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptions.rb +364 -356
- data/lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptionsObserver.rb +44 -44
- data/lib/sketchup-api-stubs/stubs/Sketchup/SectionPlane.rb +150 -150
- data/lib/sketchup-api-stubs/stubs/Sketchup/Selection.rb +454 -454
- data/lib/sketchup-api-stubs/stubs/Sketchup/SelectionObserver.rb +115 -115
- data/lib/sketchup-api-stubs/stubs/Sketchup/Set.rb +212 -212
- data/lib/sketchup-api-stubs/stubs/Sketchup/ShadowInfo.rb +257 -257
- data/lib/sketchup-api-stubs/stubs/Sketchup/ShadowInfoObserver.rb +57 -57
- data/lib/sketchup-api-stubs/stubs/Sketchup/Style.rb +69 -69
- data/lib/sketchup-api-stubs/stubs/Sketchup/Styles.rb +211 -211
- data/lib/sketchup-api-stubs/stubs/Sketchup/Text.rb +262 -262
- data/lib/sketchup-api-stubs/stubs/Sketchup/Texture.rb +225 -225
- data/lib/sketchup-api-stubs/stubs/Sketchup/TextureWriter.rb +237 -237
- data/lib/sketchup-api-stubs/stubs/Sketchup/Tool.rb +829 -829
- data/lib/sketchup-api-stubs/stubs/Sketchup/Tools.rb +132 -132
- data/lib/sketchup-api-stubs/stubs/Sketchup/ToolsObserver.rb +154 -154
- data/lib/sketchup-api-stubs/stubs/Sketchup/UVHelper.rb +61 -61
- data/lib/sketchup-api-stubs/stubs/Sketchup/Vertex.rb +142 -142
- data/lib/sketchup-api-stubs/stubs/Sketchup/View.rb +1301 -995
- data/lib/sketchup-api-stubs/stubs/Sketchup/ViewObserver.rb +43 -43
- data/lib/sketchup-api-stubs/stubs/UI/Command.rb +310 -310
- data/lib/sketchup-api-stubs/stubs/UI/HtmlDialog.rb +356 -356
- data/lib/sketchup-api-stubs/stubs/UI/Notification.rb +229 -229
- data/lib/sketchup-api-stubs/stubs/UI/Toolbar.rb +240 -240
- data/lib/sketchup-api-stubs/stubs/UI/WebDialog.rb +633 -633
- data/lib/sketchup-api-stubs/stubs/_top_level.rb +311 -303
- data/lib/sketchup-api-stubs/stubs/array.rb +741 -741
- data/lib/sketchup-api-stubs/stubs/geom.rb +348 -233
- data/lib/sketchup-api-stubs/stubs/languagehandler.rb +92 -92
- data/lib/sketchup-api-stubs/stubs/length.rb +278 -262
- data/lib/sketchup-api-stubs/stubs/numeric.rb +249 -249
- data/lib/sketchup-api-stubs/stubs/sketchup.rb +1310 -1310
- data/lib/sketchup-api-stubs/stubs/sketchupextension.rb +353 -353
- data/lib/sketchup-api-stubs/stubs/string.rb +24 -24
- data/lib/sketchup-api-stubs/stubs/ui.rb +667 -660
- metadata +2 -16
@@ -1,1483 +1,1638 @@
|
|
1
|
-
# Copyright:: Copyright
|
2
|
-
# License:: The MIT License (MIT)
|
3
|
-
|
4
|
-
# This is the interface to a SketchUp model. The model is the 3D drawing that
|
5
|
-
# the user is working with, and it serves as the "entry point" for most Ruby
|
6
|
-
# API interactions. The Sketchup.active_model method gives you a handle to the
|
7
|
-
# current model, and from there you can use the model-level methods to start
|
8
|
-
# getting information and making changes.
|
9
|
-
#
|
10
|
-
# Constants:
|
11
|
-
# Product Family
|
12
|
-
# - Model::ProTrial
|
13
|
-
# - Model::ProLicensed
|
14
|
-
# - Model::MakeTrial
|
15
|
-
# - Model::MakeTrialExpired
|
16
|
-
#
|
17
|
-
# @
|
18
|
-
#
|
19
|
-
#
|
20
|
-
#
|
21
|
-
#
|
22
|
-
# #
|
23
|
-
#
|
24
|
-
#
|
25
|
-
#
|
26
|
-
#
|
27
|
-
#
|
28
|
-
#
|
29
|
-
#
|
30
|
-
#
|
31
|
-
#
|
32
|
-
#
|
33
|
-
#
|
34
|
-
#
|
35
|
-
# UI.messagebox("
|
36
|
-
#
|
37
|
-
#
|
38
|
-
#
|
39
|
-
#
|
40
|
-
#
|
41
|
-
#
|
42
|
-
# @version SketchUp 6.0
|
43
|
-
class Sketchup::Model
|
44
|
-
|
45
|
-
# Constants
|
46
|
-
|
47
|
-
Make = nil # Stub value.
|
48
|
-
MakeTrial = nil # Stub value.
|
49
|
-
ProLicensed = nil # Stub value.
|
50
|
-
ProTrial = nil # Stub value.
|
51
|
-
|
52
|
-
VERSION_2013 = nil # Stub value.
|
53
|
-
VERSION_2014 = nil # Stub value.
|
54
|
-
VERSION_2015 = nil # Stub value.
|
55
|
-
VERSION_2016 = nil # Stub value.
|
56
|
-
VERSION_2017 = nil # Stub value.
|
57
|
-
VERSION_2018 = nil # Stub value.
|
58
|
-
VERSION_2019 = nil # Stub value.
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
#
|
70
|
-
#
|
71
|
-
#
|
72
|
-
#
|
73
|
-
#
|
74
|
-
#
|
75
|
-
#
|
76
|
-
#
|
77
|
-
#
|
78
|
-
#
|
79
|
-
#
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
#
|
85
|
-
#
|
86
|
-
#
|
87
|
-
#
|
88
|
-
#
|
89
|
-
#
|
90
|
-
#
|
91
|
-
#
|
92
|
-
#
|
93
|
-
#
|
94
|
-
# entities
|
95
|
-
#
|
96
|
-
#
|
97
|
-
#
|
98
|
-
#
|
99
|
-
#
|
100
|
-
#
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
#
|
106
|
-
#
|
107
|
-
#
|
108
|
-
#
|
109
|
-
#
|
110
|
-
#
|
111
|
-
#
|
112
|
-
#
|
113
|
-
#
|
114
|
-
#
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
#
|
120
|
-
#
|
121
|
-
#
|
122
|
-
#
|
123
|
-
#
|
124
|
-
#
|
125
|
-
#
|
126
|
-
#
|
127
|
-
#
|
128
|
-
#
|
129
|
-
#
|
130
|
-
#
|
131
|
-
#
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
#
|
137
|
-
#
|
138
|
-
#
|
139
|
-
#
|
140
|
-
#
|
141
|
-
#
|
142
|
-
#
|
143
|
-
#
|
144
|
-
#
|
145
|
-
#
|
146
|
-
#
|
147
|
-
#
|
148
|
-
#
|
149
|
-
#
|
150
|
-
#
|
151
|
-
#
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
#
|
157
|
-
#
|
158
|
-
#
|
159
|
-
#
|
160
|
-
#
|
161
|
-
#
|
162
|
-
#
|
163
|
-
#
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
#
|
168
|
-
#
|
169
|
-
#
|
170
|
-
#
|
171
|
-
#
|
172
|
-
#
|
173
|
-
#
|
174
|
-
#
|
175
|
-
#
|
176
|
-
#
|
177
|
-
#
|
178
|
-
#
|
179
|
-
#
|
180
|
-
#
|
181
|
-
#
|
182
|
-
#
|
183
|
-
#
|
184
|
-
#
|
185
|
-
#
|
186
|
-
#
|
187
|
-
#
|
188
|
-
#
|
189
|
-
#
|
190
|
-
#
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
#
|
195
|
-
#
|
196
|
-
#
|
197
|
-
# model =
|
198
|
-
#
|
199
|
-
#
|
200
|
-
#
|
201
|
-
#
|
202
|
-
#
|
203
|
-
#
|
204
|
-
# @
|
205
|
-
#
|
206
|
-
#
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
#
|
211
|
-
#
|
212
|
-
#
|
213
|
-
#
|
214
|
-
#
|
215
|
-
#
|
216
|
-
#
|
217
|
-
#
|
218
|
-
#
|
219
|
-
#
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
#
|
224
|
-
#
|
225
|
-
#
|
226
|
-
# model
|
227
|
-
#
|
228
|
-
#
|
229
|
-
#
|
230
|
-
#
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
#
|
236
|
-
#
|
237
|
-
#
|
238
|
-
#
|
239
|
-
#
|
240
|
-
#
|
241
|
-
#
|
242
|
-
#
|
243
|
-
#
|
244
|
-
#
|
245
|
-
#
|
246
|
-
# @param [String]
|
247
|
-
#
|
248
|
-
#
|
249
|
-
#
|
250
|
-
#
|
251
|
-
#
|
252
|
-
#
|
253
|
-
#
|
254
|
-
#
|
255
|
-
#
|
256
|
-
#
|
257
|
-
#
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
#
|
263
|
-
#
|
264
|
-
#
|
265
|
-
#
|
266
|
-
#
|
267
|
-
#
|
268
|
-
#
|
269
|
-
#
|
270
|
-
#
|
271
|
-
#
|
272
|
-
#
|
273
|
-
#
|
274
|
-
#
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
#
|
279
|
-
#
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
#
|
284
|
-
#
|
285
|
-
#
|
286
|
-
#
|
287
|
-
#
|
288
|
-
#
|
289
|
-
#
|
290
|
-
#
|
291
|
-
# @
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
#
|
296
|
-
#
|
297
|
-
#
|
298
|
-
#
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
#
|
303
|
-
#
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
#
|
308
|
-
#
|
309
|
-
#
|
310
|
-
#
|
311
|
-
#
|
312
|
-
#
|
313
|
-
#
|
314
|
-
# @
|
315
|
-
#
|
316
|
-
#
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
#
|
321
|
-
#
|
322
|
-
#
|
323
|
-
#
|
324
|
-
#
|
325
|
-
#
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
#
|
330
|
-
#
|
331
|
-
#
|
332
|
-
#
|
333
|
-
#
|
334
|
-
#
|
335
|
-
#
|
336
|
-
#
|
337
|
-
#
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
#
|
342
|
-
#
|
343
|
-
#
|
344
|
-
#
|
345
|
-
#
|
346
|
-
#
|
347
|
-
#
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
#
|
352
|
-
#
|
353
|
-
#
|
354
|
-
#
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
#
|
359
|
-
#
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
#
|
364
|
-
#
|
365
|
-
#
|
366
|
-
#
|
367
|
-
#
|
368
|
-
#
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
#
|
376
|
-
#
|
377
|
-
#
|
378
|
-
#
|
379
|
-
#
|
380
|
-
#
|
381
|
-
#
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
# The
|
389
|
-
#
|
390
|
-
#
|
391
|
-
#
|
392
|
-
#
|
393
|
-
#
|
394
|
-
#
|
395
|
-
#
|
396
|
-
#
|
397
|
-
# @
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
#
|
402
|
-
#
|
403
|
-
# @
|
404
|
-
#
|
405
|
-
#
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
#
|
410
|
-
#
|
411
|
-
#
|
412
|
-
#
|
413
|
-
#
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
#
|
418
|
-
#
|
419
|
-
#
|
420
|
-
#
|
421
|
-
#
|
422
|
-
#
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
#
|
427
|
-
#
|
428
|
-
#
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
#
|
433
|
-
#
|
434
|
-
#
|
435
|
-
#
|
436
|
-
#
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
#
|
441
|
-
#
|
442
|
-
#
|
443
|
-
# @
|
444
|
-
#
|
445
|
-
#
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
#
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
#
|
454
|
-
#
|
455
|
-
#
|
456
|
-
#
|
457
|
-
#
|
458
|
-
#
|
459
|
-
#
|
460
|
-
#
|
461
|
-
#
|
462
|
-
#
|
463
|
-
#
|
464
|
-
#
|
465
|
-
#
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
#
|
470
|
-
#
|
471
|
-
#
|
472
|
-
#
|
473
|
-
#
|
474
|
-
#
|
475
|
-
#
|
476
|
-
#
|
477
|
-
#
|
478
|
-
#
|
479
|
-
#
|
480
|
-
#
|
481
|
-
#
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
#
|
486
|
-
#
|
487
|
-
#
|
488
|
-
#
|
489
|
-
#
|
490
|
-
#
|
491
|
-
#
|
492
|
-
#
|
493
|
-
#
|
494
|
-
#
|
495
|
-
#
|
496
|
-
#
|
497
|
-
#
|
498
|
-
#
|
499
|
-
#
|
500
|
-
#
|
501
|
-
#
|
502
|
-
#
|
503
|
-
#
|
504
|
-
#
|
505
|
-
#
|
506
|
-
#
|
507
|
-
#
|
508
|
-
#
|
509
|
-
#
|
510
|
-
#
|
511
|
-
#
|
512
|
-
#
|
513
|
-
#
|
514
|
-
#
|
515
|
-
#
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
#
|
520
|
-
#
|
521
|
-
#
|
522
|
-
#
|
523
|
-
#
|
524
|
-
#
|
525
|
-
#
|
526
|
-
#
|
527
|
-
#
|
528
|
-
#
|
529
|
-
# @
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
#
|
534
|
-
#
|
535
|
-
#
|
536
|
-
#
|
537
|
-
#
|
538
|
-
#
|
539
|
-
#
|
540
|
-
#
|
541
|
-
#
|
542
|
-
#
|
543
|
-
#
|
544
|
-
#
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
#
|
549
|
-
#
|
550
|
-
#
|
551
|
-
# @
|
552
|
-
#
|
553
|
-
#
|
554
|
-
#
|
555
|
-
# @
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
#
|
560
|
-
#
|
561
|
-
#
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
#
|
566
|
-
#
|
567
|
-
#
|
568
|
-
#
|
569
|
-
#
|
570
|
-
#
|
571
|
-
#
|
572
|
-
#
|
573
|
-
#
|
574
|
-
#
|
575
|
-
#
|
576
|
-
#
|
577
|
-
#
|
578
|
-
#
|
579
|
-
#
|
580
|
-
#
|
581
|
-
#
|
582
|
-
#
|
583
|
-
#
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
#
|
588
|
-
#
|
589
|
-
#
|
590
|
-
#
|
591
|
-
#
|
592
|
-
#
|
593
|
-
#
|
594
|
-
#
|
595
|
-
#
|
596
|
-
#
|
597
|
-
#
|
598
|
-
#
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
#
|
603
|
-
#
|
604
|
-
#
|
605
|
-
#
|
606
|
-
#
|
607
|
-
#
|
608
|
-
#
|
609
|
-
#
|
610
|
-
#
|
611
|
-
#
|
612
|
-
#
|
613
|
-
#
|
614
|
-
#
|
615
|
-
#
|
616
|
-
#
|
617
|
-
#
|
618
|
-
#
|
619
|
-
#
|
620
|
-
#
|
621
|
-
#
|
622
|
-
#
|
623
|
-
#
|
624
|
-
#
|
625
|
-
#
|
626
|
-
#
|
627
|
-
#
|
628
|
-
#
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
633
|
-
|
634
|
-
|
635
|
-
#
|
636
|
-
#
|
637
|
-
#
|
638
|
-
#
|
639
|
-
#
|
640
|
-
#
|
641
|
-
#
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
#
|
646
|
-
#
|
647
|
-
#
|
648
|
-
#
|
649
|
-
#
|
650
|
-
#
|
651
|
-
#
|
652
|
-
#
|
653
|
-
#
|
654
|
-
#
|
655
|
-
#
|
656
|
-
#
|
657
|
-
#
|
658
|
-
#
|
659
|
-
#
|
660
|
-
#
|
661
|
-
#
|
662
|
-
#
|
663
|
-
#
|
664
|
-
#
|
665
|
-
#
|
666
|
-
#
|
667
|
-
# @return [
|
668
|
-
#
|
669
|
-
#
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
|
675
|
-
#
|
676
|
-
#
|
677
|
-
#
|
678
|
-
#
|
679
|
-
#
|
680
|
-
#
|
681
|
-
#
|
682
|
-
#
|
683
|
-
#
|
684
|
-
#
|
685
|
-
#
|
686
|
-
|
687
|
-
|
688
|
-
|
689
|
-
#
|
690
|
-
#
|
691
|
-
#
|
692
|
-
#
|
693
|
-
#
|
694
|
-
#
|
695
|
-
#
|
696
|
-
#
|
697
|
-
#
|
698
|
-
#
|
699
|
-
#
|
700
|
-
#
|
701
|
-
#
|
702
|
-
#
|
703
|
-
#
|
704
|
-
#
|
705
|
-
#
|
706
|
-
#
|
707
|
-
#
|
708
|
-
#
|
709
|
-
#
|
710
|
-
# @
|
711
|
-
#
|
712
|
-
#
|
713
|
-
# @overload
|
714
|
-
#
|
715
|
-
# @
|
716
|
-
# @param [
|
717
|
-
#
|
718
|
-
# @
|
719
|
-
#
|
720
|
-
#
|
721
|
-
|
722
|
-
|
723
|
-
|
724
|
-
#
|
725
|
-
#
|
726
|
-
#
|
727
|
-
#
|
728
|
-
#
|
729
|
-
#
|
730
|
-
#
|
731
|
-
#
|
732
|
-
#
|
733
|
-
# ]
|
734
|
-
#
|
735
|
-
#
|
736
|
-
#
|
737
|
-
|
738
|
-
|
739
|
-
|
740
|
-
#
|
741
|
-
#
|
742
|
-
# @
|
743
|
-
#
|
744
|
-
#
|
745
|
-
#
|
746
|
-
#
|
747
|
-
#
|
748
|
-
#
|
749
|
-
#
|
750
|
-
#
|
751
|
-
#
|
752
|
-
|
753
|
-
|
754
|
-
|
755
|
-
|
756
|
-
#
|
757
|
-
#
|
758
|
-
#
|
759
|
-
#
|
760
|
-
#
|
761
|
-
#
|
762
|
-
#
|
763
|
-
#
|
764
|
-
#
|
765
|
-
#
|
766
|
-
#
|
767
|
-
#
|
768
|
-
# @param [
|
769
|
-
#
|
770
|
-
#
|
771
|
-
#
|
772
|
-
#
|
773
|
-
#
|
774
|
-
#
|
775
|
-
# @
|
776
|
-
|
777
|
-
|
778
|
-
|
779
|
-
#
|
780
|
-
#
|
781
|
-
# @
|
782
|
-
|
783
|
-
|
784
|
-
|
785
|
-
#
|
786
|
-
#
|
787
|
-
#
|
788
|
-
# @
|
789
|
-
|
790
|
-
|
791
|
-
|
792
|
-
#
|
793
|
-
#
|
794
|
-
# @
|
795
|
-
|
796
|
-
|
797
|
-
|
798
|
-
#
|
799
|
-
#
|
800
|
-
|
801
|
-
|
802
|
-
|
803
|
-
#
|
804
|
-
#
|
805
|
-
#
|
806
|
-
#
|
807
|
-
#
|
808
|
-
#
|
809
|
-
#
|
810
|
-
#
|
811
|
-
#
|
812
|
-
#
|
813
|
-
|
814
|
-
|
815
|
-
|
816
|
-
#
|
817
|
-
#
|
818
|
-
#
|
819
|
-
#
|
820
|
-
#
|
821
|
-
#
|
822
|
-
#
|
823
|
-
|
824
|
-
|
825
|
-
|
826
|
-
|
827
|
-
|
828
|
-
|
829
|
-
#
|
830
|
-
#
|
831
|
-
# @example
|
832
|
-
# Sketchup.active_model
|
833
|
-
#
|
834
|
-
#
|
835
|
-
#
|
836
|
-
#
|
837
|
-
#
|
838
|
-
#
|
839
|
-
|
840
|
-
|
841
|
-
|
842
|
-
|
843
|
-
#
|
844
|
-
#
|
845
|
-
#
|
846
|
-
#
|
847
|
-
#
|
848
|
-
# @
|
849
|
-
#
|
850
|
-
#
|
851
|
-
|
852
|
-
|
853
|
-
|
854
|
-
#
|
855
|
-
#
|
856
|
-
#
|
857
|
-
#
|
858
|
-
#
|
859
|
-
#
|
860
|
-
#
|
861
|
-
#
|
862
|
-
#
|
863
|
-
#
|
864
|
-
#
|
865
|
-
#
|
866
|
-
# @
|
867
|
-
|
868
|
-
|
869
|
-
|
870
|
-
#
|
871
|
-
#
|
872
|
-
#
|
873
|
-
#
|
874
|
-
|
875
|
-
|
876
|
-
|
877
|
-
#
|
878
|
-
#
|
879
|
-
|
880
|
-
|
881
|
-
|
882
|
-
#
|
883
|
-
#
|
884
|
-
#
|
885
|
-
#
|
886
|
-
#
|
887
|
-
#
|
888
|
-
#
|
889
|
-
#
|
890
|
-
#
|
891
|
-
#
|
892
|
-
#
|
893
|
-
|
894
|
-
|
895
|
-
|
896
|
-
#
|
897
|
-
#
|
898
|
-
# @
|
899
|
-
#
|
900
|
-
#
|
901
|
-
#
|
902
|
-
#
|
903
|
-
# @
|
904
|
-
#
|
905
|
-
# @version SketchUp
|
906
|
-
def
|
907
|
-
end
|
908
|
-
|
909
|
-
# The
|
910
|
-
#
|
911
|
-
#
|
912
|
-
#
|
913
|
-
#
|
914
|
-
#
|
915
|
-
#
|
916
|
-
#
|
917
|
-
#
|
918
|
-
#
|
919
|
-
#
|
920
|
-
#
|
921
|
-
#
|
922
|
-
#
|
923
|
-
#
|
924
|
-
#
|
925
|
-
# @return [
|
926
|
-
#
|
927
|
-
#
|
928
|
-
|
929
|
-
|
930
|
-
|
931
|
-
|
932
|
-
#
|
933
|
-
#
|
934
|
-
# @example
|
935
|
-
# model = Sketchup.active_model
|
936
|
-
#
|
937
|
-
#
|
938
|
-
# @return [Sketchup::
|
939
|
-
#
|
940
|
-
#
|
941
|
-
|
942
|
-
|
943
|
-
|
944
|
-
|
945
|
-
#
|
946
|
-
#
|
947
|
-
#
|
948
|
-
#
|
949
|
-
#
|
950
|
-
# @
|
951
|
-
#
|
952
|
-
#
|
953
|
-
|
954
|
-
|
955
|
-
|
956
|
-
#
|
957
|
-
#
|
958
|
-
|
959
|
-
|
960
|
-
|
961
|
-
#
|
962
|
-
#
|
963
|
-
#
|
964
|
-
#
|
965
|
-
#
|
966
|
-
|
967
|
-
|
968
|
-
|
969
|
-
#
|
970
|
-
#
|
971
|
-
#
|
972
|
-
#
|
973
|
-
#
|
974
|
-
#
|
975
|
-
#
|
976
|
-
#
|
977
|
-
#
|
978
|
-
|
979
|
-
|
980
|
-
|
981
|
-
|
982
|
-
#
|
983
|
-
#
|
984
|
-
#
|
985
|
-
#
|
986
|
-
#
|
987
|
-
#
|
988
|
-
#
|
989
|
-
#
|
990
|
-
# @
|
991
|
-
#
|
992
|
-
#
|
993
|
-
|
994
|
-
|
995
|
-
|
996
|
-
#
|
997
|
-
#
|
998
|
-
# @
|
999
|
-
#
|
1000
|
-
#
|
1001
|
-
# @
|
1002
|
-
|
1003
|
-
|
1004
|
-
|
1005
|
-
|
1006
|
-
|
1007
|
-
#
|
1008
|
-
#
|
1009
|
-
#
|
1010
|
-
#
|
1011
|
-
#
|
1012
|
-
#
|
1013
|
-
#
|
1014
|
-
#
|
1015
|
-
#
|
1016
|
-
#
|
1017
|
-
# @return [
|
1018
|
-
#
|
1019
|
-
# @version SketchUp 6.0
|
1020
|
-
def
|
1021
|
-
end
|
1022
|
-
|
1023
|
-
# The
|
1024
|
-
#
|
1025
|
-
#
|
1026
|
-
#
|
1027
|
-
#
|
1028
|
-
#
|
1029
|
-
#
|
1030
|
-
#
|
1031
|
-
#
|
1032
|
-
|
1033
|
-
|
1034
|
-
|
1035
|
-
#
|
1036
|
-
#
|
1037
|
-
#
|
1038
|
-
#
|
1039
|
-
#
|
1040
|
-
# @param [
|
1041
|
-
#
|
1042
|
-
#
|
1043
|
-
# @
|
1044
|
-
#
|
1045
|
-
#
|
1046
|
-
|
1047
|
-
|
1048
|
-
|
1049
|
-
#
|
1050
|
-
#
|
1051
|
-
#
|
1052
|
-
#
|
1053
|
-
#
|
1054
|
-
#
|
1055
|
-
#
|
1056
|
-
#
|
1057
|
-
#
|
1058
|
-
#
|
1059
|
-
|
1060
|
-
|
1061
|
-
|
1062
|
-
|
1063
|
-
|
1064
|
-
|
1065
|
-
#
|
1066
|
-
#
|
1067
|
-
#
|
1068
|
-
# @example
|
1069
|
-
#
|
1070
|
-
#
|
1071
|
-
#
|
1072
|
-
#
|
1073
|
-
#
|
1074
|
-
#
|
1075
|
-
#
|
1076
|
-
#
|
1077
|
-
#
|
1078
|
-
#
|
1079
|
-
#
|
1080
|
-
|
1081
|
-
|
1082
|
-
|
1083
|
-
|
1084
|
-
#
|
1085
|
-
#
|
1086
|
-
#
|
1087
|
-
#
|
1088
|
-
#
|
1089
|
-
#
|
1090
|
-
#
|
1091
|
-
#
|
1092
|
-
#
|
1093
|
-
|
1094
|
-
|
1095
|
-
|
1096
|
-
|
1097
|
-
#
|
1098
|
-
#
|
1099
|
-
#
|
1100
|
-
#
|
1101
|
-
#
|
1102
|
-
#
|
1103
|
-
#
|
1104
|
-
#
|
1105
|
-
#
|
1106
|
-
#
|
1107
|
-
#
|
1108
|
-
#
|
1109
|
-
#
|
1110
|
-
#
|
1111
|
-
|
1112
|
-
|
1113
|
-
|
1114
|
-
#
|
1115
|
-
#
|
1116
|
-
#
|
1117
|
-
#
|
1118
|
-
#
|
1119
|
-
#
|
1120
|
-
#
|
1121
|
-
#
|
1122
|
-
#
|
1123
|
-
#
|
1124
|
-
#
|
1125
|
-
#
|
1126
|
-
#
|
1127
|
-
#
|
1128
|
-
#
|
1129
|
-
#
|
1130
|
-
# @
|
1131
|
-
|
1132
|
-
|
1133
|
-
|
1134
|
-
#
|
1135
|
-
#
|
1136
|
-
#
|
1137
|
-
#
|
1138
|
-
#
|
1139
|
-
#
|
1140
|
-
#
|
1141
|
-
#
|
1142
|
-
#
|
1143
|
-
#
|
1144
|
-
#
|
1145
|
-
#
|
1146
|
-
#
|
1147
|
-
#
|
1148
|
-
#
|
1149
|
-
#
|
1150
|
-
#
|
1151
|
-
#
|
1152
|
-
#
|
1153
|
-
#
|
1154
|
-
#
|
1155
|
-
|
1156
|
-
|
1157
|
-
|
1158
|
-
|
1159
|
-
|
1160
|
-
|
1161
|
-
#
|
1162
|
-
#
|
1163
|
-
#
|
1164
|
-
#
|
1165
|
-
#
|
1166
|
-
#
|
1167
|
-
#
|
1168
|
-
#
|
1169
|
-
#
|
1170
|
-
#
|
1171
|
-
#
|
1172
|
-
# @
|
1173
|
-
|
1174
|
-
|
1175
|
-
|
1176
|
-
#
|
1177
|
-
#
|
1178
|
-
#
|
1179
|
-
#
|
1180
|
-
#
|
1181
|
-
#
|
1182
|
-
#
|
1183
|
-
#
|
1184
|
-
#
|
1185
|
-
#
|
1186
|
-
# Sketchup
|
1187
|
-
#
|
1188
|
-
#
|
1189
|
-
#
|
1190
|
-
#
|
1191
|
-
# @
|
1192
|
-
#
|
1193
|
-
# @
|
1194
|
-
|
1195
|
-
|
1196
|
-
|
1197
|
-
#
|
1198
|
-
#
|
1199
|
-
#
|
1200
|
-
#
|
1201
|
-
#
|
1202
|
-
#
|
1203
|
-
#
|
1204
|
-
#
|
1205
|
-
#
|
1206
|
-
#
|
1207
|
-
#
|
1208
|
-
#
|
1209
|
-
#
|
1210
|
-
#
|
1211
|
-
#
|
1212
|
-
|
1213
|
-
|
1214
|
-
|
1215
|
-
|
1216
|
-
|
1217
|
-
|
1218
|
-
#
|
1219
|
-
#
|
1220
|
-
#
|
1221
|
-
#
|
1222
|
-
#
|
1223
|
-
#
|
1224
|
-
#
|
1225
|
-
#
|
1226
|
-
#
|
1227
|
-
#
|
1228
|
-
#
|
1229
|
-
#
|
1230
|
-
#
|
1231
|
-
#
|
1232
|
-
# @
|
1233
|
-
|
1234
|
-
|
1235
|
-
|
1236
|
-
|
1237
|
-
|
1238
|
-
#
|
1239
|
-
#
|
1240
|
-
#
|
1241
|
-
#
|
1242
|
-
#
|
1243
|
-
#
|
1244
|
-
#
|
1245
|
-
#
|
1246
|
-
|
1247
|
-
|
1248
|
-
|
1249
|
-
#
|
1250
|
-
|
1251
|
-
|
1252
|
-
|
1253
|
-
#
|
1254
|
-
#
|
1255
|
-
#
|
1256
|
-
#
|
1257
|
-
#
|
1258
|
-
#
|
1259
|
-
#
|
1260
|
-
#
|
1261
|
-
#
|
1262
|
-
#
|
1263
|
-
#
|
1264
|
-
#
|
1265
|
-
#
|
1266
|
-
#
|
1267
|
-
#
|
1268
|
-
#
|
1269
|
-
#
|
1270
|
-
#
|
1271
|
-
#
|
1272
|
-
#
|
1273
|
-
#
|
1274
|
-
# @
|
1275
|
-
|
1276
|
-
|
1277
|
-
|
1278
|
-
#
|
1279
|
-
#
|
1280
|
-
#
|
1281
|
-
#
|
1282
|
-
#
|
1283
|
-
#
|
1284
|
-
#
|
1285
|
-
#
|
1286
|
-
#
|
1287
|
-
#
|
1288
|
-
#
|
1289
|
-
#
|
1290
|
-
#
|
1291
|
-
#
|
1292
|
-
#
|
1293
|
-
#
|
1294
|
-
|
1295
|
-
|
1296
|
-
|
1297
|
-
#
|
1298
|
-
#
|
1299
|
-
#
|
1300
|
-
#
|
1301
|
-
#
|
1302
|
-
#
|
1303
|
-
#
|
1304
|
-
#
|
1305
|
-
#
|
1306
|
-
|
1307
|
-
|
1308
|
-
|
1309
|
-
#
|
1310
|
-
#
|
1311
|
-
#
|
1312
|
-
|
1313
|
-
|
1314
|
-
|
1315
|
-
#
|
1316
|
-
#
|
1317
|
-
#
|
1318
|
-
#
|
1319
|
-
#
|
1320
|
-
#
|
1321
|
-
#
|
1322
|
-
#
|
1323
|
-
#
|
1324
|
-
#
|
1325
|
-
#
|
1326
|
-
#
|
1327
|
-
#
|
1328
|
-
#
|
1329
|
-
#
|
1330
|
-
#
|
1331
|
-
#
|
1332
|
-
#
|
1333
|
-
#
|
1334
|
-
#
|
1335
|
-
#
|
1336
|
-
#
|
1337
|
-
#
|
1338
|
-
#
|
1339
|
-
#
|
1340
|
-
#
|
1341
|
-
#
|
1342
|
-
#
|
1343
|
-
#
|
1344
|
-
#
|
1345
|
-
#
|
1346
|
-
#
|
1347
|
-
#
|
1348
|
-
# @
|
1349
|
-
|
1350
|
-
|
1351
|
-
|
1352
|
-
#
|
1353
|
-
#
|
1354
|
-
#
|
1355
|
-
#
|
1356
|
-
#
|
1357
|
-
#
|
1358
|
-
#
|
1359
|
-
#
|
1360
|
-
#
|
1361
|
-
#
|
1362
|
-
#
|
1363
|
-
#
|
1364
|
-
#
|
1365
|
-
#
|
1366
|
-
# @
|
1367
|
-
|
1368
|
-
|
1369
|
-
|
1370
|
-
#
|
1371
|
-
#
|
1372
|
-
#
|
1373
|
-
#
|
1374
|
-
#
|
1375
|
-
|
1376
|
-
|
1377
|
-
|
1378
|
-
#
|
1379
|
-
#
|
1380
|
-
# @example
|
1381
|
-
# model = Sketchup.active_model
|
1382
|
-
#
|
1383
|
-
#
|
1384
|
-
# @
|
1385
|
-
#
|
1386
|
-
#
|
1387
|
-
|
1388
|
-
|
1389
|
-
|
1390
|
-
|
1391
|
-
|
1392
|
-
|
1393
|
-
#
|
1394
|
-
#
|
1395
|
-
#
|
1396
|
-
#
|
1397
|
-
#
|
1398
|
-
#
|
1399
|
-
|
1400
|
-
|
1401
|
-
|
1402
|
-
#
|
1403
|
-
#
|
1404
|
-
# @
|
1405
|
-
|
1406
|
-
|
1407
|
-
|
1408
|
-
#
|
1409
|
-
#
|
1410
|
-
#
|
1411
|
-
#
|
1412
|
-
#
|
1413
|
-
|
1414
|
-
|
1415
|
-
|
1416
|
-
#
|
1417
|
-
#
|
1418
|
-
#
|
1419
|
-
#
|
1420
|
-
#
|
1421
|
-
#
|
1422
|
-
#
|
1423
|
-
#
|
1424
|
-
# @
|
1425
|
-
#
|
1426
|
-
#
|
1427
|
-
# @
|
1428
|
-
|
1429
|
-
|
1430
|
-
|
1431
|
-
|
1432
|
-
|
1433
|
-
#
|
1434
|
-
#
|
1435
|
-
#
|
1436
|
-
#
|
1437
|
-
#
|
1438
|
-
#
|
1439
|
-
#
|
1440
|
-
|
1441
|
-
|
1442
|
-
|
1443
|
-
#
|
1444
|
-
#
|
1445
|
-
#
|
1446
|
-
# @
|
1447
|
-
#
|
1448
|
-
#
|
1449
|
-
|
1450
|
-
|
1451
|
-
|
1452
|
-
#
|
1453
|
-
#
|
1454
|
-
# @
|
1455
|
-
#
|
1456
|
-
#
|
1457
|
-
|
1458
|
-
|
1459
|
-
|
1460
|
-
#
|
1461
|
-
|
1462
|
-
|
1463
|
-
|
1464
|
-
#
|
1465
|
-
#
|
1466
|
-
#
|
1467
|
-
#
|
1468
|
-
#
|
1469
|
-
#
|
1470
|
-
#
|
1471
|
-
#
|
1472
|
-
#
|
1473
|
-
#
|
1474
|
-
#
|
1475
|
-
#
|
1476
|
-
#
|
1477
|
-
#
|
1478
|
-
#
|
1479
|
-
#
|
1480
|
-
|
1481
|
-
|
1482
|
-
|
1483
|
-
|
1
|
+
# Copyright:: Copyright 2020 Trimble Inc.
|
2
|
+
# License:: The MIT License (MIT)
|
3
|
+
|
4
|
+
# This is the interface to a SketchUp model. The model is the 3D drawing that
|
5
|
+
# the user is working with, and it serves as the "entry point" for most Ruby
|
6
|
+
# API interactions. The Sketchup.active_model method gives you a handle to the
|
7
|
+
# current model, and from there you can use the model-level methods to start
|
8
|
+
# getting information and making changes.
|
9
|
+
#
|
10
|
+
# Constants:
|
11
|
+
# Product Family
|
12
|
+
# - Model::ProTrial
|
13
|
+
# - Model::ProLicensed
|
14
|
+
# - Model::MakeTrial
|
15
|
+
# - Model::MakeTrialExpired
|
16
|
+
#
|
17
|
+
# @bug Prior to SketchUp 2019.0 this class would yield +TypeError+ for all
|
18
|
+
# method calls if +#singleton_class+ was called on the model object.
|
19
|
+
#
|
20
|
+
# @example
|
21
|
+
# # Grab a handle to the currently active model (aka the one the user is
|
22
|
+
# # looking at in SketchUp.)
|
23
|
+
# model = Sketchup.active_model
|
24
|
+
#
|
25
|
+
# # Grab other handles to commonly used collections inside the model.
|
26
|
+
# entities = model.entities
|
27
|
+
# layers = model.layers
|
28
|
+
# materials = model.materials
|
29
|
+
# component_definitions = model.definitions
|
30
|
+
# selection = model.selection
|
31
|
+
#
|
32
|
+
# # Now that we have our handles, we can start pulling objects and making
|
33
|
+
# # method calls that are useful.
|
34
|
+
# first_entity = entities[0]
|
35
|
+
# UI.messagebox("First thing in your model is a #{first_entity.typename}")
|
36
|
+
#
|
37
|
+
# number_materials = materials.length
|
38
|
+
# UI.messagebox("Your model has #{number_materials} materials.")
|
39
|
+
#
|
40
|
+
# new_edge = entities.add_line([0,0,0], [500,500,0])
|
41
|
+
#
|
42
|
+
# @version SketchUp 6.0
|
43
|
+
class Sketchup::Model
|
44
|
+
|
45
|
+
# Constants
|
46
|
+
|
47
|
+
Make = nil # Stub value.
|
48
|
+
MakeTrial = nil # Stub value.
|
49
|
+
ProLicensed = nil # Stub value.
|
50
|
+
ProTrial = nil # Stub value.
|
51
|
+
|
52
|
+
VERSION_2013 = nil # Stub value.
|
53
|
+
VERSION_2014 = nil # Stub value.
|
54
|
+
VERSION_2015 = nil # Stub value.
|
55
|
+
VERSION_2016 = nil # Stub value.
|
56
|
+
VERSION_2017 = nil # Stub value.
|
57
|
+
VERSION_2018 = nil # Stub value.
|
58
|
+
VERSION_2019 = nil # Stub value.
|
59
|
+
VERSION_2020 = nil # Stub value.
|
60
|
+
VERSION_3 = nil # Stub value.
|
61
|
+
VERSION_4 = nil # Stub value.
|
62
|
+
VERSION_5 = nil # Stub value.
|
63
|
+
VERSION_6 = nil # Stub value.
|
64
|
+
VERSION_7 = nil # Stub value.
|
65
|
+
VERSION_8 = nil # Stub value.
|
66
|
+
|
67
|
+
# Instance Methods
|
68
|
+
|
69
|
+
# The abort_operation method aborts the current operation started with the
|
70
|
+
# start_operation method.
|
71
|
+
#
|
72
|
+
# The abort_operation method is normally called from inside of a rescue clause
|
73
|
+
# to cancel an operation if something goes wrong.
|
74
|
+
#
|
75
|
+
# @example
|
76
|
+
# status = model.abort_operation
|
77
|
+
#
|
78
|
+
# @return [Boolean] true if successful, false if unsuccessful
|
79
|
+
#
|
80
|
+
# @version SketchUp 6.0
|
81
|
+
def abort_operation
|
82
|
+
end
|
83
|
+
|
84
|
+
# Returns an {Sketchup::Entities} object which contains
|
85
|
+
# the entities in the open group or component instance. If no group or
|
86
|
+
# component is open for editing then this will be the same as {#entities}.
|
87
|
+
#
|
88
|
+
# To perform actions upon the current set of entities the user is working with
|
89
|
+
# then this is the method to use. Entities selected by the user will be a
|
90
|
+
# subset of the active entities.
|
91
|
+
#
|
92
|
+
# @example
|
93
|
+
# model = Sketchup.active_model
|
94
|
+
# entities = model.active_entities
|
95
|
+
# entities.each { |entity| puts "#{entity} (#{entity.class})" }
|
96
|
+
#
|
97
|
+
# @return [Sketchup::Entities]
|
98
|
+
#
|
99
|
+
# @see #edit_transform
|
100
|
+
#
|
101
|
+
# @version SketchUp 6.0
|
102
|
+
def active_entities
|
103
|
+
end
|
104
|
+
|
105
|
+
# The {#active_layer} method retrieves the active Layer.
|
106
|
+
#
|
107
|
+
# The default layer in SketchUp is layer 0.
|
108
|
+
#
|
109
|
+
# @example
|
110
|
+
# model = Sketchup.active_model
|
111
|
+
# layer = model.active_layer
|
112
|
+
#
|
113
|
+
# @return [Sketchup::Layer]
|
114
|
+
#
|
115
|
+
# @version SketchUp 6.0
|
116
|
+
def active_layer
|
117
|
+
end
|
118
|
+
|
119
|
+
# The {#active_layer=} method sets the active {Sketchup::Layer} object.
|
120
|
+
#
|
121
|
+
# @example
|
122
|
+
# model = Sketchup.active_model
|
123
|
+
# layers = model.layers
|
124
|
+
# layer = layers.add('My Layer')
|
125
|
+
# model.active_layer = layer
|
126
|
+
#
|
127
|
+
# @param [Sketchup::Layer] layer
|
128
|
+
# The layer to be set as the active layer.
|
129
|
+
#
|
130
|
+
# @return [Sketchup::Layer]
|
131
|
+
#
|
132
|
+
# @version SketchUp 6.0
|
133
|
+
def active_layer=(layer)
|
134
|
+
end
|
135
|
+
|
136
|
+
# Returns an array containing the sequence of entities the user has
|
137
|
+
# double-clicked on for editing. This allows one to determine whether they are
|
138
|
+
# in component edit mode and where in the model they are.
|
139
|
+
#
|
140
|
+
# For example, if a user has double-clicked into a component to
|
141
|
+
# edit its geometry, and then double clicked into a sub-group to edit that,
|
142
|
+
# the active_path might contain:
|
143
|
+
#
|
144
|
+
# <code>[<Sketchup::ComponentInstance>, <Sketchup::Group>]</code>
|
145
|
+
#
|
146
|
+
# @example
|
147
|
+
# active_path = Sketchup.active_model.active_path
|
148
|
+
#
|
149
|
+
# @return [Array<Sketchup::Drawingelement>, nil] array of entities showing where the user is
|
150
|
+
# currently editing.
|
151
|
+
#
|
152
|
+
# @version SketchUp 7.0
|
153
|
+
def active_path
|
154
|
+
end
|
155
|
+
|
156
|
+
# The {#active_path=} method is used to open a given instance path for editing.
|
157
|
+
#
|
158
|
+
# It is expected that no entities are modified in an operation that
|
159
|
+
# opens/closes instances.
|
160
|
+
#
|
161
|
+
# To ensure that undo/redo is done correctly this method breaks up any open
|
162
|
+
# Ruby operations into a set of chained operations:
|
163
|
+
#
|
164
|
+
# If the API user tries to do this:
|
165
|
+
#
|
166
|
+
# model.start_operation('...', true)
|
167
|
+
# model.entities.add_face(...)
|
168
|
+
# model.active_path = instance_path
|
169
|
+
# model.entities.add_face(...)
|
170
|
+
# model.commit_operation
|
171
|
+
#
|
172
|
+
# Then the method will break it up to something like this:
|
173
|
+
#
|
174
|
+
# model.start_operation('...', true)
|
175
|
+
# model.entities.add_face(...)
|
176
|
+
# model.commit_operation
|
177
|
+
#
|
178
|
+
# model.start_operation('...', true, false, true)
|
179
|
+
# model.active_path = instance_path
|
180
|
+
# model.commit_operation
|
181
|
+
#
|
182
|
+
# model.start_operation('...', true, false, true)
|
183
|
+
# model.entities.add_face(...)
|
184
|
+
# model.commit_operation
|
185
|
+
#
|
186
|
+
# For the end user this will be experienced as a single operation.
|
187
|
+
# For the API user the side-effect is multiple transaction notifications.
|
188
|
+
#
|
189
|
+
# @example Open an instance
|
190
|
+
# model = Sketchup.active_model
|
191
|
+
# instance = model.active_entities.grep(Sketchup::ComponentInstance).first
|
192
|
+
# instance_path = Sketchup::InstancePath.new([instance])
|
193
|
+
# model.active_path = instance_path
|
194
|
+
#
|
195
|
+
# @example Close all instances
|
196
|
+
# model = Sketchup.active_model
|
197
|
+
# model.active_path = nil
|
198
|
+
#
|
199
|
+
# @note An instance path can only be opened if the instances are not locked.
|
200
|
+
# This also include instances of the same component definition that are not
|
201
|
+
# on the given path. A definition cannot be edited if any of its instances
|
202
|
+
# are locked.
|
203
|
+
#
|
204
|
+
# @note Open/close operations are special operations in SketchUp which has to
|
205
|
+
# be treated with special care.
|
206
|
+
#
|
207
|
+
# @param [Sketchup::InstancePath, Array<Sketchup::ComponentInstance, Sketchup::Group>, nil] instance_path
|
208
|
+
# Passing +nil+ or an empty array will close all open instances.
|
209
|
+
#
|
210
|
+
# @raise [ArgumentError] if the instance path is not valid.
|
211
|
+
#
|
212
|
+
# @raise [ArgumentError] if the instance path contains locked instances.
|
213
|
+
#
|
214
|
+
# @raise [ArgumentError] if the instance path contains instances who's
|
215
|
+
# siblings are locked.
|
216
|
+
#
|
217
|
+
# @return [Sketchup::Model]
|
218
|
+
#
|
219
|
+
# @version SketchUp 2020.0
|
220
|
+
def active_path=(instance_path)
|
221
|
+
end
|
222
|
+
|
223
|
+
# The {#active_view} method returns the active View object for this model.
|
224
|
+
#
|
225
|
+
# @example
|
226
|
+
# model = Sketchup.active_model
|
227
|
+
# view = model.active_view
|
228
|
+
#
|
229
|
+
# @return [Sketchup::View]
|
230
|
+
#
|
231
|
+
# @version SketchUp 6.0
|
232
|
+
def active_view
|
233
|
+
end
|
234
|
+
|
235
|
+
# Add a text note to the Model. The position of the note is given as relative
|
236
|
+
# window positions between 0 and 1. For example, the following command
|
237
|
+
# would create a note that start 1/10 of the ways down the screen from the
|
238
|
+
# upper left corner of the window.
|
239
|
+
#
|
240
|
+
# @example
|
241
|
+
# model = Sketchup.active_model
|
242
|
+
# # Add a note 1/10 ways down the screen and 1/10 ways right from the
|
243
|
+
# # upper left corner of model window.
|
244
|
+
# note = Sketchup.active_model.add_note('Hello World', 0.1, 0.1)
|
245
|
+
#
|
246
|
+
# @param [String] note
|
247
|
+
# A string note.
|
248
|
+
#
|
249
|
+
# @param [Numeric] x
|
250
|
+
# A distance along the x axis between 0 and 1.
|
251
|
+
#
|
252
|
+
# @param [Numeric] y
|
253
|
+
# A distance along the y axis between 0 and 1.
|
254
|
+
#
|
255
|
+
# @return [Sketchup::Text] a note object or an exception if it is
|
256
|
+
# unsuccessful.
|
257
|
+
#
|
258
|
+
# @version SketchUp 6.0
|
259
|
+
def add_note(note, x, y)
|
260
|
+
end
|
261
|
+
|
262
|
+
# The add_observer method is used to add an observer to the current object.
|
263
|
+
#
|
264
|
+
# @example
|
265
|
+
# model = Sketchup.active_model
|
266
|
+
# observer = Sketchup::ModelObserver.new
|
267
|
+
# status = model.add_observer(observer)
|
268
|
+
#
|
269
|
+
# @param [Object] observer
|
270
|
+
# An observer.
|
271
|
+
#
|
272
|
+
# @return [Boolean] true if successful, false if unsuccessful.
|
273
|
+
#
|
274
|
+
# @version SketchUp 6.0
|
275
|
+
def add_observer(observer)
|
276
|
+
end
|
277
|
+
|
278
|
+
# The {#attribute_dictionaries} method retrieves the AttributeDictionaries
|
279
|
+
# object that is associated with the Model.
|
280
|
+
#
|
281
|
+
# @example
|
282
|
+
# model = Sketchup.active_model
|
283
|
+
# dictionaries = model.attribute_dictionaries
|
284
|
+
# if dictionaries
|
285
|
+
# # Code to do something if attribute dictionaries exist (usually you
|
286
|
+
# # parse the array of dictionaries.
|
287
|
+
# else
|
288
|
+
# # Code to do something if attribute dictionaries do not exist.
|
289
|
+
# end
|
290
|
+
#
|
291
|
+
# @return [Sketchup::AttributeDictionaries] the AttributeDictionaries
|
292
|
+
# object associated with the entity, or nil if there are
|
293
|
+
# no attribute_dictionary objects associated with the
|
294
|
+
# model. Care must be taken if nil is returned, for
|
295
|
+
# example: invoking attribute_dictionaries.length will
|
296
|
+
# throw a NoMethodError exception, not return 0.
|
297
|
+
#
|
298
|
+
# @version SketchUp 6.0
|
299
|
+
def attribute_dictionaries
|
300
|
+
end
|
301
|
+
|
302
|
+
# Returns the Sketchup::AttributeDictionary object that is specified by
|
303
|
+
# name. If the model does not have an attribute dictionary that
|
304
|
+
# corresponds to name, returns either nil, or a creates an attribute
|
305
|
+
# dictionary. If the optional second argument is true, and there is no
|
306
|
+
# attribute dictionary that corresponds to name, a new attribute
|
307
|
+
# dictionary is created.
|
308
|
+
#
|
309
|
+
# @example
|
310
|
+
# model = Sketchup.active_model
|
311
|
+
# create_if_empty = true
|
312
|
+
# dictionary = model.attribute_dictionary('name', create_if_empty)
|
313
|
+
#
|
314
|
+
# @param [String] name
|
315
|
+
# The name of the dictionary you are attempting to
|
316
|
+
# retrieve.
|
317
|
+
#
|
318
|
+
# @param [Boolean] create
|
319
|
+
# if set to true an attribute dictionary of the
|
320
|
+
# given "name" will be created if not found.
|
321
|
+
#
|
322
|
+
# @return [Sketchup::AttributeDictionary] an attribute dictionary object if
|
323
|
+
# successful, nil if unsuccessful
|
324
|
+
#
|
325
|
+
# @version SketchUp 6.0
|
326
|
+
def attribute_dictionary(name, create = false)
|
327
|
+
end
|
328
|
+
|
329
|
+
# The {#axes} method returns the drawing axes for the model.
|
330
|
+
#
|
331
|
+
# @example
|
332
|
+
# # Point for a rectangle.
|
333
|
+
# points = [
|
334
|
+
# Geom::Point3d.new( 0, 0, 0),
|
335
|
+
# Geom::Point3d.new(10, 0, 0),
|
336
|
+
# Geom::Point3d.new(10, 20, 0),
|
337
|
+
# Geom::Point3d.new( 0, 20, 0)
|
338
|
+
# ]
|
339
|
+
# # Transform the points so they are local to the model axes. Otherwise
|
340
|
+
# # they would be local to the model origin.
|
341
|
+
# tr = Sketchup.active_model.axes.transformation
|
342
|
+
# points.each { |point| point.transform!(tr) }
|
343
|
+
# Sketchup.active_model.active_entities.add_face(points)
|
344
|
+
#
|
345
|
+
# @return [Sketchup::Axes] the axes for the model.
|
346
|
+
#
|
347
|
+
# @version SketchUp 2016
|
348
|
+
def axes
|
349
|
+
end
|
350
|
+
|
351
|
+
# The behavior method retrieves the behavior of the model.
|
352
|
+
#
|
353
|
+
# @example
|
354
|
+
# model = Sketchup.active_model
|
355
|
+
# behavior = model.behavior
|
356
|
+
#
|
357
|
+
# @return [Sketchup::Behavior] behavior object for the model if successful
|
358
|
+
#
|
359
|
+
# @version SketchUp 6.0
|
360
|
+
def behavior
|
361
|
+
end
|
362
|
+
|
363
|
+
# The {#bounds} method retrieves the bounding box of the model.
|
364
|
+
#
|
365
|
+
# @example
|
366
|
+
# model = Sketchup.active_model
|
367
|
+
# bounds = model.bounds
|
368
|
+
#
|
369
|
+
# @return [Geom::BoundingBox] bounding box for the model if successful
|
370
|
+
#
|
371
|
+
# @version SketchUp 6.0
|
372
|
+
def bounds
|
373
|
+
end
|
374
|
+
|
375
|
+
# The {#classifications} method is used to retrieve the Classifications object
|
376
|
+
# for this model.
|
377
|
+
#
|
378
|
+
# @example
|
379
|
+
# model = Sketchup.active_model
|
380
|
+
# c = model.classifications
|
381
|
+
#
|
382
|
+
# @return [Sketchup::Classifications] a Classifications object.
|
383
|
+
#
|
384
|
+
# @version SketchUp 2015
|
385
|
+
def classifications
|
386
|
+
end
|
387
|
+
|
388
|
+
# The close method is used to close this model. On Mac OS, only the active
|
389
|
+
# model can be closed. On Windows, since there can be only one document open,
|
390
|
+
# this method will perform a File/New operation.
|
391
|
+
#
|
392
|
+
# @example
|
393
|
+
# Sketchup.file_new
|
394
|
+
# model = Sketchup.active_model
|
395
|
+
# model.close
|
396
|
+
#
|
397
|
+
# @param [Boolean] ignore_changes
|
398
|
+
# If true, model changes will be
|
399
|
+
# ignored and save prompts will be suppressed.
|
400
|
+
# If false, changes will not be ignored and save
|
401
|
+
# prompts will be displayed normally.
|
402
|
+
#
|
403
|
+
# @return [nil]
|
404
|
+
#
|
405
|
+
# @version SketchUp 2015
|
406
|
+
def close(ignore_changes = false)
|
407
|
+
end
|
408
|
+
|
409
|
+
# The {#close_active} method is used to close the currently active (open) group
|
410
|
+
# or component.
|
411
|
+
#
|
412
|
+
# @example
|
413
|
+
# model = Sketchup.active_model
|
414
|
+
# status = model.close_active
|
415
|
+
#
|
416
|
+
# @note Before SketchUp 2014 this method had a bug where it didn't create an
|
417
|
+
# undo operation and that could lead to corrupted geometry when undo/redo was
|
418
|
+
# used after invoking this method.
|
419
|
+
#
|
420
|
+
# @return [Boolean] true if successful, false if unsuccessful.
|
421
|
+
#
|
422
|
+
# @version SketchUp 6.0
|
423
|
+
def close_active
|
424
|
+
end
|
425
|
+
|
426
|
+
# The commit_operation method commits an operation for undo.
|
427
|
+
#
|
428
|
+
# The commit_operation method is normally called at the end of a method to
|
429
|
+
# commit the operation that the method performs.
|
430
|
+
#
|
431
|
+
# @example
|
432
|
+
# status = model.commit_operation
|
433
|
+
#
|
434
|
+
# @return [Boolean] true if successful, false if unsuccessful
|
435
|
+
#
|
436
|
+
# @version SketchUp 6.0
|
437
|
+
def commit_operation
|
438
|
+
end
|
439
|
+
|
440
|
+
# The {#definitions} method retrieves a definition list containing all of the
|
441
|
+
# component definitions in the model.
|
442
|
+
#
|
443
|
+
# @example
|
444
|
+
# model = Sketchup.active_model
|
445
|
+
# definitions = model.definitions
|
446
|
+
#
|
447
|
+
# @return [Sketchup::DefinitionList]
|
448
|
+
#
|
449
|
+
# @version SketchUp 6.0
|
450
|
+
def definitions
|
451
|
+
end
|
452
|
+
|
453
|
+
# The description method retrieves a description of the model as found in the
|
454
|
+
# Model Info > Files panel.
|
455
|
+
#
|
456
|
+
# The returned description can be empty. The default description for all models
|
457
|
+
# is empty.
|
458
|
+
#
|
459
|
+
# @example
|
460
|
+
# model = Sketchup.active_model
|
461
|
+
# description = model.description
|
462
|
+
#
|
463
|
+
# @return [String] a description if successful.
|
464
|
+
#
|
465
|
+
# @version SketchUp 6.0
|
466
|
+
def description
|
467
|
+
end
|
468
|
+
|
469
|
+
# The {#description=} method sets the description of the model.
|
470
|
+
#
|
471
|
+
# @example
|
472
|
+
# model = Sketchup.active_model
|
473
|
+
# description = model.description = "This is a model of a house on the " <<
|
474
|
+
# "North West Corner of 10th and Dolores Street in Carmel, California"
|
475
|
+
#
|
476
|
+
# @param [String] description
|
477
|
+
# the description string to be set.
|
478
|
+
#
|
479
|
+
# @return [String]
|
480
|
+
#
|
481
|
+
# @version SketchUp 6.0
|
482
|
+
def description=(description)
|
483
|
+
end
|
484
|
+
|
485
|
+
# The {#drawing_element_visible?} method reports whether the given drawing
|
486
|
+
# element in an instance path is visible given the current model options.
|
487
|
+
#
|
488
|
+
# @example Traversing every visible entity in the model
|
489
|
+
# module Example
|
490
|
+
#
|
491
|
+
# def self.instance?(entity)
|
492
|
+
# entity.is_a?(Sketchup::ComponentInstance) || entity.is_a?(Sketchup::Group)
|
493
|
+
# end
|
494
|
+
#
|
495
|
+
# # Walk the visible entities in the model, taking into account
|
496
|
+
# # "DrawHiddenGeometry" and "DrawHiddenObjects" rendering options.
|
497
|
+
# def self.walk(entities, transformation = IDENTITY, path = [], &block)
|
498
|
+
# entities.each { |entity|
|
499
|
+
# entity_path = path + [entity]
|
500
|
+
# next unless entity.model.drawing_element_visible?(entity_path)
|
501
|
+
# block.call(entity, transformation, path)
|
502
|
+
# if instance?(entity)
|
503
|
+
# child_entities = entity.definition.entities
|
504
|
+
# child_transformation = transformation * entity.transformation
|
505
|
+
# walk(child_entities, child_transformation, entity_path, &block)
|
506
|
+
# end
|
507
|
+
# }
|
508
|
+
# end
|
509
|
+
#
|
510
|
+
# end
|
511
|
+
#
|
512
|
+
# model = Sketchup.active_model
|
513
|
+
# Example.walk(model.entities) do |entity, transformation, path|
|
514
|
+
# # Do something to every visible entity in the model...
|
515
|
+
# end
|
516
|
+
#
|
517
|
+
# @param [Sketchup::InstancePath, Array<Sketchup::Drawingelement>] instance_path
|
518
|
+
#
|
519
|
+
# @raise [ArgumentError] if the +instance_path+ is not valid.
|
520
|
+
#
|
521
|
+
# @return [Boolean]
|
522
|
+
#
|
523
|
+
# @see Sketchup::RenderingOptions
|
524
|
+
#
|
525
|
+
# @see Sketchup::Drawingelement#visible?
|
526
|
+
#
|
527
|
+
# @see Sketchup::Layer#visible?
|
528
|
+
#
|
529
|
+
# @version SketchUp 2020.0
|
530
|
+
def drawing_element_visible?(instance_path)
|
531
|
+
end
|
532
|
+
|
533
|
+
# Returns the transformation of the current component edit session. If a user
|
534
|
+
# has double-clicked to edit a component's geometry, this will
|
535
|
+
# return the transformation of that component, relative to its parent's
|
536
|
+
# origin. This allows one to correctly calculate "local" transformations of
|
537
|
+
# a given entity regardless of whether the user is in edit mode.
|
538
|
+
#
|
539
|
+
# @example
|
540
|
+
# Sketchup.active_model.edit_transform
|
541
|
+
#
|
542
|
+
# @return [Geom::Transformation] the current edit Transformation
|
543
|
+
#
|
544
|
+
# @version SketchUp 7.0
|
545
|
+
def edit_transform
|
546
|
+
end
|
547
|
+
|
548
|
+
# The {#entities} method returns an {Sketchup::Entities} object containing the
|
549
|
+
# entities in the root of model.
|
550
|
+
#
|
551
|
+
# @example
|
552
|
+
# model = Sketchup.active_model
|
553
|
+
# entities = model.entities
|
554
|
+
#
|
555
|
+
# @note This does not return a collection of all the entities in the model,
|
556
|
+
# only the top level node of the model hierarchy. To get to all entities in
|
557
|
+
# a model you must recursivly traverse the model.
|
558
|
+
#
|
559
|
+
# @return [Sketchup::Entities] an Entities object if successful
|
560
|
+
#
|
561
|
+
# @version SketchUp 6.0
|
562
|
+
def entities
|
563
|
+
end
|
564
|
+
|
565
|
+
# The export method is used to export a given file format. It knows which
|
566
|
+
# format to export based on the file extension you place on the file name.
|
567
|
+
# For example, a filename of "thing.obj" will export an OBJ file, whereas
|
568
|
+
# "thing.dae" will export a COLLADA file.
|
569
|
+
#
|
570
|
+
# For SketchUp Pro 7.1+, valid extensions include dae, kmz, 3ds, dwg,
|
571
|
+
# dxf, fbx, obj, wrl, and xsi. SketchUp Free only supports dae and kmz.
|
572
|
+
#
|
573
|
+
# Format Support Changes:
|
574
|
+
# * SketchUp 7.1 added COLLADA (.dae) export capability.
|
575
|
+
# * SketchUp Pro 2015+ added IFC export capability.
|
576
|
+
# * SketchUp Pro 2016+ added PDF export capability.
|
577
|
+
# * SketchUp Pro 2018+ added options for all 3D exporters.
|
578
|
+
#
|
579
|
+
# See the {file:pages/exporter_options.md Exporter Options} file for information
|
580
|
+
# on creating a valid hash for the various exporters.
|
581
|
+
#
|
582
|
+
# @example General use
|
583
|
+
# model = Sketchup.active_model
|
584
|
+
# show_summary = true
|
585
|
+
#
|
586
|
+
# # Export dwg file on a PC, showing a summary when complete.
|
587
|
+
# status = model.export('c:\my_export.dwg', show_summary)
|
588
|
+
#
|
589
|
+
# # Export kmz file on Mac (note the absolute file path), without summary.
|
590
|
+
# status = model.export('/Library/my_export.kmz')
|
591
|
+
#
|
592
|
+
# # Export pdf file on a PC, showing a summary when complete.
|
593
|
+
# options_hash = { :show_summary => true,
|
594
|
+
# :output_profile_lines => false,
|
595
|
+
# :map_fonts => false,
|
596
|
+
# :model_units => Length::Meter }
|
597
|
+
# status = model.export('c:/my_export.pdf', options_hash)
|
598
|
+
#
|
599
|
+
# # Or for a COLLADA (.dae) file.
|
600
|
+
# options_hash = { :triangulated_faces => true,
|
601
|
+
# :doublesided_faces => true,
|
602
|
+
# :edges => false,
|
603
|
+
# :author_attribution => false,
|
604
|
+
# :texture_maps => true,
|
605
|
+
# :selectionset_only => false,
|
606
|
+
# :preserve_instancing => true }
|
607
|
+
# status = model.export('c:/my_export.dae', options_hash)
|
608
|
+
#
|
609
|
+
# @example IFC Example
|
610
|
+
# model = Sketchup.active_model
|
611
|
+
# # If no IFC types are passed in, then no geometry will be exported.
|
612
|
+
# options_hash = { :hidden_geometry => true,
|
613
|
+
# :ifc_mapped_items => true,
|
614
|
+
# :ifc_types => ['IfcBuilding', 'IfcDoor']}
|
615
|
+
# status = model.export('c:/my_export.ifc', options_hash)
|
616
|
+
#
|
617
|
+
# @overload export(filename, show_summary = false)
|
618
|
+
#
|
619
|
+
# @param [String] filename The name of the file to export.
|
620
|
+
# @param [Boolean] show_summary Boolean to show summary dialog.
|
621
|
+
# @return [Boolean]
|
622
|
+
#
|
623
|
+
# @overload export(filename, options)
|
624
|
+
#
|
625
|
+
# @param [String] filename The name of the file to export.
|
626
|
+
# @param [Hash] options
|
627
|
+
# @return [Boolean]
|
628
|
+
#
|
629
|
+
# @raise [ArgumentError] If the file extension is unsupported.
|
630
|
+
#
|
631
|
+
# @version SketchUp 6.0
|
632
|
+
def export(*args)
|
633
|
+
end
|
634
|
+
|
635
|
+
# Finds and returns entities by their entityID or GUID.
|
636
|
+
#
|
637
|
+
# GUIDs looked up are only relevant to Group and ComponentInstance as these
|
638
|
+
# GUIDs are persistent. ComponentDefinition and Model GUIDs are not persistent
|
639
|
+
# and are not looked up.
|
640
|
+
#
|
641
|
+
# When given an array of IDs, an array is returned with a 1:1 mapping to the
|
642
|
+
# input arguments. This array may contain nil values if some ids were not
|
643
|
+
# found. You cannot look up a mix of entityIDs and GUIDs in the same call.
|
644
|
+
#
|
645
|
+
# @example
|
646
|
+
# model = Sketchup.active_model
|
647
|
+
#
|
648
|
+
# # Look up by entityID.
|
649
|
+
# entity_id = model.entities.add_line([0,0,0], [9,9,9]).entityID
|
650
|
+
# entity = model.find_entity_by_id(entity_id)
|
651
|
+
#
|
652
|
+
# # Look up by GUID.
|
653
|
+
# guid = model.entities.add_group.guid
|
654
|
+
# entity = model.find_entity_by_id(guid)
|
655
|
+
#
|
656
|
+
# # Look up multiple.
|
657
|
+
# entities = model.find_entity_by_id(id1, id2, id3)
|
658
|
+
# entities = model.find_entity_by_id([id1, id2, id3])
|
659
|
+
# entities = model.find_entity_by_id(guid1, guid2, guid3)
|
660
|
+
# entities = model.find_entity_by_id([guid1, guid2, guid3])
|
661
|
+
#
|
662
|
+
# @param [Array<Integer, String>] ids_or_array
|
663
|
+
# Pass either a series of ids or a single array containing
|
664
|
+
# ids. Ids must either be entityID Integers or GUID
|
665
|
+
# Strings.
|
666
|
+
#
|
667
|
+
# @return [Array<Sketchup::Entity, nil>] Returns an array with Entity objects for each id
|
668
|
+
# found and nil otherwise. Single Entity or nil when
|
669
|
+
# called with a single id.
|
670
|
+
#
|
671
|
+
# @version SketchUp 2015
|
672
|
+
def find_entity_by_id(ids_or_array)
|
673
|
+
end
|
674
|
+
|
675
|
+
# Finds and returns entities by their persistent id.
|
676
|
+
#
|
677
|
+
# When given an array of IDs, an array is returned with a 1:1 mapping to the
|
678
|
+
# input arguments. This array may contain `nil` values if some ids were not
|
679
|
+
# found.
|
680
|
+
#
|
681
|
+
# @example
|
682
|
+
# model = Sketchup.active_model
|
683
|
+
#
|
684
|
+
# # Look up by persistent_id.
|
685
|
+
# pid = model.entities.add_line([0,0,0], [9,9,9]).persistent_id
|
686
|
+
# entity = model.find_entity_by_persistent_id(pid)
|
687
|
+
#
|
688
|
+
# # Look up multiple.
|
689
|
+
# entities = model.find_entity_by_persistent_id(id1, id2, id3)
|
690
|
+
# entities = model.find_entity_by_persistent_id([id1, id2, id3])
|
691
|
+
#
|
692
|
+
# @example Limit search by scope
|
693
|
+
# model = Sketchup.active_model
|
694
|
+
# edge_pid = model.entities.add_line([0,0,0], [9,9,9]).persistent_id
|
695
|
+
# layer_pid = model.layers.add('Hello World').persistent_id
|
696
|
+
#
|
697
|
+
# # Search in all scopes:
|
698
|
+
# entities = model.find_entity_by_persistent_id(edge_pid, layer_pid)
|
699
|
+
# # => [#<Sketchup::Edge:0x000002567da4a8f0>, #<Sketchup::Layer:0x000002567da49e50>]
|
700
|
+
#
|
701
|
+
# # Search in layer scope:
|
702
|
+
# entities = model.find_entity_by_persistent_id(edge_pid, layer_pid, layers: true)
|
703
|
+
# # => [nil, #<Sketchup::Layer:0x000002567da49e50>]
|
704
|
+
#
|
705
|
+
# @overload find_entity_by_persistent_id(ids_or_array)
|
706
|
+
#
|
707
|
+
# @param [Array<Integer>] ids_or_array Pass either a series of ids or a
|
708
|
+
# single array containing persistent ids.
|
709
|
+
#
|
710
|
+
# @return [Array<Sketchup::Entity, nil>] Returns an array with
|
711
|
+
# {Sketchup::Entity} objects for each id found and nil otherwise.
|
712
|
+
#
|
713
|
+
# @overload find_entity_by_persistent_id(ids_or_array, **scope)
|
714
|
+
#
|
715
|
+
# @version SketchUp 2020.2
|
716
|
+
# @param [Array<Integer>] ids_or_array Pass either a series of ids or a
|
717
|
+
# single array containing persistent ids.
|
718
|
+
# @param [Hash<Symbol, Boolean>] scope Limit the scope of the search to the
|
719
|
+
# given scope categories.
|
720
|
+
# @option [Boolean] scope :entities Search entities parent to
|
721
|
+
# {Sketchup::Entities}.
|
722
|
+
# @option [Boolean] scope :layers Search {Sketchup::Layers} for
|
723
|
+
# {Sketchup::Layer} entities.
|
724
|
+
# @option [Boolean] scope :materials Search {Sketchup::Materials} for
|
725
|
+
# {Sketchup::Material} entities.
|
726
|
+
# @option [Boolean] scope :pages Search {Sketchup::Pages} for
|
727
|
+
# {Sketchup::Page} entities.
|
728
|
+
# @option [Boolean] scope :styles Search {Sketchup::Styles} for
|
729
|
+
# {Sketchup::Style} entities.
|
730
|
+
# @option [Boolean] scope :definitions Search {Sketchup::DefinitionList} for
|
731
|
+
# {Sketchup::ComponentDefinition} entities.
|
732
|
+
#
|
733
|
+
# @return [Array<Sketchup::Entity, nil>] Returns an array with
|
734
|
+
# {Sketchup::Entity} objects for each id found and nil otherwise.
|
735
|
+
#
|
736
|
+
# @version SketchUp 2017
|
737
|
+
def find_entity_by_persistent_id(*args)
|
738
|
+
end
|
739
|
+
|
740
|
+
# This methods determines if the model is georeferenced.
|
741
|
+
#
|
742
|
+
# @example
|
743
|
+
# if model.georeferenced?
|
744
|
+
# UI.messagebox('This model is georeferenced.')
|
745
|
+
# else
|
746
|
+
# UI.messagebox('This model is NOT georeferenced.')
|
747
|
+
# end
|
748
|
+
#
|
749
|
+
# @return [Boolean]
|
750
|
+
#
|
751
|
+
# @version SketchUp 7.1
|
752
|
+
def georeferenced?
|
753
|
+
end
|
754
|
+
|
755
|
+
# The get_attribute method gets the value of an attribute that in the
|
756
|
+
# AttributeDictionary with the given name. If no value is associated
|
757
|
+
# with key, or if the model does not have an attribute dictionary
|
758
|
+
# specified by name, the optional third parameter will be returned.
|
759
|
+
#
|
760
|
+
# @example
|
761
|
+
# model = Sketchup.active_model
|
762
|
+
# model.set_attribute('testdictionary', 'test', 115)
|
763
|
+
# value = model.get_attribute('testdictionary', 'test', 42)
|
764
|
+
#
|
765
|
+
# @param [String] dictname
|
766
|
+
# The name of the dictionary containing the value.
|
767
|
+
#
|
768
|
+
# @param [String] key
|
769
|
+
# The key containing the value.
|
770
|
+
#
|
771
|
+
# @param [Object] defaultvalue
|
772
|
+
# default value that will be returned if a
|
773
|
+
# value does not exist.
|
774
|
+
#
|
775
|
+
# @return [Object, nil] the value for a given key in the given
|
776
|
+
# dictionary if a value exists; the default value if a
|
777
|
+
# defaultvalue is provided and the value does not exist;
|
778
|
+
# nil if the value does not exist and no defaultvalue is
|
779
|
+
# provided.
|
780
|
+
#
|
781
|
+
# @version SketchUp 6.0
|
782
|
+
def get_attribute(dictname, key, defaultvalue = nil)
|
783
|
+
end
|
784
|
+
|
785
|
+
# the get_datum method retrieves the datum, in the form of a string, used in
|
786
|
+
# UTM conversions.
|
787
|
+
#
|
788
|
+
# @example
|
789
|
+
# model = Sketchup.active_model
|
790
|
+
# datum = model.get_datum
|
791
|
+
#
|
792
|
+
# @return [String] a datum represented as a string if successful.
|
793
|
+
#
|
794
|
+
# @version SketchUp 6.0
|
795
|
+
def get_datum
|
796
|
+
end
|
797
|
+
|
798
|
+
# Returns a value which indicates the product family of the installed SketchUp
|
799
|
+
# application.
|
800
|
+
# As of SketchUp 2013, the return values are:
|
801
|
+
# - +0+ = Unknown
|
802
|
+
# - +1+ = Pro Trial
|
803
|
+
# - +2+ = Pro
|
804
|
+
# - +3+ = Pro Expired
|
805
|
+
# - +4+ = Make Trial
|
806
|
+
# - +5+ = Make Expired
|
807
|
+
# - +6+ = Make
|
808
|
+
# - +7+ = Pro License Unavailable
|
809
|
+
#
|
810
|
+
# The Model class defines some of these values as constants as of SketchUp
|
811
|
+
# 2016.
|
812
|
+
#
|
813
|
+
# @example
|
814
|
+
# model = Sketchup.active_model
|
815
|
+
# product_family = model.get_product_family
|
816
|
+
# if product_family == Sketchup::Model::ProLicensed then
|
817
|
+
# puts "You are running licensed SketchUp Pro!"
|
818
|
+
# end
|
819
|
+
#
|
820
|
+
# @return [Integer] the product family number.
|
821
|
+
#
|
822
|
+
# @version SketchUp 6.0
|
823
|
+
def get_product_family
|
824
|
+
end
|
825
|
+
|
826
|
+
# The guid method retrieves the globally unique identifier, in the form of a
|
827
|
+
# string, for the Model. The guid will change after the model is modified and
|
828
|
+
# saved. The Model guid is stored with the SketchUp file; it will not change if the
|
829
|
+
# file is moved to another computer.
|
830
|
+
#
|
831
|
+
# @example
|
832
|
+
# model = Sketchup.active_model
|
833
|
+
# guid = model.guid
|
834
|
+
#
|
835
|
+
# @return [String] a globally unique identifier, in the form of a
|
836
|
+
# string, for the model
|
837
|
+
#
|
838
|
+
# @version SketchUp 6.0
|
839
|
+
def guid
|
840
|
+
end
|
841
|
+
|
842
|
+
# The import method is used to load a file by recognizing the file extension
|
843
|
+
# and calling appropriate importer.
|
844
|
+
#
|
845
|
+
# See the {file:pages/importer_options.md Importer Options} file for information
|
846
|
+
# on creating a valid hash for the various importers.
|
847
|
+
#
|
848
|
+
# @example Import for SketchUp 2017 and older
|
849
|
+
# model = Sketchup.active_model
|
850
|
+
# show_summary = true
|
851
|
+
# status = model.import("filename", show_summary)
|
852
|
+
#
|
853
|
+
# @example Import for SketchUp 2018+ and newer
|
854
|
+
# model = Sketchup.active_model
|
855
|
+
# options = { :units => "model",
|
856
|
+
# :merge_coplanar_faces => true,
|
857
|
+
# :show_summary => true }
|
858
|
+
# status = model.import("filename", options)
|
859
|
+
#
|
860
|
+
# @overload import(filename, options)
|
861
|
+
#
|
862
|
+
# @param [String] filename The input filename.
|
863
|
+
# @param [Hash] options The options.
|
864
|
+
# @return [Boolean]
|
865
|
+
#
|
866
|
+
# @overload import(filename, show_summary = false)
|
867
|
+
#
|
868
|
+
# @note This variant is for SketchUp 2017 and earlier.
|
869
|
+
# @param [String] filename The input filename.
|
870
|
+
# @param [Boolean] show_summary Show the summary dialog.
|
871
|
+
# @return [Boolean]
|
872
|
+
#
|
873
|
+
# @version SketchUp 6.0
|
874
|
+
def import(*args)
|
875
|
+
end
|
876
|
+
|
877
|
+
# The {#instance_path_from_pid_path} method returns a instance path given a
|
878
|
+
# string with persistent ids representing the path to the entity.
|
879
|
+
#
|
880
|
+
# @example
|
881
|
+
# points = [
|
882
|
+
# Geom::Point3d.new( 0, 0, 0),
|
883
|
+
# Geom::Point3d.new(10, 0, 0),
|
884
|
+
# Geom::Point3d.new(10, 20, 0),
|
885
|
+
# Geom::Point3d.new( 0, 20, 0)
|
886
|
+
# ]
|
887
|
+
# model = Sketchup.active_model
|
888
|
+
# entities = model.active_entities
|
889
|
+
# group = entities.add_group
|
890
|
+
# face = group.entities.add_face(points)
|
891
|
+
# pid_path = "#{group.persistent_id}.#{face.persistent_id}"
|
892
|
+
# # pid_path will look something like this: "658.723"
|
893
|
+
# instance_path = model.instance_path_from_pid_path(pid_path)
|
894
|
+
#
|
895
|
+
# @param [String] pid_path
|
896
|
+
# a string with persistent ids delimited by period.
|
897
|
+
#
|
898
|
+
# @raise [ArgumentError] if a valid instance path cannot be created from the
|
899
|
+
# given input path string.
|
900
|
+
#
|
901
|
+
# @return [Sketchup::InstancePath]
|
902
|
+
#
|
903
|
+
# @see Sketchup::InstancePath#persistent_id_path
|
904
|
+
#
|
905
|
+
# @version SketchUp 2017
|
906
|
+
def instance_path_from_pid_path(pid_path)
|
907
|
+
end
|
908
|
+
|
909
|
+
# The latlong_to_point method converts a latitude and longitude to a Point3d
|
910
|
+
# object in the model. It does not actually work with a LatLong object, but
|
911
|
+
# operates on a 2-element array. The returned point will always be on the
|
912
|
+
# ground (z=0).
|
913
|
+
#
|
914
|
+
# @example
|
915
|
+
# # Draw a point in Boulder, Colorado (40.0170N, 105.2830W)
|
916
|
+
# lnglat_array = [-105.28300, 40.01700]
|
917
|
+
# model = Sketchup.active_model
|
918
|
+
# local_point = model.latlong_to_point(lnglat_array)
|
919
|
+
# model.entities.add_cpoint(local_point)
|
920
|
+
#
|
921
|
+
# @param [Array(Numeric, Numeric)] lnglat_array
|
922
|
+
# A 2-element array containing first the longitude then
|
923
|
+
# the latitude.
|
924
|
+
#
|
925
|
+
# @return [Geom::Point3d] a point3d object if successful, false if
|
926
|
+
# unsuccessful.
|
927
|
+
#
|
928
|
+
# @version SketchUp 6.0
|
929
|
+
def latlong_to_point(lnglat_array)
|
930
|
+
end
|
931
|
+
|
932
|
+
# The {#layers method retrieves a collection of all Layers objects in the model.
|
933
|
+
#
|
934
|
+
# @example
|
935
|
+
# model = Sketchup.active_model
|
936
|
+
# layers = model.layers
|
937
|
+
#
|
938
|
+
# @return [Sketchup::Layers] a Layers object containing a collection of
|
939
|
+
# layers in the model
|
940
|
+
#
|
941
|
+
# @version SketchUp 6.0
|
942
|
+
def layers
|
943
|
+
end
|
944
|
+
|
945
|
+
# The {#line_styles} method returns the line styles manager.
|
946
|
+
#
|
947
|
+
# @example
|
948
|
+
# line_styles = Sketchup.active_model.line_styles
|
949
|
+
#
|
950
|
+
# @return [Sketchup::LineStyles] The line styles manager.
|
951
|
+
#
|
952
|
+
# @version SketchUp 2019
|
953
|
+
def line_styles
|
954
|
+
end
|
955
|
+
|
956
|
+
# This method retrieves an Array of all of the datums recognized by SketchUp.
|
957
|
+
#
|
958
|
+
# @example
|
959
|
+
# model = Sketchup.active_model
|
960
|
+
# datums = model.list_datums
|
961
|
+
#
|
962
|
+
# @return [Array<String>] An Array object containing the datums
|
963
|
+
# supported by SketchUp
|
964
|
+
#
|
965
|
+
# @version SketchUp 6.0
|
966
|
+
def list_datums
|
967
|
+
end
|
968
|
+
|
969
|
+
# The {#materials} method returns a collection of all of the materials in the
|
970
|
+
# model.
|
971
|
+
#
|
972
|
+
# @example
|
973
|
+
# model = Sketchup.active_model
|
974
|
+
# materials = model.materials
|
975
|
+
#
|
976
|
+
# @return [Sketchup::Materials]
|
977
|
+
#
|
978
|
+
# @version SketchUp 6.0
|
979
|
+
def materials
|
980
|
+
end
|
981
|
+
|
982
|
+
# This method can be used to turn mipmapping on or off.
|
983
|
+
#
|
984
|
+
# @example
|
985
|
+
# Sketchup.active_model.mipmapping = false
|
986
|
+
#
|
987
|
+
# @param [Boolean] mipmap
|
988
|
+
# whether mipmapping is turned on or off.
|
989
|
+
#
|
990
|
+
# @return [Boolean] the new mipmapping setting
|
991
|
+
#
|
992
|
+
# @version SketchUp 7.0
|
993
|
+
def mipmapping=(mipmap)
|
994
|
+
end
|
995
|
+
|
996
|
+
# This method can be used to find out if mipmapping is on or off.
|
997
|
+
#
|
998
|
+
# @example
|
999
|
+
# mipmapping = Sketchup.active_model.mipmapping?
|
1000
|
+
#
|
1001
|
+
# @return [Boolean]
|
1002
|
+
#
|
1003
|
+
# @version SketchUp 7.0
|
1004
|
+
def mipmapping?
|
1005
|
+
end
|
1006
|
+
|
1007
|
+
# The modified? method determines if the Model has been modified since the
|
1008
|
+
# last save.
|
1009
|
+
#
|
1010
|
+
# @example
|
1011
|
+
# model = Sketchup.active_model
|
1012
|
+
# entities = model.active_entities
|
1013
|
+
# # Add a group to force the status return value to be true
|
1014
|
+
# entities.add_group
|
1015
|
+
# status = model.modified?
|
1016
|
+
#
|
1017
|
+
# @return [Boolean]
|
1018
|
+
#
|
1019
|
+
# @version SketchUp 6.0
|
1020
|
+
def modified?
|
1021
|
+
end
|
1022
|
+
|
1023
|
+
# The name method retrieves the string name of the model.
|
1024
|
+
#
|
1025
|
+
# @example
|
1026
|
+
# model = Sketchup.active_model
|
1027
|
+
# name = model.name
|
1028
|
+
#
|
1029
|
+
# @return [String] string name of the model
|
1030
|
+
#
|
1031
|
+
# @version SketchUp 6.0
|
1032
|
+
def name
|
1033
|
+
end
|
1034
|
+
|
1035
|
+
# The name= method sets the string name of the model.
|
1036
|
+
#
|
1037
|
+
# @example
|
1038
|
+
# Sketchup.active_model.name = "My New Model Name"
|
1039
|
+
#
|
1040
|
+
# @param [String] name
|
1041
|
+
# new name of the model
|
1042
|
+
#
|
1043
|
+
# @return [String] the new name
|
1044
|
+
#
|
1045
|
+
# @version SketchUp 6.0
|
1046
|
+
def name=(name)
|
1047
|
+
end
|
1048
|
+
|
1049
|
+
# Returns the number faces in a model.
|
1050
|
+
#
|
1051
|
+
# @example
|
1052
|
+
# model = Sketchup.active_model
|
1053
|
+
# number_of_faces = model.number_faces
|
1054
|
+
# puts "There are #{number_of_faces} faces in the model."
|
1055
|
+
#
|
1056
|
+
# @return [Integer]
|
1057
|
+
#
|
1058
|
+
# @version SketchUp 7.1
|
1059
|
+
def number_faces
|
1060
|
+
end
|
1061
|
+
|
1062
|
+
# The {#options} method retrieves the options manager that defines the options
|
1063
|
+
# settings for the model.
|
1064
|
+
#
|
1065
|
+
# Use the string keys instead of numerical indicies when accessing the options
|
1066
|
+
# as the indicies are not consistent between SketchUp versions.
|
1067
|
+
#
|
1068
|
+
# @example
|
1069
|
+
# # Output all options available.
|
1070
|
+
# options_manager = Sketchup.active_model.options
|
1071
|
+
# options_manager.keys.each { |options_provider|
|
1072
|
+
# puts options_provider.name
|
1073
|
+
# options_provider.each { |key, value|
|
1074
|
+
# puts "> #{key} - #{value}"
|
1075
|
+
# }
|
1076
|
+
# }
|
1077
|
+
#
|
1078
|
+
# @return [Sketchup::OptionsManager]
|
1079
|
+
#
|
1080
|
+
# @version SketchUp 6.0
|
1081
|
+
def options
|
1082
|
+
end
|
1083
|
+
|
1084
|
+
# The {#pages} method retrieves a {Sketchup::Pages} object containing all of
|
1085
|
+
# the pages in the model.
|
1086
|
+
#
|
1087
|
+
# @example
|
1088
|
+
# model = Sketchup.active_model
|
1089
|
+
# pages = model.pages
|
1090
|
+
#
|
1091
|
+
# @return [Sketchup::Pages]
|
1092
|
+
#
|
1093
|
+
# @version SketchUp 6.0
|
1094
|
+
def pages
|
1095
|
+
end
|
1096
|
+
|
1097
|
+
# The path method retrieves the path of the file from which the model was
|
1098
|
+
# opened.
|
1099
|
+
#
|
1100
|
+
# An empty string is returned for a new model (one which has not been saved
|
1101
|
+
# and opened.)
|
1102
|
+
#
|
1103
|
+
# @example
|
1104
|
+
# model = Sketchup.active_model
|
1105
|
+
# path = model.path
|
1106
|
+
#
|
1107
|
+
# @return [String] an string containing the path for the currently
|
1108
|
+
# opened model.
|
1109
|
+
#
|
1110
|
+
# @version SketchUp 6.0
|
1111
|
+
def path
|
1112
|
+
end
|
1113
|
+
|
1114
|
+
# The place_component method places a new component in the Model using the
|
1115
|
+
# component placement tool.
|
1116
|
+
#
|
1117
|
+
# @example
|
1118
|
+
# model.place_component componentdefinition, repeat
|
1119
|
+
#
|
1120
|
+
# @param [Sketchup::ComponentDefinition] componentdef
|
1121
|
+
# A component definition object containing the
|
1122
|
+
# definition (blueprint) for the component.
|
1123
|
+
#
|
1124
|
+
# @param [Boolean] repeat
|
1125
|
+
# If set to true, stay in the component
|
1126
|
+
# placement tool and place multiple components.
|
1127
|
+
#
|
1128
|
+
# @return [Sketchup::Model, nil] The model object on success or Nil
|
1129
|
+
#
|
1130
|
+
# @version SketchUp 6.0
|
1131
|
+
def place_component(componentdef, repeat = false)
|
1132
|
+
end
|
1133
|
+
|
1134
|
+
# The point_to_latlong method converts a point in the model to a LatLong so
|
1135
|
+
# that you can get its latitude and longitude.
|
1136
|
+
#
|
1137
|
+
# This method uses the location information set in ShadowInfo.
|
1138
|
+
#
|
1139
|
+
# NOTE: SketchUp 6.0 and higher has a change where this method returns a
|
1140
|
+
# Point3d instead of a LatLong, where the x and y values contain the LatLong
|
1141
|
+
# coordinates.
|
1142
|
+
#
|
1143
|
+
# @example
|
1144
|
+
# model = Sketchup.active_model
|
1145
|
+
# local_point = Geom::Point3d.new(10, 10, 10)
|
1146
|
+
# world_point = model.point_to_latlong(local_point)
|
1147
|
+
#
|
1148
|
+
# @param [Geom::Point3d] point
|
1149
|
+
# A Point3d object.
|
1150
|
+
#
|
1151
|
+
# @return [Geom::Point3d, Geom::LatLong] a LatLong or Point3d object. See
|
1152
|
+
# details for information.
|
1153
|
+
#
|
1154
|
+
# @version SketchUp 6.0
|
1155
|
+
def point_to_latlong(point)
|
1156
|
+
end
|
1157
|
+
|
1158
|
+
# This method converts a Point3d object in the Model to UTM coordinates.
|
1159
|
+
#
|
1160
|
+
# This method uses the location information set in ShadowInfo. See also UTM.
|
1161
|
+
#
|
1162
|
+
# @example
|
1163
|
+
# model = Sketchup.active_model
|
1164
|
+
# point = Geom::Point3d.new(10, 10, 10)
|
1165
|
+
# utm = model.point_to_utm(point)
|
1166
|
+
#
|
1167
|
+
# @param [Geom::Point3d] point
|
1168
|
+
# A Point3d object.
|
1169
|
+
#
|
1170
|
+
# @return [Geom::UTM] a UTM object
|
1171
|
+
#
|
1172
|
+
# @version SketchUp 6.0
|
1173
|
+
def point_to_utm(point)
|
1174
|
+
end
|
1175
|
+
|
1176
|
+
# The raytest method is used to cast a ray (line) through the model and return
|
1177
|
+
# the first thing that the ray hits.
|
1178
|
+
#
|
1179
|
+
# A ray is a two element array containing a point and a vector
|
1180
|
+
# [Geom::Point3d(), Geom::Vector3d()]. The point defines the start point of
|
1181
|
+
# the ray and the vector defines the direction. If direction can not be
|
1182
|
+
# normalized (e.g. direction = [0, 0, 0]), direction is taken as a point the
|
1183
|
+
# ray intersects.
|
1184
|
+
#
|
1185
|
+
# @example
|
1186
|
+
# model = Sketchup.active_model
|
1187
|
+
# ray = [Geom::Point3d.new(1, 2, 3), Geom::Vector3d.new(4, 5, 6)]
|
1188
|
+
# item = model.raytest(ray, false) # Consider hidden geometry when
|
1189
|
+
# # computing intersections.
|
1190
|
+
#
|
1191
|
+
# @note The parameter wysiwyg_flag was added in SU8 M1.
|
1192
|
+
#
|
1193
|
+
# @param [Array(Geom::Point3d, Geom::Vector3d)] ray
|
1194
|
+
# A two element array containing a point and a vector.
|
1195
|
+
#
|
1196
|
+
# @param [Boolean] wysiwyg_flag
|
1197
|
+
# An optional boolean, added in SU8 M1, indicating
|
1198
|
+
# whether or not to consider hidden geometry in intersect
|
1199
|
+
# computations. If this flag is not specified, it
|
1200
|
+
# defaults to true (WYSIWYG) - i.e. hidden geometry is
|
1201
|
+
# not intersected against.
|
1202
|
+
#
|
1203
|
+
# @return [Array(Geom::Point3d, Array<Sketchup::Drawingelement>), nil] an array of two values. The first value is a
|
1204
|
+
# Point3d where the item that the ray passed through
|
1205
|
+
# exists. The second element is the instance path array
|
1206
|
+
# of the entity that the ray hit. For example, if the ray
|
1207
|
+
# hits a face that is contained by a component instance the
|
1208
|
+
# instance path would be [Component1]. If the ray hit a
|
1209
|
+
# face that is contained by a component instance, which
|
1210
|
+
# is contained by another component instance and so on,
|
1211
|
+
# the instance path would be [Component1, Component2,
|
1212
|
+
# Component3...].
|
1213
|
+
#
|
1214
|
+
# @version SketchUp 6.0
|
1215
|
+
def raytest(ray, wysiwyg_flag = true)
|
1216
|
+
end
|
1217
|
+
|
1218
|
+
# The remove_observer method is used to remove an observer from the current
|
1219
|
+
# object.
|
1220
|
+
#
|
1221
|
+
# @example
|
1222
|
+
# model = Sketchup.active_model
|
1223
|
+
# observer = Sketchup::ModelObserver.new
|
1224
|
+
# model.add_observer(observer)
|
1225
|
+
# status = model.remove_observer(observer)
|
1226
|
+
#
|
1227
|
+
# @param [Object] observer
|
1228
|
+
# An observer.
|
1229
|
+
#
|
1230
|
+
# @return [Boolean] true if successful, false if unsuccessful.
|
1231
|
+
#
|
1232
|
+
# @version SketchUp 6.0
|
1233
|
+
def remove_observer(observer)
|
1234
|
+
end
|
1235
|
+
|
1236
|
+
# The {#rendering_options} method retrieves the RenderingOptions object for
|
1237
|
+
# this model.
|
1238
|
+
#
|
1239
|
+
# @example
|
1240
|
+
# model = Sketchup.active_model
|
1241
|
+
# renderingoptions = model.rendering_options
|
1242
|
+
#
|
1243
|
+
# @return [Sketchup::RenderingOptions]
|
1244
|
+
#
|
1245
|
+
# @version SketchUp 6.0
|
1246
|
+
def rendering_options
|
1247
|
+
end
|
1248
|
+
|
1249
|
+
# This method is used to save the model to a file.
|
1250
|
+
#
|
1251
|
+
# @example
|
1252
|
+
# model = Sketchup.active_model
|
1253
|
+
# # Save the model using the current SketchUp format
|
1254
|
+
# filename = File.join(ENV['HOME'], 'Desktop', 'mysketchup.skp')
|
1255
|
+
# status = model.save(filename)
|
1256
|
+
# # Save the model to the current file using the current SketchUp format
|
1257
|
+
# status = model.save
|
1258
|
+
# # Save the model to the current file in SketchUp 8 format
|
1259
|
+
# status = model.save("", Sketchup::Model::VERSION_8)
|
1260
|
+
# # Save the model in SketchUp 8 format
|
1261
|
+
# filename = File.join(ENV['Home'], 'Desktop', 'mysketchup_v8.skp')
|
1262
|
+
# status = model.save("filename", Sketchup::Model::VERSION_8)
|
1263
|
+
#
|
1264
|
+
# @note A bug in SketchUp 2016 and older caused the +.skb+ backup file
|
1265
|
+
# written during save to be empty. The +.skp+ file was however valid.
|
1266
|
+
#
|
1267
|
+
# @overload save
|
1268
|
+
#
|
1269
|
+
# Starting with SketchUp 2014, this parameter is optional.
|
1270
|
+
# If no arguments are provided or the filename is an empty string, model
|
1271
|
+
# will be saved to the file to which it is associated. It must have
|
1272
|
+
# already been saved to a file.
|
1273
|
+
#
|
1274
|
+
# @overload save(filename)
|
1275
|
+
#
|
1276
|
+
# @param [String] filename
|
1277
|
+
# The name of the file to save.
|
1278
|
+
# Starting with SketchUp 2014, this parameter is optional.
|
1279
|
+
# If not provided or an empty string, model will be saved
|
1280
|
+
# to the file to which it is associated. It must have
|
1281
|
+
# already been saved to a file.
|
1282
|
+
#
|
1283
|
+
# @overload save(filename, version)
|
1284
|
+
#
|
1285
|
+
# @param [String] filename
|
1286
|
+
# The name of the file to save.
|
1287
|
+
# Starting with SketchUp 2014, this parameter is optional.
|
1288
|
+
# If not provided or an empty string, model will be saved
|
1289
|
+
# to the file to which it is associated. It must have
|
1290
|
+
# already been saved to a file.
|
1291
|
+
#
|
1292
|
+
# @param [Integer] version
|
1293
|
+
# (SketchUp 2014+)
|
1294
|
+
# Optional SketchUp file format to save.
|
1295
|
+
# If not provided, latest file format will be used.
|
1296
|
+
# Possible values are:
|
1297
|
+
# Sketchup::Model::VERSION_3, Sketchup::Model::VERSION_4,
|
1298
|
+
# Sketchup::Model::VERSION_5, Sketchup::Model::VERSION_6,
|
1299
|
+
# Sketchup::Model::VERSION_7, Sketchup::Model::VERSION_8,
|
1300
|
+
# Sketchup::Model::VERSION_2013,
|
1301
|
+
# Sketchup::Model::VERSION_2014,
|
1302
|
+
# Sketchup::Model::VERSION_2015,
|
1303
|
+
# Sketchup::Model::VERSION_2016,
|
1304
|
+
# Sketchup::Model::VERSION_2017,
|
1305
|
+
# Sketchup::Model::VERSION_2018,
|
1306
|
+
# Sketchup::Model::VERSION_2019,
|
1307
|
+
# Sketchup::Model::VERSION_2020
|
1308
|
+
#
|
1309
|
+
# @return [Boolean] true if successful, false if unsuccessful
|
1310
|
+
#
|
1311
|
+
# @version SketchUp 6.0
|
1312
|
+
def save(*args)
|
1313
|
+
end
|
1314
|
+
|
1315
|
+
# This method is used to save the copy of the current model to a file.
|
1316
|
+
#
|
1317
|
+
# @example
|
1318
|
+
# model = Sketchup.active_model
|
1319
|
+
# # Save copy of the model using the current SketchUp format
|
1320
|
+
# filename = File.join(ENV['Home'], 'Desktop', 'myModelCopy.skp')
|
1321
|
+
# status = model.save_copy(filename)
|
1322
|
+
# # Save copy of the model in SketchUp 8 format
|
1323
|
+
# filename = File.join(ENV['Home'], 'Desktop', 'mysketchupcopy_v8.skp')
|
1324
|
+
# status = model.save_copy(filename, Sketchup::Model::VERSION_8)
|
1325
|
+
#
|
1326
|
+
# @param [String] filename
|
1327
|
+
# The name of the file to save the model copy.
|
1328
|
+
#
|
1329
|
+
# @param [Integer] version
|
1330
|
+
# (SketchUp 2014+)
|
1331
|
+
# Optional SketchUp file format to save.
|
1332
|
+
# If not provided, latest file format will be used.
|
1333
|
+
# Possible values are:
|
1334
|
+
# Sketchup::Model::VERSION_3, Sketchup::Model::VERSION_4,
|
1335
|
+
# Sketchup::Model::VERSION_5, Sketchup::Model::VERSION_6,
|
1336
|
+
# Sketchup::Model::VERSION_7, Sketchup::Model::VERSION_8,
|
1337
|
+
# Sketchup::Model::VERSION_2013,
|
1338
|
+
# Sketchup::Model::VERSION_2014,
|
1339
|
+
# Sketchup::Model::VERSION_2015,
|
1340
|
+
# Sketchup::Model::VERSION_2016,
|
1341
|
+
# Sketchup::Model::VERSION_2017,
|
1342
|
+
# Sketchup::Model::VERSION_2018,
|
1343
|
+
# Sketchup::Model::VERSION_2019,
|
1344
|
+
# Sketchup::Model::VERSION_2020
|
1345
|
+
#
|
1346
|
+
# @return [Boolean] true if successful, false if unsuccessful
|
1347
|
+
#
|
1348
|
+
# @version SketchUp 2014
|
1349
|
+
def save_copy(filename, version)
|
1350
|
+
end
|
1351
|
+
|
1352
|
+
# The save_thumbnail method is used to save a thumbnail image to a file.
|
1353
|
+
# The image format is specified by the file extension of filename. Supported
|
1354
|
+
# formats are bmp, jpg, png, tif, pct, and gif.
|
1355
|
+
#
|
1356
|
+
# @example
|
1357
|
+
# model = Sketchup.active_model
|
1358
|
+
# status = model.save_thumbnail('testthumbnail2.jpg')
|
1359
|
+
#
|
1360
|
+
# @param [String] filename
|
1361
|
+
# The name of the file, with extension, to save the
|
1362
|
+
# thumbnail as.
|
1363
|
+
#
|
1364
|
+
# @return [Boolean] true if successful, false if unsuccessful
|
1365
|
+
#
|
1366
|
+
# @version SketchUp 6.0
|
1367
|
+
def save_thumbnail(filename)
|
1368
|
+
end
|
1369
|
+
|
1370
|
+
# This method is used to select a SketchUp Tool object s the active tool. You
|
1371
|
+
# must implement the SketchUp Tool interface to create a tool prior to calling
|
1372
|
+
# this method.
|
1373
|
+
#
|
1374
|
+
# The select tool is activated if you pass nil to the select_tool method. You
|
1375
|
+
# must implement the SketchUp Tool interface to create a tool, prior to calling
|
1376
|
+
# this method, and then instance the tool implementation and pass the object to
|
1377
|
+
# this method. If you attempt to set the select_tool to nil in the initialize
|
1378
|
+
# method of a tool you have written, it will be ignored.
|
1379
|
+
#
|
1380
|
+
# @example
|
1381
|
+
# model = Sketchup.active_model
|
1382
|
+
# tool = model.select_tool(nil)
|
1383
|
+
#
|
1384
|
+
# @param [Object] tool
|
1385
|
+
# The Tool object you want to select.
|
1386
|
+
#
|
1387
|
+
# @return [Sketchup::Model] The Model object.
|
1388
|
+
#
|
1389
|
+
# @version SketchUp 6.0
|
1390
|
+
def select_tool(tool)
|
1391
|
+
end
|
1392
|
+
|
1393
|
+
# This method retrieves a Selection object for the model, containing the
|
1394
|
+
# currently selected entities. The entries in the selection list are not
|
1395
|
+
# necessarily in the same order in which the user selected them.
|
1396
|
+
#
|
1397
|
+
# @example
|
1398
|
+
# model = Sketchup.active_model
|
1399
|
+
# selection = model.selection
|
1400
|
+
#
|
1401
|
+
# @return [Sketchup::Selection] A Selection object with 0 or more entities
|
1402
|
+
# that are currently selected.
|
1403
|
+
#
|
1404
|
+
# @version SketchUp 6.0
|
1405
|
+
def selection
|
1406
|
+
end
|
1407
|
+
|
1408
|
+
# This method is used to set the value of an attribute in an attribute
|
1409
|
+
# dictionary with the given name.
|
1410
|
+
#
|
1411
|
+
# This method can be used create a new AttributeDictionary object, if needed.
|
1412
|
+
#
|
1413
|
+
# @example
|
1414
|
+
# model = Sketchup.active_model
|
1415
|
+
# value = model.set_attribute('attributedictionaryname', 'key', 'value')
|
1416
|
+
#
|
1417
|
+
# @param [String] attrdictname
|
1418
|
+
# The name of the attribute dictionary whose attribute
|
1419
|
+
# you wish to set.
|
1420
|
+
#
|
1421
|
+
# @param [String] key
|
1422
|
+
# The attribute name.
|
1423
|
+
#
|
1424
|
+
# @param [Object] value
|
1425
|
+
# The value to set.
|
1426
|
+
#
|
1427
|
+
# @return [Object] the value that was set
|
1428
|
+
#
|
1429
|
+
# @version SketchUp 6.0
|
1430
|
+
def set_attribute(attrdictname, key, value)
|
1431
|
+
end
|
1432
|
+
|
1433
|
+
# This method sets the datum used in conversions between the internal
|
1434
|
+
# coordinate system and UTM.
|
1435
|
+
#
|
1436
|
+
# The default datum is WGS84. You can use the method list_datums to get a list
|
1437
|
+
# of all of the datums supported in SketchUp. If you pass an invalid datum to
|
1438
|
+
# set_datum, set_datum returns the default datum.
|
1439
|
+
#
|
1440
|
+
# @example
|
1441
|
+
# model = Sketchup.active_model
|
1442
|
+
# value = model.set_datum('Adindan')
|
1443
|
+
#
|
1444
|
+
# @param [String] datum
|
1445
|
+
#
|
1446
|
+
# @return [nil]
|
1447
|
+
#
|
1448
|
+
# @version SketchUp 6.0
|
1449
|
+
def set_datum(datum)
|
1450
|
+
end
|
1451
|
+
|
1452
|
+
# This method is used to retrieve the shadow information for the Model.
|
1453
|
+
#
|
1454
|
+
# @example
|
1455
|
+
# model = Sketchup.active_model
|
1456
|
+
# shadowinfo = model.shadow_info
|
1457
|
+
#
|
1458
|
+
# @return [Sketchup::ShadowInfo]
|
1459
|
+
#
|
1460
|
+
# @version SketchUp 6.0
|
1461
|
+
def shadow_info
|
1462
|
+
end
|
1463
|
+
|
1464
|
+
# The {#start_operation} method is used to notify SketchUp that a new
|
1465
|
+
# operation (which can be undone) is starting.
|
1466
|
+
#
|
1467
|
+
# The +op_name+ argument is a description for the operation that is displayed
|
1468
|
+
# adjacent to the Edit > Undo menu item. Make sure to provide a user friendly
|
1469
|
+
# name for your operation.
|
1470
|
+
#
|
1471
|
+
# Starting with SketchUp 7.0, there are three additional booleans that one can
|
1472
|
+
# pass in when starting an operation. It is recommended to always set
|
1473
|
+
# +disable_ui+ to +true+. It's left to +false+ for default for compatibility
|
1474
|
+
# reasons.
|
1475
|
+
#
|
1476
|
+
# @example Observer Operation since SU2016
|
1477
|
+
# class MyDefinitionsObserver < Sketchup::DefinitionObserver
|
1478
|
+
# def onComponentAdded(definitions, definition)
|
1479
|
+
# return if definition.deleted?
|
1480
|
+
# # The operation name won't be displayed when the fourth argument is
|
1481
|
+
# # +true+. It will absorb into the previous operation.
|
1482
|
+
# definition.model.start_operation('Tag It', true, false, true)
|
1483
|
+
# definition.set_attribute('MyExtension', 'Tag', 'You are it')
|
1484
|
+
# definition.model.commit_operation
|
1485
|
+
# end
|
1486
|
+
# end
|
1487
|
+
#
|
1488
|
+
# observer = MyDefinitionsObserver.new
|
1489
|
+
# model = Sketchup.active_model
|
1490
|
+
# model.definitions.add_observer(observer)
|
1491
|
+
#
|
1492
|
+
# @example Typical Operation
|
1493
|
+
# model = Sketchup.active_model
|
1494
|
+
# model.start_operation('Generate House', true)
|
1495
|
+
# model.entities.add_line([0, 0, 0], [9, 0, 0])
|
1496
|
+
# model.entities.add_line([9, 0, 0], [9, 0, 9])
|
1497
|
+
# model.commit_operation
|
1498
|
+
#
|
1499
|
+
# @note Operations in SketchUp are sequential and cannot be nested. If you start a
|
1500
|
+
# new Ruby operation while another is still open, you will implicitly close
|
1501
|
+
# the first one.
|
1502
|
+
#
|
1503
|
+
# @param [String] op_name
|
1504
|
+
# name of the operation visible in the UI
|
1505
|
+
#
|
1506
|
+
# @param [Boolean] disable_ui
|
1507
|
+
# if set to true, then SketchUp's tendency to
|
1508
|
+
# update the user interface after each geometry change will be
|
1509
|
+
# suppressed. This can result in much faster Ruby code execution if the
|
1510
|
+
# operation involves updating the model in any way.
|
1511
|
+
#
|
1512
|
+
# @param [Boolean] next_transparent
|
1513
|
+
# <b>Deprecated!</b> if set to true, then
|
1514
|
+
# whatever operation comes after this one will be appended into one
|
1515
|
+
# combined operation, allowing the user the undo both actions with a
|
1516
|
+
# single undo command. This flag is a highly difficult one, since there
|
1517
|
+
# are so many ways that a SketchUp user can interrupt a given operation
|
1518
|
+
# with one of their own. <b>Use extreme caution</b> and test thoroughly
|
1519
|
+
# when setting this to true.
|
1520
|
+
#
|
1521
|
+
# @param [Boolean] transparent
|
1522
|
+
# if set to true, then this operation will
|
1523
|
+
# append to the previous operation. This is particularly useful for
|
1524
|
+
# creating observers that react to user actions without littering the
|
1525
|
+
# undo stack with extra steps that Ruby is performing.
|
1526
|
+
#
|
1527
|
+
# @return [Boolean] +true+ if successful, +false+ if unsuccessful
|
1528
|
+
#
|
1529
|
+
# @version SketchUp 6.0
|
1530
|
+
def start_operation(op_name, disable_ui = false, next_transparent = false, transparent = false)
|
1531
|
+
end
|
1532
|
+
|
1533
|
+
# The {#styles} method retrieves the styles associated with the model.
|
1534
|
+
#
|
1535
|
+
# @example
|
1536
|
+
# model = Sketchup.active_model
|
1537
|
+
# styles = model.styles
|
1538
|
+
#
|
1539
|
+
# @return [Sketchup::Styles]
|
1540
|
+
#
|
1541
|
+
# @version SketchUp 6.0
|
1542
|
+
def styles
|
1543
|
+
end
|
1544
|
+
|
1545
|
+
# The tags method retrieves the string tags of the model.
|
1546
|
+
#
|
1547
|
+
# @example
|
1548
|
+
# model = Sketchup.active_model
|
1549
|
+
# tags = model.tags
|
1550
|
+
#
|
1551
|
+
# @return [String] string tags of the model
|
1552
|
+
#
|
1553
|
+
# @version SketchUp 6.0
|
1554
|
+
def tags
|
1555
|
+
end
|
1556
|
+
|
1557
|
+
# The tags= method sets the string tags of the model.
|
1558
|
+
#
|
1559
|
+
# @example
|
1560
|
+
# Sketchup.active_model.tags = "Building, House, Brick"
|
1561
|
+
#
|
1562
|
+
# @param [String] tags
|
1563
|
+
# new tags of the model
|
1564
|
+
#
|
1565
|
+
# @return [String] the new tags
|
1566
|
+
#
|
1567
|
+
# @version SketchUp 6.0
|
1568
|
+
def tags=(tags)
|
1569
|
+
end
|
1570
|
+
|
1571
|
+
# The tile method retrieves the name of the model. If the model is saved on
|
1572
|
+
# disk, returns the file name without extension. Otherwise returns an empty
|
1573
|
+
# string.
|
1574
|
+
#
|
1575
|
+
# @example
|
1576
|
+
# model = Sketchup.active_model
|
1577
|
+
# title = model.title
|
1578
|
+
#
|
1579
|
+
# @return [String] the title of the model or an empty string (if
|
1580
|
+
# the title is not set)
|
1581
|
+
#
|
1582
|
+
# @version SketchUp 6.0
|
1583
|
+
def title
|
1584
|
+
end
|
1585
|
+
|
1586
|
+
# The {#tools} method is used to retrieve the current {Sketchup::Tools} object.
|
1587
|
+
#
|
1588
|
+
# @example
|
1589
|
+
# model = Sketchup.active_model
|
1590
|
+
# tools = model.tools
|
1591
|
+
#
|
1592
|
+
# @return [Sketchup::Tools] a Tools object.
|
1593
|
+
#
|
1594
|
+
# @version SketchUp 6.0
|
1595
|
+
def tools
|
1596
|
+
end
|
1597
|
+
|
1598
|
+
# The utm_to_point method converts a position given in UTM coordinates to a
|
1599
|
+
# Point3d in the Model.
|
1600
|
+
#
|
1601
|
+
# @example
|
1602
|
+
# model = Sketchup.active_model
|
1603
|
+
# utm = Geom::UTM.new([+1, "A", 0.12333333, 0.12321321])
|
1604
|
+
# point = model.utm_to_point(utm)
|
1605
|
+
#
|
1606
|
+
# @param [Geom::UTM] utm
|
1607
|
+
# A UTM object.
|
1608
|
+
#
|
1609
|
+
# @return [Geom::Point3d] A Point3d object.
|
1610
|
+
#
|
1611
|
+
# @version SketchUp 6.0
|
1612
|
+
def utm_to_point(utm)
|
1613
|
+
end
|
1614
|
+
|
1615
|
+
# Determine if a model is a valid Sketchup::Model object. Returns false
|
1616
|
+
# if the model has been closed.
|
1617
|
+
#
|
1618
|
+
# This is useful on the mac where one can have multiple models open at the
|
1619
|
+
# same time. In such a case, this method can tell you if the user has closed
|
1620
|
+
# the model before you perform operations on it.
|
1621
|
+
#
|
1622
|
+
# @example
|
1623
|
+
# # This is a silly example since the active model is generally going to
|
1624
|
+
# # be valid, but it illustrates the idea.
|
1625
|
+
# model = Sketchup.active_model
|
1626
|
+
# if model.valid?
|
1627
|
+
# UI.messagebox('This model is valid.')
|
1628
|
+
# else
|
1629
|
+
# UI.messagebox('This model is NOT valid.')
|
1630
|
+
# end
|
1631
|
+
#
|
1632
|
+
# @return [Boolean]
|
1633
|
+
#
|
1634
|
+
# @version SketchUp 6.0
|
1635
|
+
def valid?
|
1636
|
+
end
|
1637
|
+
|
1638
|
+
end
|