sketchup-api-stubs 0.7.8 → 0.7.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sketchup-api-stubs/sketchup.rb +151 -148
- data/lib/sketchup-api-stubs/stubs/Array.rb +741 -741
- data/lib/sketchup-api-stubs/stubs/Geom/BoundingBox.rb +322 -322
- 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 -400
- data/lib/sketchup-api-stubs/stubs/Geom/Point3d.rb +661 -661
- data/lib/sketchup-api-stubs/stubs/Geom/PolygonMesh.rb +509 -523
- data/lib/sketchup-api-stubs/stubs/Geom/Transformation.rb +476 -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 -522
- data/lib/sketchup-api-stubs/stubs/Geom/Vector3d.rb +693 -693
- data/lib/sketchup-api-stubs/stubs/Geom.rb +351 -351
- data/lib/sketchup-api-stubs/stubs/LanguageHandler.rb +93 -93
- data/lib/sketchup-api-stubs/stubs/Layout/AngularDimension.rb +595 -595
- data/lib/sketchup-api-stubs/stubs/Layout/AutoTextDefinition.rb +747 -698
- data/lib/sketchup-api-stubs/stubs/Layout/AutoTextDefinitions.rb +183 -183
- data/lib/sketchup-api-stubs/stubs/Layout/ConnectionPoint.rb +70 -70
- data/lib/sketchup-api-stubs/stubs/Layout/Document.rb +517 -516
- data/lib/sketchup-api-stubs/stubs/Layout/Ellipse.rb +29 -29
- data/lib/sketchup-api-stubs/stubs/Layout/Entities.rb +148 -148
- data/lib/sketchup-api-stubs/stubs/Layout/Entity.rb +353 -353
- data/lib/sketchup-api-stubs/stubs/Layout/FormattedText.rb +354 -354
- data/lib/sketchup-api-stubs/stubs/Layout/Grid.rb +311 -311
- data/lib/sketchup-api-stubs/stubs/Layout/Group.rb +261 -261
- data/lib/sketchup-api-stubs/stubs/Layout/Image.rb +91 -91
- data/lib/sketchup-api-stubs/stubs/Layout/Label.rb +370 -370
- 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 +225 -225
- data/lib/sketchup-api-stubs/stubs/Layout/LinearDimension.rb +567 -567
- 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 +209 -209
- 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/ReferenceEntity.rb +82 -0
- data/lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb +692 -692
- 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/Layout.rb +25 -25
- data/lib/sketchup-api-stubs/stubs/Length.rb +278 -278
- data/lib/sketchup-api-stubs/stubs/Numeric.rb +249 -249
- data/lib/sketchup-api-stubs/stubs/Sketchup/Animation.rb +144 -144
- data/lib/sketchup-api-stubs/stubs/Sketchup/AppObserver.rb +169 -169
- data/lib/sketchup-api-stubs/stubs/Sketchup/ArcCurve.rb +209 -209
- data/lib/sketchup-api-stubs/stubs/Sketchup/AttributeDictionaries.rb +150 -152
- data/lib/sketchup-api-stubs/stubs/Sketchup/AttributeDictionary.rb +281 -286
- data/lib/sketchup-api-stubs/stubs/Sketchup/Axes.rb +149 -149
- data/lib/sketchup-api-stubs/stubs/Sketchup/Behavior.rb +302 -302
- data/lib/sketchup-api-stubs/stubs/Sketchup/Camera.rb +478 -478
- data/lib/sketchup-api-stubs/stubs/Sketchup/ClassificationSchema.rb +63 -63
- data/lib/sketchup-api-stubs/stubs/Sketchup/Classifications.rb +121 -122
- data/lib/sketchup-api-stubs/stubs/Sketchup/Color.rb +294 -294
- data/lib/sketchup-api-stubs/stubs/Sketchup/ComponentDefinition.rb +659 -619
- 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 +201 -201
- data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionList.rb +449 -426
- data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionObserver.rb +74 -74
- data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionsObserver.rb +104 -104
- data/lib/sketchup-api-stubs/stubs/Sketchup/Dimension.rb +165 -165
- data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionLinear.rb +306 -306
- data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionObserver.rb +42 -42
- data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionRadial.rb +87 -87
- data/lib/sketchup-api-stubs/stubs/Sketchup/Drawingelement.rb +406 -396
- data/lib/sketchup-api-stubs/stubs/Sketchup/Edge.rb +397 -502
- data/lib/sketchup-api-stubs/stubs/Sketchup/EdgeUse.rb +211 -211
- data/lib/sketchup-api-stubs/stubs/Sketchup/Entities.rb +1239 -1205
- data/lib/sketchup-api-stubs/stubs/Sketchup/EntitiesBuilder.rb +261 -272
- data/lib/sketchup-api-stubs/stubs/Sketchup/EntitiesObserver.rb +127 -127
- data/lib/sketchup-api-stubs/stubs/Sketchup/Entity.rb +545 -545
- data/lib/sketchup-api-stubs/stubs/Sketchup/EntityObserver.rb +60 -60
- data/lib/sketchup-api-stubs/stubs/Sketchup/ExtensionsManager.rb +125 -126
- data/lib/sketchup-api-stubs/stubs/Sketchup/Face.rb +937 -937
- data/lib/sketchup-api-stubs/stubs/Sketchup/FrameChangeObserver.rb +102 -104
- data/lib/sketchup-api-stubs/stubs/Sketchup/Group.rb +750 -750
- data/lib/sketchup-api-stubs/stubs/Sketchup/Http/Request.rb +282 -292
- data/lib/sketchup-api-stubs/stubs/Sketchup/Http/Response.rb +62 -62
- data/lib/sketchup-api-stubs/stubs/Sketchup/Http.rb +27 -27
- data/lib/sketchup-api-stubs/stubs/Sketchup/Image.rb +468 -468
- data/lib/sketchup-api-stubs/stubs/Sketchup/ImageRep.rb +266 -266
- data/lib/sketchup-api-stubs/stubs/Sketchup/Importer.rb +189 -189
- data/lib/sketchup-api-stubs/stubs/Sketchup/InputPoint.rb +406 -407
- data/lib/sketchup-api-stubs/stubs/Sketchup/InstanceObserver.rb +84 -84
- data/lib/sketchup-api-stubs/stubs/Sketchup/InstancePath.rb +306 -306
- data/lib/sketchup-api-stubs/stubs/Sketchup/Layer.rb +326 -326
- data/lib/sketchup-api-stubs/stubs/Sketchup/LayerFolder.rb +422 -422
- data/lib/sketchup-api-stubs/stubs/Sketchup/Layers.rb +427 -427
- data/lib/sketchup-api-stubs/stubs/Sketchup/LayersObserver.rb +249 -249
- data/lib/sketchup-api-stubs/stubs/Sketchup/Licensing/ExtensionLicense.rb +86 -86
- data/lib/sketchup-api-stubs/stubs/Sketchup/Licensing.rb +48 -48
- data/lib/sketchup-api-stubs/stubs/Sketchup/LineStyle.rb +24 -24
- data/lib/sketchup-api-stubs/stubs/Sketchup/LineStyles.rb +114 -112
- data/lib/sketchup-api-stubs/stubs/Sketchup/Loop.rb +137 -137
- data/lib/sketchup-api-stubs/stubs/Sketchup/Material.rb +414 -414
- data/lib/sketchup-api-stubs/stubs/Sketchup/Materials.rb +317 -318
- data/lib/sketchup-api-stubs/stubs/Sketchup/MaterialsObserver.rb +142 -142
- data/lib/sketchup-api-stubs/stubs/Sketchup/Menu.rb +93 -93
- data/lib/sketchup-api-stubs/stubs/Sketchup/Model.rb +1652 -1651
- data/lib/sketchup-api-stubs/stubs/Sketchup/ModelObserver.rb +357 -357
- data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsManager.rb +130 -131
- data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsProvider.rb +271 -284
- data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsProviderObserver.rb +58 -58
- data/lib/sketchup-api-stubs/stubs/Sketchup/Overlay.rb +490 -0
- data/lib/sketchup-api-stubs/stubs/Sketchup/OverlaysManager.rb +116 -0
- data/lib/sketchup-api-stubs/stubs/Sketchup/Page.rb +797 -797
- data/lib/sketchup-api-stubs/stubs/Sketchup/Pages.rb +361 -363
- data/lib/sketchup-api-stubs/stubs/Sketchup/PagesObserver.rb +77 -77
- data/lib/sketchup-api-stubs/stubs/Sketchup/PickHelper.rb +478 -477
- data/lib/sketchup-api-stubs/stubs/Sketchup/RegionalSettings.rb +43 -43
- data/lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptions.rb +361 -364
- data/lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptionsObserver.rb +45 -45
- data/lib/sketchup-api-stubs/stubs/Sketchup/SectionPlane.rb +150 -150
- data/lib/sketchup-api-stubs/stubs/Sketchup/Selection.rb +458 -459
- 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 +255 -260
- data/lib/sketchup-api-stubs/stubs/Sketchup/ShadowInfoObserver.rb +59 -59
- data/lib/sketchup-api-stubs/stubs/Sketchup/Skp.rb +40 -40
- data/lib/sketchup-api-stubs/stubs/Sketchup/Style.rb +69 -69
- data/lib/sketchup-api-stubs/stubs/Sketchup/Styles.rb +217 -217
- data/lib/sketchup-api-stubs/stubs/Sketchup/Text.rb +262 -262
- data/lib/sketchup-api-stubs/stubs/Sketchup/Texture.rb +217 -217
- data/lib/sketchup-api-stubs/stubs/Sketchup/TextureWriter.rb +237 -237
- data/lib/sketchup-api-stubs/stubs/Sketchup/Tool.rb +834 -837
- data/lib/sketchup-api-stubs/stubs/Sketchup/Tools.rb +132 -132
- data/lib/sketchup-api-stubs/stubs/Sketchup/ToolsObserver.rb +156 -156
- data/lib/sketchup-api-stubs/stubs/Sketchup/UVHelper.rb +75 -75
- data/lib/sketchup-api-stubs/stubs/Sketchup/Vertex.rb +142 -142
- data/lib/sketchup-api-stubs/stubs/Sketchup/View.rb +1311 -1317
- data/lib/sketchup-api-stubs/stubs/Sketchup/ViewObserver.rb +45 -45
- data/lib/sketchup-api-stubs/stubs/Sketchup.rb +1377 -1360
- 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/Command.rb +389 -389
- data/lib/sketchup-api-stubs/stubs/UI/HtmlDialog.rb +494 -496
- data/lib/sketchup-api-stubs/stubs/UI/Notification.rb +269 -269
- data/lib/sketchup-api-stubs/stubs/UI/Toolbar.rb +241 -240
- data/lib/sketchup-api-stubs/stubs/UI/WebDialog.rb +635 -635
- data/lib/sketchup-api-stubs/stubs/UI.rb +683 -683
- data/lib/sketchup-api-stubs/stubs/_top_level.rb +303 -311
- data/lib/sketchup-api-stubs.rb +1 -1
- metadata +10 -7
@@ -1,502 +1,397 @@
|
|
1
|
-
# Copyright:: Copyright
|
2
|
-
# License:: The MIT License (MIT)
|
3
|
-
|
4
|
-
# The Edge class contains methods modifying and extracting information for
|
5
|
-
# edges.
|
6
|
-
#
|
7
|
-
# @version SketchUp 6.0
|
8
|
-
class Sketchup::Edge < Sketchup::Drawingelement
|
9
|
-
|
10
|
-
# Instance Methods
|
11
|
-
|
12
|
-
# The all_connected method retrieves all of the entities connected to an edge,
|
13
|
-
# including the edge itself.
|
14
|
-
#
|
15
|
-
# @example
|
16
|
-
#
|
17
|
-
#
|
18
|
-
#
|
19
|
-
#
|
20
|
-
#
|
21
|
-
#
|
22
|
-
#
|
23
|
-
#
|
24
|
-
#
|
25
|
-
#
|
26
|
-
#
|
27
|
-
#
|
28
|
-
#
|
29
|
-
#
|
30
|
-
#
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
#
|
35
|
-
#
|
36
|
-
#
|
37
|
-
#
|
38
|
-
#
|
39
|
-
#
|
40
|
-
#
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
#
|
45
|
-
#
|
46
|
-
#
|
47
|
-
#
|
48
|
-
#
|
49
|
-
#
|
50
|
-
#
|
51
|
-
#
|
52
|
-
#
|
53
|
-
#
|
54
|
-
#
|
55
|
-
#
|
56
|
-
#
|
57
|
-
#
|
58
|
-
#
|
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
|
-
#
|
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
|
-
#
|
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
|
-
#
|
227
|
-
#
|
228
|
-
#
|
229
|
-
#
|
230
|
-
#
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
#
|
238
|
-
#
|
239
|
-
#
|
240
|
-
#
|
241
|
-
#
|
242
|
-
#
|
243
|
-
#
|
244
|
-
#
|
245
|
-
#
|
246
|
-
#
|
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
|
-
# edge.
|
375
|
-
#
|
376
|
-
#
|
377
|
-
#
|
378
|
-
#
|
379
|
-
#
|
380
|
-
#
|
381
|
-
# @
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
#
|
386
|
-
#
|
387
|
-
# @
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
#
|
392
|
-
#
|
393
|
-
#
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
#
|
399
|
-
# @example
|
400
|
-
# edge = Sketchup.active_model.entities.add_line([0,0,0], [100,100,0])
|
401
|
-
# # Soft and Smooth are normally set in pairs.
|
402
|
-
# edge.soft = !edge.soft?
|
403
|
-
# edge.smooth = edge.soft?
|
404
|
-
#
|
405
|
-
# @return [Boolean]
|
406
|
-
#
|
407
|
-
# @see https://help.sketchup.com/en/article/3000097
|
408
|
-
#
|
409
|
-
# @version SketchUp 6.0
|
410
|
-
def soft?
|
411
|
-
end
|
412
|
-
|
413
|
-
# The split method is used to to split an edge into two or more distinct
|
414
|
-
# edges. If a Point3d is given, it must be a point that is on the Edge.
|
415
|
-
#
|
416
|
-
# If a Float is given, it is a number between 0 and 1 that gives the
|
417
|
-
# relative position along the edge at which to split it. For example,
|
418
|
-
# edge.split(0.5) will split the Edge at its midpoint. This split position
|
419
|
-
# is measured from the Edge.start.
|
420
|
-
#
|
421
|
-
# Returns the new Edge that was created as a result of splitting this one.
|
422
|
-
#
|
423
|
-
# @example
|
424
|
-
# # Split a line in half.
|
425
|
-
# edge = Sketchup.active_model.entities.add_line([0,0,0],[100,100,0])
|
426
|
-
# new_edge = edge.split 0.5
|
427
|
-
#
|
428
|
-
# @param [Geom::Point3d] position
|
429
|
-
# A Point3d object whose location is along the edge, or
|
430
|
-
# a Float between 0.0 and 1.0 defining how far along the
|
431
|
-
# edge to split.
|
432
|
-
#
|
433
|
-
# @return [Sketchup::Edge] the new Edge object that was split off
|
434
|
-
# the old one if successful
|
435
|
-
#
|
436
|
-
# @version SketchUp 6.0
|
437
|
-
def split(position)
|
438
|
-
end
|
439
|
-
|
440
|
-
# The end method is used to retrieve the Vertex object at the start of the
|
441
|
-
# edge.
|
442
|
-
#
|
443
|
-
# @example
|
444
|
-
# edge = Sketchup.active_model.entities.add_line([0,0,0],[100,100,0])
|
445
|
-
# vertex = edge.start
|
446
|
-
# if (vertex)
|
447
|
-
# # display a pointer to the Vertex
|
448
|
-
# UI.messagebox vertex
|
449
|
-
# else
|
450
|
-
# UI.messagebox "Failure"
|
451
|
-
# end
|
452
|
-
# point = vertex.position
|
453
|
-
# # Let's get the Point3d of the vertex
|
454
|
-
# if (point)
|
455
|
-
# UI.messagebox point
|
456
|
-
# else
|
457
|
-
# UI.messagebox "Failure"
|
458
|
-
# end
|
459
|
-
#
|
460
|
-
# @return [Sketchup::Vertex] a Vertex object if successful
|
461
|
-
#
|
462
|
-
# @version SketchUp 6.0
|
463
|
-
def start
|
464
|
-
end
|
465
|
-
|
466
|
-
# The used_by? method is used to see if an edge is used by a given Face or
|
467
|
-
# Vertex.
|
468
|
-
#
|
469
|
-
# @example
|
470
|
-
# edge = Sketchup.active_model.entities.add_line([0,0,0],[100,100,0])
|
471
|
-
# # Returns a vertex
|
472
|
-
# vertex = edge.start
|
473
|
-
# # Check to see if the edge is used by the Vertex.
|
474
|
-
# status = edge.used_by? vertex
|
475
|
-
# if (status)
|
476
|
-
# UI.messagebox status
|
477
|
-
# else
|
478
|
-
# UI.messagebox "Failure"
|
479
|
-
# end
|
480
|
-
#
|
481
|
-
# @param [Sketchup::Vertex, Sketchup::Face] element
|
482
|
-
# A Vertex or Face object.
|
483
|
-
#
|
484
|
-
# @return [Boolean]
|
485
|
-
#
|
486
|
-
# @version SketchUp 6.0
|
487
|
-
def used_by?(element)
|
488
|
-
end
|
489
|
-
|
490
|
-
# The vertices method is used to retrieve the vertices on the edge.
|
491
|
-
#
|
492
|
-
# @example
|
493
|
-
# edge = Sketchup.active_model.entities.add_line([0,0,0],[100,100,0])
|
494
|
-
# vertices = edge.vertices
|
495
|
-
#
|
496
|
-
# @return [Array<Sketchup::Vertex>] an array of Vertex objects
|
497
|
-
#
|
498
|
-
# @version SketchUp 6.0
|
499
|
-
def vertices
|
500
|
-
end
|
501
|
-
|
502
|
-
end
|
1
|
+
# Copyright:: Copyright 2023 Trimble Inc.
|
2
|
+
# License:: The MIT License (MIT)
|
3
|
+
|
4
|
+
# The Edge class contains methods modifying and extracting information for
|
5
|
+
# edges.
|
6
|
+
#
|
7
|
+
# @version SketchUp 6.0
|
8
|
+
class Sketchup::Edge < Sketchup::Drawingelement
|
9
|
+
|
10
|
+
# Instance Methods
|
11
|
+
|
12
|
+
# The all_connected method retrieves all of the entities connected to an edge,
|
13
|
+
# including the edge itself.
|
14
|
+
#
|
15
|
+
# @example
|
16
|
+
# model = Sketchup.active_model
|
17
|
+
# entities = model.active_entities
|
18
|
+
# points = [
|
19
|
+
# Geom::Point3d.new(0, 0, 0),
|
20
|
+
# Geom::Point3d.new(100, 0, 0),
|
21
|
+
# Geom::Point3d.new(100, 100, 0),
|
22
|
+
# Geom::Point3d.new(200, 100, 0)
|
23
|
+
# ]
|
24
|
+
# # Add the edges to the model
|
25
|
+
# edges = entities.add_edges(points)
|
26
|
+
# connected_entities = edges.first.all_connected
|
27
|
+
#
|
28
|
+
# @return [Array<Sketchup::Entity>] the edge and entities connected to that edge
|
29
|
+
#
|
30
|
+
# @version SketchUp 6.0
|
31
|
+
def all_connected
|
32
|
+
end
|
33
|
+
|
34
|
+
# The common_face method is used to identify a face that is common to two
|
35
|
+
# edges.
|
36
|
+
#
|
37
|
+
# @example
|
38
|
+
# model = Sketchup.active_model
|
39
|
+
# entities = model.active_entities
|
40
|
+
# points = [
|
41
|
+
# Geom::Point3d.new(0, 0, 0),
|
42
|
+
# Geom::Point3d.new(100, 0, 0),
|
43
|
+
# Geom::Point3d.new(100, 100, 0),
|
44
|
+
# Geom::Point3d.new(0, 100, 0)
|
45
|
+
# ]
|
46
|
+
# # Add the face to the entities in the model
|
47
|
+
# face = entities.add_face(points)
|
48
|
+
# edge1 = face.edges[0]
|
49
|
+
# edge2 = face.edges[1]
|
50
|
+
# face = edge1.common_face(edge2)
|
51
|
+
#
|
52
|
+
# @param [Sketchup::Edge] edge2
|
53
|
+
# The face whose edge you are checking for commonality.
|
54
|
+
#
|
55
|
+
# @return [Sketchup::Face, nil] the Face object that is common to the two edges
|
56
|
+
# if successful
|
57
|
+
#
|
58
|
+
# @version SketchUp 6.0
|
59
|
+
def common_face(edge2)
|
60
|
+
end
|
61
|
+
|
62
|
+
# The curve method is used to get the Curve object that this edge belongs
|
63
|
+
# to, if any. Note that if the edge is part of an arc instead of a random
|
64
|
+
# curve, then this method will return an ArcCurve object.
|
65
|
+
#
|
66
|
+
# @example
|
67
|
+
# entities = Sketchup.active_model.entities
|
68
|
+
# edges = entities.add_curve([0, 0, 0], [100, 100, 0], [100, 200, 0])
|
69
|
+
# curve = edges[0].curve
|
70
|
+
#
|
71
|
+
# @return [Sketchup::Curve, nil] returns a Curve object if it is a
|
72
|
+
# curve, nil if it is not a curve
|
73
|
+
#
|
74
|
+
# @version SketchUp 6.0
|
75
|
+
def curve
|
76
|
+
end
|
77
|
+
|
78
|
+
# The end method is used to retrieve the Vertex object at the end of the edge.
|
79
|
+
#
|
80
|
+
# @example
|
81
|
+
# edge = Sketchup.active_model.entities.add_line([0, 0, 0], [100, 100, 0])
|
82
|
+
# vertex = edge.end
|
83
|
+
#
|
84
|
+
# @return [Sketchup::Vertex] a Vertex object if successful
|
85
|
+
#
|
86
|
+
# @version SketchUp 6.0
|
87
|
+
def end
|
88
|
+
end
|
89
|
+
|
90
|
+
# The explode_curve method is used to explode the curve that the given edge
|
91
|
+
# is a part of.
|
92
|
+
#
|
93
|
+
# @example
|
94
|
+
# model = Sketchup.active_model
|
95
|
+
# entities = model.active_entities
|
96
|
+
# edges = entities.add_curve([0, 0, 0], [100, 0, 0], [100, 100, 0])
|
97
|
+
# edge = edges[0]
|
98
|
+
# exploded_edge = edge.explode_curve
|
99
|
+
#
|
100
|
+
# @return [Sketchup::Edge] an exploded edge object if successful
|
101
|
+
#
|
102
|
+
# @version SketchUp 6.0
|
103
|
+
def explode_curve
|
104
|
+
end
|
105
|
+
|
106
|
+
# The {#faces} method is used to retrieve all of the faces common to the edge.
|
107
|
+
#
|
108
|
+
# @example
|
109
|
+
# edge = Sketchup.active_model.entities.add_line([0, 0, 0], [100, 100, 0])
|
110
|
+
# faces = edge.faces
|
111
|
+
#
|
112
|
+
# @return [Array<Sketchup::Face>]
|
113
|
+
#
|
114
|
+
# @version SketchUp 6.0
|
115
|
+
def faces
|
116
|
+
end
|
117
|
+
|
118
|
+
# The find_faces method is used to create all of the Faces that can be created
|
119
|
+
# with this edge. For example, if you use the API to draw three edges that form
|
120
|
+
# a triangle, the face between them will not show up because you've only drawn
|
121
|
+
# the edges, but if you call find_faces on one of the edges, the triangle will
|
122
|
+
# be filled in.
|
123
|
+
#
|
124
|
+
# @example
|
125
|
+
# model = Sketchup.active_model
|
126
|
+
# entities = model.active_entities
|
127
|
+
# points = [
|
128
|
+
# Geom::Point3d.new(0, 0, 0),
|
129
|
+
# Geom::Point3d.new(100, 0, 0),
|
130
|
+
# Geom::Point3d.new(100, 100, 0),
|
131
|
+
# Geom::Point3d.new(0, 100, 0),
|
132
|
+
# Geom::Point3d.new(0, 0, 0)
|
133
|
+
# ]
|
134
|
+
# edges = entities.add_curve(points)
|
135
|
+
# number_of_faces_found = edges[0].find_faces
|
136
|
+
#
|
137
|
+
# @return [Integer] the number of faces found
|
138
|
+
#
|
139
|
+
# @version SketchUp 6.0
|
140
|
+
def find_faces
|
141
|
+
end
|
142
|
+
|
143
|
+
# The {#length} method is used to retrieve the length of an edge in current
|
144
|
+
# units.
|
145
|
+
#
|
146
|
+
# You can pass in an optional {Geom::Transformation} (or an array that can
|
147
|
+
# represent a transformation), to correct for a parent group's transformation.
|
148
|
+
# For example, if an edge is inside of a group that is scaled to 200%, the
|
149
|
+
# length method will return the unscaled length of the edge. So by passing a
|
150
|
+
# 200% transformation object to this method, you can account for that to get
|
151
|
+
# the "visual" length of the edge.
|
152
|
+
#
|
153
|
+
# @example
|
154
|
+
# edge = Sketchup.active_model.entities.add_line([0, 0, 0], [100, 100, 0])
|
155
|
+
# edge.length
|
156
|
+
#
|
157
|
+
# @overload length
|
158
|
+
#
|
159
|
+
# @return [Length] the length of the edge
|
160
|
+
#
|
161
|
+
# @overload length(transform)
|
162
|
+
#
|
163
|
+
# @param [Geom::Transformation] transform
|
164
|
+
# A Transformation object or array that can be interpreted as a
|
165
|
+
# Transformation object.
|
166
|
+
# @return [Length] the length of the edge
|
167
|
+
#
|
168
|
+
# @version SketchUp 6.0
|
169
|
+
def length(*args)
|
170
|
+
end
|
171
|
+
|
172
|
+
# The line method is used to retrieve the line defined by the edge. Lines in
|
173
|
+
# SketchUp aren't visible entities but geometric constructs represented by
|
174
|
+
# an Array with a Point3d and a Vector3d. See the Geom module and the Array
|
175
|
+
# class for more information on lines.
|
176
|
+
#
|
177
|
+
# @example
|
178
|
+
# edge = Sketchup.active_model.entities.add_line([0,0,0], [100, 100, 0])
|
179
|
+
# line = edge.line
|
180
|
+
#
|
181
|
+
# @return [Array(Geom::Point3d, Geom::Vector3d)] an array with a Point3d object
|
182
|
+
# and a Vector3d object.
|
183
|
+
#
|
184
|
+
# @version SketchUp 6.0
|
185
|
+
def line
|
186
|
+
end
|
187
|
+
|
188
|
+
# The other_vertex method is used to find the opposite vertex given one vertex
|
189
|
+
# of the edge.
|
190
|
+
#
|
191
|
+
# @example
|
192
|
+
# edge = Sketchup.active_model.entities.add_line([0, 0, 0],[100, 100, 0])
|
193
|
+
# # Get the end vertex of an edge
|
194
|
+
# vertex = edge.end
|
195
|
+
# # Should find the starting vertex
|
196
|
+
# other_vertex = edge.other_vertex(vertex)
|
197
|
+
#
|
198
|
+
# @param [Sketchup::Vertex] vertex1
|
199
|
+
# One of the Vertex objects associated with the edge.
|
200
|
+
#
|
201
|
+
# @return [Sketchup::Vertex] the other Vertex object associated with the edge
|
202
|
+
#
|
203
|
+
# @version SketchUp 6.0
|
204
|
+
def other_vertex(vertex1)
|
205
|
+
end
|
206
|
+
|
207
|
+
# The {#reversed_in?} method is used to determine if the edge is reversed in
|
208
|
+
# a face's bounding loop.
|
209
|
+
#
|
210
|
+
# @example
|
211
|
+
# model = Sketchup.active_model
|
212
|
+
# entities = model.active_entities
|
213
|
+
# points = []
|
214
|
+
# points[0] = [0, 0, 0]
|
215
|
+
# points[1] = [9, 0, 0]
|
216
|
+
# points[2] = [9, 9, 0]
|
217
|
+
# points[3] = [0, 9, 0]
|
218
|
+
# # Add the face to the entities in the model.
|
219
|
+
# face = entities.add_face(points)
|
220
|
+
# edge = face.edges[0]
|
221
|
+
# edge.reversed_in?(face)
|
222
|
+
#
|
223
|
+
# @param [Sketchup::Face] face
|
224
|
+
# The face that is bounded by the edge.
|
225
|
+
#
|
226
|
+
# @return [Boolean] +true+ if the edge is reversed, +false+ if it is not
|
227
|
+
# reversed. +nil+ if the edge and face is not connected.
|
228
|
+
#
|
229
|
+
# @see Sketchup::EdgeUse
|
230
|
+
#
|
231
|
+
# @see Sketchup::Loop
|
232
|
+
#
|
233
|
+
# @version SketchUp 6.0
|
234
|
+
def reversed_in?(face)
|
235
|
+
end
|
236
|
+
|
237
|
+
# The {#smooth=} method is used to set the edge to be smooth.
|
238
|
+
#
|
239
|
+
# A smooth edge will cause the shading between connected faces to blend to a
|
240
|
+
# smooth transition. The edge will still be visible.
|
241
|
+
#
|
242
|
+
# @example
|
243
|
+
# edge = Sketchup.active_model.entities.add_line([0, 0, 0], [100, 100, 0])
|
244
|
+
# edge.soft = true
|
245
|
+
# edge.smooth = true
|
246
|
+
#
|
247
|
+
# @note The soft and smooth properties are normally set in pairs. You can
|
248
|
+
# observer this when the Soften/Smooth Edges feature or holding down Ctrl
|
249
|
+
# when using the Eraser Tool.
|
250
|
+
#
|
251
|
+
# @param [Boolean] value
|
252
|
+
#
|
253
|
+
# @return [Boolean]
|
254
|
+
#
|
255
|
+
# @see https://help.sketchup.com/en/article/3000097
|
256
|
+
#
|
257
|
+
# @version SketchUp 6.0
|
258
|
+
def smooth=(value)
|
259
|
+
end
|
260
|
+
|
261
|
+
# The {#smooth?} method is used to retrieve the current smooth setting for an
|
262
|
+
# edge.
|
263
|
+
#
|
264
|
+
# A smooth edge will cause the shading between connected faces to blend to a
|
265
|
+
# smooth transition. The edge will still be visible.
|
266
|
+
#
|
267
|
+
# @example
|
268
|
+
# edge = Sketchup.active_model.entities.add_line([0, 0, 0], [100, 100, 0])
|
269
|
+
# edge.smooth = true
|
270
|
+
# edge.smooth?
|
271
|
+
#
|
272
|
+
# @return [Boolean]
|
273
|
+
#
|
274
|
+
# @see https://help.sketchup.com/en/article/3000097
|
275
|
+
#
|
276
|
+
# @version SketchUp 6.0
|
277
|
+
def smooth?
|
278
|
+
end
|
279
|
+
|
280
|
+
# The {#soft=} method is used to set the edge to be soft.
|
281
|
+
#
|
282
|
+
# A soft edge will cause the connected faces to be treated as a surface. This
|
283
|
+
# means that if you have Hidden Geometry off and select one face it will also
|
284
|
+
# select all faces connected with soft edges. A soft edge will also appear
|
285
|
+
# hidden.
|
286
|
+
#
|
287
|
+
# @example
|
288
|
+
# edge = Sketchup.active_model.entities.add_line([0, 0, 0], [100, 100, 0])
|
289
|
+
# edge.smooth = true
|
290
|
+
# edge.soft = true
|
291
|
+
#
|
292
|
+
# @note The soft and smooth properties are normally set in pairs. You can
|
293
|
+
# observe this when the Soften/Smooth Edges feature or holding down Ctrl
|
294
|
+
# when using the Eraser Tool.
|
295
|
+
#
|
296
|
+
# @param [Boolean] value
|
297
|
+
#
|
298
|
+
# @return [Boolean]
|
299
|
+
#
|
300
|
+
# @see https://help.sketchup.com/en/article/3000097
|
301
|
+
#
|
302
|
+
# @version SketchUp 6.0
|
303
|
+
def soft=(value)
|
304
|
+
end
|
305
|
+
|
306
|
+
# The {#soft?} method is used to retrieve the current soft setting for an
|
307
|
+
# edge.
|
308
|
+
#
|
309
|
+
# A soft edge will cause the connected faces to be treated as a surface. This
|
310
|
+
# means that if you have Hidden Geometry off and select one face it will also
|
311
|
+
# select all faces connected with soft edges. A soft edge will also appear
|
312
|
+
# hidden.
|
313
|
+
#
|
314
|
+
# @example
|
315
|
+
# edge = Sketchup.active_model.entities.add_line([0, 0, 0], [100, 100, 0])
|
316
|
+
# edge.soft = true
|
317
|
+
# edge.soft?
|
318
|
+
#
|
319
|
+
# @return [Boolean]
|
320
|
+
#
|
321
|
+
# @see https://help.sketchup.com/en/article/3000097
|
322
|
+
#
|
323
|
+
# @version SketchUp 6.0
|
324
|
+
def soft?
|
325
|
+
end
|
326
|
+
|
327
|
+
# The split method is used to to split an edge into two or more distinct
|
328
|
+
# edges. If a Point3d is given, it must be a point that is on the Edge.
|
329
|
+
#
|
330
|
+
# If a Float is given, it is a number between 0 and 1 that gives the
|
331
|
+
# relative position along the edge at which to split it. For example,
|
332
|
+
# edge.split(0.5) will split the Edge at its midpoint. This split position
|
333
|
+
# is measured from the Edge.start.
|
334
|
+
#
|
335
|
+
# Returns the new Edge that was created as a result of splitting this one.
|
336
|
+
#
|
337
|
+
# @example
|
338
|
+
# edge = Sketchup.active_model.entities.add_line([0, 0, 0], [100, 100, 0])
|
339
|
+
# new_edge = edge.split(0.5)
|
340
|
+
#
|
341
|
+
# @param [Geom::Point3d] position
|
342
|
+
# A Point3d object whose location is along the edge, or
|
343
|
+
# a Float between 0.0 and 1.0 defining how far along the
|
344
|
+
# edge to split.
|
345
|
+
#
|
346
|
+
# @return [Sketchup::Edge] the new Edge object that was split off
|
347
|
+
# the old one if successful
|
348
|
+
#
|
349
|
+
# @version SketchUp 6.0
|
350
|
+
def split(position)
|
351
|
+
end
|
352
|
+
|
353
|
+
# The start method is used to retrieve the Vertex object at the start of the
|
354
|
+
# edge.
|
355
|
+
#
|
356
|
+
# @example
|
357
|
+
# edge = Sketchup.active_model.entities.add_line([0, 0, 0], [100, 100, 0])
|
358
|
+
# vertex = edge.start
|
359
|
+
#
|
360
|
+
# @return [Sketchup::Vertex] a Vertex object if successful
|
361
|
+
#
|
362
|
+
# @version SketchUp 6.0
|
363
|
+
def start
|
364
|
+
end
|
365
|
+
|
366
|
+
# The used_by? method is used to see if an edge is used by a given Face or
|
367
|
+
# Vertex.
|
368
|
+
#
|
369
|
+
# @example
|
370
|
+
# edge = Sketchup.active_model.entities.add_line([0, 0, 0],[100, 100, 0])
|
371
|
+
# # Returns a vertex
|
372
|
+
# vertex = edge.start
|
373
|
+
# # Check to see if the edge is used by the Vertex.
|
374
|
+
# edge.used_by?(vertex)
|
375
|
+
#
|
376
|
+
# @param [Sketchup::Vertex, Sketchup::Face] element
|
377
|
+
# A Vertex or Face object.
|
378
|
+
#
|
379
|
+
# @return [Boolean]
|
380
|
+
#
|
381
|
+
# @version SketchUp 6.0
|
382
|
+
def used_by?(element)
|
383
|
+
end
|
384
|
+
|
385
|
+
# The vertices method is used to retrieve the vertices on the edge.
|
386
|
+
#
|
387
|
+
# @example
|
388
|
+
# edge = Sketchup.active_model.entities.add_line([0, 0, 0], [100, 100, 0])
|
389
|
+
# vertices = edge.vertices
|
390
|
+
#
|
391
|
+
# @return [Array<Sketchup::Vertex>] an array of Vertex objects
|
392
|
+
#
|
393
|
+
# @version SketchUp 6.0
|
394
|
+
def vertices
|
395
|
+
end
|
396
|
+
|
397
|
+
end
|