sketchup-api-stubs 0.7.7 → 0.7.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (150) hide show
  1. checksums.yaml +4 -4
  2. data/lib/sketchup-api-stubs/sketchup.rb +2 -1
  3. data/lib/sketchup-api-stubs/stubs/{array.rb → Array.rb} +1 -1
  4. data/lib/sketchup-api-stubs/stubs/Geom/BoundingBox.rb +1 -1
  5. data/lib/sketchup-api-stubs/stubs/Geom/Bounds2d.rb +1 -1
  6. data/lib/sketchup-api-stubs/stubs/Geom/LatLong.rb +1 -1
  7. data/lib/sketchup-api-stubs/stubs/Geom/OrientedBounds2d.rb +1 -1
  8. data/lib/sketchup-api-stubs/stubs/Geom/Point2d.rb +1 -1
  9. data/lib/sketchup-api-stubs/stubs/Geom/Point3d.rb +1 -1
  10. data/lib/sketchup-api-stubs/stubs/Geom/PolygonMesh.rb +18 -4
  11. data/lib/sketchup-api-stubs/stubs/Geom/Transformation.rb +1 -1
  12. data/lib/sketchup-api-stubs/stubs/Geom/Transformation2d.rb +1 -1
  13. data/lib/sketchup-api-stubs/stubs/Geom/UTM.rb +1 -1
  14. data/lib/sketchup-api-stubs/stubs/Geom/Vector2d.rb +1 -1
  15. data/lib/sketchup-api-stubs/stubs/Geom/Vector3d.rb +16 -14
  16. data/lib/sketchup-api-stubs/stubs/{geom.rb → Geom.rb} +1 -1
  17. data/lib/sketchup-api-stubs/stubs/{languagehandler.rb → LanguageHandler.rb} +5 -4
  18. data/lib/sketchup-api-stubs/stubs/Layout/AngularDimension.rb +76 -54
  19. data/lib/sketchup-api-stubs/stubs/Layout/AutoTextDefinition.rb +311 -24
  20. data/lib/sketchup-api-stubs/stubs/Layout/AutoTextDefinitions.rb +8 -4
  21. data/lib/sketchup-api-stubs/stubs/Layout/ConnectionPoint.rb +1 -1
  22. data/lib/sketchup-api-stubs/stubs/Layout/Document.rb +2 -1
  23. data/lib/sketchup-api-stubs/stubs/Layout/Ellipse.rb +1 -1
  24. data/lib/sketchup-api-stubs/stubs/Layout/Entities.rb +1 -1
  25. data/lib/sketchup-api-stubs/stubs/Layout/Entity.rb +1 -1
  26. data/lib/sketchup-api-stubs/stubs/Layout/FormattedText.rb +16 -11
  27. data/lib/sketchup-api-stubs/stubs/Layout/Grid.rb +1 -1
  28. data/lib/sketchup-api-stubs/stubs/Layout/Group.rb +1 -1
  29. data/lib/sketchup-api-stubs/stubs/Layout/Image.rb +1 -1
  30. data/lib/sketchup-api-stubs/stubs/Layout/Label.rb +2 -2
  31. data/lib/sketchup-api-stubs/stubs/Layout/Layer.rb +1 -1
  32. data/lib/sketchup-api-stubs/stubs/Layout/LayerInstance.rb +1 -1
  33. data/lib/sketchup-api-stubs/stubs/Layout/Layers.rb +1 -1
  34. data/lib/sketchup-api-stubs/stubs/Layout/LinearDimension.rb +1 -1
  35. data/lib/sketchup-api-stubs/stubs/Layout/LockedEntityError.rb +1 -1
  36. data/lib/sketchup-api-stubs/stubs/Layout/LockedLayerError.rb +1 -1
  37. data/lib/sketchup-api-stubs/stubs/Layout/Page.rb +1 -1
  38. data/lib/sketchup-api-stubs/stubs/Layout/PageInfo.rb +1 -1
  39. data/lib/sketchup-api-stubs/stubs/Layout/Pages.rb +2 -2
  40. data/lib/sketchup-api-stubs/stubs/Layout/Path.rb +1 -1
  41. data/lib/sketchup-api-stubs/stubs/Layout/Rectangle.rb +1 -1
  42. data/lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb +9 -11
  43. data/lib/sketchup-api-stubs/stubs/Layout/Style.rb +1 -1
  44. data/lib/sketchup-api-stubs/stubs/Layout/Table.rb +1 -1
  45. data/lib/sketchup-api-stubs/stubs/Layout/TableCell.rb +1 -1
  46. data/lib/sketchup-api-stubs/stubs/Layout/TableColumn.rb +1 -1
  47. data/lib/sketchup-api-stubs/stubs/Layout/TableRow.rb +1 -1
  48. data/lib/sketchup-api-stubs/stubs/Layout.rb +1 -1
  49. data/lib/sketchup-api-stubs/stubs/{length.rb → Length.rb} +1 -1
  50. data/lib/sketchup-api-stubs/stubs/{numeric.rb → Numeric.rb} +1 -1
  51. data/lib/sketchup-api-stubs/stubs/Sketchup/Animation.rb +1 -1
  52. data/lib/sketchup-api-stubs/stubs/Sketchup/AppObserver.rb +13 -1
  53. data/lib/sketchup-api-stubs/stubs/Sketchup/ArcCurve.rb +1 -1
  54. data/lib/sketchup-api-stubs/stubs/Sketchup/AttributeDictionaries.rb +1 -1
  55. data/lib/sketchup-api-stubs/stubs/Sketchup/AttributeDictionary.rb +1 -1
  56. data/lib/sketchup-api-stubs/stubs/Sketchup/Axes.rb +1 -1
  57. data/lib/sketchup-api-stubs/stubs/Sketchup/Behavior.rb +1 -1
  58. data/lib/sketchup-api-stubs/stubs/Sketchup/Camera.rb +1 -1
  59. data/lib/sketchup-api-stubs/stubs/Sketchup/ClassificationSchema.rb +1 -1
  60. data/lib/sketchup-api-stubs/stubs/Sketchup/Classifications.rb +1 -1
  61. data/lib/sketchup-api-stubs/stubs/Sketchup/Color.rb +1 -1
  62. data/lib/sketchup-api-stubs/stubs/Sketchup/ComponentDefinition.rb +50 -8
  63. data/lib/sketchup-api-stubs/stubs/Sketchup/ComponentInstance.rb +7 -8
  64. data/lib/sketchup-api-stubs/stubs/Sketchup/Console.rb +1 -1
  65. data/lib/sketchup-api-stubs/stubs/Sketchup/ConstructionLine.rb +1 -1
  66. data/lib/sketchup-api-stubs/stubs/Sketchup/ConstructionPoint.rb +1 -1
  67. data/lib/sketchup-api-stubs/stubs/Sketchup/Curve.rb +1 -1
  68. data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionList.rb +7 -6
  69. data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionObserver.rb +1 -1
  70. data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionsObserver.rb +1 -1
  71. data/lib/sketchup-api-stubs/stubs/Sketchup/Dimension.rb +1 -1
  72. data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionLinear.rb +1 -1
  73. data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionObserver.rb +1 -1
  74. data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionRadial.rb +1 -1
  75. data/lib/sketchup-api-stubs/stubs/Sketchup/Drawingelement.rb +1 -1
  76. data/lib/sketchup-api-stubs/stubs/Sketchup/Edge.rb +1 -1
  77. data/lib/sketchup-api-stubs/stubs/Sketchup/EdgeUse.rb +1 -1
  78. data/lib/sketchup-api-stubs/stubs/Sketchup/Entities.rb +120 -41
  79. data/lib/sketchup-api-stubs/stubs/Sketchup/EntitiesBuilder.rb +272 -0
  80. data/lib/sketchup-api-stubs/stubs/Sketchup/EntitiesObserver.rb +1 -1
  81. data/lib/sketchup-api-stubs/stubs/Sketchup/Entity.rb +1 -1
  82. data/lib/sketchup-api-stubs/stubs/Sketchup/EntityObserver.rb +1 -1
  83. data/lib/sketchup-api-stubs/stubs/Sketchup/ExtensionsManager.rb +2 -2
  84. data/lib/sketchup-api-stubs/stubs/Sketchup/Face.rb +27 -7
  85. data/lib/sketchup-api-stubs/stubs/Sketchup/FrameChangeObserver.rb +1 -1
  86. data/lib/sketchup-api-stubs/stubs/Sketchup/Group.rb +1 -1
  87. data/lib/sketchup-api-stubs/stubs/Sketchup/Http/Request.rb +1 -1
  88. data/lib/sketchup-api-stubs/stubs/Sketchup/Http/Response.rb +1 -1
  89. data/lib/sketchup-api-stubs/stubs/Sketchup/Http.rb +1 -1
  90. data/lib/sketchup-api-stubs/stubs/Sketchup/Image.rb +1 -1
  91. data/lib/sketchup-api-stubs/stubs/Sketchup/ImageRep.rb +1 -1
  92. data/lib/sketchup-api-stubs/stubs/Sketchup/Importer.rb +1 -1
  93. data/lib/sketchup-api-stubs/stubs/Sketchup/InputPoint.rb +4 -2
  94. data/lib/sketchup-api-stubs/stubs/Sketchup/InstanceObserver.rb +1 -1
  95. data/lib/sketchup-api-stubs/stubs/Sketchup/InstancePath.rb +1 -1
  96. data/lib/sketchup-api-stubs/stubs/Sketchup/Layer.rb +7 -8
  97. data/lib/sketchup-api-stubs/stubs/Sketchup/LayerFolder.rb +8 -8
  98. data/lib/sketchup-api-stubs/stubs/Sketchup/Layers.rb +2 -2
  99. data/lib/sketchup-api-stubs/stubs/Sketchup/LayersObserver.rb +1 -1
  100. data/lib/sketchup-api-stubs/stubs/Sketchup/Licensing/ExtensionLicense.rb +1 -1
  101. data/lib/sketchup-api-stubs/stubs/Sketchup/Licensing.rb +3 -3
  102. data/lib/sketchup-api-stubs/stubs/Sketchup/LineStyle.rb +1 -1
  103. data/lib/sketchup-api-stubs/stubs/Sketchup/LineStyles.rb +1 -1
  104. data/lib/sketchup-api-stubs/stubs/Sketchup/Loop.rb +1 -1
  105. data/lib/sketchup-api-stubs/stubs/Sketchup/Material.rb +1 -1
  106. data/lib/sketchup-api-stubs/stubs/Sketchup/Materials.rb +2 -2
  107. data/lib/sketchup-api-stubs/stubs/Sketchup/MaterialsObserver.rb +1 -1
  108. data/lib/sketchup-api-stubs/stubs/Sketchup/Menu.rb +1 -1
  109. data/lib/sketchup-api-stubs/stubs/Sketchup/Model.rb +68 -71
  110. data/lib/sketchup-api-stubs/stubs/Sketchup/ModelObserver.rb +1 -1
  111. data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsManager.rb +2 -2
  112. data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsProvider.rb +2 -2
  113. data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsProviderObserver.rb +1 -1
  114. data/lib/sketchup-api-stubs/stubs/Sketchup/Page.rb +7 -7
  115. data/lib/sketchup-api-stubs/stubs/Sketchup/Pages.rb +2 -2
  116. data/lib/sketchup-api-stubs/stubs/Sketchup/PagesObserver.rb +1 -1
  117. data/lib/sketchup-api-stubs/stubs/Sketchup/PickHelper.rb +4 -5
  118. data/lib/sketchup-api-stubs/stubs/Sketchup/RegionalSettings.rb +1 -1
  119. data/lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptions.rb +1 -1
  120. data/lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptionsObserver.rb +1 -1
  121. data/lib/sketchup-api-stubs/stubs/Sketchup/SectionPlane.rb +1 -1
  122. data/lib/sketchup-api-stubs/stubs/Sketchup/Selection.rb +2 -2
  123. data/lib/sketchup-api-stubs/stubs/Sketchup/SelectionObserver.rb +1 -1
  124. data/lib/sketchup-api-stubs/stubs/Sketchup/Set.rb +1 -1
  125. data/lib/sketchup-api-stubs/stubs/Sketchup/ShadowInfo.rb +7 -4
  126. data/lib/sketchup-api-stubs/stubs/Sketchup/ShadowInfoObserver.rb +1 -1
  127. data/lib/sketchup-api-stubs/stubs/Sketchup/Skp.rb +1 -1
  128. data/lib/sketchup-api-stubs/stubs/Sketchup/Style.rb +1 -1
  129. data/lib/sketchup-api-stubs/stubs/Sketchup/Styles.rb +2 -2
  130. data/lib/sketchup-api-stubs/stubs/Sketchup/Text.rb +1 -1
  131. data/lib/sketchup-api-stubs/stubs/Sketchup/Texture.rb +1 -1
  132. data/lib/sketchup-api-stubs/stubs/Sketchup/TextureWriter.rb +1 -1
  133. data/lib/sketchup-api-stubs/stubs/Sketchup/Tool.rb +5 -3
  134. data/lib/sketchup-api-stubs/stubs/Sketchup/Tools.rb +1 -1
  135. data/lib/sketchup-api-stubs/stubs/Sketchup/ToolsObserver.rb +1 -1
  136. data/lib/sketchup-api-stubs/stubs/Sketchup/UVHelper.rb +9 -5
  137. data/lib/sketchup-api-stubs/stubs/Sketchup/Vertex.rb +1 -1
  138. data/lib/sketchup-api-stubs/stubs/Sketchup/View.rb +14 -4
  139. data/lib/sketchup-api-stubs/stubs/Sketchup/ViewObserver.rb +1 -1
  140. data/lib/sketchup-api-stubs/stubs/{sketchup.rb → Sketchup.rb} +10 -3
  141. data/lib/sketchup-api-stubs/stubs/{sketchupextension.rb → SketchupExtension.rb} +1 -1
  142. data/lib/sketchup-api-stubs/stubs/{string.rb → String.rb} +1 -1
  143. data/lib/sketchup-api-stubs/stubs/UI/Command.rb +79 -7
  144. data/lib/sketchup-api-stubs/stubs/UI/HtmlDialog.rb +26 -8
  145. data/lib/sketchup-api-stubs/stubs/UI/Notification.rb +1 -1
  146. data/lib/sketchup-api-stubs/stubs/UI/Toolbar.rb +1 -1
  147. data/lib/sketchup-api-stubs/stubs/UI/WebDialog.rb +18 -16
  148. data/lib/sketchup-api-stubs/stubs/{ui.rb → UI.rb} +25 -14
  149. data/lib/sketchup-api-stubs/stubs/_top_level.rb +1 -1
  150. metadata +12 -11
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2021 Trimble Inc.
1
+ # Copyright:: Copyright 2022 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # Http::Request objects allows you to send HTTP request to HTTP servers.
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2021 Trimble Inc.
1
+ # Copyright:: Copyright 2022 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # Http::Response objects allows you to get the response information from the
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2021 Trimble Inc.
1
+ # Copyright:: Copyright 2022 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # The {Sketchup::Http} module provides interfaces to create asynchronous HTTP
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2021 Trimble Inc.
1
+ # Copyright:: Copyright 2022 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # An Image object represents a raster image placed in the Model.
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2021 Trimble Inc.
1
+ # Copyright:: Copyright 2022 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # References an image representation object.
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2021 Trimble Inc.
1
+ # Copyright:: Copyright 2022 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # The Importer interface lets you build your own importers for SketchUp. To
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2021 Trimble Inc.
1
+ # Copyright:: Copyright 2022 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # The {Sketchup::InputPoint} class is used to pick 3d points and/or entities
@@ -14,7 +14,9 @@
14
14
  # {Sketchup::InputPoints} are best picked from mouse move, as you want them to
