sketchup-api-stubs 0.7.9 → 0.7.11

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 (160) hide show
  1. checksums.yaml +4 -4
  2. data/lib/sketchup-api-stubs/sketchup.rb +157 -151
  3. data/lib/sketchup-api-stubs/stubs/Array.rb +741 -741
  4. data/lib/sketchup-api-stubs/stubs/Geom/BoundingBox.rb +322 -322
  5. data/lib/sketchup-api-stubs/stubs/Geom/Bounds2d.rb +182 -172
  6. data/lib/sketchup-api-stubs/stubs/Geom/LatLong.rb +111 -126
  7. data/lib/sketchup-api-stubs/stubs/Geom/OrientedBounds2d.rb +102 -102
  8. data/lib/sketchup-api-stubs/stubs/Geom/Point2d.rb +423 -400
  9. data/lib/sketchup-api-stubs/stubs/Geom/Point3d.rb +693 -661
  10. data/lib/sketchup-api-stubs/stubs/Geom/PolygonMesh.rb +535 -509
  11. data/lib/sketchup-api-stubs/stubs/Geom/Transformation.rb +500 -476
  12. data/lib/sketchup-api-stubs/stubs/Geom/Transformation2d.rb +267 -263
  13. data/lib/sketchup-api-stubs/stubs/Geom/UTM.rb +133 -141
  14. data/lib/sketchup-api-stubs/stubs/Geom/Vector2d.rb +547 -522
  15. data/lib/sketchup-api-stubs/stubs/Geom/Vector3d.rb +678 -693
  16. data/lib/sketchup-api-stubs/stubs/Geom.rb +351 -351
  17. data/lib/sketchup-api-stubs/stubs/LanguageHandler.rb +93 -93
  18. data/lib/sketchup-api-stubs/stubs/Layout/AngularDimension.rb +595 -595
  19. data/lib/sketchup-api-stubs/stubs/Layout/AutoTextDefinition.rb +751 -747
  20. data/lib/sketchup-api-stubs/stubs/Layout/AutoTextDefinitions.rb +183 -183
  21. data/lib/sketchup-api-stubs/stubs/Layout/ConnectionPoint.rb +70 -70
  22. data/lib/sketchup-api-stubs/stubs/Layout/Dictionary.rb +234 -0
  23. data/lib/sketchup-api-stubs/stubs/Layout/Document.rb +683 -517
  24. data/lib/sketchup-api-stubs/stubs/Layout/Ellipse.rb +29 -29
  25. data/lib/sketchup-api-stubs/stubs/Layout/Entities.rb +148 -148
  26. data/lib/sketchup-api-stubs/stubs/Layout/Entity.rb +464 -353
  27. data/lib/sketchup-api-stubs/stubs/Layout/FormattedText.rb +354 -354
  28. data/lib/sketchup-api-stubs/stubs/Layout/Grid.rb +311 -311
  29. data/lib/sketchup-api-stubs/stubs/Layout/Group.rb +261 -261
  30. data/lib/sketchup-api-stubs/stubs/Layout/Image.rb +91 -91
  31. data/lib/sketchup-api-stubs/stubs/Layout/Label.rb +370 -370
  32. data/lib/sketchup-api-stubs/stubs/Layout/Layer.rb +218 -218
  33. data/lib/sketchup-api-stubs/stubs/Layout/LayerInstance.rb +128 -128
  34. data/lib/sketchup-api-stubs/stubs/Layout/Layers.rb +225 -225
  35. data/lib/sketchup-api-stubs/stubs/Layout/LinearDimension.rb +614 -567
  36. data/lib/sketchup-api-stubs/stubs/Layout/LockedEntityError.rb +10 -10
  37. data/lib/sketchup-api-stubs/stubs/Layout/LockedLayerError.rb +11 -11
  38. data/lib/sketchup-api-stubs/stubs/Layout/Page.rb +282 -183
  39. data/lib/sketchup-api-stubs/stubs/Layout/PageInfo.rb +458 -387
  40. data/lib/sketchup-api-stubs/stubs/Layout/Pages.rb +209 -209
  41. data/lib/sketchup-api-stubs/stubs/Layout/Path.rb +346 -344
  42. data/lib/sketchup-api-stubs/stubs/Layout/Rectangle.rb +174 -174
  43. data/lib/sketchup-api-stubs/stubs/Layout/ReferenceEntity.rb +82 -82
  44. data/lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb +714 -692
  45. data/lib/sketchup-api-stubs/stubs/Layout/Style.rb +1565 -1519
  46. data/lib/sketchup-api-stubs/stubs/Layout/Table.rb +290 -290
  47. data/lib/sketchup-api-stubs/stubs/Layout/TableCell.rb +149 -149
  48. data/lib/sketchup-api-stubs/stubs/Layout/TableColumn.rb +139 -139
  49. data/lib/sketchup-api-stubs/stubs/Layout/TableRow.rb +135 -135
  50. data/lib/sketchup-api-stubs/stubs/Layout.rb +25 -25
  51. data/lib/sketchup-api-stubs/stubs/Length.rb +286 -278
  52. data/lib/sketchup-api-stubs/stubs/Numeric.rb +249 -249
  53. data/lib/sketchup-api-stubs/stubs/Sketchup/Animation.rb +196 -144
  54. data/lib/sketchup-api-stubs/stubs/Sketchup/AppObserver.rb +169 -169
  55. data/lib/sketchup-api-stubs/stubs/Sketchup/ArcCurve.rb +226 -209
  56. data/lib/sketchup-api-stubs/stubs/Sketchup/AttributeDictionaries.rb +145 -150
  57. data/lib/sketchup-api-stubs/stubs/Sketchup/AttributeDictionary.rb +294 -281
  58. data/lib/sketchup-api-stubs/stubs/Sketchup/Axes.rb +149 -149
  59. data/lib/sketchup-api-stubs/stubs/Sketchup/Behavior.rb +296 -302
  60. data/lib/sketchup-api-stubs/stubs/Sketchup/Camera.rb +473 -478
  61. data/lib/sketchup-api-stubs/stubs/Sketchup/ClassificationSchema.rb +63 -63
  62. data/lib/sketchup-api-stubs/stubs/Sketchup/Classifications.rb +121 -121
  63. data/lib/sketchup-api-stubs/stubs/Sketchup/Color.rb +294 -294
  64. data/lib/sketchup-api-stubs/stubs/Sketchup/ComponentDefinition.rb +673 -659
  65. data/lib/sketchup-api-stubs/stubs/Sketchup/ComponentInstance.rb +600 -593
  66. data/lib/sketchup-api-stubs/stubs/Sketchup/Console.rb +76 -76
  67. data/lib/sketchup-api-stubs/stubs/Sketchup/ConstructionLine.rb +252 -257
  68. data/lib/sketchup-api-stubs/stubs/Sketchup/ConstructionPoint.rb +32 -32
  69. data/lib/sketchup-api-stubs/stubs/Sketchup/Curve.rb +201 -201
  70. data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionList.rb +443 -449
  71. data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionObserver.rb +74 -74
  72. data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionsObserver.rb +104 -104
  73. data/lib/sketchup-api-stubs/stubs/Sketchup/Dimension.rb +167 -165
  74. data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionLinear.rb +306 -306
  75. data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionObserver.rb +42 -42
  76. data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionRadial.rb +87 -87
  77. data/lib/sketchup-api-stubs/stubs/Sketchup/Drawingelement.rb +403 -406
  78. data/lib/sketchup-api-stubs/stubs/Sketchup/Edge.rb +397 -397
  79. data/lib/sketchup-api-stubs/stubs/Sketchup/EdgeUse.rb +211 -211
  80. data/lib/sketchup-api-stubs/stubs/Sketchup/Entities.rb +1282 -1239
  81. data/lib/sketchup-api-stubs/stubs/Sketchup/EntitiesBuilder.rb +261 -261
  82. data/lib/sketchup-api-stubs/stubs/Sketchup/EntitiesObserver.rb +127 -127
  83. data/lib/sketchup-api-stubs/stubs/Sketchup/Entity.rb +519 -545
  84. data/lib/sketchup-api-stubs/stubs/Sketchup/EntityObserver.rb +60 -60
  85. data/lib/sketchup-api-stubs/stubs/Sketchup/Environment.rb +406 -0
  86. data/lib/sketchup-api-stubs/stubs/Sketchup/Environments.rb +185 -0
  87. data/lib/sketchup-api-stubs/stubs/Sketchup/EnvironmentsObserver.rb +113 -0
  88. data/lib/sketchup-api-stubs/stubs/Sketchup/ExtensionsManager.rb +122 -125
  89. data/lib/sketchup-api-stubs/stubs/Sketchup/Face.rb +1006 -937
  90. data/lib/sketchup-api-stubs/stubs/Sketchup/FrameChangeObserver.rb +102 -102
  91. data/lib/sketchup-api-stubs/stubs/Sketchup/Group.rb +740 -750
  92. data/lib/sketchup-api-stubs/stubs/Sketchup/Http/Request.rb +289 -282
  93. data/lib/sketchup-api-stubs/stubs/Sketchup/Http/Response.rb +64 -62
  94. data/lib/sketchup-api-stubs/stubs/Sketchup/Http.rb +27 -27
  95. data/lib/sketchup-api-stubs/stubs/Sketchup/Image.rb +405 -468
  96. data/lib/sketchup-api-stubs/stubs/Sketchup/ImageRep.rb +266 -266
  97. data/lib/sketchup-api-stubs/stubs/Sketchup/Importer.rb +189 -189
  98. data/lib/sketchup-api-stubs/stubs/Sketchup/InputPoint.rb +432 -406
  99. data/lib/sketchup-api-stubs/stubs/Sketchup/InstanceObserver.rb +84 -84
  100. data/lib/sketchup-api-stubs/stubs/Sketchup/InstancePath.rb +307 -306
  101. data/lib/sketchup-api-stubs/stubs/Sketchup/Layer.rb +332 -326
  102. data/lib/sketchup-api-stubs/stubs/Sketchup/LayerFolder.rb +380 -422
  103. data/lib/sketchup-api-stubs/stubs/Sketchup/Layers.rb +409 -427
  104. data/lib/sketchup-api-stubs/stubs/Sketchup/LayersObserver.rb +241 -249
  105. data/lib/sketchup-api-stubs/stubs/Sketchup/Licensing/ExtensionLicense.rb +86 -86
  106. data/lib/sketchup-api-stubs/stubs/Sketchup/Licensing.rb +55 -48
  107. data/lib/sketchup-api-stubs/stubs/Sketchup/LineStyle.rb +24 -24
  108. data/lib/sketchup-api-stubs/stubs/Sketchup/LineStyles.rb +114 -114
  109. data/lib/sketchup-api-stubs/stubs/Sketchup/LoadHandler.rb +70 -0
  110. data/lib/sketchup-api-stubs/stubs/Sketchup/Loop.rb +137 -137
  111. data/lib/sketchup-api-stubs/stubs/Sketchup/Material.rb +1115 -414
  112. data/lib/sketchup-api-stubs/stubs/Sketchup/Materials.rb +330 -317
  113. data/lib/sketchup-api-stubs/stubs/Sketchup/MaterialsObserver.rb +142 -142
  114. data/lib/sketchup-api-stubs/stubs/Sketchup/Menu.rb +93 -93
  115. data/lib/sketchup-api-stubs/stubs/Sketchup/Model.rb +1714 -1652
  116. data/lib/sketchup-api-stubs/stubs/Sketchup/ModelObserver.rb +372 -357
  117. data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsManager.rb +133 -130
  118. data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsProvider.rb +271 -271
  119. data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsProviderObserver.rb +58 -58
  120. data/lib/sketchup-api-stubs/stubs/Sketchup/Overlay.rb +463 -490
  121. data/lib/sketchup-api-stubs/stubs/Sketchup/OverlaysManager.rb +104 -116
  122. data/lib/sketchup-api-stubs/stubs/Sketchup/Page.rb +939 -797
  123. data/lib/sketchup-api-stubs/stubs/Sketchup/Pages.rb +388 -361
  124. data/lib/sketchup-api-stubs/stubs/Sketchup/PagesObserver.rb +77 -77
  125. data/lib/sketchup-api-stubs/stubs/Sketchup/PickHelper.rb +501 -478
  126. data/lib/sketchup-api-stubs/stubs/Sketchup/RegionalSettings.rb +43 -43
  127. data/lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptions.rb +385 -361
  128. data/lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptionsObserver.rb +45 -45
  129. data/lib/sketchup-api-stubs/stubs/Sketchup/SectionPlane.rb +150 -150
  130. data/lib/sketchup-api-stubs/stubs/Sketchup/Selection.rb +451 -458
  131. data/lib/sketchup-api-stubs/stubs/Sketchup/SelectionObserver.rb +115 -115
  132. data/lib/sketchup-api-stubs/stubs/Sketchup/Set.rb +211 -212
  133. data/lib/sketchup-api-stubs/stubs/Sketchup/ShadowInfo.rb +259 -255
  134. data/lib/sketchup-api-stubs/stubs/Sketchup/ShadowInfoObserver.rb +59 -59
  135. data/lib/sketchup-api-stubs/stubs/Sketchup/Skp.rb +40 -40
  136. data/lib/sketchup-api-stubs/stubs/Sketchup/Snap.rb +125 -0
  137. data/lib/sketchup-api-stubs/stubs/Sketchup/Style.rb +88 -69
  138. data/lib/sketchup-api-stubs/stubs/Sketchup/Styles.rb +263 -217
  139. data/lib/sketchup-api-stubs/stubs/Sketchup/Text.rb +283 -262
  140. data/lib/sketchup-api-stubs/stubs/Sketchup/Texture.rb +199 -217
  141. data/lib/sketchup-api-stubs/stubs/Sketchup/TextureWriter.rb +237 -237
  142. data/lib/sketchup-api-stubs/stubs/Sketchup/Tool.rb +924 -834
  143. data/lib/sketchup-api-stubs/stubs/Sketchup/Tools.rb +132 -132
  144. data/lib/sketchup-api-stubs/stubs/Sketchup/ToolsObserver.rb +156 -156
  145. data/lib/sketchup-api-stubs/stubs/Sketchup/UVHelper.rb +75 -75
  146. data/lib/sketchup-api-stubs/stubs/Sketchup/Vertex.rb +143 -142
  147. data/lib/sketchup-api-stubs/stubs/Sketchup/View.rb +1566 -1311
  148. data/lib/sketchup-api-stubs/stubs/Sketchup/ViewObserver.rb +71 -45
  149. data/lib/sketchup-api-stubs/stubs/Sketchup.rb +1429 -1377
  150. data/lib/sketchup-api-stubs/stubs/SketchupExtension.rb +353 -353
  151. data/lib/sketchup-api-stubs/stubs/String.rb +24 -24
  152. data/lib/sketchup-api-stubs/stubs/UI/Command.rb +399 -389
  153. data/lib/sketchup-api-stubs/stubs/UI/HtmlDialog.rb +580 -494
  154. data/lib/sketchup-api-stubs/stubs/UI/Notification.rb +280 -269
  155. data/lib/sketchup-api-stubs/stubs/UI/Toolbar.rb +258 -241
  156. data/lib/sketchup-api-stubs/stubs/UI/WebDialog.rb +636 -635
  157. data/lib/sketchup-api-stubs/stubs/UI.rb +791 -683
  158. data/lib/sketchup-api-stubs/stubs/_top_level.rb +303 -303
  159. data/lib/sketchup-api-stubs.rb +1 -1
  160. metadata +10 -24
