sketchup-api-stubs 0.6.1 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (147) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +2 -0
  3. data/lib/sketchup-api-stubs/stubs/Geom/BoundingBox.rb +1 -1
  4. data/lib/sketchup-api-stubs/stubs/Geom/Bounds2d.rb +1 -1
  5. data/lib/sketchup-api-stubs/stubs/Geom/LatLong.rb +1 -1
  6. data/lib/sketchup-api-stubs/stubs/Geom/OrientedBounds2d.rb +1 -1
  7. data/lib/sketchup-api-stubs/stubs/Geom/Point2d.rb +1 -1
  8. data/lib/sketchup-api-stubs/stubs/Geom/Point3d.rb +1 -1
  9. data/lib/sketchup-api-stubs/stubs/Geom/PolygonMesh.rb +1 -1
  10. data/lib/sketchup-api-stubs/stubs/Geom/Transformation.rb +1 -1
  11. data/lib/sketchup-api-stubs/stubs/Geom/Transformation2d.rb +1 -1
  12. data/lib/sketchup-api-stubs/stubs/Geom/UTM.rb +1 -1
  13. data/lib/sketchup-api-stubs/stubs/Geom/Vector2d.rb +1 -1
  14. data/lib/sketchup-api-stubs/stubs/Geom/Vector3d.rb +1 -1
  15. data/lib/sketchup-api-stubs/stubs/Layout.rb +1 -1
  16. data/lib/sketchup-api-stubs/stubs/Layout/AngularDimension.rb +1 -1
  17. data/lib/sketchup-api-stubs/stubs/Layout/AutoTextDefinition.rb +1 -1
  18. data/lib/sketchup-api-stubs/stubs/Layout/AutoTextDefinitions.rb +1 -1
  19. data/lib/sketchup-api-stubs/stubs/Layout/ConnectionPoint.rb +1 -1
  20. data/lib/sketchup-api-stubs/stubs/Layout/Document.rb +5 -1
  21. data/lib/sketchup-api-stubs/stubs/Layout/Ellipse.rb +1 -1
  22. data/lib/sketchup-api-stubs/stubs/Layout/Entities.rb +1 -1
  23. data/lib/sketchup-api-stubs/stubs/Layout/Entity.rb +4 -10
  24. data/lib/sketchup-api-stubs/stubs/Layout/FormattedText.rb +1 -1
  25. data/lib/sketchup-api-stubs/stubs/Layout/Grid.rb +1 -1
  26. data/lib/sketchup-api-stubs/stubs/Layout/Group.rb +1 -1
  27. data/lib/sketchup-api-stubs/stubs/Layout/Image.rb +1 -1
  28. data/lib/sketchup-api-stubs/stubs/Layout/Label.rb +1 -1
  29. data/lib/sketchup-api-stubs/stubs/Layout/Layer.rb +2 -2
  30. data/lib/sketchup-api-stubs/stubs/Layout/LayerInstance.rb +1 -1
  31. data/lib/sketchup-api-stubs/stubs/Layout/Layers.rb +1 -1
  32. data/lib/sketchup-api-stubs/stubs/Layout/LinearDimension.rb +1 -1
  33. data/lib/sketchup-api-stubs/stubs/Layout/LockedEntityError.rb +1 -1
  34. data/lib/sketchup-api-stubs/stubs/Layout/LockedLayerError.rb +1 -1
  35. data/lib/sketchup-api-stubs/stubs/Layout/Page.rb +1 -1
  36. data/lib/sketchup-api-stubs/stubs/Layout/PageInfo.rb +1 -1
  37. data/lib/sketchup-api-stubs/stubs/Layout/Pages.rb +1 -1
  38. data/lib/sketchup-api-stubs/stubs/Layout/Path.rb +1 -1
  39. data/lib/sketchup-api-stubs/stubs/Layout/Rectangle.rb +1 -1
  40. data/lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb +5 -1
  41. data/lib/sketchup-api-stubs/stubs/Layout/Style.rb +1 -1
  42. data/lib/sketchup-api-stubs/stubs/Layout/Table.rb +1 -1
  43. data/lib/sketchup-api-stubs/stubs/Layout/TableCell.rb +1 -1
  44. data/lib/sketchup-api-stubs/stubs/Layout/TableColumn.rb +1 -1
  45. data/lib/sketchup-api-stubs/stubs/Layout/TableRow.rb +1 -1
  46. data/lib/sketchup-api-stubs/stubs/Sketchup/Animation.rb +1 -1
  47. data/lib/sketchup-api-stubs/stubs/Sketchup/AppObserver.rb +1 -1
  48. data/lib/sketchup-api-stubs/stubs/Sketchup/ArcCurve.rb +1 -1
  49. data/lib/sketchup-api-stubs/stubs/Sketchup/AttributeDictionaries.rb +1 -1
  50. data/lib/sketchup-api-stubs/stubs/Sketchup/AttributeDictionary.rb +1 -1
  51. data/lib/sketchup-api-stubs/stubs/Sketchup/Axes.rb +1 -1
  52. data/lib/sketchup-api-stubs/stubs/Sketchup/Behavior.rb +1 -1
  53. data/lib/sketchup-api-stubs/stubs/Sketchup/Camera.rb +1 -1
  54. data/lib/sketchup-api-stubs/stubs/Sketchup/ClassificationSchema.rb +1 -1
  55. data/lib/sketchup-api-stubs/stubs/Sketchup/Classifications.rb +1 -1
  56. data/lib/sketchup-api-stubs/stubs/Sketchup/Color.rb +1 -1
  57. data/lib/sketchup-api-stubs/stubs/Sketchup/ComponentDefinition.rb +9 -1
  58. data/lib/sketchup-api-stubs/stubs/Sketchup/ComponentInstance.rb +1 -1
  59. data/lib/sketchup-api-stubs/stubs/Sketchup/Console.rb +1 -1
  60. data/lib/sketchup-api-stubs/stubs/Sketchup/ConstructionLine.rb +1 -1
  61. data/lib/sketchup-api-stubs/stubs/Sketchup/ConstructionPoint.rb +1 -1
  62. data/lib/sketchup-api-stubs/stubs/Sketchup/Curve.rb +1 -1
  63. data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionList.rb +1 -1
  64. data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionObserver.rb +1 -1
  65. data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionsObserver.rb +1 -1
  66. data/lib/sketchup-api-stubs/stubs/Sketchup/Dimension.rb +1 -1
  67. data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionLinear.rb +1 -1
  68. data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionObserver.rb +1 -1
  69. data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionRadial.rb +1 -1
  70. data/lib/sketchup-api-stubs/stubs/Sketchup/Drawingelement.rb +1 -1
  71. data/lib/sketchup-api-stubs/stubs/Sketchup/Edge.rb +1 -1
  72. data/lib/sketchup-api-stubs/stubs/Sketchup/EdgeUse.rb +1 -1
  73. data/lib/sketchup-api-stubs/stubs/Sketchup/Entities.rb +1 -1
  74. data/lib/sketchup-api-stubs/stubs/Sketchup/EntitiesObserver.rb +1 -1
  75. data/lib/sketchup-api-stubs/stubs/Sketchup/Entity.rb +4 -1
  76. data/lib/sketchup-api-stubs/stubs/Sketchup/EntityObserver.rb +1 -1
  77. data/lib/sketchup-api-stubs/stubs/Sketchup/ExtensionsManager.rb +1 -1
  78. data/lib/sketchup-api-stubs/stubs/Sketchup/Face.rb +1 -1
  79. data/lib/sketchup-api-stubs/stubs/Sketchup/FrameChangeObserver.rb +1 -1
  80. data/lib/sketchup-api-stubs/stubs/Sketchup/Group.rb +1 -1
  81. data/lib/sketchup-api-stubs/stubs/Sketchup/Http.rb +1 -1
  82. data/lib/sketchup-api-stubs/stubs/Sketchup/Http/Request.rb +1 -1
  83. data/lib/sketchup-api-stubs/stubs/Sketchup/Http/Response.rb +1 -1
  84. data/lib/sketchup-api-stubs/stubs/Sketchup/Image.rb +1 -1
  85. data/lib/sketchup-api-stubs/stubs/Sketchup/ImageRep.rb +1 -1
  86. data/lib/sketchup-api-stubs/stubs/Sketchup/Importer.rb +1 -1
  87. data/lib/sketchup-api-stubs/stubs/Sketchup/InputPoint.rb +1 -1
  88. data/lib/sketchup-api-stubs/stubs/Sketchup/InstanceObserver.rb +1 -1
  89. data/lib/sketchup-api-stubs/stubs/Sketchup/InstancePath.rb +1 -1
  90. data/lib/sketchup-api-stubs/stubs/Sketchup/Layer.rb +25 -3
  91. data/lib/sketchup-api-stubs/stubs/Sketchup/Layers.rb +1 -1
  92. data/lib/sketchup-api-stubs/stubs/Sketchup/LayersObserver.rb +1 -1
  93. data/lib/sketchup-api-stubs/stubs/Sketchup/Licensing.rb +1 -1
  94. data/lib/sketchup-api-stubs/stubs/Sketchup/Licensing/ExtensionLicense.rb +1 -1
  95. data/lib/sketchup-api-stubs/stubs/Sketchup/LineStyle.rb +1 -1
  96. data/lib/sketchup-api-stubs/stubs/Sketchup/LineStyles.rb +1 -1
  97. data/lib/sketchup-api-stubs/stubs/Sketchup/Loop.rb +1 -1
  98. data/lib/sketchup-api-stubs/stubs/Sketchup/Material.rb +1 -1
  99. data/lib/sketchup-api-stubs/stubs/Sketchup/Materials.rb +1 -1
  100. data/lib/sketchup-api-stubs/stubs/Sketchup/MaterialsObserver.rb +1 -1
  101. data/lib/sketchup-api-stubs/stubs/Sketchup/Menu.rb +1 -1
  102. data/lib/sketchup-api-stubs/stubs/Sketchup/Model.rb +129 -11
  103. data/lib/sketchup-api-stubs/stubs/Sketchup/ModelObserver.rb +1 -1
  104. data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsManager.rb +1 -1
  105. data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsProvider.rb +8 -6
  106. data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsProviderObserver.rb +1 -1
  107. data/lib/sketchup-api-stubs/stubs/Sketchup/Page.rb +45 -1
  108. data/lib/sketchup-api-stubs/stubs/Sketchup/Pages.rb +1 -1
  109. data/lib/sketchup-api-stubs/stubs/Sketchup/PagesObserver.rb +1 -1
  110. data/lib/sketchup-api-stubs/stubs/Sketchup/PickHelper.rb +1 -1
  111. data/lib/sketchup-api-stubs/stubs/Sketchup/RegionalSettings.rb +1 -1
  112. data/lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptions.rb +12 -4
  113. data/lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptionsObserver.rb +1 -1
  114. data/lib/sketchup-api-stubs/stubs/Sketchup/SectionPlane.rb +1 -1
  115. data/lib/sketchup-api-stubs/stubs/Sketchup/Selection.rb +1 -1
  116. data/lib/sketchup-api-stubs/stubs/Sketchup/SelectionObserver.rb +1 -1
  117. data/lib/sketchup-api-stubs/stubs/Sketchup/Set.rb +1 -1
  118. data/lib/sketchup-api-stubs/stubs/Sketchup/ShadowInfo.rb +1 -1
  119. data/lib/sketchup-api-stubs/stubs/Sketchup/ShadowInfoObserver.rb +1 -1
  120. data/lib/sketchup-api-stubs/stubs/Sketchup/Style.rb +1 -1
  121. data/lib/sketchup-api-stubs/stubs/Sketchup/Styles.rb +1 -1
  122. data/lib/sketchup-api-stubs/stubs/Sketchup/Text.rb +1 -1
  123. data/lib/sketchup-api-stubs/stubs/Sketchup/Texture.rb +1 -1
  124. data/lib/sketchup-api-stubs/stubs/Sketchup/TextureWriter.rb +1 -1
  125. data/lib/sketchup-api-stubs/stubs/Sketchup/Tool.rb +1 -1
  126. data/lib/sketchup-api-stubs/stubs/Sketchup/Tools.rb +1 -1
  127. data/lib/sketchup-api-stubs/stubs/Sketchup/ToolsObserver.rb +1 -1
  128. data/lib/sketchup-api-stubs/stubs/Sketchup/UVHelper.rb +1 -1
  129. data/lib/sketchup-api-stubs/stubs/Sketchup/Vertex.rb +1 -1
  130. data/lib/sketchup-api-stubs/stubs/Sketchup/View.rb +364 -58
  131. data/lib/sketchup-api-stubs/stubs/Sketchup/ViewObserver.rb +1 -1
  132. data/lib/sketchup-api-stubs/stubs/UI/Command.rb +1 -1
  133. data/lib/sketchup-api-stubs/stubs/UI/HtmlDialog.rb +1 -1
  134. data/lib/sketchup-api-stubs/stubs/UI/Notification.rb +1 -1
  135. data/lib/sketchup-api-stubs/stubs/UI/Toolbar.rb +1 -1
  136. data/lib/sketchup-api-stubs/stubs/UI/WebDialog.rb +1 -1
  137. data/lib/sketchup-api-stubs/stubs/_top_level.rb +7 -1
  138. data/lib/sketchup-api-stubs/stubs/array.rb +1 -1
  139. data/lib/sketchup-api-stubs/stubs/geom.rb +116 -1
  140. data/lib/sketchup-api-stubs/stubs/languagehandler.rb +1 -1
  141. data/lib/sketchup-api-stubs/stubs/length.rb +19 -3
  142. data/lib/sketchup-api-stubs/stubs/numeric.rb +1 -1
  143. data/lib/sketchup-api-stubs/stubs/sketchup.rb +2 -2
  144. data/lib/sketchup-api-stubs/stubs/sketchupextension.rb +1 -1
  145. data/lib/sketchup-api-stubs/stubs/string.rb +1 -1
  146. data/lib/sketchup-api-stubs/stubs/ui.rb +10 -3
  147. metadata +2 -2
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2019 Trimble Inc.
1
+ # Copyright:: Copyright 2020 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # The ClassificationSchema class represent schemas loaded in the model.
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2019 Trimble Inc.
1
+ # Copyright:: Copyright 2020 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # The Classifications class is a container/manager for all classifications in
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2019 Trimble Inc.
1
+ # Copyright:: Copyright 2020 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # The Color class is used to create and manipulate colors within SketchUp
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2019 Trimble Inc.
1
+ # Copyright:: Copyright 2020 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # The {Sketchup::ComponentDefinition} class is used to define the contents for
@@ -293,6 +293,10 @@ class Sketchup::ComponentDefinition < Sketchup::Drawingelement
293
293
  # The insertion_point method is used to retrieve the Point3d object where the