15
15
  # draw them to the view.
16
16
  #
17
- # For an example, see https://github.com/SketchUp/sketchup-ruby-api-tutorials/tree/master/examples/02_custom_tool.
17
+ # For an example, see
18
+ # {Tool
19
+ # Example}[https://github.com/SketchUp/sketchup-ruby-api-tutorials/tree/main/examples/02_custom_tool].
18
20
  #
19
21
  # To lock inference similar to native SketchUp tools, see
20
22
  # {View#lock_inference}.
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2021 Trimble Inc.
1
+ # Copyright:: Copyright 2022 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # This observer interface is implemented to react to component instance
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2021 Trimble Inc.
1
+ # Copyright:: Copyright 2022 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # The {Sketchup::InstancePath} class represent the instance path to a given
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2021 Trimble Inc.
1
+ # Copyright:: Copyright 2022 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # The Layer class contains methods modifying and extracting information for a
@@ -34,8 +34,8 @@ class Sketchup::Layer < Sketchup::Entity
34
34
 
35
35
  # Instance Methods
36
36
 
37
- # The {#<=>} method is used to compare two layers based on their names. You
38
- # could use this for sorting if you're building a list of layer names.
37
+ # The {#<=>} method is used to compare two layers based on their names.
38
+ # This enables the Ruby +Array#sort+ method to sort SketchUp layers.
39
39
  #
