sketchup-api-stubs 0.7.4 → 0.7.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/sketchup-api-stubs.rb +1 -1
- data/lib/sketchup-api-stubs/sketchup.rb +147 -145
- data/lib/sketchup-api-stubs/stubs/Geom/BoundingBox.rb +322 -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 -400
- data/lib/sketchup-api-stubs/stubs/Geom/Point3d.rb +661 -661
- data/lib/sketchup-api-stubs/stubs/Geom/PolygonMesh.rb +498 -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 -522
- 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 -573
- data/lib/sketchup-api-stubs/stubs/Layout/AutoTextDefinition.rb +411 -411
- data/lib/sketchup-api-stubs/stubs/Layout/AutoTextDefinitions.rb +179 -174
- data/lib/sketchup-api-stubs/stubs/Layout/ConnectionPoint.rb +70 -70
- data/lib/sketchup-api-stubs/stubs/Layout/Document.rb +515 -514
- data/lib/sketchup-api-stubs/stubs/Layout/Ellipse.rb +29 -29
- data/lib/sketchup-api-stubs/stubs/Layout/Entities.rb +148 -143
- data/lib/sketchup-api-stubs/stubs/Layout/Entity.rb +353 -353
- data/lib/sketchup-api-stubs/stubs/Layout/FormattedText.rb +349 -349
- 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 -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 +225 -220
- 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 -204
- 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 -694
- 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 +144 -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 +286 -281
- data/lib/sketchup-api-stubs/stubs/Sketchup/Axes.rb +149 -149
- data/lib/sketchup-api-stubs/stubs/Sketchup/Behavior.rb +302 -328
- data/lib/sketchup-api-stubs/stubs/Sketchup/Camera.rb +478 -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 +294 -281
- data/lib/sketchup-api-stubs/stubs/Sketchup/ComponentDefinition.rb +577 -562
- data/lib/sketchup-api-stubs/stubs/Sketchup/ComponentInstance.rb +604 -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 -194
- data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionList.rb +362 -329
- data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionObserver.rb +74 -72
- data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionsObserver.rb +104 -102
- data/lib/sketchup-api-stubs/stubs/Sketchup/Dimension.rb +165 -165
- data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionLinear.rb +306 -312
- data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionObserver.rb +42 -38
- data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionRadial.rb +87 -87
- data/lib/sketchup-api-stubs/stubs/Sketchup/Drawingelement.rb +396 -390
- data/lib/sketchup-api-stubs/stubs/Sketchup/Edge.rb +502 -508
- data/lib/sketchup-api-stubs/stubs/Sketchup/EdgeUse.rb +211 -211
- data/lib/sketchup-api-stubs/stubs/Sketchup/Entities.rb +1126 -1119
- data/lib/sketchup-api-stubs/stubs/Sketchup/EntitiesObserver.rb +127 -125
- data/lib/sketchup-api-stubs/stubs/Sketchup/Entity.rb +545 -544
- data/lib/sketchup-api-stubs/stubs/Sketchup/EntityObserver.rb +60 -59
- data/lib/sketchup-api-stubs/stubs/Sketchup/ExtensionsManager.rb +126 -125
- data/lib/sketchup-api-stubs/stubs/Sketchup/Face.rb +751 -750
- data/lib/sketchup-api-stubs/stubs/Sketchup/FrameChangeObserver.rb +104 -104
- data/lib/sketchup-api-stubs/stubs/Sketchup/Group.rb +699 -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 +417 -409
- data/lib/sketchup-api-stubs/stubs/Sketchup/ImageRep.rb +266 -226
- data/lib/sketchup-api-stubs/stubs/Sketchup/Importer.rb +189 -190
- data/lib/sketchup-api-stubs/stubs/Sketchup/InputPoint.rb +405 -393
- data/lib/sketchup-api-stubs/stubs/Sketchup/InstanceObserver.rb +84 -82
- data/lib/sketchup-api-stubs/stubs/Sketchup/InstancePath.rb +306 -303
- data/lib/sketchup-api-stubs/stubs/Sketchup/Layer.rb +327 -285
- data/lib/sketchup-api-stubs/stubs/Sketchup/LayerFolder.rb +422 -0
- data/lib/sketchup-api-stubs/stubs/Sketchup/Layers.rb +427 -244
- data/lib/sketchup-api-stubs/stubs/Sketchup/LayersObserver.rb +249 -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 -112
- data/lib/sketchup-api-stubs/stubs/Sketchup/Loop.rb +137 -137
- data/lib/sketchup-api-stubs/stubs/Sketchup/Material.rb +414 -416
- data/lib/sketchup-api-stubs/stubs/Sketchup/Materials.rb +318 -311
- data/lib/sketchup-api-stubs/stubs/Sketchup/MaterialsObserver.rb +142 -141
- data/lib/sketchup-api-stubs/stubs/Sketchup/Menu.rb +93 -95
- data/lib/sketchup-api-stubs/stubs/Sketchup/Model.rb +1651 -1638
- data/lib/sketchup-api-stubs/stubs/Sketchup/ModelObserver.rb +357 -356
- data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsManager.rb +131 -132
- data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsProvider.rb +284 -284
- data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsProviderObserver.rb +58 -58
- data/lib/sketchup-api-stubs/stubs/Sketchup/Page.rb +797 -770
- data/lib/sketchup-api-stubs/stubs/Sketchup/Pages.rb +363 -353
- data/lib/sketchup-api-stubs/stubs/Sketchup/PagesObserver.rb +77 -76
- data/lib/sketchup-api-stubs/stubs/Sketchup/PickHelper.rb +478 -456
- data/lib/sketchup-api-stubs/stubs/Sketchup/RegionalSettings.rb +43 -43
- data/lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptions.rb +364 -364
- data/lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptionsObserver.rb +45 -44
- data/lib/sketchup-api-stubs/stubs/Sketchup/SectionPlane.rb +150 -150
- data/lib/sketchup-api-stubs/stubs/Sketchup/Selection.rb +459 -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 +59 -57
- data/lib/sketchup-api-stubs/stubs/Sketchup/Skp.rb +40 -0
- data/lib/sketchup-api-stubs/stubs/Sketchup/Style.rb +69 -69
- data/lib/sketchup-api-stubs/stubs/Sketchup/Styles.rb +217 -211
- data/lib/sketchup-api-stubs/stubs/Sketchup/Text.rb +262 -262
- data/lib/sketchup-api-stubs/stubs/Sketchup/Texture.rb +217 -225
- data/lib/sketchup-api-stubs/stubs/Sketchup/TextureWriter.rb +237 -237
- data/lib/sketchup-api-stubs/stubs/Sketchup/Tool.rb +835 -829
- data/lib/sketchup-api-stubs/stubs/Sketchup/Tools.rb +132 -132
- data/lib/sketchup-api-stubs/stubs/Sketchup/ToolsObserver.rb +156 -154
- data/lib/sketchup-api-stubs/stubs/Sketchup/UVHelper.rb +71 -61
- data/lib/sketchup-api-stubs/stubs/Sketchup/Vertex.rb +142 -142
- data/lib/sketchup-api-stubs/stubs/Sketchup/View.rb +1307 -1301
- data/lib/sketchup-api-stubs/stubs/Sketchup/ViewObserver.rb +45 -43
- data/lib/sketchup-api-stubs/stubs/UI/Command.rb +317 -310
- data/lib/sketchup-api-stubs/stubs/UI/HtmlDialog.rb +387 -356
- data/lib/sketchup-api-stubs/stubs/UI/Notification.rb +255 -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 -311
- data/lib/sketchup-api-stubs/stubs/array.rb +741 -741
- data/lib/sketchup-api-stubs/stubs/geom.rb +351 -348
- data/lib/sketchup-api-stubs/stubs/languagehandler.rb +92 -92
- 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.rb +1342 -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 +668 -667
- metadata +4 -2
@@ -1,508 +1,502 @@
|
|
1
|
-
# Copyright:: Copyright 2020 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
|
-
# depth = 100
|
17
|
-
# width = 100
|
18
|
-
# model = Sketchup.active_model
|
19
|
-
# entities = model.active_entities
|
20
|
-
# pts = []
|
21
|
-
# pts[0] = [0, 0, 0]
|
22
|
-
# pts[1] = [width, 0, 0]
|
23
|
-
# pts[2] = [width, depth, 0]
|
24
|
-
# pts[3] = [0, depth, 0]
|
25
|
-
# # Add the face to the entities in the model
|
26
|
-
# face = entities.add_face pts
|
27
|
-
# # I just happen to know that the second and third entities in the
|
28
|
-
# # entities objects are edges.
|
29
|
-
# entity1 = entities[1]
|
30
|
-
# entity2 = entities[2]
|
31
|
-
# edges = entity1.all_connected
|
32
|
-
# if (edges)
|
33
|
-
# UI.messagebox edges.to_s
|
34
|
-
# else
|
35
|
-
# UI.messagebox "Failure"
|
36
|
-
# end
|
37
|
-
#
|
38
|
-
# @return [Array<Sketchup::Entity>] the edge and entities connected to that edge
|
39
|
-
#
|
40
|
-
# @version SketchUp 6.0
|
41
|
-
def all_connected
|
42
|
-
end
|
43
|
-
|
44
|
-
# The common_face method is used to identify a face that is common to two
|
45
|
-
# edges.
|
46
|
-
#
|
47
|
-
# @example
|
48
|
-
# depth = 100
|
49
|
-
# width = 100
|
50
|
-
# model = Sketchup.active_model
|
51
|
-
# entities = model.active_entities
|
52
|
-
# pts = []
|
53
|
-
# pts[0] = [0,0,0]
|
54
|
-
# pts[1] = [width,0,0]
|
55
|
-
# pts[2] = [width,depth,0]
|
56
|
-
# pts[3] = [0,depth,0]
|
57
|
-
# # Add the face to the entities in the model
|
58
|
-
# face = entities.add_face pts
|
59
|
-
# # I know that the second and third entity objects are edges
|
60
|
-
# entity1 = entities[1]
|
61
|
-
# entity2 = entities[2]
|
62
|
-
# UI.messagebox entity1
|
63
|
-
# UI.messagebox entity2
|
64
|
-
# face = entity1.common_face entity2
|
65
|
-
# if (face)
|
66
|
-
# UI.messagebox face
|
67
|
-
# else
|
68
|
-
# UI.messagebox "Failure: No Common Face"
|
69
|
-
# end
|
70
|
-
#
|
71
|
-
# @param [Sketchup::Edge] edge2
|
72
|
-
# The face whose edge you are checking for commonality.
|
73
|
-
#
|
74
|
-
# @return [Sketchup::Face, nil] the Face object that is common to the two edges
|
75
|
-
# if successful
|
76
|
-
#
|
77
|
-
# @version SketchUp 6.0
|
78
|
-
def common_face(edge2)
|
79
|
-
end
|
80
|
-
|
81
|
-
# The curve method is used to get the Curve object that this edge belongs
|
82
|
-
# to, if any. Note that if the edge is part of an arc instead of a random
|
83
|
-
# curve, then this method will return an ArcCurve object.
|
84
|
-
#
|
85
|
-
# @example
|
86
|
-
# edge = Sketchup.active_model.entities.add_line([0,0,0],[100,100,0])
|
87
|
-
# curve = edge.curve
|
88
|
-
# if (curve)
|
89
|
-
# # If it is a curve, display a pointer to the curve
|
90
|
-
# UI.messagebox curve
|
91
|
-
# else
|
92
|
-
# UI.messagebox "Failure: Not a Curve"
|
93
|
-
# end
|
94
|
-
#
|
95
|
-
# @return [Sketchup::Curve, nil] returns a Curve object if it is a
|
96
|
-
# curve, nil if it is not a curve
|
97
|
-
#
|
98
|
-
# @version SketchUp 6.0
|
99
|
-
def curve
|
100
|
-
end
|
101
|
-
|
102
|
-
# The end method is used to retrieve the Vertex object at the end of the edge.
|
103
|
-
#
|
104
|
-
# @example
|
105
|
-
# edge = Sketchup.active_model.entities.add_line([0,0,0],[100,100,0])
|
106
|
-
# vertex = edge.end
|
107
|
-
# if (vertex)
|
108
|
-
# # display a pointer to the Vertex
|
109
|
-
# UI.messagebox vertex
|
110
|
-
# else
|
111
|
-
# UI.messagebox "Failure"
|
112
|
-
# end
|
113
|
-
# point = vertex.position
|
114
|
-
# # Let's get the Point3d of the vertex
|
115
|
-
# if (point)
|
116
|
-
# UI.messagebox point
|
117
|
-
# else
|
118
|
-
# UI.messagebox "Failure"
|
119
|
-
# end
|
120
|
-
#
|
121
|
-
# @return [Sketchup::Vertex] a Vertex object if successful
|
122
|
-
#
|
123
|
-
# @version SketchUp 6.0
|
124
|
-
def end
|
125
|
-
end
|
126
|
-
|
127
|
-
# The explode_curve method is used to explode an edge as though it were an
|
128
|
-
# ArcCurve.
|
129
|
-
#
|
130
|
-
# @example
|
131
|
-
# depth = 100
|
132
|
-
# width = 100
|
133
|
-
# model = Sketchup.active_model
|
134
|
-
# entities = model.active_entities
|
135
|
-
# pts = []
|
136
|
-
# pts[0] = [0, 0, 0]
|
137
|
-
# pts[1] = [width, 0, 0]
|
138
|
-
# pts[2] = [width, depth, 0]
|
139
|
-
# pts[3] = [0, depth, 0]
|
140
|
-
# # Add the face to the entities in the model
|
141
|
-
# face = entities.add_face pts
|
142
|
-
# # I just happen to know that the second entity in the
|
143
|
-
# # entities objects is an edge.
|
144
|
-
# entity1 = entities[1]
|
145
|
-
# curve = entity1.explode_curve
|
146
|
-
# if (curve)
|
147
|
-
# UI.messagebox curve
|
148
|
-
# else
|
149
|
-
# UI.messagebox "Failure"
|
150
|
-
# end
|
151
|
-
#
|
152
|
-
# @return [Sketchup::Edge] an exploded edge object if successful
|
153
|
-
#
|
154
|
-
# @version SketchUp 6.0
|
155
|
-
def explode_curve
|
156
|
-
end
|
157
|
-
|
158
|
-
# The faces method is used to retrieve all of the faces common to the edge.
|
159
|
-
#
|
160
|
-
# @example
|
161
|
-
# edge = Sketchup.active_model.entities.add_line([0,0,0],[100,100,0])
|
162
|
-
# faces = edge.faces
|
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
|
-
# @return [Length] the length of the edge
|
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
|
-
# entities
|
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
|
-
|
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
|
-
# edge
|
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
|
-
# Vertex.
|
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
|
-
# @version SketchUp 6.0
|
505
|
-
def vertices
|
506
|
-
end
|
507
|
-
|
508
|
-
end
|
1
|
+
# Copyright:: Copyright 2020 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
|
+
# depth = 100
|
17
|
+
# width = 100
|
18
|
+
# model = Sketchup.active_model
|
19
|
+
# entities = model.active_entities
|
20
|
+
# pts = []
|
21
|
+
# pts[0] = [0, 0, 0]
|
22
|
+
# pts[1] = [width, 0, 0]
|
23
|
+
# pts[2] = [width, depth, 0]
|
24
|
+
# pts[3] = [0, depth, 0]
|
25
|
+
# # Add the face to the entities in the model
|
26
|
+
# face = entities.add_face pts
|
27
|
+
# # I just happen to know that the second and third entities in the
|
28
|
+
# # entities objects are edges.
|
29
|
+
# entity1 = entities[1]
|
30
|
+
# entity2 = entities[2]
|
31
|
+
# edges = entity1.all_connected
|
32
|
+
# if (edges)
|
33
|
+
# UI.messagebox edges.to_s
|
34
|
+
# else
|
35
|
+
# UI.messagebox "Failure"
|
36
|
+
# end
|
37
|
+
#
|
38
|
+
# @return [Array<Sketchup::Entity>] the edge and entities connected to that edge
|
39
|
+
#
|
40
|
+
# @version SketchUp 6.0
|
41
|
+
def all_connected
|
42
|
+
end
|
43
|
+
|
44
|
+
# The common_face method is used to identify a face that is common to two
|
45
|
+
# edges.
|
46
|
+
#
|
47
|
+
# @example
|
48
|
+
# depth = 100
|
49
|
+
# width = 100
|
50
|
+
# model = Sketchup.active_model
|
51
|
+
# entities = model.active_entities
|
52
|
+
# pts = []
|
53
|
+
# pts[0] = [0,0,0]
|
54
|
+
# pts[1] = [width,0,0]
|
55
|
+
# pts[2] = [width,depth,0]
|
56
|
+
# pts[3] = [0,depth,0]
|
57
|
+
# # Add the face to the entities in the model
|
58
|
+
# face = entities.add_face pts
|
59
|
+
# # I know that the second and third entity objects are edges
|
60
|
+
# entity1 = entities[1]
|
61
|
+
# entity2 = entities[2]
|
62
|
+
# UI.messagebox entity1
|
63
|
+
# UI.messagebox entity2
|
64
|
+
# face = entity1.common_face entity2
|
65
|
+
# if (face)
|
66
|
+
# UI.messagebox face
|
67
|
+
# else
|
68
|
+
# UI.messagebox "Failure: No Common Face"
|
69
|
+
# end
|
70
|
+
#
|
71
|
+
# @param [Sketchup::Edge] edge2
|
72
|
+
# The face whose edge you are checking for commonality.
|
73
|
+
#
|
74
|
+
# @return [Sketchup::Face, nil] the Face object that is common to the two edges
|
75
|
+
# if successful
|
76
|
+
#
|
77
|
+
# @version SketchUp 6.0
|
78
|
+
def common_face(edge2)
|
79
|
+
end
|
80
|
+
|
81
|
+
# The curve method is used to get the Curve object that this edge belongs
|
82
|
+
# to, if any. Note that if the edge is part of an arc instead of a random
|
83
|
+
# curve, then this method will return an ArcCurve object.
|
84
|
+
#
|
85
|
+
# @example
|
86
|
+
# edge = Sketchup.active_model.entities.add_line([0,0,0],[100,100,0])
|
87
|
+
# curve = edge.curve
|
88
|
+
# if (curve)
|
89
|
+
# # If it is a curve, display a pointer to the curve
|
90
|
+
# UI.messagebox curve
|
91
|
+
# else
|
92
|
+
# UI.messagebox "Failure: Not a Curve"
|
93
|
+
# end
|
94
|
+
#
|
95
|
+
# @return [Sketchup::Curve, nil] returns a Curve object if it is a
|
96
|
+
# curve, nil if it is not a curve
|
97
|
+
#
|
98
|
+
# @version SketchUp 6.0
|
99
|
+
def curve
|
100
|
+
end
|
101
|
+
|
102
|
+
# The end method is used to retrieve the Vertex object at the end of the edge.
|
103
|
+
#
|
104
|
+
# @example
|
105
|
+
# edge = Sketchup.active_model.entities.add_line([0,0,0],[100,100,0])
|
106
|
+
# vertex = edge.end
|
107
|
+
# if (vertex)
|
108
|
+
# # display a pointer to the Vertex
|
109
|
+
# UI.messagebox vertex
|
110
|
+
# else
|
111
|
+
# UI.messagebox "Failure"
|
112
|
+
# end
|
113
|
+
# point = vertex.position
|
114
|
+
# # Let's get the Point3d of the vertex
|
115
|
+
# if (point)
|
116
|
+
# UI.messagebox point
|
117
|
+
# else
|
118
|
+
# UI.messagebox "Failure"
|
119
|
+
# end
|
120
|
+
#
|
121
|
+
# @return [Sketchup::Vertex] a Vertex object if successful
|
122
|
+
#
|
123
|
+
# @version SketchUp 6.0
|
124
|
+
def end
|
125
|
+
end
|
126
|
+
|
127
|
+
# The explode_curve method is used to explode an edge as though it were an
|
128
|
+
# ArcCurve.
|
129
|
+
#
|
130
|
+
# @example
|
131
|
+
# depth = 100
|
132
|
+
# width = 100
|
133
|
+
# model = Sketchup.active_model
|
134
|
+
# entities = model.active_entities
|
135
|
+
# pts = []
|
136
|
+
# pts[0] = [0, 0, 0]
|
137
|
+
# pts[1] = [width, 0, 0]
|
138
|
+
# pts[2] = [width, depth, 0]
|
139
|
+
# pts[3] = [0, depth, 0]
|
140
|
+
# # Add the face to the entities in the model
|
141
|
+
# face = entities.add_face pts
|
142
|
+
# # I just happen to know that the second entity in the
|
143
|
+
# # entities objects is an edge.
|
144
|
+
# entity1 = entities[1]
|
145
|
+
# curve = entity1.explode_curve
|
146
|
+
# if (curve)
|
147
|
+
# UI.messagebox curve
|
148
|
+
# else
|
149
|
+
# UI.messagebox "Failure"
|
150
|
+
# end
|
151
|
+
#
|
152
|
+
# @return [Sketchup::Edge] an exploded edge object if successful
|
153
|
+
#
|
154
|
+
# @version SketchUp 6.0
|
155
|
+
def explode_curve
|
156
|
+
end
|
157
|
+
|
158
|
+
# The {#faces} method is used to retrieve all of the faces common to the edge.
|
159
|
+
#
|
160
|
+
# @example
|
161
|
+
# edge = Sketchup.active_model.entities.add_line([0, 0, 0], [100, 100, 0])
|
162
|
+
# faces = edge.faces
|
163
|
+
#
|
164
|
+
# @return [Array<Sketchup::Face>]
|
165
|
+
#
|
166
|
+
# @version SketchUp 6.0
|
167
|
+
def faces
|
168
|
+
end
|
169
|
+
|
170
|
+
# The find_faces method is used to create all of the Faces that can be created
|
171
|
+
# with this edge. For example, if you use the API to draw three edges that form
|
172
|
+
# a triangle, the face between them will not show up because you've only drawn
|
173
|
+
# the edges, but if you call find_faces on one of the edges, the triangle will
|
174
|
+
# be filled in.
|
175
|
+
#
|
176
|
+
# @example
|
177
|
+
# depth = 100
|
178
|
+
# width = 100
|
179
|
+
# model = Sketchup.active_model
|
180
|
+
# entities = model.active_entities
|
181
|
+
# pts = []
|
182
|
+
# pts[0] = [0, 0, 0]
|
183
|
+
# pts[1] = [width, 0, 0]
|
184
|
+
# pts[2] = [width, depth, 0]
|
185
|
+
# pts[3] = [0, depth, 0]
|
186
|
+
# # Add the face to the entities in the model
|
187
|
+
# face = entities.add_face pts
|
188
|
+
# # I just happen to know that the second entity in the
|
189
|
+
# # entities objects is an edge.
|
190
|
+
# entity1 = entities[1]
|
191
|
+
# # Getting zero.
|
192
|
+
# number = entity1.find_faces
|
193
|
+
# if (number)
|
194
|
+
# UI.messagebox "I created " + number.to_s + " faces."
|
195
|
+
# else
|
196
|
+
# UI.messagebox "Failure"
|
197
|
+
# end
|
198
|
+
#
|
199
|
+
# @return [Integer] the number of faces found
|
200
|
+
#
|
201
|
+
# @version SketchUp 6.0
|
202
|
+
def find_faces
|
203
|
+
end
|
204
|
+
|
205
|
+
# The {#length} method is used to retrieve the length of an edge in current
|
206
|
+
# units.
|
207
|
+
#
|
208
|
+
# You can pass in an optional {Geom::Transformation} (or an array that can
|
209
|
+
# represent a transformation), to correct for a parent group's transformation.
|
210
|
+
# For example, if an edge is inside of a group that is scaled to 200%, the
|
211
|
+
# length method will return the unscaled length of the edge. So by passing a
|
212
|
+
# 200% transformation object to this method, you can account for that to get
|
213
|
+
# the "visual" length of the edge.
|
214
|
+
#
|
215
|
+
# @example
|
216
|
+
# edge = Sketchup.active_model.entities.add_line([0, 0, 0], [100, 100, 0])
|
217
|
+
# puts "#{edge.length} (#{edge.length.inspect})"
|
218
|
+
#
|
219
|
+
# @overload length
|
220
|
+
#
|
221
|
+
# @return [Length] the length of the edge
|
222
|
+
#
|
223
|
+
# @overload length(transform)
|
224
|
+
#
|
225
|
+
# @param [Geom::Transformation] transform
|
226
|
+
# A Transformation object or array that can be interpreted as a
|
227
|
+
# Transformation object.
|
228
|
+
# @return [Length] the length of the edge
|
229
|
+
#
|
230
|
+
# @version SketchUp 6.0
|
231
|
+
def length(*args)
|
232
|
+
end
|
233
|
+
|
234
|
+
# The line method is used to retrieve the line defined by the edge. Lines in
|
235
|
+
# SketchUp aren't visible entities but geometric constructs represented by
|
236
|
+
# an Array with a Point3d and a Vector3d. See the Geom module and the Array
|
237
|
+
# class for more information on lines.
|
238
|
+
#
|
239
|
+
# @example
|
240
|
+
# edge = Sketchup.active_model.entities.add_line([0,0,0],[100,100,0])
|
241
|
+
# # Returns a 3D ray
|
242
|
+
# line = edge.line
|
243
|
+
# if (line)
|
244
|
+
# UI.messagebox line
|
245
|
+
# else
|
246
|
+
# UI.messagebox "Failure"
|
247
|
+
# end
|
248
|
+
#
|
249
|
+
# @return [Array(Geom::Point3d, Geom::Vector3d)] an array with a Point3d object
|
250
|
+
# and a Vector3d object.
|
251
|
+
#
|
252
|
+
# @version SketchUp 6.0
|
253
|
+
def line
|
254
|
+
end
|
255
|
+
|
256
|
+
# The other_vertex method is used to find the opposite vertex given one vertex
|
257
|
+
# of the edge.
|
258
|
+
#
|
259
|
+
# @example
|
260
|
+
# edge = Sketchup.active_model.entities.add_line([0,0,0],[100,100,0])
|
261
|
+
# # Get the end vertex of an edge
|
262
|
+
# vertex = edge.end
|
263
|
+
# # Should find the starting vertex
|
264
|
+
# othervertex = edge.other_vertex vertex
|
265
|
+
# if (othervertex)
|
266
|
+
# UI.messagebox othervertex
|
267
|
+
# else
|
268
|
+
# UI.messagebox "Failure"
|
269
|
+
# end
|
270
|
+
# # The Point3d for the vertex
|
271
|
+
# point = othervertex.position
|
272
|
+
# if (point)
|
273
|
+
# UI.messagebox point
|
274
|
+
# else
|
275
|
+
# UI.messagebox "Failure"
|
276
|
+
# end
|
277
|
+
#
|
278
|
+
# @param [Sketchup::Vertex] vertex1
|
279
|
+
# One of the Vertex objects associated with the edge.
|
280
|
+
#
|
281
|
+
# @return [Sketchup::Vertex] the other Vertex object associated with the edge
|
282
|
+
#
|
283
|
+
# @version SketchUp 6.0
|
284
|
+
def other_vertex(vertex1)
|
285
|
+
end
|
286
|
+
|
287
|
+
# The {#reversed_in?} method is used to determine if the edge is reversed in
|
288
|
+
# a face's bounding loop.
|
289
|
+
#
|
290
|
+
# @example
|
291
|
+
# model = Sketchup.active_model
|
292
|
+
# entities = model.active_entities
|
293
|
+
# points = []
|
294
|
+
# points[0] = [0, 0, 0]
|
295
|
+
# points[1] = [9, 0, 0]
|
296
|
+
# points[2] = [9, 9, 0]
|
297
|
+
# points[3] = [0, 9, 0]
|
298
|
+
# # Add the face to the entities in the model
|
299
|
+
# face = entities.add_face(points)
|
300
|
+
# edge = face.edges[0]
|
301
|
+
# if edge.reversed_in?(face)
|
302
|
+
# face.reverse!
|
303
|
+
# end
|
304
|
+
#
|
305
|
+
# @param [Sketchup::Face] face
|
306
|
+
# The face that is bounded by the edge.
|
307
|
+
#
|
308
|
+
# @return [Boolean] +true+ if the edge is reversed, +false+ if it is not
|
309
|
+
# reversed. +nil+ if the edge and face is not connected.
|
310
|
+
#
|
311
|
+
# @see Sketchup::EdgeUse
|
312
|
+
#
|
313
|
+
# @see Sketchup::Loop
|
314
|
+
#
|
315
|
+
# @version SketchUp 6.0
|
316
|
+
def reversed_in?(face)
|
317
|
+
end
|
318
|
+
|
319
|
+
# The {#smooth=} method is used to set the edge to be smooth.
|
320
|
+
#
|
321
|
+
# A smooth edge will cause the shading between connected faces to blend to a
|
322
|
+
# smooth transition. The edge will still be visible.
|
323
|
+
#
|
324
|
+
# @example
|
325
|
+
# edge = Sketchup.active_model.entities.add_line([0,0,0], [100,100,0])
|
326
|
+
# # Soft and Smooth are normally set in pairs.
|
327
|
+
# edge.soft = true
|
328
|
+
# edge.smooth = true
|
329
|
+
#
|
330
|
+
# @note The soft and smooth properties are normally set in pairs. You can
|
331
|
+
# observer this when the Soften/Smooth Edges feature or holding down Ctrl
|
332
|
+
# when using the Eraser Tool.
|
333
|
+
#
|
334
|
+
# @param [Boolean] value
|
335
|
+
#
|
336
|
+
# @return [Boolean]
|
337
|
+
#
|
338
|
+
# @see https://help.sketchup.com/en/article/3000097
|
339
|
+
#
|
340
|
+
# @version SketchUp 6.0
|
341
|
+
def smooth=(value)
|
342
|
+
end
|
343
|
+
|
344
|
+
# The {#smooth?} method is used to retrieve the current smooth setting for an
|
345
|
+
# edge.
|
346
|
+
#
|
347
|
+
# A smooth edge will cause the shading between connected faces to blend to a
|
348
|
+
# smooth transition. The edge will still be visible.
|
349
|
+
#
|
350
|
+
# @example
|
351
|
+
# edge = Sketchup.active_model.entities.add_line([0,0,0], [100,100,0])
|
352
|
+
# # Soft and Smooth are normally set in pairs.
|
353
|
+
# edge.smooth = !edge.smooth?
|
354
|
+
# edge.soft = edge.smooth?
|
355
|
+
#
|
356
|
+
# @return [Boolean]
|
357
|
+
#
|
358
|
+
# @see https://help.sketchup.com/en/article/3000097
|
359
|
+
#
|
360
|
+
# @version SketchUp 6.0
|
361
|
+
def smooth?
|
362
|
+
end
|
363
|
+
|
364
|
+
# The {#soft=} method is used to set the edge to be soft.
|
365
|
+
#
|
366
|
+
# A soft edge will cause the connected faces to be treated as a surface. This
|
367
|
+
# means that if you have Hidden Geometry off and select one face it will also
|
368
|
+
# select all faces connected with soft edges. A soft edge will also appear
|
369
|
+
# hidden.
|
370
|
+
#
|
371
|
+
# @example
|
372
|
+
# edge = Sketchup.active_model.entities.add_line([0,0,0], [100,100,0])
|
373
|
+
# # Soft and Smooth are normally set in pairs.
|
374
|
+
# edge.soft = true
|
375
|
+
# edge.smooth = true
|
376
|
+
#
|
377
|
+
# @note The soft and smooth properties are normally set in pairs. You can
|
378
|
+
# observer this when the Soften/Smooth Edges feature or holding down Ctrl
|
379
|
+
# when using the Eraser Tool.
|
380
|
+
#
|
381
|
+
# @param [Boolean] value
|
382
|
+
#
|
383
|
+
# @return [Boolean]
|
384
|
+
#
|
385
|
+
# @see https://help.sketchup.com/en/article/3000097
|
386
|
+
#
|
387
|
+
# @version SketchUp 6.0
|
388
|
+
def soft=(value)
|
389
|
+
end
|
390
|
+
|
391
|
+
# The {#soft?} method is used to retrieve the current smooth setting for an
|
392
|
+
# edge.
|
393
|
+
#
|
394
|
+
# A soft edge will cause the connected faces to be treated as a surface. This
|
395
|
+
# means that if you have Hidden Geometry off and select one face it will also
|
396
|
+
# select all faces connected with soft edges. A soft edge will also appear
|
397
|
+
# hidden.
|
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
|