@@ -1,797 +1,939 @@
1
- # Copyright:: Copyright 2023 Trimble Inc.
2
- # License:: The MIT License (MIT)
3
-
4
- # The Page class contains methods to extract information and modify the
5
- # properties of an individual page.
6
- #
7
- # Note that inside the SketchUp user interface pages are called "Scenes".
8
- #
9
- # @version SketchUp 6.0
10
- class Sketchup::Page < Sketchup::Entity
11
-
12
- # Instance Methods
13
-
14
- # The axes method returns the drawing axes for the page.
15
- #
16
- # @example
17
- # page = Sketchup.active_model.pages.add("Example Page")
18
- # xaxis = Geom::Vector3d.new(3, 5, 0)
19
- # yaxis = xaxis * Z_AXIS
20
- # page.axes.set([10,0,0], xaxis, yaxis, Z_AXIS)
21
- #
22
- # @return Axes - the axes for the page.
23
- #
24
- # @version SketchUp 2016
25
- def axes
26
- end
27
-
28
- # The camera method retrieves the camera for a particular page.
29
- #
30
- # @example
31
- # model = Sketchup.active_model
32
- # pages = model.pages
33
- # page = pages.add "My Page"
34
- # camera = page.camera
35
- #
36
- # @return camera - a Camera object if successful, nil if the page
37
- # does not save camera information
38
- #
39
- # @version SketchUp 6.0
40
- def camera
41
- end
42
-
43
- # The delay_time method retrieves the amount of time, in seconds, that a page
44
- # will be displayed before transition to another page during a tour.
45
- #
46
- # The default delay time can be modified in the Model Info > Animation panel
47
- # of the SketchUp User Interface. If this method returns -1, the default
48
- # delay time is used.
49
- #
50
- # @example
51
- # model = Sketchup.active_model
52
- # pages = model.pages
53
- # page = pages.add "My Page"
54
- # time = page.delay_time
55
- #
56
- # @return time - the number of seconds of delay
57
- #
58
- # @version SketchUp 6.0
59
- def delay_time
60
- end
61
-
62
- # The delay_time= method sets the amount of time, in seconds, that a page will
63
- # be displayed before transitioning to another page during a tour. If you set
64
- # the delay for a page to be -1, the default delay time will be used.
65
- #
66
- # The default delay time can be modified in the Model Info > Animation panel
67
- # of the SketchUp User Interface.
68
- #
69
- # @example
70
- # model = Sketchup.active_model
71
- # pages = model.pages
72
- # page = pages.add "My Page"
73
- # time = page.delay_time = 10
74
- #
75
- # @param seconds
76
- # The number of seconds to set as the delay time.
77
- #
78
- # @return time - the number of seconds of delay
79
- #
80
- # @version SketchUp 6.0
81
- def delay_time=(seconds)
82
- end
83
-
84
- # The description method retrieves the description for a page as found in the
85
- # Scenes manager dialog.
86
- #
87
- # @example
88
- # model = Sketchup.active_model
89
- # pages = model.pages
90
- # page = pages.add "My Page"
91
- # description = page.description
92
- #
93
- # @return description - a textual description for the page.
94
- #
95
- # @version SketchUp 6.0
96
- def description
97
- end
98
-
99
- # The description method sets the description for a page as found in the
100
- # Scenes manager dialog.
101
- #
102
- # @example
103
- # model = Sketchup.active_model
104
- # pages = model.pages
105
- # page = pages.add "My Page"
106
- # description = page.description = "This is my first page"
107
- #
108
- # @param description
109
- # A string description for the page.
110
- #
111
- # @return description - the new string description for the page
112
- #
113
- # @version SketchUp 6.0
114
- def description=(description)
115
- end
116
-
117
- # The {#get_drawingelement_visibility} method is used to get the visibility
118
- # of a drawing element on a particular page.
119
- #
120
- # @example
121
- # model = Sketchup.active_model
122
- # entities = model.active_entities
123
- # point1 = Geom::Point3d.new(10,0,0)
124
- # constpoint = entities.add_cpoint(point1)
125
- # pages = model.pages
126
- # page = pages.add("My Page")
127
- # result = page.get_drawingelement_visibility(constpoint)
128
- #
129
- # @param [Sketchup::Drawingelement] element
130
- #
131
- # @return [Boolean] - true if visible, false if not.
132
- #
133
- # @version SketchUp 2020.0
134
- def get_drawingelement_visibility(element)
135
- end
136
-
137
- # The hidden_entities method retrieves all hidden entities within a page.
138
- #
139
- # @example
140
- # model = Sketchup.active_model
141
- # pages = model.pages
142
- # page = pages.add "My Page"
143
- # entities = page.hidden_entities
144
- #
145
- # @return entities - an Entities object containing hidden
146
- # entities on the page.
147
- #
148
- # @version SketchUp 6.0
149
- def hidden_entities
150
- end
151
-
152
- # The {#include_in_animation=} method controls whether the page should be
153
- # included when exporting an animation from the model.
154
- #
155
- # @example Turn off animation for all pages.
156
- # model = Sketchup.active_model
157
- # model.pages.each { |page|
158
- # page.include_in_animation = false
159
- # }
160
- #
161
- # @param [Boolean] include
162
- #
163
- # @return [Sketchup::Page]
164
- #
165
- # @version SketchUp 2018
166
- def include_in_animation=(include)
167
- end
168
-
169
- # The {#include_in_animation?} method determines whether the page should be
170
- # included when exporting an animation from the model.
171
- #
172
- # @example
173
- # model = Sketchup.active_model
174
- # in_animation = model.pages.select { |page| page.include_in_animation? }
175
- #
176
- # @return [Boolean]
177
- #
178
- # @version SketchUp 2018
179
- def include_in_animation?
180
- end
181
-
182
- # The label method retrieves the label for a page from the page tab.
183
- #
184
- # @example
185
- # model = Sketchup.active_model
186
- # pages = model.pages
187
- # page = pages.add "My Page"
188
- # label = page.label
189
- #
190
- # @return label - a string label for the page tab
191
- #
192
- # @version SketchUp 6.0
193
- def label
194
- end
195
-
196
- # The {#layer_folders} method retrieves the hidden layer folders
197
- # associated with a page.
198
- #
199
- # @example
200
- # model = Sketchup.active_model
201
- # pages = model.pages
202
- # page = pages.add("My Page")
203
- # folders = page.layer_folders
204
- #
205
- # @return [Array<Sketchup::LayerFolder>, nil] Returns +nil+ if {#use_hidden_layers?}
206
- # returns +false+
207
- #
208
- # @version SketchUp 2021.0
209
- def layer_folders
210
- end
211
-
212
- # The {#layers} method retrieves layers that don't use their default visibility
213
- # on this page.
214
- #
215
- # @example
216
- # model = Sketchup.active_model
217
- # pages = model.pages
218
- # page = pages.add("My Page")
219
- # layers = page.layers
220
- #
221
- # @example Test layer visibility
222
- # def visible_in_scene?(layer, scene)
223
- # scene.layers.include?(layer) == hidden_by_default?(layer)
224
- # end
225
- #
226
- # def hidden_by_default?(layer)
227
- # layer.page_behavior & LAYER_HIDDEN_BY_DEFAULT == LAYER_HIDDEN_BY_DEFAULT
228
- # end
229
- #
230
- # @return [Array<Sketchup::Layer>, nil] Returns +nil+ if {#use_hidden_layers?}
231
- # returns +false+
232
- #
233
- # @version SketchUp 6.0
234
- def layers
235
- end
236
-
237
- # The name method retrieves the name for a page from the page tab.
238
- #
239
- # @example
240
- # model = Sketchup.active_model
241
- # pages = model.pages
242
- # page = pages.add "My Page"
243
- # name = page.name
244
- #
245
- # @return label - a string name for the page tab
246
- #
247
- # @version SketchUp 6.0
248
- def name
249
- end
250
-
251
- # The name= method sets the name for a page's tab.
252
- #
253
- # @example
254
- # model = Sketchup.active_model
255
- # pages = model.pages
256
- # page = pages.add "My Page"
257
- # name = page.name = "Page Name"
258
- #
259
- # @param name
260
- # The name of the page to be set.
261
- #
262
- # @return name - the name that you have set
263
- #
264
- # @version SketchUp 6.0
265
- def name=(name)
266
- end
267
-
268
- # The rendering_options method retrieves a RenderingOptions object for the
269
- # page.
270
- #
271
- # @example
272
- # model = Sketchup.active_model
273
- # pages = model.pages
274
- # page = pages.add "My Page"
275
- # renderingoptions = page.rendering_options
276
- #
277
- # @return renderingoptions - a RenderingOptions object
278
- #
279
- # @version SketchUp 6.0
280
- def rendering_options
281
- end
282
-
283
- # The {#set_drawingelement_visibility} method is used to change the visibility
284
- # of a drawing element on a particular page. Only drawing elements on the root
285
- # of the model, as well as nested instances of components, groups, and images
286
- # are controlled by Page visibility.
287
- #
288
- # @example
289
- # model = Sketchup.active_model
290
- # entities = model.active_entities
291
- # point1 = Geom::Point3d.new(10, 0, 0)
292
- # constpoint = entities.add_cpoint(point1)
293
- # pages = model.pages
294
- # page = pages.add("My Page")
295
- # page.set_drawingelement_visibility(constpoint, false)
296
- #
297
- # @param [Sketchup::Drawingelement] element
298
- #
299
- # @param [Boolean] visibility
300
- #
301
- # @return [Boolean]
302
- #
303
- # @version SketchUp 2020.0
304
- def set_drawingelement_visibility(element, visibility)
305
- end
306
-
307
- # The {#set_visibility} method sets the visibility for a layer or
308
- # layer folder on a page.
309
- #
310
- # @example
311
- # model = Sketchup.active_model
312
- # pages = model.pages
313
- # page = pages.add("My Page")
314
- # layer = model.layers.add("My Layer")
315
- # page.set_visibility(layer, false)
316
- #
317
- # @overload set_visibility(layer, visible_for_page)
318
- #
319
- # @param [Sketchup::Layer] layer
320
- # @param [Boolean] visible_for_page
321
- #
322
- # @overload set_visibility(layer_folder, visible_for_page)
323
- #
324
- # @version SketchUp 2021.0
325
- # @param [Sketchup::LayerFolder] layer_folder
326
- # @param [Boolean] visible_for_page
327
- #
328
- # @return [Sketchup::Page] the page whose visibility was set.
329
- #
330
- # @version SketchUp 6.0
331
- def set_visibility(arg1, arg2)
332
- end
333
-
334
- # The shadow_info method retrieves the ShadowInfo object for the page.
335
- #
336
- # @example
337
- # model = Sketchup.active_model
338
- # pages = model.pages
339
- # page = pages.add "My Page"
340
- # shadowinfo = page.shadow_info
341
- #
342
- # @return shadowinfo - a ShadowInfo object if successful, nil if
343
- # the page does not save shadow information
344
- #
345
- # @version SketchUp 6.0
346
- def shadow_info
347
- end
348
-
349
- # The style method retrieves the style associated with the page.
350
- #
351
- # @example
352
- # model = Sketchup.active_model
353
- # pages = model.pages
354
- # page = pages.add "My Page"
355
- # style = page.style
356
- #
357
- # @return style - the Style object if successful
358
- #
359
- # @version SketchUp 6.0
360
- def style
361
- end
362
-
363
- # Get the amount of time that it takes to transition to this page during a
364
- # slideshow or animation export. If this value is -1, it means to use the
365
- # default transition time.
366
- #
367
- # @example
368
- # model = Sketchup.active_model
369
- # pages = model.pages
370
- # page = pages.add "My Page"
371
- # time = page.transition_time
372
- #
373
- # @return transitiontime - the amount of time it takes to
374
- # transition to this page during a slideshow or animation
375
- # export.
376
- #
377
- # @version SketchUp 6.0
378
- def transition_time
379
- end
380
-
381
- # The transition_time= method is used to set the transition time.
382
- #
383
- # @example
384
- # model = Sketchup.active_model
385
- # pages = model.pages
386
- # page = pages.add "My Page"
387
- # time = page.transition_time=20
388
- #
389
- # @param trans_time
390
- # The transition time in seconds.
391
- #
392
- # @return transitiontime - the new transition time
393
- #
394
- # @version SketchUp 6.0
395
- def transition_time=(trans_time)
396
- end
397
-
398
- # The {#update} method performs an update on the page properties based on the
399
- # current view that the user has. What properties of the Page get updated are
400
- # controlled via an integer whose bits corresponds to different properties.
401
- # These flags can be used individually or combined using bitwise OR.
402
- #
403
- # PAGE_USE_CAMERA # Camera Location
404
- # PAGE_USE_RENDERING_OPTIONS # Drawing Style
405
- # PAGE_USE_SHADOWINFO # Shadow Setting
406
- # PAGE_USE_SKETCHCS # Axes Location
407
- # PAGE_USE_HIDDEN # Hidden Geometry & Objects (Up 2019 and older)
408
- # PAGE_USE_HIDDEN_GEOMETRY # Hidden Geometry (SU 2020 and later)
409
- # PAGE_USE_HIDDEN_OBJECTS # Hidden Objects (SU 2020 and later)
410
- # PAGE_USE_LAYER_VISIBILITY # Visible Layers
411
- # PAGE_USE_SECTION_PLANES # Active Section Planes
412
- # PAGE_USE_ALL # All possible scene properties
413
- #
414
- # @example
415
- # model = Sketchup.active_model
416
- # pages = model.pages
417
- # page = pages.add "My Page"
418
- # status = page.update
419
- #
420
- # # Updates Camera Location, Shadow Settings and Visible Layers.
421
- # flags = PAGE_USE_CAMERA | PAGE_USE_SHADOWINFO | PAGE_USE_LAYER_VISIBILITY
422
- # status = page.update(flags)
423
- #
424
- # @param [Integer] flags
425
- # The bitwise OR of the bit flags.
426
- #
427
- # @return [Boolean]
428
- #
429
- # @version SketchUp 6.0
430
- def update(flags)
431
- end
432
-
433
- # The use_axes= method sets the page's axes property.
434
- #
435
- # @example
436
- # model = Sketchup.active_model
437
- # pages = model.pages
438
- # page = pages.add "My Page"
439
- # # Set use_axes to false
440
- # status = page.use_axes=false
441
- #
442
- # @param pagesettings
443
- # true if you want your page to save this property, false
444
- # if you do not want your page to save this property.
445
- #
446
- # @return status - true if you are saving the property, false if
447
- # you are not saving the property.
448
- #
449
- # @version SketchUp 6.0
450
- def use_axes=(pagesettings)
451
- end
452
-
453
- # The use_axes? method determines whether you are storing the axes property
454
- # with the page.
455
- #
456
- # @example
457
- # model = Sketchup.active_model
458
- # pages = model.pages
459
- # page = pages.add "My Page"
460
- # status = page.use_axes?
461
- #
462
- # @return [Boolean] status - true if you are storing the this property with
463
- # the page, false if you are not storing this property
464
- # with the page.
465
- #
466
- # @version SketchUp 6.0
467
- def use_axes?
468
- end
469
-
470
- # The use_camera= method sets the page's camera property.
471
- #
472
- # @example
473
- # model = Sketchup.active_model
474
- # pages = model.pages
475
- # page = pages.add "My Page"
476
- # status = page.use_camera = true
477
- #
478
- # @param setting
479
- # true if you want your page to save this property, false
480
- # if you do not want your page to save this property.
481
- #
482
- # @return status - true if you are saving the property, false if
483
- # you are not saving the property.
484
- #
485
- # @version SketchUp 6.0
486
- def use_camera=(setting)
487
- end
488
-
489
- # The use_camera? method determines whether you are storing the camera
490
- # property with the page.
491
- #
492
- # @example
493
- # model = Sketchup.active_model
494
- # pages = model.pages
495
- # page = pages.add "My Page"
496
- # status = page.use_camera?
497
- #
498
- # @return [Boolean] status - true if you are storing the this property with
499
- # the page, false if you are not storing this property
500
- # with the page.
501
- #
502
- # @version SketchUp 6.0
503
- def use_camera?
504
- end
505
-
506
- # The use_hidden= method sets the page's hidden property.
507
- #
508
- # @deprecated The functionality is replaced by {use_hidden_geometry=}
509
- # and {use_hidden_objects=} in SketchUp 2020.1.
510
- #
511
- # @example
512
- # model = Sketchup.active_model
513
- # pages = model.pages
514
- # page = pages.add "My Page"
515
- # status = page.use_hidden = false
516
- #
517
- # @param setting
518
- # true if you want your page to save this property, false
519
- # if you do not want your page to save this property.
520
- #
521
- # @return status - true if you are saving the property, false if
522
- # you are not saving the property.
523
- #
524
- # @see #use_hidden_geometry=
525
- #
526
- # @see #use_hidden_objects=
527
- #
528
- # @version SketchUp 6.0
529
- def use_hidden=(setting)
530
- end
531
-
532
- # The use_hidden? method determines whether you are storing the hidden
533
- # property with the page.
534
- #
535
- # @deprecated The functionality is replaced by {use_hidden_geometry?}
536
- # and {use_hidden_objects?} in SketchUp 2020.1.
537
- #
538
- # @example
539
- # model = Sketchup.active_model
540
- # pages = model.pages
541
- # page = pages.add("My Page")
542
- # status = page.use_hidden?
543
- #
544
- # @return [Boolean] status - true if you are storing the this property with
545
- # the page, false if you are not storing this property
546
- # with the page.
547
- #
548
- # @see #use_hidden_geometry?
549
- #
550
- # @see #use_hidden_objects?
551
- #
552
- # @version SketchUp 6.0
553
- def use_hidden?
554
- end
555
-
556
- # Sets the page's use hidden geometry property.
557
- #
558
- # @example
559
- # model = Sketchup.active_model
560
- # pages = model.pages
561
- # page = pages.add("My Page")
562
- # status = page.use_hidden_geometry = false
563
- #
564
- # @param [Boolean] setting
565
- # `true` if you want your page to save this property,
566
- # `false` if you do not want your page to save this property.
567
- #
568
- # @version SketchUp 2020.1
569
- def use_hidden_geometry=(setting)
570
- end
571
-
572
- # Returns the use hidden geometry property from the page.
573
- #
574
- # @example
575
- # model = Sketchup.active_model
576
- # pages = model.pages
577
- # page = pages.add("My Page")
578
- # status = page.use_hidden_geometry?
579
- #
580
- # @return [Boolean]
581
- #
582
- # @version SketchUp 2020.1
583
- def use_hidden_geometry?
584
- end
585
-
586
- # The use_hidden_layers= method sets the page's hidden layers
587
- # property.
588
- #
589
- # @example
590
- # model = Sketchup.active_model
591
- # pages = model.pages
592
- # page = pages.add "My Page"
593
- # status = page.use_hidden_layers = false
594
- #
595
- # @param setting
596
- # true if you want your page to save this property, false
597
- # if you do not want your page to save this property.
598
- #
599
- # @return status - true if you are saving the property, false if
600
- # you are not saving the property.
601
- #
602
- # @version SketchUp 6.0
603
- def use_hidden_layers=(setting)
604
- end
605
-
606
- # The use_hidden_layers? method determines whether you are storing the hidden
607
- # layers property with the page.
608
- #
609
- # @example
610
- # model = Sketchup.active_model
611
- # pages = model.pages
612
- # page = pages.add "My Page"
613
- # status = page.use_hidden_layers?
614
- #
615
- # @return [Boolean] status - true if you are storing the this property with
616
- # the page, false if you are not storing this property
617
- # with the page.
618
- #
619
- # @version SketchUp 6.0
620
- def use_hidden_layers?
621
- end
622
-
623
- # Sets the page's use hidden objects property.
624
- #
625
- # @example
626
- # model = Sketchup.active_model
627
- # pages = model.pages
628
- # page = pages.add("My Page")
629
- # status = page.use_hidden_objects = false
630
- #
631
- # @param [Boolean] setting
632
- # `true` if you want your page to save this property,
633
- # `false` if you do not want your page to save this property.
634
- #
635
- # @version SketchUp 2020.1
636
- def use_hidden_objects=(setting)
637
- end
638
-
639
- # Returns the use hidden objects property from the page.
640
- #
641
- # @example
642
- # model = Sketchup.active_model
643
- # pages = model.pages
644
- # page = pages.add("My Page")
645
- # status = page.use_hidden_objects?
646
- #
647
- # @return [Boolean]
648
- #
649
- # @version SketchUp 2020.1
650
- def use_hidden_objects?
651
- end
652
-
653
- # The use_rendering_optoins= method sets the page's display
654
- # settings property.
655
- #
656
- # @example
657
- # model = Sketchup.active_model
658
- # pages = model.pages
659
- # page = pages.add "My Page"
660
- # status = page.use_rendering_options = false
661
- #
662
- # @param setting
663
- # true if you want your page to save this property, false
664
- # if you do not want your page to save this property.
665
- #
666
- # @return status - true if you are saving the property, false
667
- # if you are not saving the property.
668
- #
669
- # @version SketchUp 6.0
670
- def use_rendering_options=(setting)
671
- end
672
-
673
- # The use_rendering_options? method determines whether you are storing the
674
- # rendering options property with the page.
675
- #
676
- # @example
677
- # model = Sketchup.active_model
678
- # pages = model.pages
679
- # page = pages.add "My Page"
680
- # status = page.use_rendering_options?
681
- #
682
- # @return [Boolean] status - true if you are storing the this property with
683
- # the page, false if you are not storing this property
684
- # with the page.
685
- #
686
- # @version SketchUp 6.0
687
- def use_rendering_options?
688
- end
689
-
690
- # The use_section_planes= method sets the page's section planes
691
- # property.
692
- #
693
- # @example
694
- # model = Sketchup.active_model
695
- # pages = model.pages
696
- # page = pages.add "My Page"
697
- # status = page.use_section_planes=false
698
- #
699
- # @param setting
700
- # true if you want your page to save this property, false
701
- # if you do not want your page to save this property.
702
- #
703
- # @return status - true if you are saving the property, false if
704
- # you are not saving the property.
705
- #
706
- # @version SketchUp 6.0
707
- def use_section_planes=(setting)
708
- end
709
-
710
- # The use_section_planes? method determines whether you are storing the
711
- # section planes property with the page.
712
- #
713
- # @example
714
- # model = Sketchup.active_model
715
- # pages = model.pages
716
- # page = pages.add "My Page"
717
- # status = page.use_section_planes?
718
- #
719
- # @return [Boolean] status - true if you are storing the this property with
720
- # the page, false if you are not storing this property
721
- # with the page.
722
- #
723
- # @version SketchUp 6.0
724
- def use_section_planes?
725
- end
726
-
727
- # The use_shadow_info= method sets the page's shadow info property.
728
- #
729
- # @example
730
- # model = Sketchup.active_model
731
- # pages = model.pages
732
- # page = pages.add "My Page"
733
- # status = page.use_shadow_info=false
734
- #
735
- # @param setting
736
- # true if you want your page to save this property, false
737
- # if you do not want your page to save this property.
738
- #
739
- # @return status - true if you are saving the property, false if
740
- # you are not saving the property.
741
- #
742
- # @version SketchUp 6.0
743
- def use_shadow_info=(setting)
744
- end
745
-
746
- # The use_shadow_info? method determines whether you are storing the shadow
747
- # info property with the page.
748
- #
749
- # @example
750
- # model = Sketchup.active_model
751
- # pages = model.pages
752
- # page = pages.add "My Page"
753
- # status = page.use_shadow_info?
754
- #
755
- # @return [Boolean] status - true if you are storing the this property with
756
- # the page, false if you are not storing this property
757
- # with the page.
758
- #
759
- # @version SketchUp 6.0
760
- def use_shadow_info?
761
- end
762
-
763
- # The use_style= method sets the style to be used by the page.
764
- #
765
- # @example
766
- # model = Sketchup.active_model
767
- # pages = model.pages
768
- # page = pages.add "My Page"
769
- # style = model.styles[0]
770
- # page.use_style = style
771
- #
772
- # @param style
773
- # The Style object to use.
774
- #
775
- # @return nil
776
- #
777
- # @version SketchUp 6.0
778
- def use_style=(style)
779
- end
780
-
781
- # The use_style? method determines whether storing a style with the page.
782
- #
783
- # @example
784
- # model = Sketchup.active_model
785
- # pages = model.pages
786
- # page = pages.add "My Page"
787
- # use_style = page.use_style?
788
- #
789
- # @return [Boolean] status - true if you are storing the this property with
790
- # the page, false if you are not storing this property
791
- # with the page.
792
- #
793
- # @version SketchUp 6.0
794
- def use_style?
795
- end
796
-
797
- end
1
+ # Copyright:: Copyright 2026 Trimble Inc.
2
+ # License:: The MIT License (MIT)
3
+
4
+ # The Page class contains methods to extract information and modify the properties of
5
+ # an individual page.
6
+ #
7
+ # Note that inside the SketchUp user interface pages are called "Scenes".
8
+ #
9
+ # Since SketchUp 2026.0, modifying the {Sketchup::Axes}, {Sketchup::Camera},
10
+ # {Sketchup::RenderingOptions}, and {Sketchup::ShadowInfo} properties of a page is an undoable
11
+ # operation and should be wrapped between {Sketchup::Model#start_operation} and
12
+ # {Sketchup::Model#commit_operation}.
13
+ # Example:
14
+ # model = Sketchup.active_model
15
+ # pages = model.pages
16
+ # origin = Geom::Point3d.new(10, 0, 0)
17
+ #
18
+ # model.start_operation("Set Page Properties")
19
+ # page = pages.add("My Page")
20
+ # page.axes.set(origin, Y_AXIS, X_AXIS, Z_AXIS)
21
+ # page.camera.fov = 56.78
22
+ # page.shadow_info["City"] = "Brasov, Romania"
23
+ # page.rendering_options["BackgroundColor"] = "Pink"
24
+ # model.commit_operation
25
+ #
26
+ # @version SketchUp 6.0
27
+ class Sketchup::Page < Sketchup::Entity
28
+
29
+ # Instance Methods
30
+
31
+ # The {#active_section_planes} method is used to retrieve the active section
32
+ # plane for the {Sketchup::Page}.
33
+ #
34
+ # @example
35
+ # model = Sketchup.active_model
36
+ # pages = model.pages
37
+ # page = pages.add('My Page')
38
+ # page.active_section_planes
39
+ #
40
+ # @return [Array<Sketchup::SectionPlane>, nil] Returns +nil+ if the page does
41
+ # not use section planes.
42
+ #
43
+ # @version SketchUp 2026.0
44
+ def active_section_planes
45
+ end
46
+
47
+ # The axes method returns the drawing axes for the page.
48
+ #
49
+ # Since SketchUp 2026.0, modifying the axes of a scene is an undoable operation.
50
+ #
51
+ # @example
52
+ # model = Sketchup.active_model
53
+ # page = model.pages.add("Example Page")
54
+ # xaxis = Geom::Vector3d.new(3, 5, 0)
55
+ # yaxis = xaxis * Z_AXIS
56
+ # page.axes.set([10,0,0], xaxis, yaxis, Z_AXIS)
57
+ # page.update(PAGE_USE_ALL)
58
+ # page.axes
59
+ #
60
+ # @return [Sketchup::Axes]
61
+ #
62
+ # @version SketchUp 2016
63
+ def axes
64
+ end
65
+
66
+ # The {#camera} method retrieves the camera for a particular page.
67
+ #
68
+ # Since SketchUp 2026.0, modifying the camera properties of a scene is an undoable operation.
69
+ #
70
+ # @example
71
+ # model = Sketchup.active_model
72
+ # pages = model.pages
73
+ # page = pages.add "My Page"
74
+ # camera = page.camera
75
+ #
76
+ # @return [Sketchup::Camera]
77
+ #
78
+ # @version SketchUp 6.0
79
+ def camera
80
+ end
81
+
82
+ # The delay_time method retrieves the amount of time, in seconds, that a page
83
+ # will be displayed before transition to another page during a tour.
84
+ #
85
+ # The default delay time can be modified in the Model Info > Animation panel
86
+ # of the SketchUp User Interface. If this method returns -1, the default
87
+ # delay time is used.
88
+ #
89
+ # @example
90
+ # model = Sketchup.active_model
91
+ # pages = model.pages
92
+ # page = pages.add "My Page"
93
+ # time = page.delay_time
94
+ #
95
+ # @return time - the number of seconds of delay
96
+ #
97
+ # @version SketchUp 6.0
98
+ def delay_time
99
+ end
100
+
101
+ # The delay_time= method sets the amount of time, in seconds, that a page will
102
+ # be displayed before transitioning to another page during a tour. If you set
103
+ # the delay for a page to be -1, the default delay time will be used.
104
+ #
105
+ # The default delay time can be modified in the Model Info > Animation panel
106
+ # of the SketchUp User Interface.
107
+ #
108
+ # @example
109
+ # model = Sketchup.active_model
110
+ # pages = model.pages
111
+ # page = pages.add "My Page"
112
+ # time = page.delay_time = 10
113
+ #
114
+ # @param seconds
115
+ # The number of seconds to set as the delay time.
116
+ #
117
+ # @return time - the number of seconds of delay
118
+ #
119
+ # @version SketchUp 6.0
120
+ def delay_time=(seconds)
121
+ end
122
+
123
+ # The description method retrieves the description for a page as found in the
124
+ # Scenes manager dialog.
125
+ #
126
+ # @example
127
+ # model = Sketchup.active_model
128
+ # pages = model.pages
129
+ # page = pages.add "My Page"
130
+ # description = page.description
131
+ #
132
+ # @return description - a textual description for the page.
133
+ #
134
+ # @version SketchUp 6.0
135
+ def description
136
+ end
137
+
138
+ # The description method sets the description for a page as found in the
139
+ # Scenes manager dialog.
140
+ #
141
+ # @example
142
+ # model = Sketchup.active_model
143
+ # pages = model.pages
144
+ # page = pages.add "My Page"
145
+ # description = page.description = "This is my first page"
146
+ #
147
+ # @param description
148
+ # A string description for the page.
149
+ #
150
+ # @return description - the new string description for the page
151
+ #
152
+ # @version SketchUp 6.0
153
+ def description=(description)
154
+ end
155
+
156
+ # The {#environment} method is used to retrieve the {Sketchup::Environment}
157
+ # for the scene.
158
+ #
159
+ # @example
160
+ # model = Sketchup.active_model
161
+ # pages = model.pages
162
+ # page = pages.add('My Page')
163
+ # page.environment
164
+ #
165
+ # @return [Sketchup::Environment]
166
+ #
167
+ # @version SketchUp 2025.0
168
+ def environment
169
+ end
170
+
171
+ # The {#environment=} method is used to set the {Sketchup::Environment}
172
+ # for the scene.
173
+ #
174
+ # @example
175
+ # model = Sketchup.active_model
176
+ # pages = model.pages
177
+ # page = pages.add('My Page')
178
+ # path = 'path/to/environment.hdr'
179
+ # environment = model.environments.add('My Environment', path)
180
+ # page.environment = environment
181
+ #
182
+ # @param [Sketchup::Environment] environment
183
+ #
184
+ # @return [Sketchup::Environment]
185
+ #
186
+ # @version SketchUp 2025.0
187
+ def environment=(environment)
188
+ end
189
+
190
+ # The {#get_drawingelement_visibility} method is used to get the visibility
191
+ # of a drawing element on a particular page.
192
+ #
193
+ # @example
194
+ # model = Sketchup.active_model
195
+ # entities = model.active_entities
196
+ # point1 = Geom::Point3d.new(10,0,0)
197
+ # constpoint = entities.add_cpoint(point1)
198
+ # pages = model.pages
199
+ # page = pages.add("My Page")
200
+ # result = page.get_drawingelement_visibility(constpoint)
201
+ #
202
+ # @example
203
+ # # SketchUp 2020.1 is required
204
+ # def element_visible_in_page?(element, page)
205
+ # case element
206
+ # when Sketchup::ComponentInstance, Sketchup::Group
207
+ # return unless page.use_hidden_objects?
208
+ # else
209
+ # return unless page.use_hidden_geometry?
210
+ # return unless element.parent == Sketchup.active_model
211
+ # end
212
+ # page.get_drawingelement_visibility(element)
213
+ # end
214
+ #
215
+ # @param [Sketchup::Drawingelement] element
216
+ #
217
+ # @return [Boolean] - true if visible, false if not.
218
+ #
219
+ # @version SketchUp 2020.0
220
+ def get_drawingelement_visibility(element)
221
+ end
222
+
223
+ # The hidden_entities method retrieves all hidden entities within a page.
224
+ #
225
+ # @example
226
+ # model = Sketchup.active_model
227
+ # pages = model.pages
228
+ # page = pages.add "My Page"
229
+ # entities = page.hidden_entities
230
+ #
231
+ # @return [Array<Sketchup::Drawingelement>] an array of drawing elements that are
232
+ # *hidden* on the page.
233
+ #
234
+ # @version SketchUp 6.0
235
+ def hidden_entities
236
+ end
237
+
238
+ # The {#include_in_animation=} method controls whether the page should be
239
+ # included when exporting an animation from the model.
240
+ #
241
+ # @example Turn off animation for all pages.
242
+ # model = Sketchup.active_model
243
+ # model.pages.each { |page|
244
+ # page.include_in_animation = false
245
+ # }
246
+ #
247
+ # @param [Boolean] include
248
+ #
249
+ # @return [Sketchup::Page]
250
+ #
251
+ # @version SketchUp 2018
252
+ def include_in_animation=(include)
253
+ end
254
+
255
+ # The {#include_in_animation?} method determines whether the page should be
256
+ # included when exporting an animation from the model.
257
+ #
258
+ # @example
259
+ # model = Sketchup.active_model
260
+ # in_animation = model.pages.select { |page| page.include_in_animation? }
261
+ #
262
+ # @return [Boolean]
263
+ #
264
+ # @version SketchUp 2018
265
+ def include_in_animation?
266
+ end
267
+
268
+ # The label method retrieves the label for a page from the page tab.
269
+ #
270
+ # @example
271
+ # model = Sketchup.active_model
272
+ # pages = model.pages
273
+ # page = pages.add "My Page"
274
+ # label = page.label
275
+ #
276
+ # @return label - a string label for the page tab
277
+ #
278
+ # @version SketchUp 6.0
279
+ def label
280
+ end
281
+
282
+ # The {#layer_folders} method retrieves the hidden layer folders
283
+ # associated with a page.
284
+ #
285
+ # @example
286
+ # model = Sketchup.active_model
287
+ # pages = model.pages
288
+ # page = pages.add("My Page")
289
+ # folders = page.layer_folders
290
+ #
291
+ # @return [Array<Sketchup::LayerFolder>, nil] Returns +nil+ if {#use_hidden_layers?}
292
+ # returns +false+
293
+ #
294
+ # @version SketchUp 2021.0
295
+ def layer_folders
296
+ end
297
+
298
+ # The {#layers} method retrieves layers that don't use their default visibility
299
+ # on this page.
300
+ #
301
+ # @example
302
+ # model = Sketchup.active_model
303
+ # pages = model.pages
304
+ # page = pages.add("My Page")
305
+ # layers = page.layers
306
+ #
307
+ # @example Test layer visibility
308
+ # def visible_in_scene?(layer, scene)
309
+ # scene.layers.include?(layer) == hidden_by_default?(layer)
310
+ # end
311
+ #
312
+ # def hidden_by_default?(layer)
313
+ # layer.page_behavior & LAYER_HIDDEN_BY_DEFAULT == LAYER_HIDDEN_BY_DEFAULT
314
+ # end
315
+ #
316
+ # @return [Array<Sketchup::Layer>, nil] Returns +nil+ if {#use_hidden_layers?}
317
+ # returns +false+
318
+ #
319
+ # @version SketchUp 6.0
320
+ def layers
321
+ end
322
+
323
+ # The name method retrieves the name for a page from the page tab.
324
+ #
325
+ # @example
326
+ # model = Sketchup.active_model
327
+ # pages = model.pages
328
+ # page = pages.add "My Page"
329
+ # name = page.name
330
+ #
331
+ # @return label - a string name for the page tab
332
+ #
333
+ # @version SketchUp 6.0
334
+ def name
335
+ end
336
+
337
+ # The {#name=} method sets the name for a page's tab. If the name is already used by another page,
338
+ # a unique name is created.
339
+ #
340
+ # @bug Prior to SketchUp 2026.0 this method did not make the name unique.
341
+ #
342
+ # @example
343
+ # model = Sketchup.active_model
344
+ # pages = model.pages
345
+ # page = pages.add "My Page"
346
+ # name = page.name = "Page Name"
347
+ #
348
+ # @param name
349
+ # The name of the page to be set.
350
+ #
351
+ # @return name - the name that you have set
352
+ #
353
+ # @version SketchUp 6.0
354
+ def name=(name)
355
+ end
356
+
357
+ # The rendering_options method retrieves a RenderingOptions object for the
358
+ # page.
359
+ #
360
+ # Since SketchUp 2026.0, modifying rendering_options of a scene is an undoable operation.
361
+ #
362
+ # @example
363
+ # model = Sketchup.active_model
364
+ # pages = model.pages
365
+ # page = pages.add("My Page")
366
+ # renderingoptions = page.rendering_options
367
+ #
368
+ # @note Most rendering options of a scene are also present in {Sketchup::Style} and are governed by
369
+ # the selected style. Those options should not be changed from the scene.
370
+ # The ones not related to {Sketchup::Style} like fog (+DisplayFog+,
371
+ # +FogColor+) are safe to be changed from the scene.
372
+ #
373
+ # @return [Sketchup::RenderingOptions]
374
+ #
375
+ # @version SketchUp 6.0
376
+ def rendering_options
377
+ end
378
+
379
+ # The {#set_drawingelement_visibility} method is used to change the visibility
380
+ # of a drawing element on a particular page. Only drawing elements on the root
381
+ # of the model, as well as nested instances of components, groups, and images
382
+ # are controlled by Page visibility.
383
+ #
384
+ # @example
385
+ # model = Sketchup.active_model
386
+ # entities = model.active_entities
387
+ # point1 = Geom::Point3d.new(10, 0, 0)
388
+ # constpoint = entities.add_cpoint(point1)
389
+ # pages = model.pages
390
+ # page = pages.add("My Page")
391
+ # page.set_drawingelement_visibility(constpoint, false)
392
+ #
393
+ # @param [Sketchup::Drawingelement] element
394
+ #
395
+ # @param [Boolean] visibility
396
+ #
397
+ # @return [Boolean]
398
+ #
399
+ # @version SketchUp 2020.0
400
+ def set_drawingelement_visibility(element, visibility)
401
+ end
402
+
403
+ # The {#set_visibility} method sets the visibility for a layer or
404
+ # layer folder on a page.
405
+ #
406
+ # @example
407
+ # model = Sketchup.active_model
408
+ # pages = model.pages
409
+ # page = pages.add("My Page")
410
+ # layer = model.layers.add("My Layer")
411
+ # page.set_visibility(layer, false)
412
+ #
413
+ # @overload set_visibility(layer, visible_for_page)
414
+ #
415
+ # @param [Sketchup::Layer] layer
416
+ # @param [Boolean] visible_for_page
417
+ #
418
+ # @overload set_visibility(layer_folder, visible_for_page)
419
+ #
420
+ # @version SketchUp 2021.0
421
+ # @param [Sketchup::LayerFolder] layer_folder
422
+ # @param [Boolean] visible_for_page
423
+ #
424
+ # @return [Sketchup::Page] the page whose visibility was set.
425
+ #
426
+ # @version SketchUp 6.0
427
+ def set_visibility(arg1, arg2)
428
+ end
429
+
430
+ # The {#shadow_info} method retrieves the ShadowInfo object for the page.
431
+ #
432
+ # Since SketchUp 2026.0, modifying shadow_info of a scene is an undoable operation.
433
+ #
434
+ # @example
435
+ # model = Sketchup.active_model
436
+ # pages = model.pages
437
+ # page = pages.add "My Page"
438
+ # shadowinfo = page.shadow_info
439
+ #
440
+ # @note While certain shadow settings, such as those available in the Shadows panel, can be
441
+ # controlled on a per-page basis, global settings like north
442
+ # angle, latitude, and longitude are managed at the model level and are not page-specific.
443
+ #
444
+ # @return [Sketchup::ShadowInfo]
445
+ #
446
+ # @version SketchUp 6.0
447
+ def shadow_info
448
+ end
449
+
450
+ # The style method retrieves the style associated with the page.
451
+ #
452
+ # @example
453
+ # model = Sketchup.active_model
454
+ # pages = model.pages
455
+ # page = pages.add "My Page"
456
+ # style = page.style
457
+ #
458
+ # @return style - the Style object if successful
459
+ #
460
+ # @version SketchUp 6.0
461
+ def style
462
+ end
463
+
464
+ # Get the amount of time that it takes to transition to this page during a
465
+ # slideshow or animation export. If this value is -1, it means to use the
466
+ # default transition time.
467
+ #
468
+ # @example
469
+ # model = Sketchup.active_model
470
+ # pages = model.pages
471
+ # page = pages.add "My Page"
472
+ # time = page.transition_time
473
+ #
474
+ # @return transitiontime - the amount of time it takes to
475
+ # transition to this page during a slideshow or animation
476
+ # export.
477
+ #
478
+ # @version SketchUp 6.0
479
+ def transition_time
480
+ end
481
+
482
+ # The transition_time= method is used to set the transition time.
483
+ #
484
+ # @example
485
+ # model = Sketchup.active_model
486
+ # pages = model.pages
487
+ # page = pages.add "My Page"
488
+ # time = page.transition_time=20
489
+ #
490
+ # @param trans_time
491
+ # The transition time in seconds.
492
+ #
493
+ # @return transitiontime - the new transition time
494
+ #
495
+ # @version SketchUp 6.0
496
+ def transition_time=(trans_time)
497
+ end
498
+
499
+ # The {#update} method performs an update on the page properties based on the
500
+ # current view that the user has. What properties of the Page get updated are
501
+ # controlled via an integer whose bits corresponds to different properties.
502
+ # These flags can be used individually or combined using bitwise OR.
503
+ #
504
+ # PAGE_USE_CAMERA # Camera Location
505
+ # PAGE_USE_RENDERING_OPTIONS # Drawing Style
506
+ # PAGE_USE_SHADOWINFO # Shadow Setting
507
+ # PAGE_USE_SKETCHCS # Axes Location
508
+ # PAGE_USE_HIDDEN # Hidden Geometry & Objects (Up 2019 and older)
509
+ # PAGE_USE_HIDDEN_GEOMETRY # Hidden Geometry (SU 2020 and later)
510
+ # PAGE_USE_HIDDEN_OBJECTS # Hidden Objects (SU 2020 and later)
511
+ # PAGE_USE_LAYER_VISIBILITY # Visible Layers
512
+ # PAGE_USE_SECTION_PLANES # Active Section Planes
513
+ # PAGE_USE_ALL # All possible scene properties
514
+ # PAGE_USE_ENVIRONMENT # Environment settings
515
+ #
516
+ # @example
517
+ # model = Sketchup.active_model
518
+ # pages = model.pages
519
+ # page = pages.add "My Page"
520
+ # status = page.update
521
+ #
522
+ # # Updates Camera Location, Shadow Settings and Visible Layers.
523
+ # flags = PAGE_USE_CAMERA | PAGE_USE_SHADOWINFO | PAGE_USE_LAYER_VISIBILITY
524
+ # status = page.update(flags)
525
+ #
526
+ # @param [Integer] flags
527
+ # The bitwise OR of the bit flags.
528
+ #
529
+ # @return [Boolean]
530
+ #
531
+ # @version SketchUp 6.0
532
+ def update(flags)
533
+ end
534
+
535
+ # The use_axes= method sets the page's axes property.
536
+ #
537
+ # @example
538
+ # model = Sketchup.active_model
539
+ # pages = model.pages
540
+ # page = pages.add "My Page"
541
+ # # Set use_axes to false
542
+ # status = page.use_axes=false
543
+ #
544
+ # @param pagesettings
545
+ # true if you want your page to save this property, false
546
+ # if you do not want your page to save this property.
547
+ #
548
+ # @return status - true if you are saving the property, false if
549
+ # you are not saving the property.
550
+ #
551
+ # @version SketchUp 6.0
552
+ def use_axes=(pagesettings)
553
+ end
554
+
555
+ # The use_axes? method determines whether you are storing the axes property
556
+ # with the page.
557
+ #
558
+ # @example
559
+ # model = Sketchup.active_model
560
+ # pages = model.pages
561
+ # page = pages.add "My Page"
562
+ # status = page.use_axes?
563
+ #
564
+ # @return [Boolean] status - true if you are storing the this property with
565
+ # the page, false if you are not storing this property
566
+ # with the page.
567
+ #
568
+ # @version SketchUp 6.0
569
+ def use_axes?
570
+ end
571
+
572
+ # The use_camera= method sets the page's camera property.
573
+ #
574
+ # @example
575
+ # model = Sketchup.active_model
576
+ # pages = model.pages
577
+ # page = pages.add "My Page"
578
+ # status = page.use_camera = true
579
+ #
580
+ # @param setting
581
+ # true if you want your page to save this property, false
582
+ # if you do not want your page to save this property.
583
+ #
584
+ # @return status - true if you are saving the property, false if
585
+ # you are not saving the property.
586
+ #
587
+ # @version SketchUp 6.0
588
+ def use_camera=(setting)
589
+ end
590
+
591
+ # The use_camera? method determines whether you are storing the camera
592
+ # property with the page.
593
+ #
594
+ # @example
595
+ # model = Sketchup.active_model
596
+ # pages = model.pages
597
+ # page = pages.add "My Page"
598
+ # status = page.use_camera?
599
+ #
600
+ # @return [Boolean] status - true if you are storing the this property with
601
+ # the page, false if you are not storing this property
602
+ # with the page.
603
+ #
604
+ # @version SketchUp 6.0
605
+ def use_camera?
606
+ end
607
+
608
+ # The {#use_environment=} method is used to set if the {Sketchup::Environment}
609
+ # settings are used in the scene.
610
+ #
611
+ # @example
612
+ # model = Sketchup.active_model
613
+ # pages = model.pages
614
+ # page = pages.add('My Page')
615
+ # page.use_environment?
616
+ # # => true
617
+ # page.use_environment = false
618
+ # page.use_environment?
619
+ # # => false
620
+ #
621
+ # @param [Boolean] use_environment
622
+ #
623
+ # @return [Boolean]
624
+ #
625
+ # @version SketchUp 2025.0
626
+ def use_environment=(use_environment)
627
+ end
628
+
629
+ # The {#use_environment?} method is used to determine if the {Sketchup::Environment}
630
+ # settings are used in the scene.
631
+ #
632
+ # @example
633
+ # model = Sketchup.active_model
634
+ # pages = model.pages
635
+ # page = pages.add('My Page')
636
+ # page.use_environment?
637
+ # # => true
638
+ # page.use_environment = false
639
+ # page.use_environment?
640
+ # # => false
641
+ #
642
+ # @return [Boolean]
643
+ #
644
+ # @version SketchUp 2025.0
645
+ def use_environment?
646
+ end
647
+
648
+ # The use_hidden= method sets the page's hidden property.
649
+ #
650
+ # @deprecated The functionality is replaced by {use_hidden_geometry=}
651
+ # and {use_hidden_objects=} in SketchUp 2020.1.
652
+ #
653
+ # @example
654
+ # model = Sketchup.active_model
655
+ # pages = model.pages
656
+ # page = pages.add "My Page"
657
+ # status = page.use_hidden = false
658
+ #
659
+ # @param setting
660
+ # true if you want your page to save this property, false
661
+ # if you do not want your page to save this property.
662
+ #
663
+ # @return status - true if you are saving the property, false if
664
+ # you are not saving the property.
665
+ #
666
+ # @see #use_hidden_geometry=
667
+ #
668
+ # @see #use_hidden_objects=
669
+ #
670
+ # @version SketchUp 6.0
671
+ def use_hidden=(setting)
672
+ end
673
+
674
+ # The use_hidden? method determines whether you are storing the hidden
675
+ # property with the page.
676
+ #
677
+ # @deprecated The functionality is replaced by {use_hidden_geometry?}
678
+ # and {use_hidden_objects?} in SketchUp 2020.1.
679
+ #
680
+ # @example
681
+ # model = Sketchup.active_model
682
+ # pages = model.pages
683
+ # page = pages.add("My Page")
684
+ # status = page.use_hidden?
685
+ #
686
+ # @return [Boolean] status - true if you are storing the this property with
687
+ # the page, false if you are not storing this property
688
+ # with the page.
689
+ #
690
+ # @see #use_hidden_geometry?
691
+ #
692
+ # @see #use_hidden_objects?
693
+ #
694
+ # @version SketchUp 6.0
695
+ def use_hidden?
696
+ end
697
+
698
+ # Sets the page's use hidden geometry property.
699
+ #
700
+ # @example
701
+ # model = Sketchup.active_model
702
+ # pages = model.pages
703
+ # page = pages.add("My Page")
704
+ # status = page.use_hidden_geometry = false
705
+ #
706
+ # @param [Boolean] setting
707
+ # `true` if you want your page to save this property,
708
+ # `false` if you do not want your page to save this property.
709
+ #
710
+ # @version SketchUp 2020.1
711
+ def use_hidden_geometry=(setting)
712
+ end
713
+
714
+ # Returns the use hidden geometry property from the page.
715
+ #
716
+ # @example
717
+ # model = Sketchup.active_model
718
+ # pages = model.pages
719
+ # page = pages.add("My Page")
720
+ # status = page.use_hidden_geometry?
721
+ #
722
+ # @return [Boolean]
723
+ #
724
+ # @version SketchUp 2020.1
725
+ def use_hidden_geometry?
726
+ end
727
+
728
+ # The use_hidden_layers= method sets the page's hidden layers
729
+ # property.
730
+ #
731
+ # @example
732
+ # model = Sketchup.active_model
733
+ # pages = model.pages
734
+ # page = pages.add "My Page"
735
+ # status = page.use_hidden_layers = false
736
+ #
737
+ # @param setting
738
+ # true if you want your page to save this property, false
739
+ # if you do not want your page to save this property.
740
+ #
741
+ # @return status - true if you are saving the property, false if
742
+ # you are not saving the property.
743
+ #
744
+ # @version SketchUp 6.0
745
+ def use_hidden_layers=(setting)
746
+ end
747
+
748
+ # The use_hidden_layers? method determines whether you are storing the hidden
749
+ # layers property with the page.
750
+ #
751
+ # @example
752
+ # model = Sketchup.active_model
753
+ # pages = model.pages
754
+ # page = pages.add "My Page"
755
+ # status = page.use_hidden_layers?
756
+ #
757
+ # @return [Boolean] status - true if you are storing the this property with
758
+ # the page, false if you are not storing this property
759
+ # with the page.
760
+ #
761
+ # @version SketchUp 6.0
762
+ def use_hidden_layers?
763
+ end
764
+
765
+ # Sets the page's use hidden objects property.
766
+ #
767
+ # @example
768
+ # model = Sketchup.active_model
769
+ # pages = model.pages
770
+ # page = pages.add("My Page")
771
+ # status = page.use_hidden_objects = false
772
+ #
773
+ # @param [Boolean] setting
774
+ # `true` if you want your page to save this property,
775
+ # `false` if you do not want your page to save this property.
776
+ #
777
+ # @version SketchUp 2020.1
778
+ def use_hidden_objects=(setting)
779
+ end
780
+
781
+ # Returns the use hidden objects property from the page.
782
+ #
783
+ # @example
784
+ # model = Sketchup.active_model
785
+ # pages = model.pages
786
+ # page = pages.add("My Page")
787
+ # status = page.use_hidden_objects?
788
+ #
789
+ # @return [Boolean]
790
+ #
791
+ # @version SketchUp 2020.1
792
+ def use_hidden_objects?
793
+ end
794
+
795
+ # The use_rendering_optoins= method sets the page's display
796
+ # settings property.
797
+ #
798
+ # @example
799
+ # model = Sketchup.active_model
800
+ # pages = model.pages
801
+ # page = pages.add "My Page"
802
+ # status = page.use_rendering_options = false
803
+ #
804
+ # @param setting
805
+ # true if you want your page to save this property, false
806
+ # if you do not want your page to save this property.
807
+ #
808
+ # @return status - true if you are saving the property, false
809
+ # if you are not saving the property.
810
+ #
811
+ # @version SketchUp 6.0
812
+ def use_rendering_options=(setting)
813
+ end
814
+
815
+ # The use_rendering_options? method determines whether you are storing the
816
+ # rendering options property with the page.
817
+ #
818
+ # @example
819
+ # model = Sketchup.active_model
820
+ # pages = model.pages
821
+ # page = pages.add "My Page"
822
+ # status = page.use_rendering_options?
823
+ #
824
+ # @return [Boolean] status - true if you are storing the this property with
825
+ # the page, false if you are not storing this property
826
+ # with the page.
827
+ #
828
+ # @version SketchUp 6.0
829
+ def use_rendering_options?
830
+ end
831
+
832
+ # The use_section_planes= method sets the page's section planes
833
+ # property.
834
+ #
835
+ # @example
836
+ # model = Sketchup.active_model
837
+ # pages = model.pages
838
+ # page = pages.add "My Page"
839
+ # status = page.use_section_planes=false
840
+ #
841
+ # @param setting
842
+ # true if you want your page to save this property, false
843
+ # if you do not want your page to save this property.
844
+ #
845
+ # @return status - true if you are saving the property, false if
846
+ # you are not saving the property.
847
+ #
848
+ # @version SketchUp 6.0
849
+ def use_section_planes=(setting)
850
+ end
851
+
852
+ # The use_section_planes? method determines whether you are storing the
853
+ # section planes property with the page.
854
+ #
855
+ # @example
856
+ # model = Sketchup.active_model
857
+ # pages = model.pages
858
+ # page = pages.add "My Page"
859
+ # status = page.use_section_planes?
860
+ #
861
+ # @return [Boolean] status - true if you are storing the this property with
862
+ # the page, false if you are not storing this property
863
+ # with the page.
864
+ #
865
+ # @version SketchUp 6.0
866
+ def use_section_planes?
867
+ end
868
+
869
+ # The use_shadow_info= method sets the page's shadow info property.
870
+ #
871
+ # @example
872
+ # model = Sketchup.active_model
873
+ # pages = model.pages
874
+ # page = pages.add "My Page"
875
+ # status = page.use_shadow_info=false
876
+ #
877
+ # @param setting
878
+ # true if you want your page to save this property, false
879
+ # if you do not want your page to save this property.
880
+ #
881
+ # @return status - true if you are saving the property, false if
882
+ # you are not saving the property.
883
+ #
884
+ # @version SketchUp 6.0
885
+ def use_shadow_info=(setting)
886
+ end
887
+
888
+ # The use_shadow_info? method determines whether you are storing the shadow
889
+ # info property with the page.
890
+ #
891
+ # @example
892
+ # model = Sketchup.active_model
893
+ # pages = model.pages
894
+ # page = pages.add "My Page"
895
+ # status = page.use_shadow_info?
896
+ #
897
+ # @return [Boolean] status - true if you are storing the this property with
898
+ # the page, false if you are not storing this property
899
+ # with the page.
900
+ #
901
+ # @version SketchUp 6.0
902
+ def use_shadow_info?
903
+ end
904
+
905
+ # The use_style= method sets the style to be used by the page.
906
+ #
907
+ # @example
908
+ # model = Sketchup.active_model
909
+ # pages = model.pages
910
+ # page = pages.add "My Page"
911
+ # style = model.styles[0]
912
+ # page.use_style = style
913
+ #
914
+ # @param style
915
+ # The Style object to use.
916
+ #
917
+ # @return nil
918
+ #
919
+ # @version SketchUp 6.0
920
+ def use_style=(style)
921
+ end
922
+
923
+ # The use_style? method determines whether storing a style with the page.
924
+ #
925
+ # @example
926
+ # model = Sketchup.active_model
927
+ # pages = model.pages
928
+ # page = pages.add "My Page"
929
+ # use_style = page.use_style?
930
+ #
931
+ # @return [Boolean] status - true if you are storing the this property with
932
+ # the page, false if you are not storing this property
933
+ # with the page.
934
+ #
935
+ # @version SketchUp 6.0
936
+ def use_style?
937
+ end
938
+
939
+ end