40
40
  # @example
41
41
  # model = Sketchup.active_model
@@ -120,11 +120,10 @@ class Sketchup::Layer < Sketchup::Entity
120
120
  # @example
121
121
  # model = Sketchup.active_model
122
122
  # layers = model.layers
123
- # folder1 = layers.add('Folder1')
124
- # parent_folder = folder1.folder # Returns: nil
125
- #
126
- # folder2 = folder1.add('Folder2')
127
- # parent_folder = folder2.folder # Returns: folder1
123
+ # folder1 = layers.add_folder('Folder1')
124
+ # layer1 = layers.add('Layer1')
125
+ # layer1.folder = folder1
126
+ # parent_folder = layer1.folder # Returns: folder1
128
127
  #
129
128
  # @return [Sketchup::LayerFolder, nil] +nil+ if the folder is a direct child to
130
129
  # the layer manager.
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2021 Trimble Inc.
1
+ # Copyright:: Copyright 2022 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # Allows layers to be organized in folders. Folders may have duplicate names.
@@ -19,15 +19,15 @@ class Sketchup::LayerFolder < Sketchup::Entity
19
19
  # Instance Methods
20
20
 
21
21
  # The {#<=>} method is used to compare two layer folders based on their names.
22
- # You could use this for sorting if you're building a list of folder names.
22
+ # This enables the Ruby +Array#sort+ method to sort SketchUp layer folders.
23
23
  #