294
294
  # component was inserted.
295
295
  #
296
+ # @deprecated SketchUp 2020.0 removed the insertion point feature.
297
+ # The getter will always return the origin point and the
298
+ # setter becomes a no-op.
299
+ #
296
300
  # @example
297
301
  # point = Geom::Point3d.new 10,20,30
298
302
  # transform = Geom::Transformation.new point
@@ -314,6 +318,10 @@ class Sketchup::ComponentDefinition < Sketchup::Drawingelement
314
318
 
315
319
  # Sets the insertion point of your definition.
316
320
  #
321
+ # @deprecated SketchUp 2020.0 removed the insertion point feature.
322
+ # The getter will always return the origin point and the
323
+ # setter becomes a no-op.
324
+ #
317
325
  # @example
318
326
  # point = Geom::Point3d.new(10, 20, 0)
319
327
  # componentdefinition = Sketchup.active_model.definitions[0]
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2019 Trimble Inc.
1
+ # Copyright:: Copyright 2020 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # The {Sketchup::ComponentInstance} class is used to represent component
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2019 Trimble Inc.
1
+ # Copyright:: Copyright 2020 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # The Console class is used by SketchUp to direct $stdout and $stderr to the
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2019 Trimble Inc.
1
+ # Copyright:: Copyright 2020 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # The ConstructionLine class contains methods for modifying construction
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2019 Trimble Inc.
1
+ # Copyright:: Copyright 2020 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # A construction point represents a point in the model that can be used to aid
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2019 Trimble Inc.
1
+ # Copyright:: Copyright 2020 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # The Curve class is used by SketchUp to unite a series of Edge objects into
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2019 Trimble Inc.
1
+ # Copyright:: Copyright 2020 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # A DefinitionList object holds a list of all of the ComponentDefinition
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2019 Trimble Inc.
1
+ # Copyright:: Copyright 2020 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # This observer interface is implemented to react to component definition
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2019 Trimble Inc.
1
+ # Copyright:: Copyright 2020 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # This observer interface is implemented to react to events on a definitions
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2019 Trimble Inc.
1
+ # Copyright:: Copyright 2020 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # The Dimension class provides base functionality for classes DimensionLinear
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2019 Trimble Inc.
1
+ # Copyright:: Copyright 2020 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # The DimensionLinear class represents linear dimensions.
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2019 Trimble Inc.
1
+ # Copyright:: Copyright 2020 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # This observer interface is implemented to react to changes in dimension text.
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2019 Trimble Inc.
1
+ # Copyright:: Copyright 2020 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # The DimensionRadial class represents radius and diameter dimensions on
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2019 Trimble Inc.
1
+ # Copyright:: Copyright 2020 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # Drawingelement is a base class for an item in the model that can be
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2019 Trimble Inc.
1
+ # Copyright:: Copyright 2020 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # The Edge class contains methods modifying and extracting information for
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2019 Trimble Inc.
1
+ # Copyright:: Copyright 2020 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # The EdgeUse class defines how an Edge is used in the definition of a Face.
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2019 Trimble Inc.
1
+ # Copyright:: Copyright 2020 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # The Entities class is a container class for all entities in a model (it is a
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2019 Trimble Inc.
1
+ # Copyright:: Copyright 2020 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # This observer interface is implemented to react to {Sketchup::Entities}
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2019 Trimble Inc.
1
+ # Copyright:: Copyright 2020 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # This is the base class for all SketchUp entities. Entities are basically
@@ -344,6 +344,9 @@ class Sketchup::Entity
344
344
  #
