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.
Files changed (150) hide show
  1. checksums.yaml +4 -4
  2. data/lib/sketchup-api-stubs.rb +1 -1
  3. data/lib/sketchup-api-stubs/sketchup.rb +147 -145
  4. data/lib/sketchup-api-stubs/stubs/Geom/BoundingBox.rb +322 -318
  5. data/lib/sketchup-api-stubs/stubs/Geom/Bounds2d.rb +172 -172
  6. data/lib/sketchup-api-stubs/stubs/Geom/LatLong.rb +126 -126
  7. data/lib/sketchup-api-stubs/stubs/Geom/OrientedBounds2d.rb +102 -102
  8. data/lib/sketchup-api-stubs/stubs/Geom/Point2d.rb +400 -400
  9. data/lib/sketchup-api-stubs/stubs/Geom/Point3d.rb +661 -661
  10. data/lib/sketchup-api-stubs/stubs/Geom/PolygonMesh.rb +498 -492
  11. data/lib/sketchup-api-stubs/stubs/Geom/Transformation.rb +478 -478
  12. data/lib/sketchup-api-stubs/stubs/Geom/Transformation2d.rb +263 -263
  13. data/lib/sketchup-api-stubs/stubs/Geom/UTM.rb +141 -141
  14. data/lib/sketchup-api-stubs/stubs/Geom/Vector2d.rb +522 -522
  15. data/lib/sketchup-api-stubs/stubs/Geom/Vector3d.rb +691 -691
  16. data/lib/sketchup-api-stubs/stubs/Layout.rb +25 -25
  17. data/lib/sketchup-api-stubs/stubs/Layout/AngularDimension.rb +573 -573
  18. data/lib/sketchup-api-stubs/stubs/Layout/AutoTextDefinition.rb +411 -411
  19. data/lib/sketchup-api-stubs/stubs/Layout/AutoTextDefinitions.rb +179 -174
  20. data/lib/sketchup-api-stubs/stubs/Layout/ConnectionPoint.rb +70 -70
  21. data/lib/sketchup-api-stubs/stubs/Layout/Document.rb +515 -514
  22. data/lib/sketchup-api-stubs/stubs/Layout/Ellipse.rb +29 -29
  23. data/lib/sketchup-api-stubs/stubs/Layout/Entities.rb +148 -143
  24. data/lib/sketchup-api-stubs/stubs/Layout/Entity.rb +353 -353
  25. data/lib/sketchup-api-stubs/stubs/Layout/FormattedText.rb +349 -349
  26. data/lib/sketchup-api-stubs/stubs/Layout/Grid.rb +311 -311
  27. data/lib/sketchup-api-stubs/stubs/Layout/Group.rb +261 -261
  28. data/lib/sketchup-api-stubs/stubs/Layout/Image.rb +91 -91
  29. data/lib/sketchup-api-stubs/stubs/Layout/Label.rb +370 -371
  30. data/lib/sketchup-api-stubs/stubs/Layout/Layer.rb +218 -218
  31. data/lib/sketchup-api-stubs/stubs/Layout/LayerInstance.rb +128 -128
  32. data/lib/sketchup-api-stubs/stubs/Layout/Layers.rb +225 -220
  33. data/lib/sketchup-api-stubs/stubs/Layout/LinearDimension.rb +567 -567
  34. data/lib/sketchup-api-stubs/stubs/Layout/LockedEntityError.rb +10 -10
  35. data/lib/sketchup-api-stubs/stubs/Layout/LockedLayerError.rb +11 -11
  36. data/lib/sketchup-api-stubs/stubs/Layout/Page.rb +183 -183
  37. data/lib/sketchup-api-stubs/stubs/Layout/PageInfo.rb +387 -387
  38. data/lib/sketchup-api-stubs/stubs/Layout/Pages.rb +209 -204
  39. data/lib/sketchup-api-stubs/stubs/Layout/Path.rb +344 -344
  40. data/lib/sketchup-api-stubs/stubs/Layout/Rectangle.rb +174 -174
  41. data/lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb +694 -694
  42. data/lib/sketchup-api-stubs/stubs/Layout/Style.rb +1519 -1519
  43. data/lib/sketchup-api-stubs/stubs/Layout/Table.rb +290 -290
  44. data/lib/sketchup-api-stubs/stubs/Layout/TableCell.rb +149 -149
  45. data/lib/sketchup-api-stubs/stubs/Layout/TableColumn.rb +139 -139
  46. data/lib/sketchup-api-stubs/stubs/Layout/TableRow.rb +135 -135
  47. data/lib/sketchup-api-stubs/stubs/Sketchup/Animation.rb +144 -140
  48. data/lib/sketchup-api-stubs/stubs/Sketchup/AppObserver.rb +157 -157
  49. data/lib/sketchup-api-stubs/stubs/Sketchup/ArcCurve.rb +209 -209
  50. data/lib/sketchup-api-stubs/stubs/Sketchup/AttributeDictionaries.rb +152 -152
  51. data/lib/sketchup-api-stubs/stubs/Sketchup/AttributeDictionary.rb +286 -281
  52. data/lib/sketchup-api-stubs/stubs/Sketchup/Axes.rb +149 -149
  53. data/lib/sketchup-api-stubs/stubs/Sketchup/Behavior.rb +302 -328
  54. data/lib/sketchup-api-stubs/stubs/Sketchup/Camera.rb +478 -577
  55. data/lib/sketchup-api-stubs/stubs/Sketchup/ClassificationSchema.rb +63 -63
  56. data/lib/sketchup-api-stubs/stubs/Sketchup/Classifications.rb +122 -122
  57. data/lib/sketchup-api-stubs/stubs/Sketchup/Color.rb +294 -281
  58. data/lib/sketchup-api-stubs/stubs/Sketchup/ComponentDefinition.rb +577 -562
  59. data/lib/sketchup-api-stubs/stubs/Sketchup/ComponentInstance.rb +604 -593
  60. data/lib/sketchup-api-stubs/stubs/Sketchup/Console.rb +76 -76
  61. data/lib/sketchup-api-stubs/stubs/Sketchup/ConstructionLine.rb +257 -257
  62. data/lib/sketchup-api-stubs/stubs/Sketchup/ConstructionPoint.rb +32 -32
  63. data/lib/sketchup-api-stubs/stubs/Sketchup/Curve.rb +201 -194
  64. data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionList.rb +362 -329
  65. data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionObserver.rb +74 -72
  66. data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionsObserver.rb +104 -102
  67. data/lib/sketchup-api-stubs/stubs/Sketchup/Dimension.rb +165 -165
  68. data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionLinear.rb +306 -312
  69. data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionObserver.rb +42 -38
  70. data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionRadial.rb +87 -87
  71. data/lib/sketchup-api-stubs/stubs/Sketchup/Drawingelement.rb +396 -390
  72. data/lib/sketchup-api-stubs/stubs/Sketchup/Edge.rb +502 -508
  73. data/lib/sketchup-api-stubs/stubs/Sketchup/EdgeUse.rb +211 -211
  74. data/lib/sketchup-api-stubs/stubs/Sketchup/Entities.rb +1126 -1119
  75. data/lib/sketchup-api-stubs/stubs/Sketchup/EntitiesObserver.rb +127 -125
  76. data/lib/sketchup-api-stubs/stubs/Sketchup/Entity.rb +545 -544
  77. data/lib/sketchup-api-stubs/stubs/Sketchup/EntityObserver.rb +60 -59
  78. data/lib/sketchup-api-stubs/stubs/Sketchup/ExtensionsManager.rb +126 -125
  79. data/lib/sketchup-api-stubs/stubs/Sketchup/Face.rb +751 -750
  80. data/lib/sketchup-api-stubs/stubs/Sketchup/FrameChangeObserver.rb +104 -104
  81. data/lib/sketchup-api-stubs/stubs/Sketchup/Group.rb +699 -697
  82. data/lib/sketchup-api-stubs/stubs/Sketchup/Http.rb +27 -27
  83. data/lib/sketchup-api-stubs/stubs/Sketchup/Http/Request.rb +285 -285
  84. data/lib/sketchup-api-stubs/stubs/Sketchup/Http/Response.rb +62 -62
  85. data/lib/sketchup-api-stubs/stubs/Sketchup/Image.rb +417 -409
  86. data/lib/sketchup-api-stubs/stubs/Sketchup/ImageRep.rb +266 -226
  87. data/lib/sketchup-api-stubs/stubs/Sketchup/Importer.rb +189 -190
  88. data/lib/sketchup-api-stubs/stubs/Sketchup/InputPoint.rb +405 -393
  89. data/lib/sketchup-api-stubs/stubs/Sketchup/InstanceObserver.rb +84 -82
  90. data/lib/sketchup-api-stubs/stubs/Sketchup/InstancePath.rb +306 -303
  91. data/lib/sketchup-api-stubs/stubs/Sketchup/Layer.rb +327 -285
  92. data/lib/sketchup-api-stubs/stubs/Sketchup/LayerFolder.rb +422 -0
  93. data/lib/sketchup-api-stubs/stubs/Sketchup/Layers.rb +427 -244
  94. data/lib/sketchup-api-stubs/stubs/Sketchup/LayersObserver.rb +249 -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 -112
  99. data/lib/sketchup-api-stubs/stubs/Sketchup/Loop.rb +137 -137
  100. data/lib/sketchup-api-stubs/stubs/Sketchup/Material.rb +414 -416
  101. data/lib/sketchup-api-stubs/stubs/Sketchup/Materials.rb +318 -311
  102. data/lib/sketchup-api-stubs/stubs/Sketchup/MaterialsObserver.rb +142 -141
  103. data/lib/sketchup-api-stubs/stubs/Sketchup/Menu.rb +93 -95
  104. data/lib/sketchup-api-stubs/stubs/Sketchup/Model.rb +1651 -1638
  105. data/lib/sketchup-api-stubs/stubs/Sketchup/ModelObserver.rb +357 -356
  106. data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsManager.rb +131 -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 +797 -770
  110. data/lib/sketchup-api-stubs/stubs/Sketchup/Pages.rb +363 -353
  111. data/lib/sketchup-api-stubs/stubs/Sketchup/PagesObserver.rb +77 -76
  112. data/lib/sketchup-api-stubs/stubs/Sketchup/PickHelper.rb +478 -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 +45 -44
  116. data/lib/sketchup-api-stubs/stubs/Sketchup/SectionPlane.rb +150 -150
  117. data/lib/sketchup-api-stubs/stubs/Sketchup/Selection.rb +459 -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 +59 -57
  122. data/lib/sketchup-api-stubs/stubs/Sketchup/Skp.rb +40 -0
  123. data/lib/sketchup-api-stubs/stubs/Sketchup/Style.rb +69 -69
  124. data/lib/sketchup-api-stubs/stubs/Sketchup/Styles.rb +217 -211
  125. data/lib/sketchup-api-stubs/stubs/Sketchup/Text.rb +262 -262
  126. data/lib/sketchup-api-stubs/stubs/Sketchup/Texture.rb +217 -225
  127. data/lib/sketchup-api-stubs/stubs/Sketchup/TextureWriter.rb +237 -237
  128. data/lib/sketchup-api-stubs/stubs/Sketchup/Tool.rb +835 -829
  129. data/lib/sketchup-api-stubs/stubs/Sketchup/Tools.rb +132 -132
  130. data/lib/sketchup-api-stubs/stubs/Sketchup/ToolsObserver.rb +156 -154
  131. data/lib/sketchup-api-stubs/stubs/Sketchup/UVHelper.rb +71 -61
  132. data/lib/sketchup-api-stubs/stubs/Sketchup/Vertex.rb +142 -142
  133. data/lib/sketchup-api-stubs/stubs/Sketchup/View.rb +1307 -1301
  134. data/lib/sketchup-api-stubs/stubs/Sketchup/ViewObserver.rb +45 -43
  135. data/lib/sketchup-api-stubs/stubs/UI/Command.rb +317 -310
  136. data/lib/sketchup-api-stubs/stubs/UI/HtmlDialog.rb +387 -356
  137. data/lib/sketchup-api-stubs/stubs/UI/Notification.rb +255 -229
  138. data/lib/sketchup-api-stubs/stubs/UI/Toolbar.rb +240 -240
  139. data/lib/sketchup-api-stubs/stubs/UI/WebDialog.rb +633 -633
  140. data/lib/sketchup-api-stubs/stubs/_top_level.rb +311 -311
  141. data/lib/sketchup-api-stubs/stubs/array.rb +741 -741
  142. data/lib/sketchup-api-stubs/stubs/geom.rb +351 -348
  143. data/lib/sketchup-api-stubs/stubs/languagehandler.rb +92 -92
  144. data/lib/sketchup-api-stubs/stubs/length.rb +278 -278
  145. data/lib/sketchup-api-stubs/stubs/numeric.rb +249 -249
  146. data/lib/sketchup-api-stubs/stubs/sketchup.rb +1342 -1310
  147. data/lib/sketchup-api-stubs/stubs/sketchupextension.rb +353 -353
  148. data/lib/sketchup-api-stubs/stubs/string.rb +24 -24
  149. data/lib/sketchup-api-stubs/stubs/ui.rb +668 -667
  150. metadata +4 -2