24
24
  # @api TagFolder
25
25
  #
26
26
  # @example
27
27
  # model = Sketchup.active_model
28
28
  # layers = model.layers
29
- # folder1 = layers.add('Folder1')
30
- # folder2 = layers.add('Folder2')
29
+ # folder1 = layers.add_folder('Folder1')
30
+ # folder2 = layers.add_folder('Folder2')
31
31
  # comparison = folder1 <=> folder2 # Returns: -1
32
32
  # comparison = folder1 <=> folder1 # Returns: 0
33
33
  # comparison = folder2 <=> folder1 # Returns: 1
@@ -206,10 +206,10 @@ class Sketchup::LayerFolder < Sketchup::Entity
206
206
  # @example
207
207
  # model = Sketchup.active_model
208
208
  # layers = model.layers
209
- # folder1 = layers.add('Folder1')
209
+ # folder1 = layers.add_folder('Folder1')
210
210
  # parent_folder = folder1.folder # Returns: nil
211
211
  #
212
- # folder2 = folder1.add('Folder2')
212
+ # folder2 = folder1.add_folder('Folder2')
213
213
  # parent_folder = folder2.folder # Returns: folder1
214
214
  #
215
215
  # @return [Sketchup::LayerFolder, nil] +nil+ if the folder is a direct child to
@@ -229,8 +229,8 @@ class Sketchup::LayerFolder < Sketchup::Entity
229
229
  # @example
230
230
  # model = Sketchup.active_model
231
231
  # layers = model.layers
232
- # folder1 = layers.add('Folder1')
233
- # folder2 = layers.add('Folder2')
232
+ # folder1 = layers.add_folder('Folder1')
233
+ # folder2 = layers.add_folder('Folder2')
234
234
  #
235
235
  # folder2.folder = folder1