345
345
  # The persistent id persistent between sessions.
346
346
  #
347
+ # [SketchUp 2020.0]
348
+ # - {Sketchup::Layer}
349
+ # - {Sketchup::LineStyle}
347
350
  # [SketchUp 2018]
348
351
  # - {Sketchup::Page}
349
352
  # [SketchUp 2017]
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2019 Trimble Inc.
1
+ # Copyright:: Copyright 2020 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # This observer interface is implemented to react to entity events. To
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2019 Trimble Inc.
1
+ # Copyright:: Copyright 2020 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # The ExtensionsManager class provides a way of accessing the
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2019 Trimble Inc.
1
+ # Copyright:: Copyright 2020 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # Faces in SketchUp are flat, 2-sided polygons with 3 or more sides.
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2019 Trimble Inc.
1
+ # Copyright:: Copyright 2020 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # This observer interface is implemented to react to changes in camera
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2019 Trimble Inc.
1
+ # Copyright:: Copyright 2020 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # A Group class contains methods for manipulating groups of entities.
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2019 Trimble Inc.
1
+ # Copyright:: Copyright 2020 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 2019 Trimble Inc.
1
+ # Copyright:: Copyright 2020 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 2019 Trimble Inc.
1
+ # Copyright:: Copyright 2020 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 2019 Trimble Inc.
1
+ # Copyright:: Copyright 2020 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 2019 Trimble Inc.
1
+ # Copyright:: Copyright 2020 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 2019 Trimble Inc.
1
+ # Copyright:: Copyright 2020 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 2019 Trimble Inc.
1
+ # Copyright:: Copyright 2020 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # The InputPoint used to pick entities that reside under the current cursor
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2019 Trimble Inc.
1
+ # Copyright:: Copyright 2020 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 2019 Trimble Inc.
1
+ # Copyright:: Copyright 2020 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 2019 Trimble Inc.
1
+ # Copyright:: Copyright 2020 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # The Layer class contains methods modifying and extracting information for a
@@ -103,6 +103,26 @@ class Sketchup::Layer < Sketchup::Entity
103
103
  def color=(color)