@@ -1,190 +1,189 @@
1
- # Copyright:: Copyright 2020 Trimble Inc.
2
- # License:: The MIT License (MIT)
3
-
4
- # The Importer interface lets you build your own importers for SketchUp. To
5
- # use this, you create a subclass of Importer and implement all of the
6
- # methods described below. This will make your importer appear in the list
7
- # that users see under File > Import, and you can use Ruby to do all of the
8
- # work of opening the file and creating whatever you need inside SketchUp.
9
- #
10
- # Here is an example of a complete script that imports a .txt file and
11
- # displays its contents in a messagebox.
12
- #
13
- # @example
14
- # class TextImporter < Sketchup::Importer
15
- #
16
- # # This method is called by SketchUp to determine the description that
17
- # # appears in the File > Import dialog's pulldown list of valid
18
- # # importers.
19
- # def description
20
- # return "Custom Text Importer (*.txt)"
21
- # end
22
- #
23
- # # This method is called by SketchUp to determine what file extension
24
- # # is associated with your importer.
25
- # def file_extension
26
- # return "txt"
27
- # end
28
- #
29
- # # This method is called by SketchUp to get a unique importer id.
30
- # def id
31
- # return "com.sketchup.importers.custom_txt"
32
- # end
33
- #
34
- # # This method is called by SketchUp to determine if the "Options"
35
- # # button inside the File > Import dialog should be enabled while your
36
- # # importer is selected.
37
- # def supports_options?
38
- # return true
39
- # end
40
- #
41
- # # This method is called by SketchUp when the user clicks on the
42
- # # "Options" button inside the File > Import dialog. You can use it to
43
- # # gather and store settings for your importer.
44
- # def do_options
45
- # # In a real use you would probably store this information in an
46
- # # instance variable.
47
- # my_settings = UI.inputbox(['My Import Option:'], ['1'],
48
- # "Import Options")
49
- # end
50
- #
51
- # # This method is called by SketchUp after the user has selected a file
52
- # # to import. This is where you do the real work of opening and
53
- # # processing the file.
54
- # def load_file(file_path, status)
55
- # UI.messagebox(file_path)
56
- # return 0 # 0 is the code for a successful import
57
- # end
58
- # end
59
- #
60
- # Sketchup.register_importer(TextImporter.new)
61
- #
62
- # @version SketchUp 6.0
63
- class Sketchup::Importer
64
-
65
- # Constants
66
-
67
- ImportCanceled = nil # Stub value.
68
- ImportFail = nil # Stub value.
69
- ImportFileNotFound = nil # Stub value.
70
- ImportSuccess = nil # Stub value.
71
- ImporterNotFound = nil # Stub value.
72
-
73
- # Instance Methods
74
-
75
- # This method is called by SketchUp to determine the description that appears
76
- # in the File > Import dialog's pulldown list of valid importers.
77
- #
78
- # Though it is common for the description to include the file extension
79
- # supported by the importer (such as "Text Importer (.txt)"), the actual
80
- # extension is defined in the file_extension method.
81
- #
82
- # @example
83
- # def description
84
- # return "Custom Text Importer (*.txt)"
85
- # end
86
- #
87
- # @return description - a brief string description
88
- #
89
- # @version SketchUp 6.0
90
- def description
91
- end
92
-
93
- # This method is called by SketchUp when the user clicks on the "Options"
94
- # button inside the File > Import dialog. You can use it to gather and store
95
- # settings for your importer.
96
- #
97
- # Only applicable if the importer supports options, meaning its
98
- # supports_options method returns true.
99
- #
100
- # @example
101
- # def id
102
- # return "com.sketchup.importers.custom_txt"
103
- # end
104
- #
105
- # @return id - an id string
106
- #
107
- # @version SketchUp 6.0
108
- def do_options
109
- end
110
-
111
- # This method is called by SketchUp to determine a single file extension is
112
- # associated with your importer. Only files that match this extension will be
113
- # shown to the user as they browse their harddrive for things to import.
114
- #
115
- # Ruby importers are only allowed to support a single extension.
116
- #
117
- # @example
118
- # def file_extension
119
- # return "txt"
120
- # end
121
- #
122
- # @return extension - typically a 3-letter string
123
- #
124
- # @version SketchUp 6.0
125
- def file_extension
126
- end
127
-
128
- # This method is called by SketchUp to determine a unique identifier for
129
- # your importer, typically something like "com.sketchup.importers.dxf".
130
- #
131
- # @example
132
- # def id
133
- # return "com.sketchup.importers.custom_txt"
134
- # end
135
- #
136
- # @return id - an id string
137
- #
138
- # @version SketchUp 6.0
139
- def id
140
- end
141
-
142
- # This method is called by SketchUp after the user has selected a file to
143
- # import. This is where you do the real work by opening the file via Ruby's
144
- # File object and processing it in whatever way you need.
145
- #
146
- # You must return an integer success code to SketchUp when you are done.
147
- # These are the codes that SketchUp understands and what will happen when
148
- # SketchUp receives each key.
149
- #
150
- # - 0 = Import Success (no additional dialog shown)
151
- # - 1 = Import Failed (no additional dialog shown)
152
- # - 2 = Import Cancelled by User (SketchUp will show a "cancelled" dialog)
153
- # - 4 = Import File not Found (SketchUp will show a "not found" dialog)
154
- # - 5 = SketchUp version not supported (no additional dialog shown)
155
- #
156
- # @example
157
- # def load_file(file_path, status)
158
- # # Here is where you would open the file and process it.
159
- # UI.messagebox(file_path)
160
- # return 0 # Success
161
- # end
162
- #
163
- # @param file_path
164
- # Absolute path to the file the user selected
165
- #
166
- # @param status
167
- # The status of the import so far. Contains true.
168
- #
169
- # @return success - an integer status code. See above.
170
- #
171
- # @version SketchUp 6.0
172
- def load_file(file_path, status)
173
- end
174
-
175
- # This method is called by SketchUp to determine if the "Options"
176
- # button inside the File > Import dialog should be enabled while your
177
- # importer is selected.
178
- #
179
- # @example
180
- # def supports_options?
181
- # return true
182
- # end
183
- #
184
- # @return [Boolean] supports_options - a boolean
185
- #
186
- # @version SketchUp 6.0
187
- def supports_options?
188
- end
189
-
190
- end
1
+ # Copyright:: Copyright 2020 Trimble Inc.
2
+ # License:: The MIT License (MIT)
3
+
4
+ # The Importer interface lets you build your own importers for SketchUp. To
5
+ # use this, you create a subclass of Importer and implement all of the
6
+ # methods described below. This will make your importer appear in the list
7
+ # that users see under File > Import, and you can use Ruby to do all of the
8
+ # work of opening the file and creating whatever you need inside SketchUp.
9
+ #
10
+ # Here is an example of a complete script that imports a .txt file and
11
+ # displays its contents in a messagebox.
12
+ #
13
+ # @example
14
+ # class TextImporter < Sketchup::Importer
15
+ #
16
+ # # This method is called by SketchUp to determine the description that
17
+ # # appears in the File > Import dialog's pulldown list of valid
18
+ # # importers.
19
+ # def description
20
+ # return "Custom Text Importer (*.txt)"
21
+ # end
22
+ #
23
+ # # This method is called by SketchUp to determine what file extension
24
+ # # is associated with your importer.
25
+ # def file_extension
26
+ # return "txt"
27
+ # end
28
+ #
29
+ # # This method is called by SketchUp to get a unique importer id.
30
+ # def id
31
+ # return "com.sketchup.importers.custom_txt"
32
+ # end
33
+ #
34
+ # # This method is called by SketchUp to determine if the "Options"
35
+ # # button inside the File > Import dialog should be enabled while your
36
+ # # importer is selected.
37
+ # def supports_options?
38
+ # return true
39
+ # end
40
+ #
41
+ # # This method is called by SketchUp when the user clicks on the
42
+ # # "Options" button inside the File > Import dialog. You can use it to
43
+ # # gather and store settings for your importer.
44
+ # def do_options
45
+ # # In a real use you would probably store this information in an
46
+ # # instance variable.
47
+ # my_settings = UI.inputbox(['My Import Option:'], ['1'],
48
+ # "Import Options")
49
+ # end
50
+ #
51
+ # # This method is called by SketchUp after the user has selected a file
52
+ # # to import. This is where you do the real work of opening and
53
+ # # processing the file.
54
+ # def load_file(file_path, status)
55
+ # UI.messagebox(file_path)
56
+ #
57
+ # return Sketchup::Importer::ImportSuccess
58
+ # end
59
+ # end
60
+ #
61
+ # Sketchup.register_importer(TextImporter.new)
62
+ #
63
+ # @version SketchUp 6.0
64
+ class Sketchup::Importer
65
+
66
+ # Constants
67
+
68
+ ImportCanceled = nil # Stub value.
69
+ ImportFail = nil # Stub value.
70
+ ImportFileNotFound = nil # Stub value.
71
+ ImportSuccess = nil # Stub value.
72
+
73
+ # Instance Methods
74
+
75
+ # This method is called by SketchUp to determine the description that appears
76
+ # in the File > Import dialog's pulldown list of valid importers.
77
+ #
78
+ # Though it is common for the description to include the file extension
79
+ # supported by the importer (such as "Text Importer (.txt)"), the actual
80
+ # extension is defined in the file_extension method.
81
+ #
82
+ # @example
83
+ # def description
84
+ # return "Custom Text Importer (*.txt)"
85
+ # end
86
+ #
87
+ # @return description - a brief string description
88
+ #
89
+ # @version SketchUp 6.0
90
+ def description
91
+ end
92
+
93
+ # This method is called by SketchUp when the user clicks on the "Options"
94
+ # button inside the File > Import dialog. You can use it to gather and store
95
+ # settings for your importer.
96
+ #
97
+ # Only applicable if the importer supports options, meaning its
98
+ # supports_options method returns true.
99
+ #
100
+ # @example
101
+ # def id
102
+ # return "com.sketchup.importers.custom_txt"
103
+ # end
104
+ #
105
+ # @return id - an id string
106
+ #
107
+ # @version SketchUp 6.0
108
+ def do_options
109
+ end
110
+
111
+ # This method is called by SketchUp to determine a single file extension is
112
+ # associated with your importer. Only files that match this extension will be
113
+ # shown to the user as they browse their harddrive for things to import.
114
+ #
115
+ # Ruby importers are only allowed to support a single extension.
116
+ #
117
+ # @example
118
+ # def file_extension
119
+ # return "txt"
120
+ # end
121
+ #
122
+ # @return extension - typically a 3-letter string
123
+ #
124
+ # @version SketchUp 6.0
125
+ def file_extension
126
+ end
127
+
128
+ # This method is called by SketchUp to determine a unique identifier for
129
+ # your importer, typically something like "com.sketchup.importers.dxf".
130
+ #
131
+ # @example
132
+ # def id
133
+ # return "com.sketchup.importers.custom_txt"
134
+ # end
135
+ #
136
+ # @return id - an id string
137
+ #
138
+ # @version SketchUp 6.0
139
+ def id
140
+ end
141
+
142
+ # This method is called by SketchUp after the user has selected a file to
143
+ # import. This is where you do the real work by opening the file via Ruby's
144
+ # File object and processing it in whatever way you need.
145
+ #
146
+ # You must return an integer success code to SketchUp when you are done.
147
+ # These are the codes that SketchUp understands:
148
+ #
149
+ # - Sketchup::Importer::ImportSuccess
150
+ # - Sketchup::Importer::ImportFail
151
+ # - Sketchup::Importer::ImportCanceled - SketchUp will show a "cancelled" dialog
152
+ # - Sketchup::Importer::ImportFileNotFound - SketchUp will show a "not found" dialog
153
+ #
154
+ # @example
155
+ # def load_file(file_path, status)
156
+ # # Here is where you would open the file and process it.
157
+ # puts file_path
158
+ #
159
+ # return Sketchup::Importer::ImportSuccess
160
+ # end
161
+ #
162
+ # @param file_path
163
+ # Absolute path to the file the user selected
164
+ #
165
+ # @param status
166
+ # The status of the import so far. Contains true.
167
+ #
168
+ # @return success - an integer status code. See above.
169
+ #
170
+ # @version SketchUp 6.0
171
+ def load_file(file_path, status)
172
+ end
173
+
174
+ # This method is called by SketchUp to determine if the "Options"
175
+ # button inside the File > Import dialog should be enabled while your
176
+ # importer is selected.
177
+ #
178
+ # @example
179
+ # def supports_options?
180
+ # return true
181
+ # end
182
+ #
183
+ # @return [Boolean] supports_options - a boolean
184
+ #
185
+ # @version SketchUp 6.0
186
+ def supports_options?
187
+ end
188
+
189
+ end
@@ -1,393 +1,405 @@
1
- # Copyright:: Copyright 2020 Trimble Inc.
2
- # License:: The MIT License (MIT)
3
-
4
- # The InputPoint used to pick entities that reside under the current cursor
5
- # location. InputPoint and PickHelper are similar, but InputPoint also uses
6
- # inferencing. Only tools react to cursor location. Therefore, most of the
7
- # methods in this class are only useful in the context of a tool you are
8
- # writing. For example, if you want to determine the entity that you just
9
- # clicked on with the mouse, you would use InputPoint.pick from within your
10
- # onLMouseButton method in a tool. See the example script linetool.rb for
11
- # examples of using the InputPoint class.
12
- #
13
- # @version SketchUp 6.0
14
- class Sketchup::InputPoint
15
-
16
- # Instance Methods
17
-
18
- # The == method is used to determine if two input points are the same.
19
- #
20
- # @example
21
- # view = Sketchup.active_model.active_view
22
- # x = 100
23
- # y = 100
24
- # ip1 = Sketchup::InputPoint.new
25
- # ip2 = view.inputpoint x,y
26
- # # Copy the contents of inputpoint2 into inputpoint1
27
- # ip1.copy! ip2
28
- # # Returns true
29
- # status = ip1 == ip2
30
- #
31
- # @param inputpoint2
32
- # The second input point in the comparison.
33
- #
34
- # @return status - true if the InputPoint objects are the same
35
- # object. False if the objects are not the same.
36
- #
37
- # @version SketchUp 6.0
38
- def ==(inputpoint2)
39
- end
40
-
41
- # The clear method is used to clear the input point.
42
- #
43
- # This sets it to an empty state. After calling this, valid? will return
44
- # false.
45
- #
46
- # @example
47
- # view = Sketchup.active_model.active_view
48
- # x = 100
49
- # y = 100
50
- # ip1 = view.inputpoint x,y
51
- # # Returns true
52
- # ip = ip1.clear
53
- #
54
- # @return inputpoint - the cleared (empty) input point if this
55
- # successful
56
- #
57
- # @version SketchUp 6.0
58
- def clear
59
- end
60
-
61
- # The copy! method is used to copy the data from a second input point into
62
- # this input point.
63
- #
64
- # @example
65
- # view = Sketchup.active_model.active_view
66
- # x = 100
67
- # y = 100
68
- # ip1 = Sketchup::InputPoint.new
69
- # ip2 = view.inputpoint x,y
70
- # # Copy the contents of inputpoint2 into inputpoint1
71
- # ip = ip1.copy! ip2
72
- #
73
- # @param inputpoint
74
- # The second input point.
75
- #
76
- # @return inputpoint - the new input point that received the copy
77
- # if successful
78
- #
79
- # @version SketchUp 6.0
80
- def copy!(inputpoint)
81
- end
82
-
83
- # The degrees_of_freedom method retrieves the number of degrees of freedom
84
- # there are for an input point.
85
- #
86
- # If you are just getting a point in space, then the degrees_of_freedom will
87
- # be 3 - meaning that there is nothing about the point that would constrain
88
- # its position.
89
- #
90
- # If you are on a face, then the degrees_of_freedom will be 2
91
- # meaning that you can only move on the plane of the face.
92
- #
93
- # If you are on an Edge or an axis, then the degrees_of_freedom will be 1
94
- # meaning that you can only move in the direction of the edge or axis.
95
- #
96
- # If you get an end point of an Edge, or an intersection point, then the
97
- # degrees_of_freedom will be 0.
98
- #
99
- # @example
100
- # view = Sketchup.active_model.active_view
101
- # x = 100
102
- # y = 100
103
- # ip1 = view.inputpoint x,y
104
- # dof = ip1.degrees_of_freedom
105
- #
106
- # @return degrees_of_freedom - see comments.
107
- #
108
- # @version SketchUp 6.0
109
- def degrees_of_freedom
110
- end
111
-
112
- # The depth method retrieves the depth of an inference if it is coming from a
113
- # component.
114
- #
115
- # If the InputPoint is not getting a position from inside a component, this
116
- # method will return 0. Otherwise it returns the depth of the entity in a
117
- # nested component that is providing the position.
118
- #
119
- # @example
120
- # view = Sketchup.active_model.active_view
121
- # x = 100
122
- # y = 100
123
- # ip1 = view.inputpoint x,y
124
- # d = ip1.depth
125
- #
126
- # @return depth - a number representing the depth of the
127
- # inputpoint (inside groups and components) if successful
128
- #
129
- # @version SketchUp 6.0
130
- def depth
131
- end
132
-
133
- # The display? method is used to determine if the input point has anything to
134
- # draw.
135
- #
136
- # If the method returns true, then the draw method will draw something.
137
- #
138
- # @example
139
- # view = Sketchup.active_model.active_view
140
- # x = 100
141
- # y = 100
142
- # ip1 = view.inputpoint x,y
143
- # status = ip1.display
144
- #
145
- # @return [Boolean] status - true if the draw method will draw something,
146
- # false if the draw method has nothing to draw
147
- #
148
- # @version SketchUp 6.0
149
- def display?
150
- end
151
-
152
- # The draw method is used to draw the input point.
153
- #
154
- # This is useful for showing an InputPoint from within the draw method of a
155
- # tool that you have implemented in Ruby. Additional examples are available in
156
- # the Plugins/examples directory.
157
- #
158
- # @example
159
- # view = Sketchup.active_model.active_view
160
- # x = 100
161
- # y = 100
162
- # ip1 = view.inputpoint x,y
163
- # ip = ip1.draw view
164
- #
165
- # @param view
166
- # The current view.
167
- #
168
- # @return view
169
- #
170
- # @version SketchUp 6.0
171
- def draw(view)
172
- end
173
-
174
- # The edge method is used to retrieve the edge if the input point is getting
175
- # its position from a point on an Edge.
176
- #
177
- # @example
178
- # view = Sketchup.active_model.active_view
179
- # x = 100
180
- # y = 100
181
- # ip1 = view.inputpoint x,y
182
- # e = ip1.edge
183
- #
184
- # @return edge - an Edge object if successful, or nil if
185
- # unsuccessful
186
- #
187
- # @version SketchUp 6.0
188
- def edge
189
- end
190
-
191
- # The face method retrieves the face if the input point is getting its
192
- # position from a face.
193
- #
194
- # Otherwise it returns nil.
195
- #
196
- # @example
197
- # view = Sketchup.active_model.active_view
198
- # x = 100
199
- # y = 100
200
- # ip1 = view.inputpoint x,y
201
- # f = ip1.face
202
- #
203
- # @return face - a Face object if successful, or nil if
204
- # unsuccessful
205
- #
206
- # @version SketchUp 6.0
207
- def face
208
- end
209
-
210
- # The new method is used to create a new InputPoint object.
211
- #
212
- # @example
213
- # ip1 = Sketchup::InputPoint.new
214
- #
215
- # # Or you can construct it at an arbitrary location.
216
- # starting_point = Geom::Point3d.new(100, 200, 300)
217
- # ip2 = Sketchup::InputPoint.new(starting_point)
218
- #
219
- # @note Prior to SketchUp 2019 it was not possible to
220
- # sub-class {Sketchup::InputPoint} due to a bug in how SketchUp initialized
221
- # the class.
222
- #
223
- # @param pt_or_vertex
224
- # An optional Point3d or Vertex where the new InputPoint
225
- # should be created.
226
- #
227
- # @return inputpoint - the newly created InputPoint object if
228
- # successful
229
- #
230
- # @version SketchUp 6.0
231
- def initialize(pt_or_vertex)
232
- end
233
-
234
- # The {#instance_path} method retrieves the instance path for the picked point.
235
- #
236
- # The returned instance_path is a copy of what the input point is holding on to
237
- # at the moment you access it. Your copy will not update if you make new picks
238
- # with the input point.
239
- #
240
- # If there has been no valid pick it will return `nil`.
241
- #
242
- # @example
243
- # view = Sketchup.active_model.active_view
244
- # x = 100
245
- # y = 100
246
- # ip = view.inputpoint(x, y)
247
- # instance_path = ip.instance_path
248
- #
249
- # @return [Sketchup::InstancePath, nil]
250
- #
251
- # @version SketchUp 2017
252
- def instance_path
253
- end
254
-
255
- # The pick method is used to get the input point at a specific screen
256
- # position.
257
- #
258
- # The first form just uses the screen position to compute the InputPoint. It
259
- # is used when you don't want the InputPoint to be dependent on another
260
- # InputPoint.
261
- #
262
- # The second form uses the screen position and another InputPoint. It will
263
- # find additional inferences such as along one of the axis directions from the
264
- # first point.
265
- #
266
- # @example
267
- # view = Sketchup.active_model.active_view
268
- # x = 100
269
- # y = 100
270
- # inputpoint = view.inputpoint x, y
271
- # inputpoint2 = Sketchup::InputPoint.new
272
- # inputpoint.pick view, x, y
273
- # inputpoint.pick view, x, y, inputpoint2
274
- #
275
- # @param view
276
- # The current view.
277
- #
278
- # @param x
279
- # A x value.
280
- #
281
- # @param y
282
- # A y value.
283
- #
284
- # @param [optional] inputpoint
285
- # A second input point used as a reference
286
- # for the pick.
287
- #
288
- # @return status - true if a valid InputPoint was picked and it
289
- # is different than it was before.
290
- #
291
- # @version SketchUp 6.0
292
- def pick(view, x, y, inputpoint)
293
- end
294
-
295
- # The position method is used to get the 3D point from the input point.
296
- #
297
- # @example
298
- # view = Sketchup.active_model.active_view
299
- # x = 100
300
- # y = 100
301
- # ip1 = view.inputpoint x,y
302
- # point = ip1.position
303
- #
304
- # @return point - a Point3d object position for the input point
305
- # if successful
306
- #
307
- # @version SketchUp 6.0
308
- def position
309
- end
310
-
311
- # The tooltip method is used to retrieve the string that is the tool tip to
312
- # display for the input point.
313
- #
314
- # @example
315
- # view = Sketchup.active_model.active_view
316
- # x = 100
317
- # y = 100
318
- # ip1 = view.inputpoint x,y
319
- # # Click on a face and you get "On Face"
320
- # tip = ip1.tooltip
321
- #
322
- # @return tip - a string tooltip or an empty string (if the input
323
- # point doesn't provide a tooltip).
324
- #
325
- # @version SketchUp 6.0
326
- def tooltip
327
- end
328
-
329
- # The transformation method retrieves the Transformation object for the input
330
- # point.
331
- #
332
- # If the InputPoint object is getting its position from something inside of a
333
- # component instance, this method returns the Transformation of the component
334
- # instance. Otherwise it returns the identity Transformation.
335
- #
336
- # Note that the position method on a input point always returns a point that is
337
- # transformed into model space. If you are using the edge, face or vertex
338
- # method on the InputPoint though, you will probably need to use the
339
- # transformation method to transform the data that you get back from the
340
- # selected entity.
341
- #
342
- # @example
343
- # view = Sketchup.active_model.active_view
344
- # x = 100
345
- # y = 100
346
- # ip1 = view.inputpoint x,y
347
- # # In this case, returning the identity transformation
348
- # tform = ip1.transformation
349
- #
350
- # @return transformation - the Transformation for the input point
351
- # if successful
352
- #
353
- # @version SketchUp 6.0
354
- def transformation
355
- end
356
-
357
- # The valid? method is used to determine if an input point has valid data.
358
- #
359
- # You must have called the pick method to set the data before it is valid.
360
- #
361
- # @example
362
- # view = Sketchup.active_model.active_view
363
- # x = 100
364
- # y = 100
365
- # ip1 = view.inputpoint x,y
366
- # status = ip1.valid?
367
- #
368
- # @return [Boolean] status - true if the input point has valid data, false
369
- # if it does not have valid data.
370
- #
371
- # @version SketchUp 6.0
372
- def valid?
373
- end
374
-
375
- # The vertex method returns a Vertex associated with the InputPoint. If the
376
- # InputPoint is on the end of a line, then it will return the Vertex. If the
377
- # InputPoint does not select any vertices this method returns nil.
378
- #
379
- # @example
380
- # view = Sketchup.active_model.active_view
381
- # x = 100
382
- # y = 100
383
- # ip1 = view.inputpoint x,y
384
- # # Click on a face and you get "On Face"
385
- # tip = ip1.vertex
386
- #
387
- # @return vertex - The associated vertex
388
- #
389
- # @version SketchUp 6.0
390
- def vertex
391
- end
392
-
393
- end
1
+ # Copyright:: Copyright 2020 Trimble Inc.
2
+ # License:: The MIT License (MIT)
3
+
4
+ # The {Sketchup::InputPoint} class is used to pick 3d points and/or entities
5
+ # that reside under the current cursor location, similar to native Line tool
6
+ # and other drawing tools. Unlike {Sketchup::PickHelper},
7
+ # {Sketchup::InputPoint} uses inference, i.e. "snaps" to vertices and other
8
+ # entities when the cursor is close to them.
9
+ #
10
+ # Only {Sketchup::Tool}s react to cursor location and most of these methods are
11
+ # only useful in the context of a tool. For example, if you want to determine
12
+ # the 3d point you just moved the cursor over, you would use
13
+ # {#pick} from within your {Sketchup::Tool#onMouseMove} method.
14
+ # {Sketchup::InputPoints} are best picked from mouse move, as you want them to
15
+ # draw them to the view.
16
+ #
17
+ # For an example, see https://github.com/SketchUp/sketchup-ruby-api-tutorials/tree/master/examples/02_custom_tool.
18
+ #
19
+ # To lock inference similar to native SketchUp tools, see
20
+ # {View#lock_inference}.
21
+ #
22
+ # @version SketchUp 6.0
23
+ class Sketchup::InputPoint
24
+
25
+ # Instance Methods
26
+
27
+ # The == method is used to determine if two input points are the same.
28
+ #
29
+ # @example
30
+ # view = Sketchup.active_model.active_view
31
+ # x = 100
32
+ # y = 100
33
+ # ip1 = Sketchup::InputPoint.new
34
+ # ip2 = view.inputpoint x,y
35
+ # # Copy the contents of inputpoint2 into inputpoint1
36
+ # ip1.copy! ip2
37
+ # # Returns true
38
+ # status = ip1 == ip2
39
+ #
40
+ # @param inputpoint2
41
+ # The second input point in the comparison.
42
+ #
43
+ # @return status - true if the InputPoint objects are the same
44
+ # object. False if the objects are not the same.
45
+ #
46
+ # @version SketchUp 6.0
47
+ def ==(inputpoint2)
48
+ end
49
+
50
+ # The clear method is used to clear the input point.
51
+ #
52
+ # This sets it to an empty state. After calling this, valid? will return
53
+ # false.
54
+ #
55
+ # @example
56
+ # view = Sketchup.active_model.active_view
57
+ # x = 100
58
+ # y = 100
59
+ # ip1 = view.inputpoint x,y
60
+ # # Returns true
61
+ # ip = ip1.clear
62
+ #
63
+ # @return inputpoint - the cleared (empty) input point if this
64
+ # successful
65
+ #
66
+ # @version SketchUp 6.0
67
+ def clear
68
+ end
69
+
70
+ # The copy! method is used to copy the data from a second input point into
71
+ # this input point.
72
+ #
73
+ # @example
74
+ # view = Sketchup.active_model.active_view
75
+ # x = 100
76
+ # y = 100
77
+ # ip1 = Sketchup::InputPoint.new
78
+ # ip2 = view.inputpoint x,y
79
+ # # Copy the contents of inputpoint2 into inputpoint1
80
+ # ip = ip1.copy! ip2
81
+ #
82
+ # @param inputpoint
83
+ # The second input point.
84
+ #
85
+ # @return inputpoint - the new input point that received the copy
86
+ # if successful
87
+ #
88
+ # @version SketchUp 6.0
89
+ def copy!(inputpoint)
90
+ end
91
+
92
+ # The degrees_of_freedom method retrieves the number of degrees of freedom
93
+ # there are for an input point.
94
+ #
95
+ # If you are just getting a point in space, then the degrees_of_freedom will
96
+ # be 3 - meaning that there is nothing about the point that would constrain
97
+ # its position.
98
+ #
99
+ # If you are on a face, then the degrees_of_freedom will be 2
100
+ # meaning that you can only move on the plane of the face.
101
+ #
102
+ # If you are on an Edge or an axis, then the degrees_of_freedom will be 1
103
+ # meaning that you can only move in the direction of the edge or axis.
104
+ #
105
+ # If you get an end point of an Edge, or an intersection point, then the
106
+ # degrees_of_freedom will be 0.
107
+ #
108
+ # @example
109
+ # view = Sketchup.active_model.active_view
110
+ # x = 100
111
+ # y = 100
112
+ # ip1 = view.inputpoint x,y
113
+ # dof = ip1.degrees_of_freedom
114
+ #
115
+ # @return degrees_of_freedom - see comments.
116
+ #
117
+ # @version SketchUp 6.0
118
+ def degrees_of_freedom
119
+ end
120
+
121
+ # The depth method retrieves the depth of an inference if it is coming from a
122
+ # component.
123
+ #
124
+ # If the InputPoint is not getting a position from inside a component, this
125
+ # method will return 0. Otherwise it returns the depth of the entity in a
126
+ # nested component that is providing the position.
127
+ #
128
+ # @example
129
+ # view = Sketchup.active_model.active_view
130
+ # x = 100
131
+ # y = 100
132
+ # ip1 = view.inputpoint x,y
133
+ # d = ip1.depth
134
+ #
135
+ # @return depth - a number representing the depth of the
136
+ # inputpoint (inside groups and components) if successful
137
+ #
138
+ # @version SketchUp 6.0
139
+ def depth
140
+ end
141
+
142
+ # The display? method is used to determine if the input point has anything to
143
+ # draw.
144
+ #
145
+ # If the method returns true, then the draw method will draw something.
146
+ #
147
+ # @example
148
+ # view = Sketchup.active_model.active_view
149
+ # x = 100
150
+ # y = 100
151
+ # ip1 = view.inputpoint x,y
152
+ # status = ip1.display
153
+ #
154
+ # @return [Boolean] status - true if the draw method will draw something,
155
+ # false if the draw method has nothing to draw
156
+ #
157
+ # @version SketchUp 6.0
158
+ def display?
159
+ end
160
+
161
+ # The draw method is used to draw the input point.
162
+ #
163
+ # This is useful for showing an InputPoint from within the draw method of a
164
+ # tool that you have implemented in Ruby. Additional examples are available in
165
+ # the Plugins/examples directory.
166
+ #
167
+ # @example
168
+ # view = Sketchup.active_model.active_view
169
+ # x = 100
170
+ # y = 100
171
+ # ip1 = view.inputpoint x,y
172
+ # ip = ip1.draw view
173
+ #
174
+ # @param view
175
+ # The current view.
176
+ #
177
+ # @return view
178
+ #
179
+ # @version SketchUp 6.0
180
+ def draw(view)
181
+ end
182
+
183
+ # The edge method is used to retrieve the edge if the input point is getting
184
+ # its position from a point on an Edge.
185
+ #
186
+ # @example
187
+ # view = Sketchup.active_model.active_view
188
+ # x = 100
189
+ # y = 100
190
+ # ip1 = view.inputpoint x,y
191
+ # e = ip1.edge
192
+ #
193
+ # @return edge - an Edge object if successful, or nil if
194
+ # unsuccessful
195
+ #
196
+ # @version SketchUp 6.0
197
+ def edge
198
+ end
199
+
200
+ # The face method retrieves the face at or behind the input point. This can be
201
+ # used to determine a plane, similar to what native Rotate tool does.
202
+ #
203
+ # @example
204
+ # view = Sketchup.active_model.active_view
205
+ # x = 100
206
+ # y = 100
207
+ # ip1 = view.inputpoint x,y
208
+ # f = ip1.face
209
+ #
210
+ # @note The InputPoint doesn't necessarily lie on the face, but can be e.g. on
211
+ # an edge in front of the face.
212
+ #
213
+ # @return [Sketchup::Face, nil]
214
+ #
215
+ # @version SketchUp 6.0
216
+ def face
217
+ end
218
+
219
+ # The new method is used to create a new InputPoint object.
220
+ #
221
+ # @example
222
+ # ip1 = Sketchup::InputPoint.new
223
+ #
224
+ # # Or you can construct it at an arbitrary location.
225
+ # starting_point = Geom::Point3d.new(100, 200, 300)
226
+ # ip2 = Sketchup::InputPoint.new(starting_point)
227
+ #
228
+ # @note Prior to SketchUp 2019 it was not possible to
229
+ # sub-class {Sketchup::InputPoint} due to a bug in how SketchUp initialized
230
+ # the class.
231
+ #
232
+ # @overload initialize()
233
+ #
234
+ # @return [Sketchup::InputPoint]
235
+ #
236
+ # @overload initialize(pt_or_vertex)
237
+ #
238
+ # @param pt_or_vertex [Geom::Point3d, Sketchup::Vertex] An optional Point3d
239
+ # or Vertex where the new InputPoint should be created.
240
+ # @return [Sketchup::InputPoint]
241
+ #
242
+ # @version SketchUp 6.0
243
+ def initialize(*args)
244
+ end
245
+
246
+ # The {#instance_path} method retrieves the instance path for the picked point.
247
+ #
248
+ # The returned instance_path is a copy of what the input point is holding on to
249
+ # at the moment you access it. Your copy will not update if you make new picks
250
+ # with the input point.
251
+ #
252
+ # If there has been no valid pick it will return `nil`.
253
+ #
254
+ # @example
255
+ # view = Sketchup.active_model.active_view
256
+ # x = 100
257
+ # y = 100
258
+ # ip = view.inputpoint(x, y)
259
+ # instance_path = ip.instance_path
260
+ #
261
+ # @return [Sketchup::InstancePath, nil]
262
+ #
263
+ # @version SketchUp 2017
264
+ def instance_path
265
+ end
266
+
267
+ # The pick method is used to get the input point at a specific screen
268
+ # position.
269
+ #
270
+ # The first form just uses the screen position to compute the InputPoint. It
271
+ # is used when you don't want the InputPoint to be dependent on another
272
+ # InputPoint.
273
+ #
274
+ # The second form uses the screen position and another InputPoint. It will
275
+ # find additional inferences such as along one of the axis directions from the
276
+ # first point.
277
+ #
278
+ # @example
279
+ # view = Sketchup.active_model.active_view
280
+ # x = 100
281
+ # y = 100
282
+ # inputpoint = view.inputpoint x, y
283
+ # inputpoint2 = Sketchup::InputPoint.new
284
+ # inputpoint.pick view, x, y
285
+ # inputpoint.pick view, x, y, inputpoint2
286
+ #
287
+ # @param view
288
+ # The current view.
289
+ #
290
+ # @param x
291
+ # A x value.
292
+ #
293
+ # @param y
294
+ # A y value.
295
+ #
296
+ # @param [optional] inputpoint
297
+ # A second input point used as a reference
298
+ # for the pick.
299
+ #
300
+ # @return status - true if a valid InputPoint was picked and it
301
+ # is different than it was before.
302
+ #
303
+ # @version SketchUp 6.0
304
+ def pick(view, x, y, inputpoint)
305
+ end
306
+
307
+ # The position method is used to get the 3D point from the input point.
308
+ #
309
+ # @example
310
+ # view = Sketchup.active_model.active_view
311
+ # x = 100
312
+ # y = 100
313
+ # ip1 = view.inputpoint x,y
314
+ # point = ip1.position
315
+ #
316
+ # @return point - a Point3d object position for the input point
317
+ # if successful
318
+ #
319
+ # @version SketchUp 6.0
320
+ def position
321
+ end
322
+
323
+ # The tooltip method is used to retrieve the string that is the tool tip to
324
+ # display for the input point.
325
+ #
326
+ # @example
327
+ # view = Sketchup.active_model.active_view
328
+ # x = 100
329
+ # y = 100
330
+ # ip1 = view.inputpoint x,y
331
+ # # Click on a face and you get "On Face"
332
+ # tip = ip1.tooltip
333
+ #
334
+ # @return tip - a string tooltip or an empty string (if the input
335
+ # point doesn't provide a tooltip).
336
+ #
337
+ # @version SketchUp 6.0
338
+ def tooltip
339
+ end
340
+
341
+ # The transformation method retrieves the Transformation object for the input
342
+ # point.
343
+ #
344
+ # If the InputPoint object is getting its position from something inside of a
345
+ # component instance, this method returns the Transformation of the component
346
+ # instance. Otherwise it returns the identity Transformation.
347
+ #
348
+ # Note that the position method on a input point always returns a point that is
349
+ # transformed into model space. If you are using the edge, face or vertex
350
+ # method on the InputPoint though, you will probably need to use the
351
+ # transformation method to transform the data that you get back from the
352
+ # selected entity.
353
+ #
354
+ # @example
355
+ # view = Sketchup.active_model.active_view
356
+ # x = 100
357
+ # y = 100
358
+ # ip1 = view.inputpoint x,y
359
+ # # In this case, returning the identity transformation
360
+ # tform = ip1.transformation
361
+ #
362
+ # @return transformation - the Transformation for the input point
363
+ # if successful
364
+ #
365
+ # @version SketchUp 6.0
366
+ def transformation
367
+ end
368
+
369
+ # The valid? method is used to determine if an input point has valid data.
370
+ #
371
+ # You must have called the pick method to set the data before it is valid.
372
+ #
373
+ # @example
374
+ # view = Sketchup.active_model.active_view
375
+ # x = 100
376
+ # y = 100
377
+ # ip1 = view.inputpoint x,y
378
+ # status = ip1.valid?
379
+ #
380
+ # @return [Boolean] status - true if the input point has valid data, false
381
+ # if it does not have valid data.
382
+ #
383
+ # @version SketchUp 6.0
384
+ def valid?
385
+ end
386
+
387
+ # The vertex method returns a Vertex associated with the InputPoint. If the
388
+ # InputPoint is on the end of a line, then it will return the Vertex. If the
389
+ # InputPoint does not select any vertices this method returns nil.
390
+ #
391
+ # @example
392
+ # view = Sketchup.active_model.active_view
393
+ # x = 100
394
+ # y = 100
395
+ # ip1 = view.inputpoint x,y
396
+ # # Click on a face and you get "On Face"
397
+ # tip = ip1.vertex
398
+ #
399
+ # @return vertex - The associated vertex
400
+ #
401
+ # @version SketchUp 6.0
402
+ def vertex
403
+ end
404
+
405
+ end