sketchup-api-stubs 0.7.3 → 0.7.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (149) hide show
  1. checksums.yaml +5 -5
  2. data/.yardopts +9 -9
  3. data/lib/sketchup-api-stubs.rb +1 -1
  4. data/lib/sketchup-api-stubs/sketchup.rb +145 -145
  5. data/lib/sketchup-api-stubs/stubs/Geom/BoundingBox.rb +318 -318
  6. data/lib/sketchup-api-stubs/stubs/Geom/Bounds2d.rb +172 -172
  7. data/lib/sketchup-api-stubs/stubs/Geom/LatLong.rb +126 -126
  8. data/lib/sketchup-api-stubs/stubs/Geom/OrientedBounds2d.rb +102 -102
  9. data/lib/sketchup-api-stubs/stubs/Geom/Point2d.rb +400 -400
  10. data/lib/sketchup-api-stubs/stubs/Geom/Point3d.rb +661 -661
  11. data/lib/sketchup-api-stubs/stubs/Geom/PolygonMesh.rb +492 -492
  12. data/lib/sketchup-api-stubs/stubs/Geom/Transformation.rb +478 -478
  13. data/lib/sketchup-api-stubs/stubs/Geom/Transformation2d.rb +263 -263
  14. data/lib/sketchup-api-stubs/stubs/Geom/UTM.rb +141 -141
  15. data/lib/sketchup-api-stubs/stubs/Geom/Vector2d.rb +522 -522
  16. data/lib/sketchup-api-stubs/stubs/Geom/Vector3d.rb +691 -691
  17. data/lib/sketchup-api-stubs/stubs/Layout.rb +25 -25
  18. data/lib/sketchup-api-stubs/stubs/Layout/AngularDimension.rb +573 -573
  19. data/lib/sketchup-api-stubs/stubs/Layout/AutoTextDefinition.rb +411 -411
  20. data/lib/sketchup-api-stubs/stubs/Layout/AutoTextDefinitions.rb +174 -186
  21. data/lib/sketchup-api-stubs/stubs/Layout/ConnectionPoint.rb +70 -70
  22. data/lib/sketchup-api-stubs/stubs/Layout/Document.rb +514 -514
  23. data/lib/sketchup-api-stubs/stubs/Layout/Ellipse.rb +29 -29
  24. data/lib/sketchup-api-stubs/stubs/Layout/Entities.rb +143 -155
  25. data/lib/sketchup-api-stubs/stubs/Layout/Entity.rb +353 -353
  26. data/lib/sketchup-api-stubs/stubs/Layout/FormattedText.rb +349 -349
  27. data/lib/sketchup-api-stubs/stubs/Layout/Grid.rb +311 -311
  28. data/lib/sketchup-api-stubs/stubs/Layout/Group.rb +261 -261
  29. data/lib/sketchup-api-stubs/stubs/Layout/Image.rb +91 -91
  30. data/lib/sketchup-api-stubs/stubs/Layout/Label.rb +371 -371
  31. data/lib/sketchup-api-stubs/stubs/Layout/Layer.rb +218 -218
  32. data/lib/sketchup-api-stubs/stubs/Layout/LayerInstance.rb +128 -128
  33. data/lib/sketchup-api-stubs/stubs/Layout/Layers.rb +220 -232
  34. data/lib/sketchup-api-stubs/stubs/Layout/LinearDimension.rb +567 -567
  35. data/lib/sketchup-api-stubs/stubs/Layout/LockedEntityError.rb +10 -10
  36. data/lib/sketchup-api-stubs/stubs/Layout/LockedLayerError.rb +11 -11
  37. data/lib/sketchup-api-stubs/stubs/Layout/Page.rb +183 -183
  38. data/lib/sketchup-api-stubs/stubs/Layout/PageInfo.rb +387 -387
  39. data/lib/sketchup-api-stubs/stubs/Layout/Pages.rb +204 -216
  40. data/lib/sketchup-api-stubs/stubs/Layout/Path.rb +344 -344
  41. data/lib/sketchup-api-stubs/stubs/Layout/Rectangle.rb +174 -174
  42. data/lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb +694 -694
  43. data/lib/sketchup-api-stubs/stubs/Layout/Style.rb +1519 -1519
  44. data/lib/sketchup-api-stubs/stubs/Layout/Table.rb +290 -290
  45. data/lib/sketchup-api-stubs/stubs/Layout/TableCell.rb +149 -149
  46. data/lib/sketchup-api-stubs/stubs/Layout/TableColumn.rb +139 -139
  47. data/lib/sketchup-api-stubs/stubs/Layout/TableRow.rb +135 -135
  48. data/lib/sketchup-api-stubs/stubs/Sketchup/Animation.rb +140 -140
  49. data/lib/sketchup-api-stubs/stubs/Sketchup/AppObserver.rb +157 -157
  50. data/lib/sketchup-api-stubs/stubs/Sketchup/ArcCurve.rb +209 -209
  51. data/lib/sketchup-api-stubs/stubs/Sketchup/AttributeDictionaries.rb +152 -152
  52. data/lib/sketchup-api-stubs/stubs/Sketchup/AttributeDictionary.rb +281 -281
  53. data/lib/sketchup-api-stubs/stubs/Sketchup/Axes.rb +149 -149
  54. data/lib/sketchup-api-stubs/stubs/Sketchup/Behavior.rb +328 -328
  55. data/lib/sketchup-api-stubs/stubs/Sketchup/Camera.rb +577 -577
  56. data/lib/sketchup-api-stubs/stubs/Sketchup/ClassificationSchema.rb +63 -63
  57. data/lib/sketchup-api-stubs/stubs/Sketchup/Classifications.rb +122 -122
  58. data/lib/sketchup-api-stubs/stubs/Sketchup/Color.rb +281 -281
  59. data/lib/sketchup-api-stubs/stubs/Sketchup/ComponentDefinition.rb +562 -562
  60. data/lib/sketchup-api-stubs/stubs/Sketchup/ComponentInstance.rb +593 -593
  61. data/lib/sketchup-api-stubs/stubs/Sketchup/Console.rb +76 -76
  62. data/lib/sketchup-api-stubs/stubs/Sketchup/ConstructionLine.rb +257 -257
  63. data/lib/sketchup-api-stubs/stubs/Sketchup/ConstructionPoint.rb +32 -32
  64. data/lib/sketchup-api-stubs/stubs/Sketchup/Curve.rb +194 -194
  65. data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionList.rb +329 -329
  66. data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionObserver.rb +72 -72
  67. data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionsObserver.rb +102 -102
  68. data/lib/sketchup-api-stubs/stubs/Sketchup/Dimension.rb +165 -165
  69. data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionLinear.rb +312 -312
  70. data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionObserver.rb +38 -38
  71. data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionRadial.rb +87 -87
  72. data/lib/sketchup-api-stubs/stubs/Sketchup/Drawingelement.rb +390 -390
  73. data/lib/sketchup-api-stubs/stubs/Sketchup/Edge.rb +508 -508
  74. data/lib/sketchup-api-stubs/stubs/Sketchup/EdgeUse.rb +211 -211
  75. data/lib/sketchup-api-stubs/stubs/Sketchup/Entities.rb +1119 -1119
  76. data/lib/sketchup-api-stubs/stubs/Sketchup/EntitiesObserver.rb +125 -125
  77. data/lib/sketchup-api-stubs/stubs/Sketchup/Entity.rb +544 -544
  78. data/lib/sketchup-api-stubs/stubs/Sketchup/EntityObserver.rb +59 -59
  79. data/lib/sketchup-api-stubs/stubs/Sketchup/ExtensionsManager.rb +125 -125
  80. data/lib/sketchup-api-stubs/stubs/Sketchup/Face.rb +750 -750
  81. data/lib/sketchup-api-stubs/stubs/Sketchup/FrameChangeObserver.rb +104 -104
  82. data/lib/sketchup-api-stubs/stubs/Sketchup/Group.rb +697 -697
  83. data/lib/sketchup-api-stubs/stubs/Sketchup/Http.rb +27 -27
  84. data/lib/sketchup-api-stubs/stubs/Sketchup/Http/Request.rb +285 -285
  85. data/lib/sketchup-api-stubs/stubs/Sketchup/Http/Response.rb +62 -62
  86. data/lib/sketchup-api-stubs/stubs/Sketchup/Image.rb +409 -409
  87. data/lib/sketchup-api-stubs/stubs/Sketchup/ImageRep.rb +226 -226
  88. data/lib/sketchup-api-stubs/stubs/Sketchup/Importer.rb +190 -190
  89. data/lib/sketchup-api-stubs/stubs/Sketchup/InputPoint.rb +393 -393
  90. data/lib/sketchup-api-stubs/stubs/Sketchup/InstanceObserver.rb +82 -82
  91. data/lib/sketchup-api-stubs/stubs/Sketchup/InstancePath.rb +303 -303
  92. data/lib/sketchup-api-stubs/stubs/Sketchup/Layer.rb +285 -280
  93. data/lib/sketchup-api-stubs/stubs/Sketchup/Layers.rb +244 -231
  94. data/lib/sketchup-api-stubs/stubs/Sketchup/LayersObserver.rb +136 -136
  95. data/lib/sketchup-api-stubs/stubs/Sketchup/Licensing.rb +48 -48
  96. data/lib/sketchup-api-stubs/stubs/Sketchup/Licensing/ExtensionLicense.rb +86 -86
  97. data/lib/sketchup-api-stubs/stubs/Sketchup/LineStyle.rb +24 -24
  98. data/lib/sketchup-api-stubs/stubs/Sketchup/LineStyles.rb +112 -123
  99. data/lib/sketchup-api-stubs/stubs/Sketchup/Loop.rb +137 -137
  100. data/lib/sketchup-api-stubs/stubs/Sketchup/Material.rb +416 -416
  101. data/lib/sketchup-api-stubs/stubs/Sketchup/Materials.rb +311 -311
  102. data/lib/sketchup-api-stubs/stubs/Sketchup/MaterialsObserver.rb +141 -141
  103. data/lib/sketchup-api-stubs/stubs/Sketchup/Menu.rb +95 -95
  104. data/lib/sketchup-api-stubs/stubs/Sketchup/Model.rb +1638 -1601
  105. data/lib/sketchup-api-stubs/stubs/Sketchup/ModelObserver.rb +356 -356
  106. data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsManager.rb +132 -132
  107. data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsProvider.rb +284 -284
  108. data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsProviderObserver.rb +58 -58
  109. data/lib/sketchup-api-stubs/stubs/Sketchup/Page.rb +770 -770
  110. data/lib/sketchup-api-stubs/stubs/Sketchup/Pages.rb +353 -353
  111. data/lib/sketchup-api-stubs/stubs/Sketchup/PagesObserver.rb +76 -76
  112. data/lib/sketchup-api-stubs/stubs/Sketchup/PickHelper.rb +456 -456
  113. data/lib/sketchup-api-stubs/stubs/Sketchup/RegionalSettings.rb +43 -43
  114. data/lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptions.rb +364 -364
  115. data/lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptionsObserver.rb +44 -44
  116. data/lib/sketchup-api-stubs/stubs/Sketchup/SectionPlane.rb +150 -150
  117. data/lib/sketchup-api-stubs/stubs/Sketchup/Selection.rb +454 -454
  118. data/lib/sketchup-api-stubs/stubs/Sketchup/SelectionObserver.rb +115 -115
  119. data/lib/sketchup-api-stubs/stubs/Sketchup/Set.rb +212 -212
  120. data/lib/sketchup-api-stubs/stubs/Sketchup/ShadowInfo.rb +257 -257
  121. data/lib/sketchup-api-stubs/stubs/Sketchup/ShadowInfoObserver.rb +57 -57
  122. data/lib/sketchup-api-stubs/stubs/Sketchup/Style.rb +69 -69
  123. data/lib/sketchup-api-stubs/stubs/Sketchup/Styles.rb +211 -211
  124. data/lib/sketchup-api-stubs/stubs/Sketchup/Text.rb +262 -262
  125. data/lib/sketchup-api-stubs/stubs/Sketchup/Texture.rb +225 -225
  126. data/lib/sketchup-api-stubs/stubs/Sketchup/TextureWriter.rb +237 -237
  127. data/lib/sketchup-api-stubs/stubs/Sketchup/Tool.rb +829 -829
  128. data/lib/sketchup-api-stubs/stubs/Sketchup/Tools.rb +132 -132
  129. data/lib/sketchup-api-stubs/stubs/Sketchup/ToolsObserver.rb +154 -154
  130. data/lib/sketchup-api-stubs/stubs/Sketchup/UVHelper.rb +61 -61
  131. data/lib/sketchup-api-stubs/stubs/Sketchup/Vertex.rb +142 -142
  132. data/lib/sketchup-api-stubs/stubs/Sketchup/View.rb +1301 -1301
  133. data/lib/sketchup-api-stubs/stubs/Sketchup/ViewObserver.rb +43 -43
  134. data/lib/sketchup-api-stubs/stubs/UI/Command.rb +310 -310
  135. data/lib/sketchup-api-stubs/stubs/UI/HtmlDialog.rb +356 -356
  136. data/lib/sketchup-api-stubs/stubs/UI/Notification.rb +229 -229
  137. data/lib/sketchup-api-stubs/stubs/UI/Toolbar.rb +240 -240
  138. data/lib/sketchup-api-stubs/stubs/UI/WebDialog.rb +633 -633
  139. data/lib/sketchup-api-stubs/stubs/_top_level.rb +311 -311
  140. data/lib/sketchup-api-stubs/stubs/array.rb +741 -741
  141. data/lib/sketchup-api-stubs/stubs/geom.rb +348 -348
  142. data/lib/sketchup-api-stubs/stubs/languagehandler.rb +92 -92
  143. data/lib/sketchup-api-stubs/stubs/length.rb +278 -278
  144. data/lib/sketchup-api-stubs/stubs/numeric.rb +249 -249
  145. data/lib/sketchup-api-stubs/stubs/sketchup.rb +1310 -1310
  146. data/lib/sketchup-api-stubs/stubs/sketchupextension.rb +353 -353
  147. data/lib/sketchup-api-stubs/stubs/string.rb +24 -24
  148. data/lib/sketchup-api-stubs/stubs/ui.rb +667 -667
  149. metadata +3 -4