236
236
  #
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2021 Trimble Inc.
1
+ # Copyright:: Copyright 2022 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # The Layers collection allows you to see and manage all of the layers in a
@@ -129,7 +129,7 @@ class Sketchup::Layers < Sketchup::Entity
129
129
  # number = layers.count
130
130
  #
131
131
  # @note Since SketchUp 2014 the count method is inherited from Ruby's
132
- # +Enumable+ mix-in module. Prior to that the {#count} method is an alias
132
+ # +Enumerable+ mix-in module. Prior to that the {#count} method is an alias
133
133
  # for {#length}.
134
134
  #
135
135
  # @return integer - the number of layers in the collection
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2021 Trimble Inc.
1
+ # Copyright:: Copyright 2022 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # This observer interface is implemented to react to layers events.
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2021 Trimble Inc.
1
+ # Copyright:: Copyright 2022 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # The Sketchup::Licensing::ExtensionLicense class is used to store extension
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2021 Trimble Inc.
1
+ # Copyright:: Copyright 2022 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # The +Sketchup::Licensing+ module contains methods for
@@ -9,8 +9,8 @@
9
9
  # native code should prefer using the native API, which should be more secure
10
10
  # than their Ruby API counterparts.
11
11
  #
12
- # For more details, see:
13
- # {Licensing Example}[https://github.com/SketchUp/sketchup-ruby-api-tutorials/tree/master/examples/99_license]
12
+ # For more details, see
13
+ # {Licensing Example}[https://github.com/SketchUp/sketchup-ruby-api-tutorials/tree/main/examples/99_license]
14
14
  #
15
15
  # @version SketchUp 2015
16
16
  module Sketchup::Licensing
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2021 Trimble Inc.
1
+ # Copyright:: Copyright 2022 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # This provides a way for SketchUp to customize a line style and be set on a
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2021 Trimble Inc.
1
+ # Copyright:: Copyright 2022 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # Provides access to the different line style objects in the model.
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2021 Trimble Inc.
1
+ # Copyright:: Copyright 2022 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # Loop is a low level topology class that will not need to be used often. A
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2021 Trimble Inc.
1
+ # Copyright:: Copyright 2022 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # The Material class represents a texture or color that can be applied to
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2021 Trimble Inc.
1
+ # Copyright:: Copyright 2022 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # A collection of Materials objects. Each model contains a Materials collection
@@ -110,7 +110,7 @@ class Sketchup::Materials < Sketchup::Entity
110
110
  # count = materials.count
111
111
  #
112
112
  # @note Since SketchUp 2014 the count method is inherited from Ruby's
113
- # +Enumable+ mix-in module. Prior to that the {#count} method is an alias
113
+ # +Enumerable+ mix-in module. Prior to that the {#count} method is an alias
114
114
  # for {#length}.
115
115
  #
116
116
  # @return [Integer]
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2021 Trimble Inc.
1
+ # Copyright:: Copyright 2022 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # This observer interface is implemented to react to materials events.
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2021 Trimble Inc.
1
+ # Copyright:: Copyright 2022 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # An interface to a menu.
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2021 Trimble Inc.
1
+ # Copyright:: Copyright 2022 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # This is the interface to a SketchUp model. The model is the 3D drawing that
@@ -186,15 +186,15 @@ class Sketchup::Model
186
186
  # If the API user tries to do this:
187
187
  #
188
188
  # model.start_operation('...', true)
189
- # model.entities.add_face(...)
189
+ # model.active_entities.add_face(...)
190
190
  # model.active_path = instance_path
191
- # model.entities.add_face(...)
191
+ # model.active_entities.add_face(...)
192
192
  # model.commit_operation
193
193
  #
194
194
  # Then SketchUp will automatically break it up to something like to this:
195
195
  #
196
196
  # model.start_operation('...', true)
197
- # model.entities.add_face(...)
197
+ # model.active_entities.add_face(...)
198
198
  # model.commit_operation
199
199
  #
200
200
  # model.start_operation('...', true, false, true)
@@ -202,7 +202,7 @@ class Sketchup::Model
202
202
  # model.commit_operation
203
203
  #
204
204
  # model.start_operation('...', true, false, true)
205
- # model.entities.add_face(...)
205
+ # model.active_entities.add_face(...)
206
206
  # model.commit_operation
207
207
  #
208
208
  # For the end user this will be experienced as a single operation.
@@ -1034,7 +1034,11 @@ class Sketchup::Model
1034
1034
  def modified?
1035
1035
  end
1036
1036
 
1037
- # The name method retrieves the string name of the model.
1037
+ # The {#name} method retrieves the name of the model.
1038
+ #
1039
+ # This property can be seen in Model Info and maps to the component
1040
+ # name if the model is inserted into another model. This property should not
1041
+ # be confused with the model {#path}.
1038
1042
  #
1039
1043
  # @example
1040
1044
  # model = Sketchup.active_model
@@ -1046,15 +1050,12 @@ class Sketchup::Model
1046
1050
  def name
1047
1051
  end
1048
1052
 
1049
- # The name= method sets the string name of the model.
1053
+ # The {#name=} method sets the string name of the model.
1050
1054
  #
1051
1055
  # @example
1052
1056
  # Sketchup.active_model.name = "My New Model Name"