104
104
  end
105
105
 
106
+ # The {#display_name} method is used to retrieve the display name of the layer.
107
+ #
108
+ # @example
109
+ # model = Sketchup.active_model
110
+ # layers = model.layers
111
+ # new_layer = layers.add ("test layer")
112
+ # name = new_layer.display_name
113
+ #
114
+ # @return [String] the display name of the Layer object
115
+ #
116
+ # @see #name
117
+ #
118
+ # @version SketchUp 2020.0
119
+ def display_name
120
+ end
121
+
122
+ # Layer Group methods
123
+ def layer_group
124
+ end
125
+
106
126
  # The {#line_style} method retrieves the line style on this layer.
107
127
  #
108
128
  # @example
@@ -129,7 +149,7 @@ class Sketchup::Layer < Sketchup::Entity
129
149
  def line_style=(line_style)
130
150
  end
131
151
 
132
- # The name method is used to retrieve the name of the layer.
152
+ # The {#name} method is used to retrieve the name of the layer.
133
153
  #
134
154
  # @example
135
155
  # model = Sketchup.active_model
@@ -137,7 +157,9 @@ class Sketchup::Layer < Sketchup::Entity
137
157
  # new_layer = layers.add "test layer"
138
158
  # name = new_layer.name
139
159
  #