@@ -1,76 +1,76 @@
1
- # Copyright:: Copyright 2020 Trimble Inc.
2
- # License:: The MIT License (MIT)
3
-
4
- # This observer interface is implemented to react to pages events. To
5
- # implement this observer, create a Ruby class of this type, override the
6
- # desired methods, and add an instance of the observer to the objects of
7
- # interests.
8
- #
9
- # @example
10
- # # This is an example of an observer that watches the pages for new ones.
11
- # class MyPagesObserver < Sketchup::PagesObserver
12
- # def onElementAdded(pages, page)
13
- # puts "onElementAdded: #{page}"
14
- # end
15
- # end
16
- #
17
- # # Attach the observer.
18
- # Sketchup.active_model.pages.add_observer(MyPagesObserver.new)
19
- #
20
- # @version SketchUp 6.0
21
- class Sketchup::PagesObserver < Sketchup::EntitiesObserver
22
-
23
- # Instance Methods
24
-
25
- # The {#onContentsModified} method is invoked whenever the pages change.
26
- #
27
- # @example
28
- # def onContentsModified(pages)
29
- # puts "onContentsModified: #{pages}"
30
- # end
31
- #
32
- # @param [Sketchup::Pages] pages
33
- #
34
- # @return [nil]
35
- #
36
- # @version SketchUp 6.0
37
- def onContentsModified(pages)
38
- end
39
-
40
- # The {#onElementAdded} method is invoked when an element is added to a
41
- # {Sketchup::Pages} object.
42
- #
43
- # @example
44
- # def onElementAdded(pages, page)
45
- # puts "onElementAdded: #{page}"
46
- # end
47
- #
48
- # @param [Sketchup::Pages] pages
49
- #
50
- # @param [Sketchup::Page] page
51
- #
52
- # @return [nil]
53
- #
54
- # @version SketchUp 6.0
55
- def onElementAdded(pages, page)
56
- end
57
-
58
- # The {#onElementRemoved} method is invoked when an element is removed from a
59
- # {Sketchup::Pages} object.
60
- #
61
- # @example
62
- # def onElementRemoved(pages, page)
63
- # puts "onElementRemoved: #{page}"
64
- # end
65
- #
66
- # @param [Sketchup::Pages] pages
67
- #
68
- # @param [Sketchup::Page] page
69
- #
70
- # @return [nil]
71
- #
72
- # @version SketchUp 6.0
73
- def onElementRemoved(pages, page)
74
- end
75
-
76
- end
1
+ # Copyright:: Copyright 2020 Trimble Inc.
2
+ # License:: The MIT License (MIT)
3
+
4
+ # This observer interface is implemented to react to pages events. To
5
+ # implement this observer, create a Ruby class of this type, override the
6
+ # desired methods, and add an instance of the observer to the objects of
7
+ # interests.
8
+ #
9
+ # @example
10
+ # # This is an example of an observer that watches the pages for new ones.
11
+ # class MyPagesObserver < Sketchup::PagesObserver
12
+ # def onElementAdded(pages, page)
13
+ # puts "onElementAdded: #{page}"
14
+ # end
15
+ # end
16
+ #
17
+ # # Attach the observer.
18
+ # Sketchup.active_model.pages.add_observer(MyPagesObserver.new)
19
+ #
20
+ # @version SketchUp 6.0
21
+ class Sketchup::PagesObserver < Sketchup::EntitiesObserver
22
+
23
+ # Instance Methods
24
+
25
+ # The {#onContentsModified} method is invoked whenever the pages change.
26
+ #
27
+ # @example
28
+ # def onContentsModified(pages)
29
+ # puts "onContentsModified: #{pages}"
30
+ # end
31
+ #
32
+ # @param [Sketchup::Pages] pages
33
+ #
34
+ # @return [nil]
35
+ #
36
+ # @version SketchUp 6.0
37
+ def onContentsModified(pages)
38
+ end
39
+
40
+ # The {#onElementAdded} method is invoked when an element is added to a
41
+ # {Sketchup::Pages} object.
42
+ #
43
+ # @example
44
+ # def onElementAdded(pages, page)
45
+ # puts "onElementAdded: #{page}"
46
+ # end
47
+ #
48
+ # @param [Sketchup::Pages] pages
49
+ #
50
+ # @param [Sketchup::Page] page
51
+ #
52
+ # @return [nil]
53
+ #
54
+ # @version SketchUp 6.0
55
+ def onElementAdded(pages, page)
56
+ end
57
+
58
+ # The {#onElementRemoved} method is invoked when an element is removed from a
59
+ # {Sketchup::Pages} object.
60
+ #
61
+ # @example
62
+ # def onElementRemoved(pages, page)
63
+ # puts "onElementRemoved: #{page}"
64
+ # end
65
+ #
66
+ # @param [Sketchup::Pages] pages
67
+ #
68
+ # @param [Sketchup::Page] page
69
+ #
70
+ # @return [nil]
71
+ #
72
+ # @version SketchUp 6.0
73
+ def onElementRemoved(pages, page)
74
+ end
75
+
76
+ end
@@ -1,456 +1,456 @@
1
- # Copyright:: Copyright 2020 Trimble Inc.
2
- # License:: The MIT License (MIT)
3
-
4
- # The PickHelper class is used to pick entities that reside under the current
5
- # cursor location. PickHelper and InputPoint are similar, but InputPoint also
6
- # uses inferencing. You can retrieve a PickHelper object using the pick_helper
7
- # method on a View object.
8
- #
9
- # Entities that are picked (found under the
10
- # cursor when a mouse or keyboard event occurs), are called Pick Records and
11
- # are placed in an indexed list.
12
- #
13
- # @version SketchUp 6.0
14
- class Sketchup::PickHelper
15
-
16
- # Constants
17
-
18
- PICK_CROSSING = nil # Stub value.
19
- PICK_INSIDE = nil # Stub value.
20
-
21
- # Instance Methods
22
-
23
- # The all_picked method is used to get an array of entities from the
24
- # active entities from all the pick paths. Duplicates might occur if
25
- # there are multiple pick paths for entities that ends in a group or
26
- # component.
27
- #
28
- # For example, if the pick hits at the border of an edge and face
29
- # inside a group there will be two pick paths - one for the face and
30
- # one for the edge. Since this method returns entities from the active
31
- # entities it would return an array with the group two times.
32
- #
33
- # @example
34
- # ph = view.pick_helper
35
- # ph.do_pick(x, y)
36
- # entities = ph.all_picked
37
- #
38
- # @return elements - the array of elements in the pick.
39
- #
40
- # @version SketchUp 6.0
41
- def all_picked
42
- end
43
-
44
- # The best_picked method is used to retrieve the "best" entity picked (entity
45
- # that you would have picked if you were using the select tool).
46
- #
47
- # Returns nil if nothing was picked. You must have called do_pick
48
- # before calling this method.
49
- #
50
- # @example
51
- # ph = view.pick_helper
52
- # ph.do_pick(x, y)
53
- # best_entity = ph.best_picked
54
- #
55
- # @return entity - the best picked entity
56
- #
57
- # @version SketchUp 6.0
58
- def best_picked
59
- end
60
-
61
- # Used to pick a set of entities from a model from a BoundingBox. The pick
62
- # criteria can be for completely-contained or partially-contained entities,
63
- # similar to how the Selection tool works.
64
- #
65
- # @example
66
- # boundingbox = Geom::BoundingBox.new
67
- # boundingbox.add([1, 1, 1], [100, 100, 100])
68
- # ph = Sketchup.active_model.active_view.pick_helper
69
- #
70
- # # Rotate the box 45' around the z-axis
71
- # angle = 45
72
- # transformation = Geom::Transformation.new(ORIGIN, Z_AXIS, angle)
73
- #
74
- # num_picked = ph.boundingbox_pick(boundingbox, Sketchup::PickHelper::PICK_CROSSING, transformation)
75
- # if num_picked > 0
76
- # Sketchup.active_model.selection.add(ph.all_picked)
77
- # end
78
- #
79
- # @param bounding_box
80
- # BoundingBox object defining the volume to use for picking
81
- #
82
- # @param pick_type
83
- # PICK_INSIDE to select entities completely contained or
84
- # PICK_CROSSING to select entities partially contained.
85
- #
86
- # @param [optional] transformation
87
- # Transformation that will be applied to the
88
- # volume defined by the BoundingBox that allows for a
89
- # rotation.
90
- #
91
- # @return The number of Entity objects picked
92
- #
93
- # @version SketchUp 2016
94
- def boundingbox_pick(bounding_box, pick_type, transformation = IDENTITY)
95
- end
96
-
97
- # The count method is used to count the number of entities picked (number of
98
- # pick records)
99
- #
100
- # @example
101
- # number = pickhelper.count
102
- #
103
- # @return number - the number of entities picked
104
- #
105
- # @version SketchUp 6.0
106
- def count
107
- end
108
-
109
- # The depth_at method retrieves the depth of one of the currently picked
110
- # entities in the list of pick records.
111
- #
112
- # @example
113
- # ph = view.pick_helper
114
- # ph.do_pick(x, y)
115
- # # Iterate all pick-routes:
116
- # pickhelper.count.times { |pick_path_index|
117
- # puts pickhelper.depth_at(pick_path_index)
118
- # }
119
- #
120
- # @param index
121
- # A number from 0 to number of items picked minus one.
122
- #
123
- # @return integer - the depth of the entity if successful
124
- #
125
- # @version SketchUp 6.0
126
- def depth_at(index)
127
- end
128
-
129
- # The do_pick method is used to perform the initial pick. This method is
130
- # generally called before any other methods in the PickHelper class.
131
- #
132
- # Returns the number of entities picked. The x and y values are the screen
133
- # coordinates of the point at which would want to do a pick.
134
- #
135
- # @example
136
- # ph = view.pick_helpernum = ph.do_pick(x, y)
137
- #
138
- # @param x
139
- # X screen coordinate for the pick.
140
- #
141
- # @param y
142
- # Y screen coordinate for the pick.
143
- #
144
- # @param aperture
145
- # The size of the pick-aperture.
146
- #
147
- # @return Integer - The number of Entity objects picked
148
- #
149
- # @version SketchUp 6.0
150
- def do_pick(x, y, aperture = 0)
151
- end
152
-
153
- # The element_at method is used to retrieve a specific entity in the list of
154
- # picked elements. This element will be from the active entities.
155
- #
156
- # Use count() to get the number of possible pick paths.
157
- #
158
- # @example
159
- # ph = view.pick_helper
160
- # ph.do_pick(x, y)
161
- # # Iterate all pick-routes:
162
- # pickhelper.count.times { |pick_path_index|
163
- # puts pickhelper.element_at(pick_path_index)
164
- # }
165
- # # You would iterate the same elements in all_picked.
166
- #
167
- # @param index
168
- # A number from 0 to number of items picked minus one.
169
- #
170
- # @return entity - the entity at the index position in the list
171
- # of picked entities.
172
- #
173
- # @version SketchUp 6.0
174
- def element_at(index)
175
- end
176
-
177
- # The {#init} method is used to initialize the PickHelper for testing points.
178
- #
179
- # You do not normally need to call this method, but you can use this if you
180
- # want to call {#test_point} or {#pick_segment} on a lot of points.
181
- #
182
- # If the optional aperture is given, it is given in pixels.
183
- #
184
- # @example
185
- # ph = view.pick_helper
186
- # ph.init(x, y, 5)
187
- # # Find all points picked by the screen click.
188
- # selected = points.select { |point|
189
- # ph.test_point(point)
190
- # }
191
- #
192
- # @param [Integer] x
193
- # X screen coordinate for the pick.
194
- #
195
- # @param [Integer] y
196
- # Y screen coordinate for the pick.
197
- #
198
- # @param [Integer] aperture
199
- # aperture in pixels.
200
- #
201
- # @return [PickHelper] self
202
- #
203
- # @version SketchUp 6.0
204
- def init(x, y, aperture = 0)
205
- end
206
-
207
- # The leaf_at method retrieves the deepest thing in a pick path.
208
- #
209
- # For example, if you have a face that is within a component that is within
210
- # another component, leaf_at returns the face.
211
- #
212
- # Use count() to get the number of possible pick paths.
213
- #
214
- # @example
215
- # ph = view.pick_helper
216
- # ph.do_pick(x, y)
217
- # # Iterate all pick-routes:
218
- # pickhelper.count.times { |pick_path_index|
219
- # p pickhelper.leaf_at(pick_path_index)
220
- # }
221
- #
222
- # @param index
223
- # A number from 0 to number of items picked minus one.
224
- #
225
- # @return entity - the leaf entity
226
- #
227
- # @version SketchUp 6.0
228
- def leaf_at(index)
229
- end
230
-
231
- # The path_at method is used to retrieve the entire path for an entity in the
232
- # pick list (as an array).
233
- #
234
- # If one of the pick paths end in a face nested in a group nested in a
235
- # component this method will return an array of these entities. The Group
236
- # will be first and the face will be last.
237
- #
238
- # The first item in the array will be from the active entities and the last
239
- # item will be a drawing element that is not a group, component or image.
240
- #
241
- # @example
242
- # ph = view.pick_helper
243
- # ph.do_pick(x, y)
244
- # # Iterate all pick-routes:
245
- # pickhelper.count.times { |pick_path_index|
246
- # p pickhelper.path_at(pick_path_index)
247
- # }
248
- #
249
- # @param index
250
- # A number from 0 to number of items picked minus one.
251
- #
252
- # @return array - an array of entities including the leaf
253
- #
254
- # @version SketchUp 6.0
255
- def path_at(index)
256
- end
257
-
258
- # The {#pick_segment} method is used to pick a segment of a polyline curve that
259
- # is defined by an array of points.
260
- #
261
- # If you click on a point in a polyline curve, the index of
262
- # the point in the curve is returned (starting at 0).
263
- #
264
- # If you click on a segment in the polyline curve, the index of the segment is
265
- # returned. Segments are returned by negative indicies and start at index -1
266
- # (for the segment connecting the first two points) and increase by a factor
267
- # of -1 (for example, the segment connecting second and third point is -2).
268
- #
269
- # There is no need to invoke {#do_pick} for this and the results are unrelated.
270
- #
271
- # @example
272
- # point1 = Geom::Point3d.new(0 ,0, 0)
273
- # point2 = Geom::Point3d.new(10, 0, 0)
274
- # segment = [point1, point2]
275
- # ph = view.pick_helper
276
- # # If testing many points this is the fastest way to test.
277
- # ph.init(x, y)
278
- # picked = ph.pick_segment(segment)
279
- # # This do not require .init
280
- # picked = ph.pick_segment(segment, x, y)
281
- #
282
- # @note The return value will be a negative index when a segment is picked.
283
- #
284
- # @overload pick_segment(points)
285
- #
286
- # This is more efficient if you need to test a number of segments for the
287
- # same set of screen coordinates. But then you must use {#init} first.
288
- # @param [Array<Geom::Point3d>] points A series of points in the polyline as
289
- # a list of parameters or an array containing Point3d
290
- # objects.
291
- # @return [Integer, false] an index on success, +false+ on failure
292
- #
293
- # @overload pick_segment(points, x, y, aperture = 0)
294
- #
295
- # @param [Array<Geom::Point3d>] points A series of points in the polyline as
296
- # a list of parameters or an array containing Point3d
297
- # objects.
298
- # @param [Integer] x screen mouse position in pixels.
299
- # @param [Integer] y (required if x given) screen mouse position
300
- # in pixels.
301
- # @param aperture aperture in pixels.
302
- # @return [Integer, false] an index on success, +false+ on failure
303
- #
304
- # @version SketchUp 6.0
305
- def pick_segment(*args)
306
- end
307
-
308
- # The picked_edge method is used to retrieve the "best" Edge picked.
309
- #
310
- # Returns nil if there were no edges picked. You must have called do_pick
311
- # before calling this method.
312
- #
313
- # @example
314
- # ph = view.pick_helper
315
- # ph.do_pick(x, y)
316
- # edge = ph.picked_edge
317
- #
318
- # @return edge - an Edge object if successful
319
- #
320
- # @version SketchUp 6.0
321
- def picked_edge
322
- end
323
-
324
- # The picked_element method retrieves the best drawing element, that is not an
325
- # edge or a face, picked.
326
- #
327
- # Returns nil if nothing was picked. You must have called do_pick
328
- # before calling this method.
329
- #
330
- # @example
331
- # ph = view.pick_helper
332
- # ph.do_pick(x, y)
333
- # entity = ph.picked_element
334
- #
335
- # @param index
336
- #
337
- # @return element - a drawing element that is not an edge or face
338
- # if successful
339
- #
340
- # @version SketchUp 6.0
341
- def picked_element(index)
342
- end
343
-
344
- # The picked_face method is used to retrieve the best face picked.
345
- #
346
- # Returns nil if there were no faces picked. You must have called do_pick
347
- # before calling this method.
348
- #
349
- # @example
350
- # ph = view.pick_helper
351
- # ph.do_pick(x, y)
352
- # face = ph.picked_face
353
- #
354
- # @return face - a Face object if successful
355
- #
356
- # @version SketchUp 6.0
357
- def picked_face
358
- end
359
-
360
- # The {#test_point} method is used to test a point to see if it would be
361
- # selected using the default or given pick aperture.
362
- #
363
- # There is no need to invoke {#do_pick} for this and the results are unrelated.
364
- #
365
- # @example
366
- # ph = view.pick_helper
367
- # # If testing many points this is the fastest way to test.
368
- # ph.init(x, y)
369
- # picked = ph.test_point(point)
370
- # # These do not require init()
371
- # picked = ph.test_point(point, x, y)
372
- # picked = ph.test_point(point, x, y, aperture)
373
- #
374
- # @overload test_point(point)
375
- #
376
- # This is more efficient if you want to test a lot of points using the same
377
- # screen point. But you *must* have called the {#init} method first for this
378
- # to work.
379
- # @param [Geom::Point3d] point
380
- #
381
- # @overload test_point(point, x, y, aperture = 0)
382
- #
383
- # @param [Geom::Point3d] point
384
- # @param [Integer] x
385
- # @param [Integer] y
386
- # @param [Integer] aperture
387
- #
388
- # @return [Boolean]
389
- #
390
- # @version SketchUp 6.0
391
- def test_point(*args)
392
- end
393
-
394
- # The transformation_at method is used to get a transformation at a specific
395
- # pick path index in the pick helper.
396
- #
397
- # The transformation combines the transformation of all groups, components and
398
- # images in the pick path. This transformation can be used to transform the
399
- # coordinates of the leaf entity into the coordinates of the active entities.
400
- #
401
- # @example
402
- # ph = view.pick_helper
403
- # ph.do_pick(x, y)
404
- # # Iterate all pick-routes:
405
- # pickhelper.count.times { |pick_path_index|
406
- # puts pickhelper.transformation_at(pick_path_index)
407
- # }
408
- #
409
- # @param index
410
- # The index where the transformation should be retrieved.
411
- #
412
- # @return transformation - the transformation found
413
- #
414
- # @version SketchUp 6.0
415
- def transformation_at(index)
416
- end
417
-
418
- # The view method is used to get the view associated with the PickHelper.
419
- #
420
- # @example
421
- # view = pickhelper.view
422
- #
423
- # @return view - the associated view
424
- #
425
- # @version SketchUp 6.0
426
- def view
427
- end
428
-
429
- # Used to pick a set of entities from a model based on a screen coordinate
430
- # rectangular area defined by two points. The pick criteria can be for
431
- # completely-contained or partially-contained entities, similar to how
432
- # the Selection tool works. The z value of the points passed in are ignored.
433
- #
434
- # @example
435
- # ph = Sketchup.active_model.active_view.pick_helper
436
- # start_point = Geom::Point3d.new(100, 100, 0)
437
- # end_point = Geom::Point3d.new(500, 500, 0)
438
- # num_picked = ph.window_pick(start_point, end_point, Sketchup::PickHelper::PICK_CROSSING)
439
- #
440
- # @param start_point
441
- # First screen coordinate point.
442
- #
443
- # @param end_point
444
- # Second screen coordinate point.
445
- #
446
- # @param pick_type
447
- # PICK_INSIDE to select entities completely contained or
448
- # PICK_CROSSING to select entities partially contained.
449
- #
450
- # @return The number of Entity objects picked
451
- #
452
- # @version SketchUp 2016
453
- def window_pick(start_point, end_point, pick_type)
454
- end
455
-
456
- end
1
+ # Copyright:: Copyright 2020 Trimble Inc.
2
+ # License:: The MIT License (MIT)
3
+
4
+ # The PickHelper class is used to pick entities that reside under the current
5
+ # cursor location. PickHelper and InputPoint are similar, but InputPoint also
6
+ # uses inferencing. You can retrieve a PickHelper object using the pick_helper
7
+ # method on a View object.
8
+ #
9
+ # Entities that are picked (found under the
10
+ # cursor when a mouse or keyboard event occurs), are called Pick Records and
11
+ # are placed in an indexed list.
12
+ #
13
+ # @version SketchUp 6.0
14
+ class Sketchup::PickHelper
15
+
16
+ # Constants
17
+
18
+ PICK_CROSSING = nil # Stub value.
19
+ PICK_INSIDE = nil # Stub value.
20
+
21
+ # Instance Methods
22
+
23
+ # The all_picked method is used to get an array of entities from the
24
+ # active entities from all the pick paths. Duplicates might occur if
25
+ # there are multiple pick paths for entities that ends in a group or
26
+ # component.
27
+ #
28
+ # For example, if the pick hits at the border of an edge and face
29
+ # inside a group there will be two pick paths - one for the face and
30
+ # one for the edge. Since this method returns entities from the active
31
+ # entities it would return an array with the group two times.
32
+ #
33
+ # @example
34
+ # ph = view.pick_helper
35
+ # ph.do_pick(x, y)
36
+ # entities = ph.all_picked
37
+ #
38
+ # @return elements - the array of elements in the pick.
39
+ #
40
+ # @version SketchUp 6.0
41
+ def all_picked
42
+ end
43
+
44
+ # The best_picked method is used to retrieve the "best" entity picked (entity
45
+ # that you would have picked if you were using the select tool).
46
+ #
47
+ # Returns nil if nothing was picked. You must have called do_pick
48
+ # before calling this method.
49
+ #
50
+ # @example
51
+ # ph = view.pick_helper
52
+ # ph.do_pick(x, y)
53
+ # best_entity = ph.best_picked
54
+ #
55
+ # @return entity - the best picked entity
56
+ #
57
+ # @version SketchUp 6.0
58
+ def best_picked
59
+ end
60
+
61
+ # Used to pick a set of entities from a model from a BoundingBox. The pick
62
+ # criteria can be for completely-contained or partially-contained entities,
63
+ # similar to how the Selection tool works.
64
+ #
65
+ # @example
66
+ # boundingbox = Geom::BoundingBox.new
67
+ # boundingbox.add([1, 1, 1], [100, 100, 100])
68
+ # ph = Sketchup.active_model.active_view.pick_helper
69
+ #
70
+ # # Rotate the box 45' around the z-axis
71
+ # angle = 45
72
+ # transformation = Geom::Transformation.new(ORIGIN, Z_AXIS, angle)
73
+ #
74
+ # num_picked = ph.boundingbox_pick(boundingbox, Sketchup::PickHelper::PICK_CROSSING, transformation)
75
+ # if num_picked > 0
76
+ # Sketchup.active_model.selection.add(ph.all_picked)
77
+ # end
78
+ #
79
+ # @param bounding_box
80
+ # BoundingBox object defining the volume to use for picking
81
+ #
82
+ # @param pick_type
83
+ # PICK_INSIDE to select entities completely contained or
84
+ # PICK_CROSSING to select entities partially contained.
85
+ #
86
+ # @param [optional] transformation
87
+ # Transformation that will be applied to the
88
+ # volume defined by the BoundingBox that allows for a
89
+ # rotation.
90
+ #
91
+ # @return The number of Entity objects picked
92
+ #
93
+ # @version SketchUp 2016
94
+ def boundingbox_pick(bounding_box, pick_type, transformation = IDENTITY)
95
+ end
96
+
97
+ # The count method is used to count the number of entities picked (number of
98
+ # pick records)
99
+ #
100
+ # @example
101
+ # number = pickhelper.count
102
+ #
103
+ # @return number - the number of entities picked
104
+ #
105
+ # @version SketchUp 6.0
106
+ def count
107
+ end
108
+
109
+ # The depth_at method retrieves the depth of one of the currently picked
110
+ # entities in the list of pick records.
111
+ #
112
+ # @example
113
+ # ph = view.pick_helper
114
+ # ph.do_pick(x, y)
115
+ # # Iterate all pick-routes:
116
+ # pickhelper.count.times { |pick_path_index|
117
+ # puts pickhelper.depth_at(pick_path_index)
118
+ # }
119
+ #
120
+ # @param index
121
+ # A number from 0 to number of items picked minus one.
122
+ #
123
+ # @return integer - the depth of the entity if successful
124
+ #
125
+ # @version SketchUp 6.0
126
+ def depth_at(index)
127
+ end
128
+
129
+ # The do_pick method is used to perform the initial pick. This method is
130
+ # generally called before any other methods in the PickHelper class.
131
+ #
132
+ # Returns the number of entities picked. The x and y values are the screen
133
+ # coordinates of the point at which would want to do a pick.
134
+ #
135
+ # @example
136
+ # ph = view.pick_helpernum = ph.do_pick(x, y)
137
+ #
138
+ # @param x
139
+ # X screen coordinate for the pick.
140
+ #
141
+ # @param y
142
+ # Y screen coordinate for the pick.
143
+ #
144
+ # @param aperture
145
+ # The size of the pick-aperture.
146
+ #
147
+ # @return Integer - The number of Entity objects picked
148
+ #
149
+ # @version SketchUp 6.0
150
+ def do_pick(x, y, aperture = 0)
151
+ end
152
+
153
+ # The element_at method is used to retrieve a specific entity in the list of
154
+ # picked elements. This element will be from the active entities.
155
+ #
156
+ # Use count() to get the number of possible pick paths.
157
+ #
158
+ # @example
159
+ # ph = view.pick_helper
160
+ # ph.do_pick(x, y)
161
+ # # Iterate all pick-routes:
162
+ # pickhelper.count.times { |pick_path_index|
163
+ # puts pickhelper.element_at(pick_path_index)
164
+ # }
165
+ # # You would iterate the same elements in all_picked.
166
+ #
167
+ # @param index
168
+ # A number from 0 to number of items picked minus one.
169
+ #
170
+ # @return entity - the entity at the index position in the list
171
+ # of picked entities.
172
+ #
173
+ # @version SketchUp 6.0
174
+ def element_at(index)
175
+ end
176
+
177
+ # The {#init} method is used to initialize the PickHelper for testing points.
178
+ #
179
+ # You do not normally need to call this method, but you can use this if you
180
+ # want to call {#test_point} or {#pick_segment} on a lot of points.
181
+ #
182
+ # If the optional aperture is given, it is given in pixels.
183
+ #
184
+ # @example
185
+ # ph = view.pick_helper
186
+ # ph.init(x, y, 5)
187
+ # # Find all points picked by the screen click.
188
+ # selected = points.select { |point|
189
+ # ph.test_point(point)
190
+ # }
191
+ #
192
+ # @param [Integer] x
193
+ # X screen coordinate for the pick.
194
+ #
195
+ # @param [Integer] y
196
+ # Y screen coordinate for the pick.
197
+ #
198
+ # @param [Integer] aperture
199
+ # aperture in pixels.
200
+ #
201
+ # @return [PickHelper] self
202
+ #
203
+ # @version SketchUp 6.0
204
+ def init(x, y, aperture = 0)
205
+ end
206
+
207
+ # The leaf_at method retrieves the deepest thing in a pick path.
208
+ #
209
+ # For example, if you have a face that is within a component that is within
210
+ # another component, leaf_at returns the face.
211
+ #
212
+ # Use count() to get the number of possible pick paths.
213
+ #
214
+ # @example
215
+ # ph = view.pick_helper
216
+ # ph.do_pick(x, y)
217
+ # # Iterate all pick-routes:
218
+ # pickhelper.count.times { |pick_path_index|
219
+ # p pickhelper.leaf_at(pick_path_index)
220
+ # }
221
+ #
222
+ # @param index
223
+ # A number from 0 to number of items picked minus one.
224
+ #
225
+ # @return entity - the leaf entity
226
+ #
227
+ # @version SketchUp 6.0
228
+ def leaf_at(index)
229
+ end
230
+
231
+ # The path_at method is used to retrieve the entire path for an entity in the
232
+ # pick list (as an array).
233
+ #
234
+ # If one of the pick paths end in a face nested in a group nested in a
235
+ # component this method will return an array of these entities. The Group
236
+ # will be first and the face will be last.
237
+ #
238
+ # The first item in the array will be from the active entities and the last
239
+ # item will be a drawing element that is not a group, component or image.
240
+ #
241
+ # @example
242
+ # ph = view.pick_helper
243
+ # ph.do_pick(x, y)
244
+ # # Iterate all pick-routes:
245
+ # pickhelper.count.times { |pick_path_index|
246
+ # p pickhelper.path_at(pick_path_index)
247
+ # }
248
+ #
249
+ # @param index
250
+ # A number from 0 to number of items picked minus one.
251
+ #
252
+ # @return array - an array of entities including the leaf
253
+ #
254
+ # @version SketchUp 6.0
255
+ def path_at(index)
256
+ end
257
+
258
+ # The {#pick_segment} method is used to pick a segment of a polyline curve that
259
+ # is defined by an array of points.
260
+ #
261
+ # If you click on a point in a polyline curve, the index of
262
+ # the point in the curve is returned (starting at 0).
263
+ #
264
+ # If you click on a segment in the polyline curve, the index of the segment is
265
+ # returned. Segments are returned by negative indicies and start at index -1
266
+ # (for the segment connecting the first two points) and increase by a factor
267
+ # of -1 (for example, the segment connecting second and third point is -2).
268
+ #
269
+ # There is no need to invoke {#do_pick} for this and the results are unrelated.
270
+ #
271
+ # @example
272
+ # point1 = Geom::Point3d.new(0 ,0, 0)
273
+ # point2 = Geom::Point3d.new(10, 0, 0)
274
+ # segment = [point1, point2]
275
+ # ph = view.pick_helper
276
+ # # If testing many points this is the fastest way to test.
277
+ # ph.init(x, y)
278
+ # picked = ph.pick_segment(segment)
279
+ # # This do not require .init
280
+ # picked = ph.pick_segment(segment, x, y)
281
+ #
282
+ # @note The return value will be a negative index when a segment is picked.
283
+ #
284
+ # @overload pick_segment(points)
285
+ #
286
+ # This is more efficient if you need to test a number of segments for the
287
+ # same set of screen coordinates. But then you must use {#init} first.
288
+ # @param [Array<Geom::Point3d>] points A series of points in the polyline as
289
+ # a list of parameters or an array containing Point3d
290
+ # objects.
291
+ # @return [Integer, false] an index on success, +false+ on failure
292
+ #
293
+ # @overload pick_segment(points, x, y, aperture = 0)
294
+ #
295
+ # @param [Array<Geom::Point3d>] points A series of points in the polyline as
296
+ # a list of parameters or an array containing Point3d
297
+ # objects.
298
+ # @param [Integer] x screen mouse position in pixels.
299
+ # @param [Integer] y (required if x given) screen mouse position
300
+ # in pixels.
301
+ # @param aperture aperture in pixels.
302
+ # @return [Integer, false] an index on success, +false+ on failure
303
+ #
304
+ # @version SketchUp 6.0
305
+ def pick_segment(*args)
306
+ end
307
+
308
+ # The picked_edge method is used to retrieve the "best" Edge picked.
309
+ #
310
+ # Returns nil if there were no edges picked. You must have called do_pick
311
+ # before calling this method.
312
+ #
313
+ # @example
314
+ # ph = view.pick_helper
315
+ # ph.do_pick(x, y)
316
+ # edge = ph.picked_edge
317
+ #
318
+ # @return edge - an Edge object if successful
319
+ #
320
+ # @version SketchUp 6.0
321
+ def picked_edge
322
+ end
323
+
324
+ # The picked_element method retrieves the best drawing element, that is not an
325
+ # edge or a face, picked.
326
+ #
327
+ # Returns nil if nothing was picked. You must have called do_pick
328
+ # before calling this method.
329
+ #
330
+ # @example
331
+ # ph = view.pick_helper
332
+ # ph.do_pick(x, y)
333
+ # entity = ph.picked_element
334
+ #
335
+ # @param index
336
+ #
337
+ # @return element - a drawing element that is not an edge or face
338
+ # if successful
339
+ #
340
+ # @version SketchUp 6.0
341
+ def picked_element(index)
342
+ end
343
+
344
+ # The picked_face method is used to retrieve the best face picked.
345
+ #
346
+ # Returns nil if there were no faces picked. You must have called do_pick
347
+ # before calling this method.
348
+ #
349
+ # @example
350
+ # ph = view.pick_helper
351
+ # ph.do_pick(x, y)
352
+ # face = ph.picked_face
353
+ #
354
+ # @return face - a Face object if successful
355
+ #
356
+ # @version SketchUp 6.0
357
+ def picked_face
358
+ end
359
+
360
+ # The {#test_point} method is used to test a point to see if it would be
361
+ # selected using the default or given pick aperture.
362
+ #
363
+ # There is no need to invoke {#do_pick} for this and the results are unrelated.
364
+ #
365
+ # @example
366
+ # ph = view.pick_helper
367
+ # # If testing many points this is the fastest way to test.
368
+ # ph.init(x, y)
369
+ # picked = ph.test_point(point)
370
+ # # These do not require init()
371
+ # picked = ph.test_point(point, x, y)
372
+ # picked = ph.test_point(point, x, y, aperture)
373
+ #
374
+ # @overload test_point(point)
375
+ #
376
+ # This is more efficient if you want to test a lot of points using the same
377
+ # screen point. But you *must* have called the {#init} method first for this
378
+ # to work.
379
+ # @param [Geom::Point3d] point
380
+ #
381
+ # @overload test_point(point, x, y, aperture = 0)
382
+ #
383
+ # @param [Geom::Point3d] point
384
+ # @param [Integer] x
385
+ # @param [Integer] y
386
+ # @param [Integer] aperture
387
+ #
388
+ # @return [Boolean]
389
+ #
390
+ # @version SketchUp 6.0
391
+ def test_point(*args)
392
+ end
393
+
394
+ # The transformation_at method is used to get a transformation at a specific
395
+ # pick path index in the pick helper.
396
+ #
397
+ # The transformation combines the transformation of all groups, components and
398
+ # images in the pick path. This transformation can be used to transform the
399
+ # coordinates of the leaf entity into the coordinates of the active entities.
400
+ #
401
+ # @example
402
+ # ph = view.pick_helper
403
+ # ph.do_pick(x, y)
404
+ # # Iterate all pick-routes:
405
+ # pickhelper.count.times { |pick_path_index|
406
+ # puts pickhelper.transformation_at(pick_path_index)
407
+ # }
408
+ #
409
+ # @param index
410
+ # The index where the transformation should be retrieved.
411
+ #
412
+ # @return transformation - the transformation found
413
+ #
414
+ # @version SketchUp 6.0
415
+ def transformation_at(index)
416
+ end
417
+
418
+ # The view method is used to get the view associated with the PickHelper.
419
+ #
420
+ # @example
421
+ # view = pickhelper.view
422
+ #
423
+ # @return view - the associated view
424
+ #
425
+ # @version SketchUp 6.0
426
+ def view
427
+ end
428
+
429
+ # Used to pick a set of entities from a model based on a screen coordinate
430
+ # rectangular area defined by two points. The pick criteria can be for
431
+ # completely-contained or partially-contained entities, similar to how
432
+ # the Selection tool works. The z value of the points passed in are ignored.
433
+ #
434
+ # @example
435
+ # ph = Sketchup.active_model.active_view.pick_helper
436
+ # start_point = Geom::Point3d.new(100, 100, 0)
437
+ # end_point = Geom::Point3d.new(500, 500, 0)
438
+ # num_picked = ph.window_pick(start_point, end_point, Sketchup::PickHelper::PICK_CROSSING)
439
+ #
440
+ # @param start_point
441
+ # First screen coordinate point.
442
+ #
443
+ # @param end_point
444
+ # Second screen coordinate point.
445
+ #
446
+ # @param pick_type
447
+ # PICK_INSIDE to select entities completely contained or
448
+ # PICK_CROSSING to select entities partially contained.
449
+ #
450
+ # @return The number of Entity objects picked
451
+ #
452
+ # @version SketchUp 2016
453
+ def window_pick(start_point, end_point, pick_type)
454
+ end
455
+
456
+ end