1053
1057
  #
1054
1058
  # @param [String] name
1055
- # new name of the model
1056
- #
1057
- # @return [String] the new name
1058
1059
  #
1059
1060
  # @version SketchUp 6.0
1060
1061
  def name=(name)
@@ -1111,15 +1112,13 @@ class Sketchup::Model
1111
1112
  # The path method retrieves the path of the file from which the model was
1112
1113
  # opened.
1113
1114
  #
1114
- # An empty string is returned for a new model (one which has not been saved
1115
- # and opened.)
1115
+ # An empty string is returned for a model that has not been saved.
1116
1116
  #
1117
1117
  # @example
1118
1118
  # model = Sketchup.active_model
1119
1119
  # path = model.path
1120
1120
  #
1121
- # @return [String] an string containing the path for the currently
1122
- # opened model.
1121
+ # @return [String]
1123
1122
  #
1124
1123
  # @version SketchUp 6.0
1125
1124
  def path
@@ -1196,6 +1195,14 @@ class Sketchup::Model
1196
1195
  # normalized (e.g. direction = [0, 0, 0]), direction is taken as a point the
1197
1196
  # ray intersects.
1198
1197
  #
1198
+ # first value is a Point3d where the item that the ray passed through exists. The second element is
1199
+ # the instance path array of the entity that the ray hit. For example, if the ray hits a face that
1200
+ # is contained by a component instance the instance path would be [Component1]. If the ray hit a
1201
+ # face that is contained by a component instance, which
1202
+ # is contained by another component instance and so on,
1203
+ # the instance path would be [Component1, Component2,
1204
+ # Component3...].
1205
+ #
1199
1206
  # @example
1200
1207
  # model = Sketchup.active_model
1201
1208
  # ray = [Geom::Point3d.new(1, 2, 3), Geom::Vector3d.new(4, 5, 6)]
@@ -1214,16 +1221,7 @@ class Sketchup::Model
1214
1221
  # defaults to true (WYSIWYG) - i.e. hidden geometry is
1215
1222
  # not intersected against.
1216
1223
  #
1217
- # @return [Array(Geom::Point3d, Array<Sketchup::Drawingelement>), nil] an array of two values. The first value is a
1218
- # Point3d where the item that the ray passed through
1219
- # exists. The second element is the instance path array
1220
- # of the entity that the ray hit. For example, if the ray
1221
- # hits a face that is contained by a component instance the
1222
- # instance path would be [Component1]. If the ray hit a
1223
- # face that is contained by a component instance, which
1224
- # is contained by another component instance and so on,
1225
- # the instance path would be [Component1, Component2,
1226
- # Component3...].
1224
+ # @return [Array(Geom::Point3d, Array<Sketchup::Drawingelement>), nil] an array of two values. The
1227
1225
  #
1228
1226
  # @version SketchUp 6.0
1229
1227
  def raytest(ray, wysiwyg_flag = true)
@@ -1267,10 +1265,13 @@ class Sketchup::Model
1267
1265
  # # Save the model using the current SketchUp format
1268
1266
  # path = File.join(ENV['HOME'], 'Desktop', 'mysketchup.skp')
1269
1267
  # status = model.save(path)
1268
+ #
1270
1269
  # # Save the model to the current file using the current SketchUp format
1271
1270
  # status = model.save
1271
+ #
1272
1272
  # # Save the model to the current file in SketchUp 8 format
1273
1273
  # status = model.save("", Sketchup::Model::VERSION_8)
1274
+ #
1274
1275
  # # Save the model in SketchUp 8 format
1275
1276
  # path = File.join(ENV['Home'], 'Desktop', 'mysketchup_v8.skp')
1276
1277
  # status = model.save(path, Sketchup::Model::VERSION_8)
@@ -1280,50 +1281,41 @@ class Sketchup::Model
1280
1281
  #
1281
1282
  # @overload save
1282
1283
  #
1283
- # Starting with SketchUp 2014, this parameter is optional.
1284
- # If no arguments are provided or the filename is an empty string, model
1285
- # will be saved to the file to which it is associated. It must have
1286
- # already been saved to a file.
1284
+ # Save model to the path it is already associated with.
1285
+ # @raise ArgumentError if the model is not previosly saved.
1286
+ # @version SketchUp 2014
1287
1287
  #
1288
1288
  # @overload save(path)
1289
1289
  #
1290
+ # Save the model to a given path.
1291
+ # @version SketchUp 6.0
1290
1292
  # @param [String] path
1291
- # The name of the file to save.
1292
- # Starting with SketchUp 2014, this parameter is optional.
1293
- # If not provided or an empty string, model will be saved
1294
- # to the file to which it is associated. It must have
1295
- # already been saved to a file.
1293
+ # If empty, the model saves to the path it is already associated with.
1296
1294
  #
1297
1295
  # @overload save(path, version)
1298
1296
  #
1297
+ # Save the model as a specific SketchUp file version to a given path.
1298
+ # @version SketchUp 2014
1299
1299
  # @param [String] path
1300
- # The path of the file to save to.
1301
- # Starting with SketchUp 2014, this parameter is optional.
1302
- # If not provided or an empty string, model will be saved
1303
- # to the file to which it is associated. It must have
1304
- # already been saved to a file.
1305
- #
1306
1300
  # @param [Integer] version