140
- # @return name - the name of the Layer object
160
+ # @return [String]
161
+ #
162
+ # @see #display_name
141
163
  #
142
164
  # @version SketchUp 6.0
143
165
  def name
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2019 Trimble Inc.
1
+ # Copyright:: Copyright 2020 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
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2019 Trimble Inc.
1
+ # Copyright:: Copyright 2020 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # This observer interface is implemented to react to layers events. To
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2019 Trimble Inc.
1
+ # Copyright:: Copyright 2020 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # The +Sketchup::Licensing+ module contains methods for
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2019 Trimble Inc.
1
+ # Copyright:: Copyright 2020 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 2019 Trimble Inc.
1
+ # Copyright:: Copyright 2020 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 2019 Trimble Inc.
1
+ # Copyright:: Copyright 2020 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 2019 Trimble Inc.
1
+ # Copyright:: Copyright 2020 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 2019 Trimble Inc.
1
+ # Copyright:: Copyright 2020 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 2019 Trimble Inc.
1
+ # Copyright:: Copyright 2020 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # A collection of Materials objects. Each model contains a Materials collection
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2019 Trimble Inc.
1
+ # Copyright:: Copyright 2020 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # This observer interface is implemented to react to materials events. To
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2019 Trimble Inc.
1
+ # Copyright:: Copyright 2020 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 2019 Trimble Inc.
1
+ # Copyright:: Copyright 2020 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
@@ -14,6 +14,9 @@
14
14
  # - Model::MakeTrial
