sketchup-api-stubs 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/SketchUp/Geom/BoundingBox.rb +335 -0
- data/SketchUp/Geom/LatLong.rb +123 -0
- data/SketchUp/Geom/Point3d.rb +643 -0
- data/SketchUp/Geom/PolygonMesh.rb +478 -0
- data/SketchUp/Geom/Transformation.rb +476 -0
- data/SketchUp/Geom/UTM.rb +135 -0
- data/SketchUp/Geom/Vector3d.rb +684 -0
- data/SketchUp/Sketchup/Animation.rb +137 -0
- data/SketchUp/Sketchup/AppObserver.rb +157 -0
- data/SketchUp/Sketchup/ArcCurve.rb +209 -0
- data/SketchUp/Sketchup/AttributeDictionaries.rb +146 -0
- data/SketchUp/Sketchup/AttributeDictionary.rb +280 -0
- data/SketchUp/Sketchup/Axes.rb +149 -0
- data/SketchUp/Sketchup/Behavior.rb +338 -0
- data/SketchUp/Sketchup/Camera.rb +594 -0
- data/SketchUp/Sketchup/ClassificationSchema.rb +63 -0
- data/SketchUp/Sketchup/Classifications.rb +118 -0
- data/SketchUp/Sketchup/Color.rb +291 -0
- data/SketchUp/Sketchup/ComponentDefinition.rb +562 -0
- data/SketchUp/Sketchup/ComponentInstance.rb +597 -0
- data/SketchUp/Sketchup/Console.rb +78 -0
- data/SketchUp/Sketchup/ConstructionLine.rb +257 -0
- data/SketchUp/Sketchup/ConstructionPoint.rb +32 -0
- data/SketchUp/Sketchup/Curve.rb +196 -0
- data/SketchUp/Sketchup/DefinitionList.rb +312 -0
- data/SketchUp/Sketchup/DefinitionObserver.rb +73 -0
- data/SketchUp/Sketchup/DefinitionsObserver.rb +102 -0
- data/SketchUp/Sketchup/Dimension.rb +167 -0
- data/SketchUp/Sketchup/DimensionLinear.rb +232 -0
- data/SketchUp/Sketchup/DimensionObserver.rb +38 -0
- data/SketchUp/Sketchup/DimensionRadial.rb +87 -0
- data/SketchUp/Sketchup/Drawingelement.rb +400 -0
- data/SketchUp/Sketchup/Edge.rb +517 -0
- data/SketchUp/Sketchup/EdgeUse.rb +213 -0
- data/SketchUp/Sketchup/Entities.rb +1011 -0
- data/SketchUp/Sketchup/EntitiesObserver.rb +125 -0
- data/SketchUp/Sketchup/Entity.rb +522 -0
- data/SketchUp/Sketchup/EntityObserver.rb +59 -0
- data/SketchUp/Sketchup/ExtensionsManager.rb +129 -0
- data/SketchUp/Sketchup/Face.rb +737 -0
- data/SketchUp/Sketchup/FrameChangeObserver.rb +104 -0
- data/SketchUp/Sketchup/Group.rb +705 -0
- data/SketchUp/Sketchup/Http.rb +27 -0
- data/SketchUp/Sketchup/Http/Request.rb +285 -0
- data/SketchUp/Sketchup/Http/Response.rb +62 -0
- data/SketchUp/Sketchup/Image.rb +393 -0
- data/SketchUp/Sketchup/Importer.rb +192 -0
- data/SketchUp/Sketchup/InputPoint.rb +393 -0
- data/SketchUp/Sketchup/InstanceObserver.rb +82 -0
- data/SketchUp/Sketchup/InstancePath.rb +297 -0
- data/SketchUp/Sketchup/Layer.rb +240 -0
- data/SketchUp/Sketchup/Layers.rb +235 -0
- data/SketchUp/Sketchup/LayersObserver.rb +136 -0
- data/SketchUp/Sketchup/Licensing.rb +47 -0
- data/SketchUp/Sketchup/Licensing/ExtensionLicense.rb +88 -0
- data/SketchUp/Sketchup/Loop.rb +141 -0
- data/SketchUp/Sketchup/Material.rb +384 -0
- data/SketchUp/Sketchup/Materials.rb +283 -0
- data/SketchUp/Sketchup/MaterialsObserver.rb +141 -0
- data/SketchUp/Sketchup/Menu.rb +97 -0
- data/SketchUp/Sketchup/Model.rb +1459 -0
- data/SketchUp/Sketchup/ModelObserver.rb +356 -0
- data/SketchUp/Sketchup/OptionsManager.rb +135 -0
- data/SketchUp/Sketchup/OptionsProvider.rb +277 -0
- data/SketchUp/Sketchup/OptionsProviderObserver.rb +58 -0
- data/SketchUp/Sketchup/Page.rb +636 -0
- data/SketchUp/Sketchup/Pages.rb +349 -0
- data/SketchUp/Sketchup/PagesObserver.rb +76 -0
- data/SketchUp/Sketchup/PickHelper.rb +457 -0
- data/SketchUp/Sketchup/RegionalSettings.rb +43 -0
- data/SketchUp/Sketchup/RenderingOptions.rb +337 -0
- data/SketchUp/Sketchup/RenderingOptionsObserver.rb +44 -0
- data/SketchUp/Sketchup/SectionPlane.rb +88 -0
- data/SketchUp/Sketchup/Selection.rb +470 -0
- data/SketchUp/Sketchup/SelectionObserver.rb +115 -0
- data/SketchUp/Sketchup/Set.rb +253 -0
- data/SketchUp/Sketchup/ShadowInfo.rb +257 -0
- data/SketchUp/Sketchup/ShadowInfoObserver.rb +57 -0
- data/SketchUp/Sketchup/Style.rb +77 -0
- data/SketchUp/Sketchup/Styles.rb +204 -0
- data/SketchUp/Sketchup/Text.rb +241 -0
- data/SketchUp/Sketchup/Texture.rb +211 -0
- data/SketchUp/Sketchup/TextureWriter.rb +237 -0
- data/SketchUp/Sketchup/Tool.rb +808 -0
- data/SketchUp/Sketchup/Tools.rb +120 -0
- data/SketchUp/Sketchup/ToolsObserver.rb +154 -0
- data/SketchUp/Sketchup/UVHelper.rb +61 -0
- data/SketchUp/Sketchup/Vertex.rb +143 -0
- data/SketchUp/Sketchup/View.rb +965 -0
- data/SketchUp/Sketchup/ViewObserver.rb +40 -0
- data/SketchUp/UI/Command.rb +307 -0
- data/SketchUp/UI/HtmlDialog.rb +346 -0
- data/SketchUp/UI/Notification.rb +229 -0
- data/SketchUp/UI/Toolbar.rb +243 -0
- data/SketchUp/UI/WebDialog.rb +623 -0
- data/SketchUp/_top_level.rb +193 -0
- data/SketchUp/array.rb +593 -0
- data/SketchUp/geom.rb +231 -0
- data/SketchUp/languagehandler.rb +92 -0
- data/SketchUp/length.rb +210 -0
- data/SketchUp/numeric.rb +249 -0
- data/SketchUp/sketchup.rb +1290 -0
- data/SketchUp/sketchupextension.rb +355 -0
- data/SketchUp/string.rb +24 -0
- data/SketchUp/ui.rb +637 -0
- metadata +176 -0
@@ -0,0 +1,78 @@
|
|
1
|
+
# Copyright:: Copyright 2017 Trimble Inc.
|
2
|
+
# License:: The MIT License (MIT)
|
3
|
+
|
4
|
+
# The Console class is used by SketchUp to direct $stdout and $stderr to the
|
5
|
+
# Ruby Console. It is a singleton class that only has one instance available.
|
6
|
+
# This instance is accessible via the SKETCHUP_CONSOLE constant.
|
7
|
+
#
|
8
|
+
# In SketchUp 2014 methods were added to allow developers to control the
|
9
|
+
# visibility of the Ruby Console.
|
10
|
+
#
|
11
|
+
# Also note that in SketchUp 2014, writing to the console does not work from
|
12
|
+
# within Ruby threads other than the main thread. So the following code will
|
13
|
+
# not produce any output.
|
14
|
+
#
|
15
|
+
# @example
|
16
|
+
# t = Thread.new { puts 'This will not be written to the console.' }
|
17
|
+
# t.join
|
18
|
+
#
|
19
|
+
# @example
|
20
|
+
# # By default $stdout is directed to SKETCHUP_CONSOLE.
|
21
|
+
# p $stdout
|
22
|
+
#
|
23
|
+
# # $stdout can however be redirected so the safe way to access the
|
24
|
+
# # SketchUp console is by using the SKETCHUP_CONSOLE constant.
|
25
|
+
# p SKETCHUP_CONSOLE
|
26
|
+
#
|
27
|
+
# @version SketchUp 2014
|
28
|
+
class Sketchup::Console
|
29
|
+
|
30
|
+
# Instance Methods
|
31
|
+
|
32
|
+
# Clears the contents of SketchUp's Ruby Console.
|
33
|
+
#
|
34
|
+
# @example
|
35
|
+
# SKETCHUP_CONSOLE.clear
|
36
|
+
#
|
37
|
+
# @return true.
|
38
|
+
#
|
39
|
+
# @version SketchUp 2014
|
40
|
+
def clear
|
41
|
+
end
|
42
|
+
|
43
|
+
# Hides the SketchUp Ruby Console.
|
44
|
+
#
|
45
|
+
# @example
|
46
|
+
# SKETCHUP_CONSOLE.hide
|
47
|
+
#
|
48
|
+
# @return true.
|
49
|
+
#
|
50
|
+
# @version SketchUp 2014
|
51
|
+
def hide
|
52
|
+
end
|
53
|
+
|
54
|
+
# Displays the SketchUp Ruby Console.
|
55
|
+
#
|
56
|
+
# @example
|
57
|
+
# SKETCHUP_CONSOLE.show
|
58
|
+
#
|
59
|
+
# @return true.
|
60
|
+
#
|
61
|
+
# @version SketchUp 2014
|
62
|
+
def show
|
63
|
+
end
|
64
|
+
|
65
|
+
# Returns the visibility state of the SketchUp Ruby Console.
|
66
|
+
#
|
67
|
+
# @example
|
68
|
+
# puts SKETCHUP_CONSOLE.visible?
|
69
|
+
#
|
70
|
+
# @return true if visible, false if not.
|
71
|
+
#
|
72
|
+
# @return [Boolean]
|
73
|
+
#
|
74
|
+
# @version SketchUp 2014
|
75
|
+
def visible?
|
76
|
+
end
|
77
|
+
|
78
|
+
end
|
@@ -0,0 +1,257 @@
|
|
1
|
+
# Copyright:: Copyright 2017 Trimble Inc.
|
2
|
+
# License:: The MIT License (MIT)
|
3
|
+
|
4
|
+
# The ConstructionLine class contains methods for modifying construction
|
5
|
+
# lines. Construction lines can be infinite in length, semi-infinite (i.e.
|
6
|
+
# infinite in one direction) or finite.
|
7
|
+
#
|
8
|
+
# @version SketchUp 6.0
|
9
|
+
class Sketchup::ConstructionLine < Sketchup::Drawingelement
|
10
|
+
|
11
|
+
# Instance Methods
|
12
|
+
|
13
|
+
# The direction method retrieves a 3D vector in the direction of the
|
14
|
+
# construction line.
|
15
|
+
#
|
16
|
+
# @example
|
17
|
+
# model = Sketchup.active_model
|
18
|
+
# entities = model.active_entities
|
19
|
+
# point1 = Geom::Point3d.new(0,0,0)
|
20
|
+
# point2 = Geom::Point3d.new(20,20,20)
|
21
|
+
# constline = entities.add_cline(point1, point2)
|
22
|
+
# vector = constline.direction
|
23
|
+
# if (vector)
|
24
|
+
# UI.messagebox(vector)
|
25
|
+
# else
|
26
|
+
# UI.messagebox("Failure")
|
27
|
+
# end
|
28
|
+
#
|
29
|
+
# @return vector - a Vector3d object if successful
|
30
|
+
#
|
31
|
+
# @version SketchUp 6.0
|
32
|
+
def direction
|
33
|
+
end
|
34
|
+
|
35
|
+
# The direction= method is used to set the direction of the construction line
|
36
|
+
# to a 3D vector.
|
37
|
+
#
|
38
|
+
# @example
|
39
|
+
# # Draw a construction line that points diagonally.
|
40
|
+
# model = Sketchup.active_model
|
41
|
+
# entities = model.active_entities
|
42
|
+
# constline = entities.add_cline([10,10,10], [200,200,200])
|
43
|
+
#
|
44
|
+
# # Create a new direction that is straight up, and redirect the line.
|
45
|
+
# new_direction = [0, 0, 1]
|
46
|
+
# constline.direction = new_direction
|
47
|
+
#
|
48
|
+
# @param vector
|
49
|
+
# The Vector3d whose direction will be used to set the
|
50
|
+
# direction of the construction line.
|
51
|
+
#
|
52
|
+
# @return vector - the new Vector3d object if successful
|
53
|
+
#
|
54
|
+
# @version SketchUp 6.0
|
55
|
+
def direction=(vector)
|
56
|
+
end
|
57
|
+
|
58
|
+
# The end method retrieves the end point of a construction line in the form of
|
59
|
+
# a 3D point.
|
60
|
+
#
|
61
|
+
# If the construction line is infinite at the end, this returns nil.
|
62
|
+
#
|
63
|
+
# @example
|
64
|
+
# model = Sketchup.active_model
|
65
|
+
# entities = model.active_entities
|
66
|
+
# point1 = Geom::Point3d.new(0,0,0)
|
67
|
+
# point2 = Geom::Point3d.new(20,20,20)
|
68
|
+
# constline = entities.add_cline(point1, point2)
|
69
|
+
# endofline = constline.end
|
70
|
+
#
|
71
|
+
# @return point - a Point3d object representing the end of the
|
72
|
+
# construction line
|
73
|
+
#
|
74
|
+
# @version SketchUp 6.0
|
75
|
+
def end
|
76
|
+
end
|
77
|
+
|
78
|
+
# The end= method is used to set the end point of the construction line. This
|
79
|
+
# method will make the length finite at the end.
|
80
|
+
#
|
81
|
+
# Set the end to nil to make the construction line infinite at the end.
|
82
|
+
#
|
83
|
+
# @example
|
84
|
+
# model = Sketchup.active_model
|
85
|
+
# entities = model.active_entities
|
86
|
+
# point1 = Geom::Point3d.new(0,0,0)
|
87
|
+
# point2 = Geom::Point3d.new(20,20,20)
|
88
|
+
# point3 = Geom::Point3d.new(10,10,10)
|
89
|
+
# constline = entities.add_cline(point1, point2)
|
90
|
+
# UI.messagebox(constline.end)
|
91
|
+
# # Will display point2
|
92
|
+
#
|
93
|
+
# @overload end=(point)
|
94
|
+
#
|
95
|
+
# @param [Geom::Point3d] point The Point3d object to set for the end point
|
96
|
+
# of the construction line.
|
97
|
+
# @return point - a Point3d object if successful or nil
|
98
|
+
#
|
99
|
+
# @overload end=(nil)
|
100
|
+
#
|
101
|
+
# @param [nil] nil Sets the end point to infinite.
|
102
|
+
# @return point - a Point3d object if successful or nil
|
103
|
+
#
|
104
|
+
# @version SketchUp 6.0
|
105
|
+
def end=(arg)
|
106
|
+
end
|
107
|
+
|
108
|
+
# The position method is used to retrieve a 3D point used to create a
|
109
|
+
# construction line on an infinite construction line.
|
110
|
+
#
|
111
|
+
# @example
|
112
|
+
# model = Sketchup.active_model
|
113
|
+
# entities = model.active_entities
|
114
|
+
# point1 = Geom::Point3d.new(0,0,0)
|
115
|
+
# vector = Geom::Vector3d.new(10,10,10)
|
116
|
+
# constline = entities.add_cline(point1, vector)
|
117
|
+
# # Returns point1 or 0,0,0
|
118
|
+
# position = constline.position
|
119
|
+
#
|
120
|
+
# @return point - the Point3d object used to create the line (if
|
121
|
+
# successful)
|
122
|
+
#
|
123
|
+
# @version SketchUp 6.0
|
124
|
+
def position
|
125
|
+
end
|
126
|
+
|
127
|
+
# The position= method is used to set a 3D point that the construction passes
|
128
|
+
# through
|
129
|
+
#
|
130
|
+
# @example
|
131
|
+
# model = Sketchup.active_model
|
132
|
+
# entities = model.active_entities
|
133
|
+
# point1 = Geom::Point3d.new(0,0,0)
|
134
|
+
# point2 = Geom::Point3d.new(20,20,20)
|
135
|
+
# point3 = Geom::Point3d.new(0,20,20)
|
136
|
+
# constline = entities.add_cline(point1, point2)
|
137
|
+
# position = constline.position = point3
|
138
|
+
#
|
139
|
+
# @param point
|
140
|
+
# The Point3d object for the construction line to pass
|
141
|
+
# through.
|
142
|
+
#
|
143
|
+
# @return point - the new Point3d object that the construction
|
144
|
+
# line will pass through (if successful)
|
145
|
+
#
|
146
|
+
# @version SketchUp 6.0
|
147
|
+
def position=(point)
|
148
|
+
end
|
149
|
+
|
150
|
+
# The reverse! method is used to reverse the direction of the construction
|
151
|
+
# line.
|
152
|
+
#
|
153
|
+
# @example
|
154
|
+
# model = Sketchup.active_model
|
155
|
+
# entities = model.active_entities
|
156
|
+
# point1 = Geom::Point3d.new(0,0,0)
|
157
|
+
# point2 = Geom::Point3d.new(20,20,20)
|
158
|
+
# constline = entities.add_cline(point1, point2)
|
159
|
+
# status = constline.reverse!
|
160
|
+
#
|
161
|
+
# @return status
|
162
|
+
#
|
163
|
+
# @version SketchUp 6.0
|
164
|
+
def reverse!
|
165
|
+
end
|
166
|
+
|
167
|
+
# The start method is used to retrieve the starting point of a construction
|
168
|
+
# line.
|
169
|
+
#
|
170
|
+
# If the construction line is infinite at the start, this returns nil.
|
171
|
+
#
|
172
|
+
# @example
|
173
|
+
# model = Sketchup.active_model
|
174
|
+
# entities = model.active_entities
|
175
|
+
# point1 = Geom::Point3d.new(0,0,0)
|
176
|
+
# point2 = Geom::Point3d.new(20,20,20)
|
177
|
+
# constline = entities.add_cline(point1, point2)
|
178
|
+
# startofline = constline.start
|
179
|
+
#
|
180
|
+
# @return point - the Poin3d object representing the starting
|
181
|
+
# point of the construction line (if successful)
|
182
|
+
#
|
183
|
+
# @version SketchUp 6.0
|
184
|
+
def start
|
185
|
+
end
|
186
|
+
|
187
|
+
# The start= method is used to set the start point of a construction line
|
188
|
+
# making the line's length finite at the start.
|
189
|
+
#
|
190
|
+
# Setting the start to nil will make the construction line infinite at the
|
191
|
+
# start.
|
192
|
+
#
|
193
|
+
# @example
|
194
|
+
# model = Sketchup.active_model
|
195
|
+
# entities = model.active_entities
|
196
|
+
# point1 = Geom::Point3d.new(0,0,0)
|
197
|
+
# point2 = Geom::Point3d.new(20,20,20)
|
198
|
+
# point3 = Geom::Point3d.new(5,5,5)
|
199
|
+
# constline = entities.add_cline(point1, point2)
|
200
|
+
# startofline = constline.start = point3
|
201
|
+
#
|
202
|
+
# @overload start=(point)
|
203
|
+
#
|
204
|
+
# @param [Geom::Point3d] point The Point3d object to set for the start point
|
205
|
+
# of the construction line.
|
206
|
+
# @return point - a Point3d object if successful or nil
|
207
|
+
#
|
208
|
+
# @overload start=(nil)
|
209
|
+
#
|
210
|
+
# @param [nil] nil Sets the start point to infinite.
|
211
|
+
# @return point - a Point3d object if successful or nil
|
212
|
+
#
|
213
|
+
# @version SketchUp 6.0
|
214
|
+
def start=(arg)
|
215
|
+
end
|
216
|
+
|
217
|
+
# The stipple method is used to retrieve the stipple pattern used to display
|
218
|
+
# the construction line.
|
219
|
+
#
|
220
|
+
# @example
|
221
|
+
# model = Sketchup.active_model
|
222
|
+
# entities = model.active_entities
|
223
|
+
# point1 = Geom::Point3d.new(0,0,0)
|
224
|
+
# point2 = Geom::Point3d.new(20,20,20)
|
225
|
+
# constline = entities.add_cline(point1, point2)
|
226
|
+
# UI.messagebox(constline.stipple)
|
227
|
+
#
|
228
|
+
# @return pattern - the stipple pattern being used
|
229
|
+
#
|
230
|
+
# @version SketchUp 6.0
|
231
|
+
def stipple
|
232
|
+
end
|
233
|
+
|
234
|
+
# The stipple= method is used to set the stipple pattern used to display
|
235
|
+
# the construction line. The stipple pattern is given as a string.
|
236
|
+
# Valid strings are:
|
237
|
+
# - <code>"."</code> (Dotted Line),
|
238
|
+
# - <code>"-"</code> (Short Dashes Line),
|
239
|
+
# - <code>"_"</code> (Long Dashes Line),
|
240
|
+
# - <code>"-.-"</code> (Dash Dot Dash Line).
|
241
|
+
#
|
242
|
+
# @example
|
243
|
+
# model = Sketchup.active_model
|
244
|
+
# entities = model.active_entities
|
245
|
+
# point1 = Geom::Point3d.new(0,0,0)
|
246
|
+
# point2 = Geom::Point3d.new(20,20,20)
|
247
|
+
# constline = entities.add_cline(point1, point2)
|
248
|
+
# constline.stipple = "-.-"
|
249
|
+
#
|
250
|
+
# @param pattern
|
251
|
+
# - the stipple pattern to use
|
252
|
+
#
|
253
|
+
# @version SketchUp 6.0
|
254
|
+
def stipple=(pattern)
|
255
|
+
end
|
256
|
+
|
257
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# Copyright:: Copyright 2017 Trimble Inc.
|
2
|
+
# License:: The MIT License (MIT)
|
3
|
+
|
4
|
+
# A construction point represents a point in the model that can be used to aid
|
5
|
+
# in other modeling operations. For example, you may put a construction point
|
6
|
+
# at the center of a circle to make it easier to locate that point for
|
7
|
+
# performing other operations.
|
8
|
+
#
|
9
|
+
# @version SketchUp 6.0
|
10
|
+
class Sketchup::ConstructionPoint < Sketchup::Drawingelement
|
11
|
+
|
12
|
+
# Instance Methods
|
13
|
+
|
14
|
+
# The position method is used to retrieve a Point3d used to create a
|
15
|
+
# construction point.
|
16
|
+
#
|
17
|
+
# @example
|
18
|
+
# model = Sketchup.active_model
|
19
|
+
# entities = model.active_entities
|
20
|
+
# point1 = Geom::Point3d.new(10,0,0)
|
21
|
+
# constpoint = entities.add_cpoint point1
|
22
|
+
# # Returns 10,0,0
|
23
|
+
# position = constpoint.position
|
24
|
+
#
|
25
|
+
# @return point - the Point3d object used to create the
|
26
|
+
# ConstructionPoint
|
27
|
+
#
|
28
|
+
# @version SketchUp 6.0
|
29
|
+
def position
|
30
|
+
end
|
31
|
+
|
32
|
+
end
|
@@ -0,0 +1,196 @@
|
|
1
|
+
# Copyright:: Copyright 2017 Trimble Inc.
|
2
|
+
# License:: The MIT License (MIT)
|
3
|
+
|
4
|
+
# The Curve class is used by SketchUp to unite a series of Edge objects into
|
5
|
+
# one conceptual entity. Since SketchUp is a surface modeler, all circles,
|
6
|
+
# arcs, and arbitrary curves are really just edges that are bound together in
|
7
|
+
# sequence.
|
8
|
+
#
|
9
|
+
# There is a subclass of Curve called ArcCurve, which is any curve that makes
|
10
|
+
# up part of a circle. You can think of ArcCurves as entities that were created
|
11
|
+
# with SketchUp's Arc or Circle drawing tools and Curves as entities that were
|
12
|
+
# created with the Freehand drawing tool.
|
13
|
+
#
|
14
|
+
# @version SketchUp 6.0
|
15
|
+
class Sketchup::Curve < Sketchup::Entity
|
16
|
+
|
17
|
+
# Instance Methods
|
18
|
+
|
19
|
+
# The count_edges method is used to retrieve the number of Edge objects that
|
20
|
+
# make up the Curve.
|
21
|
+
#
|
22
|
+
# @example
|
23
|
+
# centerpoint = Geom::Point3d.new
|
24
|
+
# # Create a circle perpendicular to the normal or Z axis
|
25
|
+
# vector = Geom::Vector3d.new 0,0,1
|
26
|
+
# vector2 = vector.normalize!
|
27
|
+
# model = Sketchup.active_model
|
28
|
+
# entities = model.entities
|
29
|
+
# edgearray = entities.add_circle centerpoint, vector2, 10
|
30
|
+
# edge = edgearray[0]
|
31
|
+
# curve = edge.curve
|
32
|
+
# number = curve.count_edges
|
33
|
+
#
|
34
|
+
# @return num_edges - the number of edges in the curve
|
35
|
+
#
|
36
|
+
# @version SketchUp 6.0
|
37
|
+
def count_edges
|
38
|
+
end
|
39
|
+
|
40
|
+
# The each_edge method is used to iterate through all of the Edge objects in
|
41
|
+
# the curve.
|
42
|
+
#
|
43
|
+
# @example
|
44
|
+
# centerpoint = Geom::Point3d.new
|
45
|
+
# # Create a circle perpendicular to the normal or Z axis
|
46
|
+
# vector = Geom::Vector3d.new 0,0,1
|
47
|
+
# vector2 = vector.normalize!
|
48
|
+
# model = Sketchup.active_model
|
49
|
+
# entities = model.entities
|
50
|
+
# edgearray = entities.add_circle centerpoint, vector2, 10
|
51
|
+
# edge = edgearray[0]
|
52
|
+
# curve = edge.curve
|
53
|
+
# curve.each_edge {|e| UI.messagebox e}
|
54
|
+
#
|
55
|
+
# @return edge - a variable that will hold each Edge object as
|
56
|
+
# they are found.
|
57
|
+
#
|
58
|
+
# @version SketchUp 6.0
|
59
|
+
def each_edge
|
60
|
+
end
|
61
|
+
|
62
|
+
# The edges method is used to retrieve an array of Edge objects that make up
|
63
|
+
# the Curve.
|
64
|
+
#
|
65
|
+
# @example
|
66
|
+
# centerpoint = Geom::Point3d.new
|
67
|
+
# # Create a circle perpendicular to the normal or Z axis
|
68
|
+
# vector = Geom::Vector3d.new 0,0,1
|
69
|
+
# vector2 = vector.normalize!
|
70
|
+
# model = Sketchup.active_model
|
71
|
+
# entities = model.entities
|
72
|
+
# edgearray = entities.add_circle centerpoint, vector2, 10
|
73
|
+
# edge = edgearray[0]
|
74
|
+
# curve = edge.curve
|
75
|
+
# edges = curve.edges
|
76
|
+
#
|
77
|
+
# @return edges - an array of Edge objects if successful
|
78
|
+
#
|
79
|
+
# @version SketchUp 6.0
|
80
|
+
def edges
|
81
|
+
end
|
82
|
+
|
83
|
+
# The first_edge method is used to retrieve the first edge of the curve.
|
84
|
+
#
|
85
|
+
# @example
|
86
|
+
# centerpoint = Geom::Point3d.new
|
87
|
+
# # Create a circle perpendicular to the normal or Z axis
|
88
|
+
# vector = Geom::Vector3d.new 0,0,1
|
89
|
+
# vector2 = vector.normalize!
|
90
|
+
# model = Sketchup.active_model
|
91
|
+
# entities = model.entities
|
92
|
+
# edgearray = entities.add_circle centerpoint, vector2, 10
|
93
|
+
# edge = edgearray[0]
|
94
|
+
# curve = edge.curve
|
95
|
+
# firstedge = curve.first_edge
|
96
|
+
#
|
97
|
+
# @return edge - the first Edge object in the curve if successful
|
98
|
+
#
|
99
|
+
# @version SketchUp 6.0
|
100
|
+
def first_edge
|
101
|
+
end
|
102
|
+
|
103
|
+
#
|
104
|
+
# @example
|
105
|
+
# # Create a polygon and check its edge
|
106
|
+
# ents = Sketchup.active_model.entities
|
107
|
+
# ents.add_ngon [0, 0, 0], [0, 0, 1], 10, 6
|
108
|
+
# curve = nil
|
109
|
+
# ents.each { |e| curve = e.curve if e.is_a? Sketchup::Edge }
|
110
|
+
# is_poly = curve.is_polygon?
|
111
|
+
#
|
112
|
+
# @return True if this edge was originally created by the polygon
|
113
|
+
# tool, otherwise false.
|
114
|
+
#
|
115
|
+
# @return [Boolean]
|
116
|
+
#
|
117
|
+
# @version SketchUp 7.1 M1
|
118
|
+
def is_polygon?
|
119
|
+
end
|
120
|
+
|
121
|
+
# The last_edge method is used to retrieve the last edge of the curve.
|
122
|
+
#
|
123
|
+
# @example
|
124
|
+
# centerpoint = Geom::Point3d.new
|
125
|
+
# # Create a circle perpendicular to the normal or Z axis
|
126
|
+
# vector = Geom::Vector3d.new 0,0,1
|
127
|
+
# vector2 = vector.normalize!
|
128
|
+
# model = Sketchup.active_model
|
129
|
+
# entities = model.entities
|
130
|
+
# edgearray = entities.add_circle centerpoint, vector2, 10
|
131
|
+
# edge = edgearray[7]
|
132
|
+
# curve = edge.curve
|
133
|
+
# lastedge = curve.last_edge
|
134
|
+
#
|
135
|
+
# @return edge - the last Edge object in the curve if successful
|
136
|
+
#
|
137
|
+
# @version SketchUp 6.0
|
138
|
+
def last_edge
|
139
|
+
end
|
140
|
+
|
141
|
+
# The length method retrieves the length of the curve.
|
142
|
+
#
|
143
|
+
# @example
|
144
|
+
# centerpoint = Geom::Point3d.new
|
145
|
+
# # Create a circle perpendicular to the normal or Z axis
|
146
|
+
# vector = Geom::Vector3d.new 0,0,1
|
147
|
+
# vector2 = vector.normalize!
|
148
|
+
# model = Sketchup.active_model
|
149
|
+
# entities = model.entities
|
150
|
+
# edgearray = entities.add_circle centerpoint, vector2, 10
|
151
|
+
# edge = edgearray[7]
|
152
|
+
# curve = edge.curve
|
153
|
+
# length = curve.length
|
154
|
+
#
|
155
|
+
# @return length - the length of the curve in current units if
|
156
|
+
# successful
|
157
|
+
#
|
158
|
+
# @version SketchUp 6.0
|
159
|
+
def length
|
160
|
+
end
|
161
|
+
|
162
|
+
# The vertices method retrieves a collection of all vertices in a curve.
|
163
|
+
#
|
164
|
+
# @example
|
165
|
+
# # Need example ruby code here.
|
166
|
+
#
|
167
|
+
# @param point_array
|
168
|
+
# Array of Point3d objects to move each vertex to match.
|
169
|
+
#
|
170
|
+
# @return success - true or false
|
171
|
+
#
|
172
|
+
# @version SketchUp 6.0
|
173
|
+
def move_vertices(point_array)
|
174
|
+
end
|
175
|
+
|
176
|
+
# The vertices method retrieves a collection of all vertices in a curve.
|
177
|
+
#
|
178
|
+
# @example
|
179
|
+
# centerpoint = Geom::Point3d.new
|
180
|
+
# # Create a circle perpendicular to the normal or Z axis
|
181
|
+
# vector = Geom::Vector3d.new 0,0,1
|
182
|
+
# vector2 = vector.normalize!
|
183
|
+
# model = Sketchup.active_model
|
184
|
+
# entities = model.entities
|
185
|
+
# edgearray = entities.add_circle centerpoint, vector2, 10
|
186
|
+
# edge = edgearray[7]
|
187
|
+
# curve = edge.curve
|
188
|
+
# vertices = curve.vertices
|
189
|
+
#
|
190
|
+
# @return vertices - a collection of the vertices
|
191
|
+
#
|
192
|
+
# @version SketchUp 6.0
|
193
|
+
def vertices
|
194
|
+
end
|
195
|
+
|
196
|
+
end
|