1307
- # (SketchUp 2014+)
1308
- # Optional SketchUp file format to save.
1309
- # If not provided, latest file format will be used.
1310
1301
  # Possible values are:
1311
- # Sketchup::Model::VERSION_3, Sketchup::Model::VERSION_4,
1312
- # Sketchup::Model::VERSION_5, Sketchup::Model::VERSION_6,
1313
- # Sketchup::Model::VERSION_7, Sketchup::Model::VERSION_8,
1314
- # Sketchup::Model::VERSION_2013,
1315
- # Sketchup::Model::VERSION_2014,
1316
- # Sketchup::Model::VERSION_2015,
1317
- # Sketchup::Model::VERSION_2016,
1318
- # Sketchup::Model::VERSION_2017,
1319
- # Sketchup::Model::VERSION_2018,
1320
- # Sketchup::Model::VERSION_2019,
1321
- # Sketchup::Model::VERSION_2020,
1322
- # Sketchup::Model::VERSION_2021
1302
+ # - Sketchup::Model::VERSION_3,
1303
+ # - Sketchup::Model::VERSION_4,
1304
+ # - Sketchup::Model::VERSION_5,
1305
+ # - Sketchup::Model::VERSION_6,
1306
+ # - Sketchup::Model::VERSION_7,
1307
+ # - Sketchup::Model::VERSION_8,
1308
+ # - Sketchup::Model::VERSION_2013,
1309
+ # - Sketchup::Model::VERSION_2014,
1310
+ # - Sketchup::Model::VERSION_2015,
1311
+ # - Sketchup::Model::VERSION_2016,
1312
+ # - Sketchup::Model::VERSION_2017,
1313
+ # - Sketchup::Model::VERSION_2018,
1314
+ # - Sketchup::Model::VERSION_2019,
1315
+ # - Sketchup::Model::VERSION_2020,
1316
+ # - Sketchup::Model::VERSION_2021
1323
1317
  #
1324
- # @return [Boolean] true if successful, false if unsuccessful
1325
- #
1326
- # @version SketchUp 6.0
1318
+ # @return [Boolean] +true+ if successful, +false+ if unsuccessful
1327
1319
  def save(*args)
1328
1320
  end
1329
1321
 
@@ -1334,6 +1326,7 @@ class Sketchup::Model
1334
1326
  # # Save copy of the model using the current SketchUp format
1335
1327
  # path = File.join(ENV['Home'], 'Desktop', 'myModelCopy.skp')
1336
1328
  # status = model.save_copy(path)
1329
+ #
1337
1330
  # # Save copy of the model in SketchUp 8 format
1338
1331
  # path = File.join(ENV['Home'], 'Desktop', 'mysketchupcopy_v8.skp')
1339
1332
  # status = model.save_copy(path, Sketchup::Model::VERSION_8)
@@ -1342,22 +1335,24 @@ class Sketchup::Model
1342
1335
  # The path of the file to save the model copy to.
1343
1336
  #
1344
1337
  # @param [Integer] version
1345
- # (SketchUp 2014+)
1346
- # Optional SketchUp file format to save.
1338
+ # Optional SketchUp file format to use.
1347
1339
  # If not provided, latest file format will be used.
1348
1340
  # Possible values are:
1349
- # Sketchup::Model::VERSION_3, Sketchup::Model::VERSION_4,
1350
- # Sketchup::Model::VERSION_5, Sketchup::Model::VERSION_6,
1351
- # Sketchup::Model::VERSION_7, Sketchup::Model::VERSION_8,
1352
- # Sketchup::Model::VERSION_2013,
1353
- # Sketchup::Model::VERSION_2014,
1354
- # Sketchup::Model::VERSION_2015,
1355
- # Sketchup::Model::VERSION_2016,
1356
- # Sketchup::Model::VERSION_2017,
1357
- # Sketchup::Model::VERSION_2018,
1358
- # Sketchup::Model::VERSION_2019,
1359
- # Sketchup::Model::VERSION_2020,
1360
- # Sketchup::Model::VERSION_2021
1341
+ # - Sketchup::Model::VERSION_3,
1342
+ # - Sketchup::Model::VERSION_4,
1343
+ # - Sketchup::Model::VERSION_5,
1344
+ # - Sketchup::Model::VERSION_6,
1345
+ # - Sketchup::Model::VERSION_7,
1346
+ # - Sketchup::Model::VERSION_8,
1347
+ # - Sketchup::Model::VERSION_2013,
1348
+ # - Sketchup::Model::VERSION_2014,
1349
+ # - Sketchup::Model::VERSION_2015,
1350
+ # - Sketchup::Model::VERSION_2016,
1351
+ # - Sketchup::Model::VERSION_2017,
1352
+ # - Sketchup::Model::VERSION_2018,
1353
+ # - Sketchup::Model::VERSION_2019,
1354
+ # - Sketchup::Model::VERSION_2020,
1355
+ # - Sketchup::Model::VERSION_2021
1361
1356
  #
1362
1357
  # @return [Boolean] true if successful, false if unsuccessful
1363
1358
  #