15
15
  # - Model::MakeTrialExpired
16
16
  #
17
+ # @bug Prior to SketchUp 2019.0 this class would yield +TypeError+ for all
18
+ # method calls if +#singleton_class+ was called on the model object.
19
+ #
17
20
  # @example
18
21
  # # Grab a handle to the currently active model (aka the one the user is
19
22
  # # looking at in SketchUp.)
@@ -36,9 +39,6 @@
36
39
  #
37
40
  # new_edge = entities.add_line([0,0,0], [500,500,0])
38
41
  #
39
- # @note Prior to SketchUp 2019 this class would yield +TypeError+ for all
40
- # method calls if +#singleton_class+ was called on the model object.
41
- #
42
42
  # @version SketchUp 6.0
43
43
  class Sketchup::Model
44
44
 
@@ -56,6 +56,7 @@ class Sketchup::Model
56
56
  VERSION_2017 = nil # Stub value.
57
57
  VERSION_2018 = nil # Stub value.
58
58
  VERSION_2019 = nil # Stub value.
59
+ VERSION_2020 = nil # Stub value.
59
60
  VERSION_3 = nil # Stub value.
60
61
  VERSION_4 = nil # Stub value.
61
62
  VERSION_5 = nil # Stub value.
@@ -152,6 +153,73 @@ class Sketchup::Model
152
153
  def active_path
153
154
  end
154
155
 
156
+ # The {#active_path=} method is used to open a given instance path for editing.
157
+ #
158
+ # It is expected that no entities are modified in an operation that
159
+ # opens/closes instances.
160
+ #
161
+ # To ensure that undo/redo is done correctly this method breaks up any open
162
+ # Ruby operations into a set of chained operations:
163
+ #
164
+ # If the API user tries to do this:
165
+ #
166
+ # model.start_operation('...', true)
167
+ # model.entities.add_face(...)
168
+ # model.active_path = instance_path
169
+ # model.entities.add_face(...)
170
+ # model.commit_operation
171
+ #
172
+ # Then the method will break it up to something like this:
173
+ #
174
+ # model.start_operation('...', true)
175
+ # model.entities.add_face(...)
176
+ # model.commit_operation
177
+ #
178
+ # model.start_operation('...', true, false, true)
179
+ # model.active_path = instance_path
180
+ # model.commit_operation
181
+ #
182
+ # model.start_operation('...', true, false, true)
183
+ # model.entities.add_face(...)
184
+ # model.commit_operation
185
+ #
186
+ # For the end user this will be experienced as a single operation.
187
+ # For the API user the side-effect is multiple transaction notifications.
188
+ #
189
+ # @example Open an instance
190
+ # model = Sketchup.active_model
191
+ # instance = model.active_entities.grep(Sketchup::ComponentInstance).first
192
+ # instance_path = Sketchup::InstancePath.new([instance])
193
+ # model.active_path = instance_path
194
+ #
195
+ # @example Close all instances
196
+ # model = Sketchup.active_model
197
+ # model.active_path = nil
198
+ #
199
+ # @note An instance path can only be opened if the instances are not locked.
200
+ # This also include instances of the same component definition that are not
201
+ # on the given path. A definition cannot be edited if any of its instances
202
+ # are locked.
203
+ #
204
+ # @note Open/close operations are special operations in SketchUp which has to
205
+ # be treated with special care.
206
+ #
207
+ # @param [Sketchup::InstancePath, Array<Sketchup::ComponentInstance, Sketchup::Group>, nil] instance_path
208
+ # Passing +nil+ or an empty array will close all open instances.
209
+ #
210
+ # @raise [ArgumentError] if the instance path is not valid.
211
+ #
212
+ # @raise [ArgumentError] if the instance path contains locked instances.
213
+ #
214
+ # @raise [ArgumentError] if the instance path contains instances who's
215
+ # siblings are locked.
216
+ #
217
+ # @return [Sketchup::Model]
218
+ #
219
+ # @version SketchUp 2020.0
220
+ def active_path=(instance_path)
221
+ end
222
+
155
223
  # The {#active_view} method returns the active View object for this model.
156
224
  #
157
225
  # @example
@@ -338,17 +406,17 @@ class Sketchup::Model
338
406
  def close(ignore_changes = false)
339
407
  end
340
408
 
341
- # The close_active method is used to close the currently active (open) group
409
+ # The {#close_active} method is used to close the currently active (open) group
342
410
  # or component.
343
411
  #