@@ -1540,6 +1535,8 @@ class Sketchup::Model
1540
1535
  # creating observers that react to user actions without littering the
1541
1536
  # undo stack with extra steps that Ruby is performing.
1542
1537
  #
1538
+ # @raise [RuntimeError] if called within the context of {Sketchup::Entities#build}.
1539
+ #
1543
1540
  # @return [Boolean] +true+ if successful, +false+ if unsuccessful
1544
1541
  #
1545
1542
  # @version SketchUp 6.0
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2021 Trimble Inc.
1
+ # Copyright:: Copyright 2022 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # This observer interface is implemented to react to model events.
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2021 Trimble Inc.
1
+ # Copyright:: Copyright 2022 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # The OptionsManager class manages various kinds of OptionsProviders on a
@@ -53,7 +53,7 @@ class Sketchup::OptionsManager
53
53
  # number = manager.count
54
54
  #
55
55
  # @note Since SketchUp 2014 the count method is inherited from Ruby's
56
- # +Enumable+ mix-in module. Prior to that the {#count} method is an alias
56
+ # +Enumerable+ mix-in module. Prior to that the {#count} method is an alias
57
57
  # for {#length}.
58
58
  #
59
59
  # @return integer - number of OptionsProvider objects if
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2021 Trimble Inc.
1
+ # Copyright:: Copyright 2022 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # An +OptionsProvider+ class provides various kinds of options on a
@@ -87,7 +87,7 @@ class Sketchup::OptionsProvider
87
87
  # number = optionsprovider.count
88
88
  #
89
89
  # @note Since SketchUp 2014 the count method is inherited from Ruby's
90
- # +Enumable+ mix-in module. Prior to that the {#count} method is an alias
90
+ # +Enumerable+ mix-in module. Prior to that the {#count} method is an alias
91
91
  # for {#length}.
92
92
  #
93
93
  # @return [Integer]
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2021 Trimble Inc.
1
+ # Copyright:: Copyright 2022 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # This observer interface is implemented to react to operations provider
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2021 Trimble Inc.
1
+ # Copyright:: Copyright 2022 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # The Page class contains methods to extract information and modify the
@@ -169,7 +169,7 @@ class Sketchup::Page < Sketchup::Entity
169
169
  # The {#include_in_animation?} method determines whether the page should be
170
170
  # included when exporting an animation from the model.
171
171
  #
172
- # @example Toggle inclusion in animation for all pages.
172
+ # @example
173
173
  # model = Sketchup.active_model
174
174
  # in_animation = model.pages.select { |page| page.include_in_animation? }
175
175
  #
@@ -202,7 +202,7 @@ class Sketchup::Page < Sketchup::Entity
202
202
  # page = pages.add("My Page")
203
203
  # folders = page.layer_folders
204
204
  #
205
- # @return [Array<Sketchup::LayerFolder>, nil] Returns +nil+ if {#use_hidden?}
205
+ # @return [Array<Sketchup::LayerFolder>, nil] Returns +nil+ if {#use_hidden_layers?}
206
206
  # returns +false+
207
207
  #
208
208
  # @version SketchUp 2021.0
@@ -227,8 +227,8 @@ class Sketchup::Page < Sketchup::Entity
227
227
  # layer.page_behavior & LAYER_HIDDEN_BY_DEFAULT == LAYER_HIDDEN_BY_DEFAULT
228
228
  # end
229
229
  #
230
- # @return [Array<Sketchup::Layer>, nil] Returns +nil+ if {#use_hidden?} returns
231
- # +false+
230
+ # @return [Array<Sketchup::Layer>, nil] Returns +nil+ if {#use_hidden_layers?}
231
+ # returns +false+
232
232
  #
233
233
  # @version SketchUp 6.0
234
234
  def layers
@@ -321,11 +321,11 @@ class Sketchup::Page < Sketchup::Entity
321
321
  #
322
322
  # @overload set_visibility(layer_folder, visible_for_page)
323
323
  #
324
- # @version SketchUp 20201.0
324
+ # @version SketchUp 2021.0
325
325
  # @param [Sketchup::LayerFolder] layer_folder
326
326
  # @param [Boolean] visible_for_page
327
327
  #
328
- # @return [Sketchup::Page] the page whose visibility was set.
328
+ # @return [Sketchup::Page] the page whose visibility was set.
329
329
  #
330
330
  # @version SketchUp 6.0
331
331
  def set_visibility(arg1, arg2)
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2021 Trimble Inc.
1
+ # Copyright:: Copyright 2022 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # The Pages class contains methods for manipulating a collection of Pages
@@ -183,7 +183,7 @@ class Sketchup::Pages < Sketchup::Entity
183
183
  # number = pages.count
184
184
  #
185
185
  # @note Since SketchUp 2014 the count method is inherited from Ruby's
186
- # +Enumable+ mix-in module. Prior to that the {#count} method is an alias
186
+ # +Enumerable+ mix-in module. Prior to that the {#count} method is an alias
187
187
  # for {#length}.
188
188
  #
189
189
  # @return [Integer]
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2021 Trimble Inc.
1
+ # Copyright:: Copyright 2022 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # This observer interface is implemented to react to pages events.