344
- # Note: before SketchUp 2014 this method had a bug where it didn't create an
345
- # undo operation and that could lead to corrupted geometry when undo/redo was
346
- # used after invoking this method.
347
- #
348
412
  # @example
349
413
  # model = Sketchup.active_model
350
414
  # status = model.close_active
351
415
  #
416
+ # @note Before SketchUp 2014 this method had a bug where it didn't create an
417
+ # undo operation and that could lead to corrupted geometry when undo/redo was
418
+ # used after invoking this method.
419
+ #
352
420
  # @return [Boolean] true if successful, false if unsuccessful.
353
421
  #
354
422
  # @version SketchUp 6.0
@@ -414,6 +482,54 @@ class Sketchup::Model
414
482
  def description=(description)
415
483
  end
416
484
 
485
+ # The {#drawing_element_visible?} method reports whether the given drawing
486
+ # element in an instance path is visible given the current model options.
487
+ #
488
+ # @example Traversing every visible entity in the model
489
+ # module Example
490
+ #
491
+ # def self.instance?(entity)
492
+ # entity.is_a?(Sketchup::ComponentInstance) || entity.is_a?(Sketchup::Group)
493
+ # end
494
+ #
495
+ # # Walk the visible entities in the model, taking into account
496
+ # # "DrawHiddenGeometry" and "DrawHiddenObjects" rendering options.
497
+ # def self.walk(entities, transformation = IDENTITY, path = [], &block)
498
+ # entities.each { |entity|
499
+ # entity_path = path + [entity]
500
+ # next unless entity.model.drawing_element_visible?(entity_path)
501
+ # block.call(entity, transformation, path)
502
+ # if instance?(entity)
503
+ # child_entities = entity.definition.entities
504
+ # child_transformation = transformation * entity.transformation
505
+ # walk(child_entities, child_transformation, entity_path, &block)
506
+ # end
507
+ # }
508
+ # end
509
+ #
510
+ # end
511
+ #
512
+ # model = Sketchup.active_model
513
+ # Example.walk(model.entities) do |entity, transformation, path|
514
+ # # Do something to every visible entity in the model...
515
+ # end
516
+ #
517
+ # @param [Sketchup::InstancePath, Array<Sketchup::Drawingelement>] instance_path
518
+ #
519
+ # @raise [ArgumentError] if the +instance_path+ is not valid.
520
+ #
521
+ # @return [Boolean]
522
+ #
523
+ # @see Sketchup::RenderingOptions
524
+ #
525
+ # @see Sketchup::Drawingelement#visible?
526
+ #
527
+ # @see Sketchup::Layer#visible?
528
+ #
529
+ # @version SketchUp 2020.0
530
+ def drawing_element_visible?(instance_path)
531
+ end
532
+
417
533
  # Returns the transformation of the current component edit session. If a user
418
534
  # has double-clicked to edit a component's geometry, this will
419
535
  # return the transformation of that component, relative to its parent's
@@ -1150,7 +1266,8 @@ class Sketchup::Model
1150
1266
  # Sketchup::Model::VERSION_2016,
1151
1267
  # Sketchup::Model::VERSION_2017,
1152
1268
  # Sketchup::Model::VERSION_2018,
1153
- # Sketchup::Model::VERSION_2019
1269
+ # Sketchup::Model::VERSION_2019,
1270
+ # Sketchup::Model::VERSION_2020
1154
1271
  #
1155
1272
  # @return [Boolean] true if successful, false if unsuccessful
1156
1273
  #
@@ -1186,7 +1303,8 @@ class Sketchup::Model
1186
1303
  # Sketchup::Model::VERSION_2016,
1187
1304
  # Sketchup::Model::VERSION_2017,
1188
1305
  # Sketchup::Model::VERSION_2018,
1189
- # Sketchup::Model::VERSION_2019
1306
+ # Sketchup::Model::VERSION_2019,
1307
+ # Sketchup::Model::VERSION_2020
1190
1308
  #
1191
1309
  # @return [Boolean] true if successful, false if unsuccessful
1192
1310
  #