sketchup-api-stubs 0.6.1 → 0.7.4

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 (149) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +2 -0
  3. data/lib/sketchup-api-stubs.rb +1 -1
  4. data/lib/sketchup-api-stubs/sketchup.rb +145 -145
  5. data/lib/sketchup-api-stubs/stubs/Geom/BoundingBox.rb +318 -318
  6. data/lib/sketchup-api-stubs/stubs/Geom/Bounds2d.rb +172 -172
  7. data/lib/sketchup-api-stubs/stubs/Geom/LatLong.rb +126 -126
  8. data/lib/sketchup-api-stubs/stubs/Geom/OrientedBounds2d.rb +102 -102
  9. data/lib/sketchup-api-stubs/stubs/Geom/Point2d.rb +400 -401
  10. data/lib/sketchup-api-stubs/stubs/Geom/Point3d.rb +661 -661
  11. data/lib/sketchup-api-stubs/stubs/Geom/PolygonMesh.rb +492 -492
  12. data/lib/sketchup-api-stubs/stubs/Geom/Transformation.rb +478 -478
  13. data/lib/sketchup-api-stubs/stubs/Geom/Transformation2d.rb +263 -263
  14. data/lib/sketchup-api-stubs/stubs/Geom/UTM.rb +141 -141
  15. data/lib/sketchup-api-stubs/stubs/Geom/Vector2d.rb +522 -523
  16. data/lib/sketchup-api-stubs/stubs/Geom/Vector3d.rb +691 -691
  17. data/lib/sketchup-api-stubs/stubs/Layout.rb +25 -25
  18. data/lib/sketchup-api-stubs/stubs/Layout/AngularDimension.rb +573 -569
  19. data/lib/sketchup-api-stubs/stubs/Layout/AutoTextDefinition.rb +411 -411
  20. data/lib/sketchup-api-stubs/stubs/Layout/AutoTextDefinitions.rb +174 -186
  21. data/lib/sketchup-api-stubs/stubs/Layout/ConnectionPoint.rb +70 -70
  22. data/lib/sketchup-api-stubs/stubs/Layout/Document.rb +514 -455
  23. data/lib/sketchup-api-stubs/stubs/Layout/Ellipse.rb +29 -29
  24. data/lib/sketchup-api-stubs/stubs/Layout/Entities.rb +143 -155
  25. data/lib/sketchup-api-stubs/stubs/Layout/Entity.rb +353 -359
  26. data/lib/sketchup-api-stubs/stubs/Layout/FormattedText.rb +349 -349
  27. data/lib/sketchup-api-stubs/stubs/Layout/Grid.rb +311 -123
  28. data/lib/sketchup-api-stubs/stubs/Layout/Group.rb +261 -261
  29. data/lib/sketchup-api-stubs/stubs/Layout/Image.rb +91 -86
  30. data/lib/sketchup-api-stubs/stubs/Layout/Label.rb +371 -371
  31. data/lib/sketchup-api-stubs/stubs/Layout/Layer.rb +218 -218
  32. data/lib/sketchup-api-stubs/stubs/Layout/LayerInstance.rb +128 -128
  33. data/lib/sketchup-api-stubs/stubs/Layout/Layers.rb +220 -232
  34. data/lib/sketchup-api-stubs/stubs/Layout/LinearDimension.rb +567 -563
  35. data/lib/sketchup-api-stubs/stubs/Layout/LockedEntityError.rb +10 -10
  36. data/lib/sketchup-api-stubs/stubs/Layout/LockedLayerError.rb +11 -11
  37. data/lib/sketchup-api-stubs/stubs/Layout/Page.rb +183 -183
  38. data/lib/sketchup-api-stubs/stubs/Layout/PageInfo.rb +387 -387
  39. data/lib/sketchup-api-stubs/stubs/Layout/Pages.rb +204 -216
  40. data/lib/sketchup-api-stubs/stubs/Layout/Path.rb +344 -344
  41. data/lib/sketchup-api-stubs/stubs/Layout/Rectangle.rb +174 -174
  42. data/lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb +694 -547
  43. data/lib/sketchup-api-stubs/stubs/Layout/Style.rb +1519 -1519
  44. data/lib/sketchup-api-stubs/stubs/Layout/Table.rb +290 -290
  45. data/lib/sketchup-api-stubs/stubs/Layout/TableCell.rb +149 -149
  46. data/lib/sketchup-api-stubs/stubs/Layout/TableColumn.rb +139 -139
  47. data/lib/sketchup-api-stubs/stubs/Layout/TableRow.rb +135 -135
  48. data/lib/sketchup-api-stubs/stubs/Sketchup/Animation.rb +140 -140
  49. data/lib/sketchup-api-stubs/stubs/Sketchup/AppObserver.rb +157 -157
  50. data/lib/sketchup-api-stubs/stubs/Sketchup/ArcCurve.rb +209 -209
  51. data/lib/sketchup-api-stubs/stubs/Sketchup/AttributeDictionaries.rb +152 -152
  52. data/lib/sketchup-api-stubs/stubs/Sketchup/AttributeDictionary.rb +281 -281
  53. data/lib/sketchup-api-stubs/stubs/Sketchup/Axes.rb +149 -149
  54. data/lib/sketchup-api-stubs/stubs/Sketchup/Behavior.rb +328 -328
  55. data/lib/sketchup-api-stubs/stubs/Sketchup/Camera.rb +577 -577
  56. data/lib/sketchup-api-stubs/stubs/Sketchup/ClassificationSchema.rb +63 -63
  57. data/lib/sketchup-api-stubs/stubs/Sketchup/Classifications.rb +122 -122
  58. data/lib/sketchup-api-stubs/stubs/Sketchup/Color.rb +281 -281
  59. data/lib/sketchup-api-stubs/stubs/Sketchup/ComponentDefinition.rb +562 -554
  60. data/lib/sketchup-api-stubs/stubs/Sketchup/ComponentInstance.rb +593 -593
  61. data/lib/sketchup-api-stubs/stubs/Sketchup/Console.rb +76 -76
  62. data/lib/sketchup-api-stubs/stubs/Sketchup/ConstructionLine.rb +257 -257
  63. data/lib/sketchup-api-stubs/stubs/Sketchup/ConstructionPoint.rb +32 -32
  64. data/lib/sketchup-api-stubs/stubs/Sketchup/Curve.rb +194 -194
  65. data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionList.rb +329 -329
  66. data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionObserver.rb +72 -72
  67. data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionsObserver.rb +102 -102
  68. data/lib/sketchup-api-stubs/stubs/Sketchup/Dimension.rb +165 -165
  69. data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionLinear.rb +312 -312
  70. data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionObserver.rb +38 -38
  71. data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionRadial.rb +87 -87
  72. data/lib/sketchup-api-stubs/stubs/Sketchup/Drawingelement.rb +390 -390
  73. data/lib/sketchup-api-stubs/stubs/Sketchup/Edge.rb +508 -508
  74. data/lib/sketchup-api-stubs/stubs/Sketchup/EdgeUse.rb +211 -211
  75. data/lib/sketchup-api-stubs/stubs/Sketchup/Entities.rb +1119 -1097
  76. data/lib/sketchup-api-stubs/stubs/Sketchup/EntitiesObserver.rb +125 -125
  77. data/lib/sketchup-api-stubs/stubs/Sketchup/Entity.rb +544 -537
  78. data/lib/sketchup-api-stubs/stubs/Sketchup/EntityObserver.rb +59 -59
  79. data/lib/sketchup-api-stubs/stubs/Sketchup/ExtensionsManager.rb +125 -125
  80. data/lib/sketchup-api-stubs/stubs/Sketchup/Face.rb +750 -750
  81. data/lib/sketchup-api-stubs/stubs/Sketchup/FrameChangeObserver.rb +104 -104
  82. data/lib/sketchup-api-stubs/stubs/Sketchup/Group.rb +697 -697
  83. data/lib/sketchup-api-stubs/stubs/Sketchup/Http.rb +27 -27
  84. data/lib/sketchup-api-stubs/stubs/Sketchup/Http/Request.rb +285 -285
  85. data/lib/sketchup-api-stubs/stubs/Sketchup/Http/Response.rb +62 -62
  86. data/lib/sketchup-api-stubs/stubs/Sketchup/Image.rb +409 -409
  87. data/lib/sketchup-api-stubs/stubs/Sketchup/ImageRep.rb +226 -226
  88. data/lib/sketchup-api-stubs/stubs/Sketchup/Importer.rb +190 -190
  89. data/lib/sketchup-api-stubs/stubs/Sketchup/InputPoint.rb +393 -393
  90. data/lib/sketchup-api-stubs/stubs/Sketchup/InstanceObserver.rb +82 -82
  91. data/lib/sketchup-api-stubs/stubs/Sketchup/InstancePath.rb +303 -303
  92. data/lib/sketchup-api-stubs/stubs/Sketchup/Layer.rb +285 -262
  93. data/lib/sketchup-api-stubs/stubs/Sketchup/Layers.rb +244 -231
  94. data/lib/sketchup-api-stubs/stubs/Sketchup/LayersObserver.rb +136 -136
  95. data/lib/sketchup-api-stubs/stubs/Sketchup/Licensing.rb +48 -48
  96. data/lib/sketchup-api-stubs/stubs/Sketchup/Licensing/ExtensionLicense.rb +86 -86
  97. data/lib/sketchup-api-stubs/stubs/Sketchup/LineStyle.rb +24 -24
  98. data/lib/sketchup-api-stubs/stubs/Sketchup/LineStyles.rb +112 -123
  99. data/lib/sketchup-api-stubs/stubs/Sketchup/Loop.rb +137 -137
  100. data/lib/sketchup-api-stubs/stubs/Sketchup/Material.rb +416 -416
  101. data/lib/sketchup-api-stubs/stubs/Sketchup/Materials.rb +311 -311
  102. data/lib/sketchup-api-stubs/stubs/Sketchup/MaterialsObserver.rb +141 -141
  103. data/lib/sketchup-api-stubs/stubs/Sketchup/Menu.rb +95 -95
  104. data/lib/sketchup-api-stubs/stubs/Sketchup/Model.rb +1638 -1483
  105. data/lib/sketchup-api-stubs/stubs/Sketchup/ModelObserver.rb +356 -356
  106. data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsManager.rb +132 -132
  107. data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsProvider.rb +284 -282
  108. data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsProviderObserver.rb +58 -58
  109. data/lib/sketchup-api-stubs/stubs/Sketchup/Page.rb +770 -650
  110. data/lib/sketchup-api-stubs/stubs/Sketchup/Pages.rb +353 -353
  111. data/lib/sketchup-api-stubs/stubs/Sketchup/PagesObserver.rb +76 -76
  112. data/lib/sketchup-api-stubs/stubs/Sketchup/PickHelper.rb +456 -456
  113. data/lib/sketchup-api-stubs/stubs/Sketchup/RegionalSettings.rb +43 -43
  114. data/lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptions.rb +364 -356
  115. data/lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptionsObserver.rb +44 -44
  116. data/lib/sketchup-api-stubs/stubs/Sketchup/SectionPlane.rb +150 -150
  117. data/lib/sketchup-api-stubs/stubs/Sketchup/Selection.rb +454 -454
  118. data/lib/sketchup-api-stubs/stubs/Sketchup/SelectionObserver.rb +115 -115
  119. data/lib/sketchup-api-stubs/stubs/Sketchup/Set.rb +212 -212
  120. data/lib/sketchup-api-stubs/stubs/Sketchup/ShadowInfo.rb +257 -257
  121. data/lib/sketchup-api-stubs/stubs/Sketchup/ShadowInfoObserver.rb +57 -57
  122. data/lib/sketchup-api-stubs/stubs/Sketchup/Style.rb +69 -69
  123. data/lib/sketchup-api-stubs/stubs/Sketchup/Styles.rb +211 -211
  124. data/lib/sketchup-api-stubs/stubs/Sketchup/Text.rb +262 -262
  125. data/lib/sketchup-api-stubs/stubs/Sketchup/Texture.rb +225 -225
  126. data/lib/sketchup-api-stubs/stubs/Sketchup/TextureWriter.rb +237 -237
  127. data/lib/sketchup-api-stubs/stubs/Sketchup/Tool.rb +829 -829
  128. data/lib/sketchup-api-stubs/stubs/Sketchup/Tools.rb +132 -132
  129. data/lib/sketchup-api-stubs/stubs/Sketchup/ToolsObserver.rb +154 -154
  130. data/lib/sketchup-api-stubs/stubs/Sketchup/UVHelper.rb +61 -61
  131. data/lib/sketchup-api-stubs/stubs/Sketchup/Vertex.rb +142 -142
  132. data/lib/sketchup-api-stubs/stubs/Sketchup/View.rb +1301 -995
  133. data/lib/sketchup-api-stubs/stubs/Sketchup/ViewObserver.rb +43 -43
  134. data/lib/sketchup-api-stubs/stubs/UI/Command.rb +310 -310
  135. data/lib/sketchup-api-stubs/stubs/UI/HtmlDialog.rb +356 -356
  136. data/lib/sketchup-api-stubs/stubs/UI/Notification.rb +229 -229
  137. data/lib/sketchup-api-stubs/stubs/UI/Toolbar.rb +240 -240
  138. data/lib/sketchup-api-stubs/stubs/UI/WebDialog.rb +633 -633
  139. data/lib/sketchup-api-stubs/stubs/_top_level.rb +311 -303
  140. data/lib/sketchup-api-stubs/stubs/array.rb +741 -741
  141. data/lib/sketchup-api-stubs/stubs/geom.rb +348 -233
  142. data/lib/sketchup-api-stubs/stubs/languagehandler.rb +92 -92
  143. data/lib/sketchup-api-stubs/stubs/length.rb +278 -262
  144. data/lib/sketchup-api-stubs/stubs/numeric.rb +249 -249
  145. data/lib/sketchup-api-stubs/stubs/sketchup.rb +1310 -1310
  146. data/lib/sketchup-api-stubs/stubs/sketchupextension.rb +353 -353
  147. data/lib/sketchup-api-stubs/stubs/string.rb +24 -24
  148. data/lib/sketchup-api-stubs/stubs/ui.rb +667 -660
  149. metadata +2 -16
@@ -1,174 +1,174 @@
1
- # Copyright:: Copyright 2019 Trimble Inc.
2
- # License:: The MIT License (MIT)
3
-
4
- # A simple rectangular shape entity.
5
- #
6
- # @version LayOut 2018
7
- class Layout::Rectangle < Layout::Entity
8
-
9
- # Constants
10
-
11
- TYPE_BULGED = nil # Stub value.
12
- TYPE_LOZENGE = nil # Stub value.
13
- TYPE_NORMAL = nil # Stub value.
14
- TYPE_ROUNDED = nil # Stub value.
15
-
16
- # Instance Methods
17
-
18
- # The {#initialize} method creates a new normal, lozenge, bulged or rounded
19
- # {Layout::Rectangle}, depending on the type passed in.
20
- #
21
- # The rectangle type can be one of the following values:
22
- # [+Layout::Rectangle::TYPE_NORMAL+]
23
- # [+Layout::Rectangle::TYPE_ROUNDED+]
24
- # [+Layout::Rectangle::TYPE_LOZENGE+]
25
- # [+Layout::Rectangle::TYPE_BULGED+]
26
- #
27
- # @example
28
- # upper_left = Geom::Point2d.new(1, 1)
29
- # lower_right = Geom::Point2d.new(2, 2)
30
- # bounds = Geom::Bounds2d.new(upper_left, lower_right)
31
- # # Creates a normal rectangle
32
- # rect = Layout::Rectangle.new(bounds)
33
- # rounded_rect = Layout::Rectangle.new_rounded(
34
- # Layout::Rectangle::TYPE_ROUNDED, bounds, radius)
35
- # lozenge_rect = Layout::Rectangle.new_lozenge(
36
- # Layout::Rectangle::TYPE_LOZENGE, bounds)
37
- # bulged_rect = Layout::Rectangle.new_bulged(Layout::Rectangle::TYPE_BULGED,
38
- # bounds, bulge_distance)
39
- #
40
- # @overload initialize(bounds)
41
- #
42
- # @param [Geom::Bounds2d] bounds
43
- # @return [Layout::Rectangle]
44
- #
45
- # @overload initialize(bounds, type)
46
- #
47
- # @param [Geom::Bounds2d] bounds
48
- # @param [Integer] type
49
- # The type of {Layout::Rectangle} to create. Must be
50
- # +Layout::Rectangle::TYPE_NORMAL+ or +Layout::Rectangle::TYPE_LOZENGE+
51
- # @return [Layout::Rectangle]
52
- #
53
- # @overload initialize(bounds, type, radius)
54
- #
55
- # @param [Geom::Bounds2d] bounds
56
- # @param [Integer] type
57
- # The type of {Layout::Rectangle} to create. Must be
58
- # +Layout::Rectangle::TYPE_BULGED+ or +Layout::Rectangle::TYPE_ROUNDED+
59
- # @param [Float] radius
60
- # @return [Layout::Rectangle]
61
- #
62
- # @raise [ArgumentError] if type passed in does not match the number of
63
- # arguments
64
- #
65
- # @raise [ArgumentError] if bounds is zero size
66
- #
67
- # @raise [ArgumentError] if type is not a valid type
68
- #
69
- # @raise [ArgumentError] if radius is a negative value
70
- #
71
- # @version LayOut 2018
72
- def initialize(*args)
73
- end
74
-
75
- # The {#radius} method returns the radius of the {Layout::Rectangle}, or +nil+
76
- # if the {Layout::Rectangle} is not of type +Layout::Rectangle::TYPE_BULGED+ or
77
- # +Layout::Rectangle::TYPE_ROUNDED+
78
- #
79
- # @example
80
- # upper_left = Geom::Point2d.new(1, 1)
81
- # lower_right = Geom::Point2d.new(2, 2)
82
- # bounds = Geom::Bounds2d.new(upper_left, lower_right)
83
- # radius = 0.8
84
- # rect = Layout::Rectangle.new_rounded(bounds, radius)
85
- # # Should equal 0.8
86
- # r = rect.radius
87
- #
88
- # @return [Float, nil]
89
- #
90
- # @version LayOut 2018
91
- def radius
92
- end
93
-
94
- # The {#radius=} method sets the radius of the {Layout::Rectangle}.
95
- #
96
- # @example
97
- # upper_left = Geom::Point2d.new(1, 1)
98
- # lower_right = Geom::Point2d.new(2, 2)
99
- # bounds = Geom::Bounds2d.new(upper_left, lower_right)
100
- # radius = 0.8
101
- # rect = Layout::Rectangle.new_rounded(bounds, radius)
102
- # rect.radius = 0.5
103
- #
104
- # @param [Float] radius
105
- # The new radius value to set
106
- #
107
- # @raise [ArgumentError] if the {Layout::Rectangle} is not of type
108
- # +Layout::Rectangle::TYPE_BULGED+ or +Layout::Rectangle::TYPE_ROUNDED+
109
- #
110
- # @raise [ArgumentError] if radius is negative
111
- #
112
- # @raise [LockedLayerError] if the {Layout::Rectangle} is on a locked
113
- # {Layout::Layer}
114
- #
115
- # @raise [LockedEntityError] if the {Layout::Rectangle} is locked
116
- #
117
- # @version LayOut 2018
118
- def radius=(radius)
119
- end
120
-
121
- # The {#type} method returns the type of the {Layout::Rectangle}.
122
- #
123
- # The type of a rectangle can be one of the following:
124
- # [+Layout::Rectangle::TYPE_NORMAL+]
125
- # [+Layout::Rectangle::TYPE_ROUNDED+]
126
- # [+Layout::Rectangle::TYPE_LOZENGE+]
127
- # [+Layout::Rectangle::TYPE_BULGED+]
128
- #
129
- # @example
130
- # upper_left = Geom::Point2d.new(1, 1)
131
- # lower_right = Geom::Point2d.new(2, 2)
132
- # bounds = Geom::Bounds2d.new(upper_left, lower_right)
133
- # rect = Layout::Rectangle.new(bounds)
134
- # rect_type =rect.type
135
- #
136
- # @return [Integer] integer that corresponds with a rectangle type
137
- #
138
- # @version LayOut 2018
139
- def type
140
- end
141
-
142
- # The {#type=} method sets the type of the {Layout::Rectangle}. If the type is
143
- # set to +Layout::Rectangle::TYPE_ROUNDED+ or +Layout::Rectangle::TYPE_BULGED+,
144
- # the [Layout::Rectangle]'s radius will be set to the default value of 0.25, if
145
- # the value had not previously been set.
146
- #
147
- # The type of a {Layout::Rectangle} can be one of the following:
148
- # [+Layout::Rectangle::TYPE_NORMAL+]
149
- # [+Layout::Rectangle::TYPE_ROUNDED+]
150
- # [+Layout::Rectangle::TYPE_LOZENGE+]
151
- # [+Layout::Rectangle::TYPE_BULGED+]
152
- #
153
- # @example
154
- # upper_left = Geom::Point2d.new(1, 1)
155
- # lower_right = Geom::Point2d.new(2, 2)
156
- # bounds = Geom::Bounds2d.new(upper_left, lower_right)
157
- # rect = Layout::Rectangle.new(bounds)
158
- # rect.type = Layout::Rectangle::TYPE_LOZENGE
159
- #
160
- # @param [Integer] type
161
- # An integer that corresponds with a rectangle type
162
- #
163
- # @raise [LockedLayerError] if the {Layout::Rectangle} is on a locked
164
- # {Layout::Layer}
165
- #
166
- # @raise [LockedEntityError] if the {Layout::Rectangle} is locked
167
- #
168
- # @raise [ArgumentError] if type is not a valid rectangle type
169
- #
170
- # @version LayOut 2018
171
- def type=(type)
172
- end
173
-
174
- end
1
+ # Copyright:: Copyright 2020 Trimble Inc.
2
+ # License:: The MIT License (MIT)
3
+
4
+ # A simple rectangular shape entity.
5
+ #
6
+ # @version LayOut 2018
7
+ class Layout::Rectangle < Layout::Entity
8
+
9
+ # Constants
10
+
11
+ TYPE_BULGED = nil # Stub value.
12
+ TYPE_LOZENGE = nil # Stub value.
13
+ TYPE_NORMAL = nil # Stub value.
14
+ TYPE_ROUNDED = nil # Stub value.
15
+
16
+ # Instance Methods
17
+
18
+ # The {#initialize} method creates a new normal, lozenge, bulged or rounded
19
+ # {Layout::Rectangle}, depending on the type passed in.
20
+ #
21
+ # The rectangle type can be one of the following values:
22
+ # [+Layout::Rectangle::TYPE_NORMAL+]
23
+ # [+Layout::Rectangle::TYPE_ROUNDED+]
24
+ # [+Layout::Rectangle::TYPE_LOZENGE+]
25
+ # [+Layout::Rectangle::TYPE_BULGED+]
26
+ #
27
+ # @example
28
+ # upper_left = Geom::Point2d.new(1, 1)
29
+ # lower_right = Geom::Point2d.new(2, 2)
30
+ # bounds = Geom::Bounds2d.new(upper_left, lower_right)
31
+ # # Creates a normal rectangle
32
+ # rect = Layout::Rectangle.new(bounds)
33
+ # rounded_rect = Layout::Rectangle.new_rounded(
34
+ # Layout::Rectangle::TYPE_ROUNDED, bounds, radius)
35
+ # lozenge_rect = Layout::Rectangle.new_lozenge(
36
+ # Layout::Rectangle::TYPE_LOZENGE, bounds)
37
+ # bulged_rect = Layout::Rectangle.new_bulged(Layout::Rectangle::TYPE_BULGED,
38
+ # bounds, bulge_distance)
39
+ #
40
+ # @overload initialize(bounds)
41
+ #
42
+ # @param [Geom::Bounds2d] bounds
43
+ # @return [Layout::Rectangle]
44
+ #
45
+ # @overload initialize(bounds, type)
46
+ #
47
+ # @param [Geom::Bounds2d] bounds
48
+ # @param [Integer] type
49
+ # The type of {Layout::Rectangle} to create. Must be
50
+ # +Layout::Rectangle::TYPE_NORMAL+ or +Layout::Rectangle::TYPE_LOZENGE+
51
+ # @return [Layout::Rectangle]
52
+ #
53
+ # @overload initialize(bounds, type, radius)
54
+ #
55
+ # @param [Geom::Bounds2d] bounds
56
+ # @param [Integer] type
57
+ # The type of {Layout::Rectangle} to create. Must be
58
+ # +Layout::Rectangle::TYPE_BULGED+ or +Layout::Rectangle::TYPE_ROUNDED+
59
+ # @param [Float] radius
60
+ # @return [Layout::Rectangle]
61
+ #
62
+ # @raise [ArgumentError] if type passed in does not match the number of
63
+ # arguments
64
+ #
65
+ # @raise [ArgumentError] if bounds is zero size
66
+ #
67
+ # @raise [ArgumentError] if type is not a valid type
68
+ #
69
+ # @raise [ArgumentError] if radius is a negative value
70
+ #
71
+ # @version LayOut 2018
72
+ def initialize(*args)
73
+ end
74
+
75
+ # The {#radius} method returns the radius of the {Layout::Rectangle}, or +nil+
76
+ # if the {Layout::Rectangle} is not of type +Layout::Rectangle::TYPE_BULGED+ or
77
+ # +Layout::Rectangle::TYPE_ROUNDED+
78
+ #
79
+ # @example
80
+ # upper_left = Geom::Point2d.new(1, 1)
81
+ # lower_right = Geom::Point2d.new(2, 2)
82
+ # bounds = Geom::Bounds2d.new(upper_left, lower_right)
83
+ # radius = 0.8
84
+ # rect = Layout::Rectangle.new_rounded(bounds, radius)
85
+ # # Should equal 0.8
86
+ # r = rect.radius
87
+ #
88
+ # @return [Float, nil]
89
+ #
90
+ # @version LayOut 2018
91
+ def radius
92
+ end
93
+
94
+ # The {#radius=} method sets the radius of the {Layout::Rectangle}.
95
+ #
96
+ # @example
97
+ # upper_left = Geom::Point2d.new(1, 1)
98
+ # lower_right = Geom::Point2d.new(2, 2)
99
+ # bounds = Geom::Bounds2d.new(upper_left, lower_right)
100
+ # radius = 0.8
101
+ # rect = Layout::Rectangle.new_rounded(bounds, radius)
102
+ # rect.radius = 0.5
103
+ #
104
+ # @param [Float] radius
105
+ # The new radius value to set
106
+ #
107
+ # @raise [ArgumentError] if the {Layout::Rectangle} is not of type
108
+ # +Layout::Rectangle::TYPE_BULGED+ or +Layout::Rectangle::TYPE_ROUNDED+
109
+ #
110
+ # @raise [ArgumentError] if radius is negative
111
+ #
112
+ # @raise [LockedLayerError] if the {Layout::Rectangle} is on a locked
113
+ # {Layout::Layer}
114
+ #
115
+ # @raise [LockedEntityError] if the {Layout::Rectangle} is locked
116
+ #
117
+ # @version LayOut 2018
118
+ def radius=(radius)
119
+ end
120
+
121
+ # The {#type} method returns the type of the {Layout::Rectangle}.
122
+ #
123
+ # The type of a rectangle can be one of the following:
124
+ # [+Layout::Rectangle::TYPE_NORMAL+]
125
+ # [+Layout::Rectangle::TYPE_ROUNDED+]
126
+ # [+Layout::Rectangle::TYPE_LOZENGE+]
127
+ # [+Layout::Rectangle::TYPE_BULGED+]
128
+ #
129
+ # @example
130
+ # upper_left = Geom::Point2d.new(1, 1)
131
+ # lower_right = Geom::Point2d.new(2, 2)
132
+ # bounds = Geom::Bounds2d.new(upper_left, lower_right)
133
+ # rect = Layout::Rectangle.new(bounds)
134
+ # rect_type =rect.type
135
+ #
136
+ # @return [Integer] integer that corresponds with a rectangle type
137
+ #
138
+ # @version LayOut 2018
139
+ def type
140
+ end
141
+
142
+ # The {#type=} method sets the type of the {Layout::Rectangle}. If the type is
143
+ # set to +Layout::Rectangle::TYPE_ROUNDED+ or +Layout::Rectangle::TYPE_BULGED+,
144
+ # the [Layout::Rectangle]'s radius will be set to the default value of 0.25, if
145
+ # the value had not previously been set.
146
+ #
147
+ # The type of a {Layout::Rectangle} can be one of the following:
148
+ # [+Layout::Rectangle::TYPE_NORMAL+]
149
+ # [+Layout::Rectangle::TYPE_ROUNDED+]
150
+ # [+Layout::Rectangle::TYPE_LOZENGE+]
151
+ # [+Layout::Rectangle::TYPE_BULGED+]
152
+ #
153
+ # @example
154
+ # upper_left = Geom::Point2d.new(1, 1)
155
+ # lower_right = Geom::Point2d.new(2, 2)
156
+ # bounds = Geom::Bounds2d.new(upper_left, lower_right)
157
+ # rect = Layout::Rectangle.new(bounds)
158
+ # rect.type = Layout::Rectangle::TYPE_LOZENGE
159
+ #
160
+ # @param [Integer] type
161
+ # An integer that corresponds with a rectangle type
162
+ #
163
+ # @raise [LockedLayerError] if the {Layout::Rectangle} is on a locked
164
+ # {Layout::Layer}
165
+ #
166
+ # @raise [LockedEntityError] if the {Layout::Rectangle} is locked
167
+ #
168
+ # @raise [ArgumentError] if type is not a valid rectangle type
169
+ #
170
+ # @version LayOut 2018
171
+ def type=(type)
172
+ end
173
+
174
+ end
@@ -1,547 +1,694 @@
1
- # Copyright:: Copyright 2019 Trimble Inc.
2
- # License:: The MIT License (MIT)
3
-
4
- # A SketchUp Model entity. This is an instance of a SketchUp Model that is
5
- # inserted into a .layout file. You can change the render mode, line weight,
6
- # and set the current scene for the SketchUp Model with this interface.
7
- #
8
- # @example
9
- # bounds = Geom::Bounds2d.new(1, 1, 3, 3)
10
- # model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
11
- # model.current_scene = 2
12
- # model.view = Layout::SketchUpModel::FRONT_VIEW
13
- # model.render_mode = Layout::SketchUpModel::VECTOR_RENDER
14
- # model.render if model.render_needed?
15
- #
16
- # @version LayOut 2018
17
- class Layout::SketchUpModel < Layout::Entity
18
-
19
- # Constants
20
-
21
- BOTTOM_RELATIVE_VIEW = nil # Stub value.
22
- BOTTOM_VIEW = nil # Stub value.
23
-
24
- BACK_VIEW = nil # Stub value.
25
-
26
- CUSTOM_VIEW = nil # Stub value.
27
-
28
- FRONT_VIEW = nil # Stub value.
29
-
30
- HYBRID_RENDER = nil # Stub value.
31
-
32
- ISO_VIEW = nil # Stub value.
33
-
34
- LEFT_VIEW = nil # Stub value.
35
-
36
- RASTER_RENDER = nil # Stub value.
37
-
38
- RIGHT_VIEW = nil # Stub value.
39
-
40
- TOP_RELATIVE_VIEW = nil # Stub value.
41
- TOP_VIEW = nil # Stub value.
42
-
43
- VECTOR_RENDER = nil # Stub value.
44
-
45
- # Instance Methods
46
-
47
- # The {#clip_mask} method returns the clip mask entity for the
48
- # {Layout::SketchUpModel}, or +nil+ if it does not have one. clip_mask can be a
49
- # {Layout::Rectangle}, {Layout::Ellipse}, or {Layout::Path}.
50
- #
51
- # @example
52
- # bounds = Geom::Bounds2d.new(1, 1, 3, 3)
53
- # model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
54
- # clip_mask = model.clip_mask
55
- #
56
- # @return [Layout::Entity]
57
- #
58
- # @version LayOut 2018
59
- def clip_mask
60
- end
61
-
62
- # The {#clip_mask=} method sets a clip mask for the {Layout::SketchUpModel}.
63
- # clip_mask can be a {Layout::Rectangle}, {Layout::Ellipse}, or {Layout::Path},
64
- # and it must not currently exist in a {Layout::Document}.
65
- #
66
- # @example
67
- # bounds = Geom::Bounds2d.new(1, 1, 3, 3)
68
- # model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
69
- # rect = Layout::Rectangle.new([[2, 2], [3, 3]]);
70
- # model.clip_mask = rect
71
- #
72
- # @param [Layout::Entity] clip_mask
73
- #
74
- # @raise [ArgumentError] if clip_mask is already in a {Layout::Document}
75
- #
76
- # @raise [ArgumentError] if clip_mask is not a {Layout::Rectangle},
77
- # {Layout::Ellipse}, or {Layout::Path}
78
- #
79
- # @raise [LockedLayerError] if the {Layout::SketchUpModel} is on a locked
80
- # {Layout::Layer}
81
- #
82
- # @raise [LockedEntityError] if the {Layout::SketchUpModel} is locked
83
- #
84
- # @version LayOut 2018
85
- def clip_mask=(clip_mask)
86
- end
87
-
88
- # The {#current_scene} method returns the index of the most recently
89
- # selected scene of the {Layout::SketchUpModel}.
90
- #
91
- # @example
92
- # bounds = Geom::Bounds2d.new(1, 1, 3, 3)
93
- # model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
94
- # scene_index = model.current_scene
95
- #
96
- # @raise [ArgumentError] if the most recently selected scene no longer exists
97
- #
98
- # @return [Integer]
99
- #
100
- # @version LayOut 2018
101
- def current_scene
102
- end
103
-
104
- # The {#current_scene=} method sets the scene of the {Layout::SketchUpModel}.
105
- #
106
- # @example
107
- # bounds = Geom::Bounds2d.new(1, 1, 3, 3)
108
- # model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
109
- # model.current_scene = 1
110
- #
111
- # @param [Integer] index
112
- # The index into the list of available scenes.
113
- #
114
- # @raise [IndexError] if index is out of range
115
- #
116
- # @raise [LockedLayerError] if the {Layout::SketchUpModel} is on a locked
117
- # {Layout::Layer}
118
- #
119
- # @raise [LockedEntityError] if the {Layout::SketchUpModel} is locked
120
- #
121
- # @version LayOut 2018
122
- def current_scene=(index)
123
- end
124
-
125
- # The {#current_scene_modified?} method returns whether the most recently
126
- # selected scene of the {Layout::SketchUpModel} has been modified.
127
- #
128
- # @example
129
- # bounds = Geom::Bounds2d.new(1, 1, 3, 3)
130
- # model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
131
- # modified = model.current_scene_modified?
132
- #
133
- # @raise [ArgumentError] if the most recently selected scene no longer exists
134
- #
135
- # @return [Boolean]
136
- #
137
- # @version LayOut 2018
138
- def current_scene_modified?
139
- end
140
-
141
- # The {#dash_scale} method returns the dash scale for the
142
- # {Layout::SketchUpModel}. A scale value of 0.0 means the dashes are scaled
143
- # based on the line weight.
144
- #
145
- # @example
146
- # bounds = Geom::Bounds2d.new(1, 1, 3, 3)
147
- # model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
148
- # dash_scale = model.dash_scale
149
- #
150
- # @return [Float]
151
- #
152
- # @version LayOut 2019
153
- def dash_scale
154
- end
155
-
156
- # The {#dash_scale=} method sets the dash scale for the {Layout::SketchUpModel}.
157
- # A scale value of 0.0 or lower will "auto" scale the dashes based on the line
158
- # weight.
159
- #
160
- # @example
161
- # bounds = Geom::Bounds2d.new(1, 1, 3, 3)
162
- # model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
163
- # model.dash_scale = 2.5
164
- #
165
- # @param [Float] dash_scale
166
- #
167
- # @raise [LockedLayerError] if the {Layout::SketchUpModel} is on a locked
168
- # {Layout::Layer}
169
- #
170
- # @raise [LockedEntityError] if the {Layout::SketchUpModel} is locked
171
- #
172
- # @version LayOut 2018
173
- def dash_scale=(dash_scale)
174
- end
175
-
176
- # The {#display_background=} method sets whether the background is displayed
177
- # for the {Layout::SketchUpModel}.
178
- #
179
- # @example
180
- # bounds = Geom::Bounds2d.new(1, 1, 3, 3)
181
- # model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
182
- # model.display_background = false
183
- #
184
- # @param [Boolean] display
185
- #
186
- # @raise [LockedLayerError] if the {Layout::SketchUpModel} is on a locked
187
- # {Layout::Layer}
188
- #
189
- # @raise [LockedEntityError] if the {Layout::SketchUpModel} is locked
190
- #
191
- # @version LayOut 2018
192
- def display_background=(display)
193
- end
194
-
195
- # The {#display_background?} method returns whether the background is displayed
196
- # for the {Layout::SketchUpModel}.
197
- #
198
- # @example
199
- # bounds = Geom::Bounds2d.new(1, 1, 3, 3)
200
- # model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
201
- # displayed = model.display_background?
202
- #
203
- # @return [Boolean]
204
- #
205
- # @version LayOut 2018
206
- def display_background?
207
- end
208
-
209
- # The {#entities} method returns the {Layout::Group} that represents the
210
- # {Layout::SketchUpModel} in its exploded form. The {Layout::Group} will
211
- # contain a {Layout::Image} for raster and hybrid-rendered models, and
212
- # will contain a {Layout::Group} of LayOut entities for
213
- # vector and hybrid-rendered models.
214
- #
215
- # @example
216
- # bounds = Geom::Bounds2d.new(1, 1, 3, 3)
217
- # model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
218
- # entities = model.entities
219
- #
220
- # @return [Layout::Entity]
221
- #
222
- # @version LayOut 2018
223
- def entities
224
- end
225
-
226
- # The {#initialize} method creates a new {Layout::SketchUpModel}.
227
- #
228
- # @example
229
- # bounds = Geom::Bounds2d.new(1, 1, 3, 3)
230
- # model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
231
- #
232
- # @param [String] path
233
- # The path to a .skp file
234
- #
235
- # @param [Geom::Bounds2d] bounds
236
- #
237
- # @raise [ArgumentError] if path does not point to a valid SketchUp Model file
238
- #
239
- # @raise [ArgumentError] if bounds is zero size
240
- #
241
- # @return [Layout::SketchUpModel]
242
- #
243
- # @version LayOut 2018
244
- def initialize(path, bounds)
245
- end
246
-
247
- # The {#line_weight} method returns the line weight for the
248
- # {Layout::SketchUpModel}.
249
- #
250
- # @example
251
- # bounds = Geom::Bounds2d.new(1, 1, 3, 3)
252
- # model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
253
- # line_weight = model.line_weight
254
- #
255
- # @return [Float]
256
- #
257
- # @version LayOut 2018
258
- def line_weight
259
- end
260
-
261
- # The {#line_weight=} method sets the line weight for the
262
- # {Layout::SketchUpModel}. Line weight must be at least 0.01.
263
- #
264
- # @example
265
- # bounds = Geom::Bounds2d.new(1, 1, 3, 3)
266
- # model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
267
- # model.line_weight = 2.5
268
- #
269
- # @param [Float] line_weight
270
- #
271
- # @raise [ArgumentError] if line_weight is less than 0.01
272
- #
273
- # @raise [LockedLayerError] if the {Layout::SketchUpModel} is on a locked
274
- # {Layout::Layer}
275
- #
276
- # @raise [LockedEntityError] if the {Layout::SketchUpModel} is locked
277
- #
278
- # @version LayOut 2018
279
- def line_weight=(line_weight)
280
- end
281
-
282
- # The {#model_to_paper_point} method converts the {Geom::Point3d} in the
283
- # {Layout::SketchUpModel} to a {Geom::Point2d} in paper space.
284
- #
285
- # @example
286
- # bounds = Geom::Bounds2d.new(1, 1, 3, 3)
287
- # model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
288
- # point_3d = [200, 100, 100]
289
- # point_2d = model.model_to_paper_point(point_3d)
290
- #
291
- # @param [Geom::Point3d] model_point
292
- #
293
- # @return [Geom::Point2d]
294
- #
295
- # @version LayOut 2018
296
- def model_to_paper_point(model_point)
297
- end
298
-
299
- # The {#perspective=} method sets whether the {Layout::SketchUpModel}'s view
300
- # is perspective or orthographic.
301
- #
302
- # @example
303
- # bounds = Geom::Bounds2d.new(1, 1, 3, 3)
304
- # model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
305
- # model.perspective = false
306
- #
307
- # @param [Boolean] perspective
308
- #
309
- # @raise [LockedLayerError] if the {Layout::SketchUpModel} is on a locked
310
- # {Layout::Layer}
311
- #
312
- # @raise [LockedEntityError] if the {Layout::SketchUpModel} is locked
313
- #
314
- # @version LayOut 2018
315
- def perspective=(perspective)
316
- end
317
-
318
- # The {#perspective?} method returns whether the {Layout::SketchUpModel}'s view
319
- # is perspective or orthographic.
320
- #
321
- # @example
322
- # bounds = Geom::Bounds2d.new(1, 1, 3, 3)
323
- # model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
324
- # perspective = model.perspective?
325
- #
326
- # @return [Boolean]
327
- #
328
- # @version LayOut 2018
329
- def perspective?
330
- end
331
-
332
- # The {#preserve_scale_on_resize=} method sets whether the scale is preserved
333
- # when the {Layout::SketchUpModel} is resized.
334
- #
335
- # @example
336
- # bounds = Geom::Bounds2d.new(1, 1, 3, 3)
337
- # model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
338
- # model.preserve_scale_on_resize = true
339
- #
340
- # @param [Boolean] preserve_scale
341
- #
342
- # @raise [LockedLayerError] if the {Layout::SketchUpModel} is on a locked
343
- # {Layout::Layer}
344
- #
345
- # @raise [LockedEntityError] if the {Layout::SketchUpModel} is locked
346
- #
347
- # @version LayOut 2018
348
- def preserve_scale_on_resize=(preserve_scale)
349
- end
350
-
351
- # The {#preserve_scale_on_resize?} method returns whether the scale is
352
- # preserved when the {Layout::SketchUpModel} is resized.
353
- #
354
- # @example
355
- # bounds = Geom::Bounds2d.new(1, 1, 3, 3)
356
- # model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
357
- # will_scale = model.preserve_scale_on_resize?
358
- #
359
- # @return [Boolean]
360
- #
361
- # @version LayOut 2018
362
- def preserve_scale_on_resize?
363
- end
364
-
365
- # The {#render} method renders the {Layout::SketchUpModel}.
366
- #
367
- # @example
368
- # bounds = Geom::Bounds2d.new(1, 1, 3, 3)
369
- # model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
370
- # model.render if model.render_needed?
371
- #
372
- # @raise [LockedLayerError] if the {Layout::SketchUpModel} is on a locked
373
- # {Layout::Layer}
374
- #
375
- # @raise [LockedEntityError] if the {Layout::SketchUpModel} is locked
376
- #
377
- # @version LayOut 2018
378
- def render
379
- end
380
-
381
- # The {#render_mode} method returns the render mode of the
382
- # {Layout::SketchUpModel}.
383
- #
384
- # The render mode can be one of the following:
385
- # [+Layout::SketchUpModel::RASTER_RENDER+]
386
- # [+Layout::SketchUpModel::HYBRID_RENDER+]
387
- # [+Layout::SketchUpModel::VECTOR_RENDER+]
388
- #
389
- # @example
390
- # bounds = Geom::Bounds2d.new(1, 1, 3, 3)
391
- # model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
392
- # render_mode = model.render_mode
393
- #
394
- # @return [Integer]
395
- #
396
- # @version LayOut 2018
397
- def render_mode
398
- end
399
-
400
- # The {#render_mode=} method sets the render mode of the
401
- # {Layout::SketchUpModel}.
402
- #
403
- # The render mode can be one of the following:
404
- # [+Layout::SketchUpModel::RASTER_RENDER+]
405
- # [+Layout::SketchUpModel::HYBRID_RENDER+]
406
- # [+Layout::SketchUpModel::VECTOR_RENDER+]
407
- #
408
- # @example
409
- # bounds = Geom::Bounds2d.new(1, 1, 3, 3)
410
- # model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
411
- # model.render_mode = Layout::SketchUpModel::RASTER_RENDER
412
- #
413
- # @param [Integer] render_mode
414
- #
415
- # @raise [ArgumentError] if render_mode is not a valid render mode
416
- #
417
- # @raise [LockedLayertError] if the {Layout::SketchUpModel} is on a locked
418
- # {Layout::Layer}
419
- #
420
- # @raise [LockedEntityError] if the {Layout::SketchUpModel} is locked
421
- #
422
- # @version LayOut 2018
423
- def render_mode=(render_mode)
424
- end
425
-
426
- # The {#render_needed?} method returns whether the {Layout::SketchUpModel}
427
- # needs to be rendered.
428
- #
429
- # @example
430
- # bounds = Geom::Bounds2d.new(1, 1, 3, 3)
431
- # model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
432
- # model.render if model.render_needed?
433
- #
434
- # @return [Boolean]
435
- #
436
- # @version LayOut 2018
437
- def render_needed?
438
- end
439
-
440
- # The {#scale} method returns the scale of the {Layout::SketchUpModel}.
441
- #
442
- # @example
443
- # bounds = Geom::Bounds2d.new(1, 1, 3, 3)
444
- # model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
445
- # scale = model.scale
446
- #
447
- # @return [Float]
448
- #
449
- # @version LayOut 2018
450
- def scale
451
- end
452
-
453
- # The {#scale=} method sets the scale of the {Layout::SketchUpModel}. Scale
454
- # must be at least 0.0000001, and the view must be orthographic.
455
- #
456
- # @example
457
- # bounds = Geom::Bounds2d.new(1, 1, 3, 3)
458
- # model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
459
- # model.scale = 2.0
460
- #
461
- # @param [Float] scale
462
- #
463
- # @raise [ArgumentError] if the {Layout::SketchUpModel} view is not orthographic
464
- #
465
- # @raise [ArgumentError] if scale is less than 0.0000001
466
- #
467
- # @raise [LockedLayerError] if the {Layout::SketchUpModel} is on a locked
468
- # {Layout::Layer}
469
- #
470
- # @raise [LockedEntityError] if the {Layout::SketchUpModel} is locked
471
- #
472
- # @version LayOut 2018
473
- def scale=(scale)
474
- end
475
-
476
- # The {#scenes} method returns an array of scene names that are available
477
- # for the {Layout::SketchUpModel}. The first scene will always be the default
478
- # scene, called "Last saved SketchUp View".
479
- #
480
- # @example
481
- # bounds = Geom::Bounds2d.new(1, 1, 3, 3)
482
- # model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
483
- # scene_names = model.scenes
484
- #
485
- # @return [Array<String>]
486
- #
487
- # @version LayOut 2018
488
- def scenes
489
- end
490
-
491
- # The {#view} method returns the standard view of the {Layout::SketchUpModel}.
492
- #
493
- # The standard view can be one of the following values:
494
- # [+Layout::SketchUpModel::CUSTOM_VIEW+]
495
- # [+Layout::SketchUpModel::TOP_VIEW+]
496
- # [+Layout::SketchUpModel::TOP_RELATIVE_VIEW+]
497
- # [+Layout::SketchUpModel::BOTTOM_VIEW+]
498
- # [+Layout::SketchUpModel::BOTTOM_RELATIVE_VIEW+]
499
- # [+Layout::SketchUpModel::FRONT_VIEW+]
500
- # [+Layout::SketchUpModel::BACK_VIEW+]
501
- # [+Layout::SketchUpModel::LEFT_VIEW+]
502
- # [+Layout::SketchUpModel::RIGHT_VIEW+]
503
- # [+Layout::SketchUpModel::ISO_VIEW+]
504
- #
505
- # @example
506
- # bounds = Geom::Bounds2d.new(1, 1, 3, 3)
507
- # model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
508
- # view = model.view
509
- #
510
- # @return [Integer]
511
- #
512
- # @version LayOut 2018
513
- def view
514
- end
515
-
516
- # The {#view=} method sets the standard view of the {Layout::SketchUpModel}.
517
- #
518
- # The standard view can be one of the following values:
519
- # [+Layout::SketchUpModel::TOP_VIEW+]
520
- # [+Layout::SketchUpModel::TOP_RELATIVE_VIEW+]
521
- # [+Layout::SketchUpModel::BOTTOM_VIEW+]
522
- # [+Layout::SketchUpModel::BOTTOM_RELATIVE_VIEW+]
523
- # [+Layout::SketchUpModel::FRONT_VIEW+]
524
- # [+Layout::SketchUpModel::BACK_VIEW+]
525
- # [+Layout::SketchUpModel::LEFT_VIEW+]
526
- # [+Layout::SketchUpModel::RIGHT_VIEW+]
527
- # [+Layout::SketchUpModel::ISO_VIEW+]
528
- #
529
- # @example
530
- # bounds = Geom::Bounds2d.new(1, 1, 3, 3)
531
- # model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
532
- # model.view = Layout::SketchUpModel::FRONT_VIEW
533
- #
534
- # @param [Integer] view
535
- #
536
- # @raise [ArgumentError] if view is not a valid standard view
537
- #
538
- # @raise [LockedLayerError] if the {Layout::SketchUpModel} is on a locked
539
- # {Layout::Layer}
540
- #
541
- # @raise [LockedEntityError] if the {Layout::SketchUpModel} is locked
542
- #
543
- # @version LayOut 2018
544
- def view=(view)
545
- end
546
-
547
- end
1
+ # Copyright:: Copyright 2020 Trimble Inc.
2
+ # License:: The MIT License (MIT)
3
+
4
+ # A SketchUp Model entity. This is an instance of a SketchUp Model that is
5
+ # inserted into a .layout file. You can change the render mode, line weight,
6
+ # and set the current scene for the SketchUp Model with this interface.
7
+ #
8
+ # @example
9
+ # bounds = Geom::Bounds2d.new(1, 1, 3, 3)
10
+ # model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
11
+ # model.current_scene = 2
12
+ # model.view = Layout::SketchUpModel::FRONT_VIEW
13
+ # model.render_mode = Layout::SketchUpModel::VECTOR_RENDER
14
+ # model.render if model.render_needed?
15
+ #
16
+ # @version LayOut 2018
17
+ class Layout::SketchUpModel < Layout::Entity
18
+
19
+ # Constants
20
+
21
+ BOTTOM_RELATIVE_VIEW = nil # Stub value.
22
+ BOTTOM_VIEW = nil # Stub value.
23
+
24
+ BACK_VIEW = nil # Stub value.
25
+
26
+ CUSTOM_VIEW = nil # Stub value.
27
+
28
+ FRONT_VIEW = nil # Stub value.
29
+
30
+ HYBRID_RENDER = nil # Stub value.
31
+
32
+ ISO_VIEW = nil # Stub value.
33
+
34
+ LEFT_VIEW = nil # Stub value.
35
+
36
+ RASTER_RENDER = nil # Stub value.
37
+
38
+ RIGHT_VIEW = nil # Stub value.
39
+
40
+ TOP_RELATIVE_VIEW = nil # Stub value.
41
+ TOP_VIEW = nil # Stub value.
42
+
43
+ VECTOR_RENDER = nil # Stub value.
44
+
45
+ # Instance Methods
46
+
47
+ # The {#camera_modified?} method returns whether the camera of the
48
+ # {Layout::SketchUpModel} has been modified.
49
+ #
50
+ # @example
51
+ # bounds = Geom::Bounds2d.new(1, 1, 3, 3)
52
+ # model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
53
+ # modified = model.camera_modified?
54
+ #
55
+ # @return [Boolean]
56
+ #
57
+ # @version LayOut 2020.1
58
+ def camera_modified?
59
+ end
60
+
61
+ # The {#clip_mask} method returns the clip mask entity for the
62
+ # {Layout::SketchUpModel}, or +nil+ if it does not have one. clip_mask can be a
63
+ # {Layout::Rectangle}, {Layout::Ellipse}, or {Layout::Path}.
64
+ #
65
+ # @example
66
+ # bounds = Geom::Bounds2d.new(1, 1, 3, 3)
67
+ # model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
68
+ # clip_mask = model.clip_mask
69
+ #
70
+ # @return [Layout::Entity]
71
+ #
72
+ # @version LayOut 2018
73
+ def clip_mask
74
+ end
75
+
76
+ # The {#clip_mask=} method sets a clip mask for the {Layout::SketchUpModel}.
77
+ # clip_mask can be a {Layout::Rectangle}, {Layout::Ellipse}, or {Layout::Path},
78
+ # or +nil+, and it must not currently exist in a {Layout::Document},
79
+ # or {Layout::Group}.
80
+ #
81
+ # @example
82
+ # bounds = Geom::Bounds2d.new(1, 1, 3, 3)
83
+ # model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
84
+ # rect = Layout::Rectangle.new([[2, 2], [3, 3]]);
85
+ # model.clip_mask = rect
86
+ #
87
+ # @note +clip_mask+ may be +nil+ as of LayOut 2020.1.
88
+ #
89
+ # @param [Layout::Entity, nil] clip_mask
90
+ # The clip mask can be a {Layout::Path},
91
+ # {Layout::Rectangle}, {Layout::Ellipse}, or +nil+.
92
+ #
93
+ # @raise [ArgumentError] if clip_mask is already in a {Layout::Document} or
94
+ # {Layout::Group}
95
+ #
96
+ # @raise [ArgumentError] if clip_mask is not a {Layout::Rectangle},
97
+ # {Layout::Ellipse}, or {Layout::Path}
98
+ #
99
+ # @raise [LockedLayerError] if the {Layout::SketchUpModel} is on a locked
100
+ # {Layout::Layer}
101
+ #
102
+ # @raise [LockedEntityError] if the {Layout::SketchUpModel} is locked
103
+ #
104
+ # @version LayOut 2018
105
+ def clip_mask=(clip_mask)
106
+ end
107
+
108
+ # The {#current_scene} method returns the index of the most recently
109
+ # selected scene of the {Layout::SketchUpModel}.
110
+ #
111
+ # @example
112
+ # bounds = Geom::Bounds2d.new(1, 1, 3, 3)
113
+ # model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
114
+ # scene_index = model.current_scene
115
+ #
116
+ # @raise [ArgumentError] if the most recently selected scene no longer exists
117
+ #
118
+ # @return [Integer]
119
+ #
120
+ # @version LayOut 2018
121
+ def current_scene
122
+ end
123
+
124
+ # The {#current_scene=} method sets the scene of the {Layout::SketchUpModel}.
125
+ #
126
+ # @example
127
+ # bounds = Geom::Bounds2d.new(1, 1, 3, 3)
128
+ # model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
129
+ # model.current_scene = 1
130
+ #
131
+ # @note LayOut automatically adds the scene "Last Saved SketchUp View" to each
132
+ # {Layout::SketchUpModel}. This means that the {Sketchup::Model}'s scenes
133
+ # start with index 1.
134
+ #
135
+ # @param [Integer] index
136
+ # The index into the list of available scenes.
137
+ #
138
+ # @raise [IndexError] if index is out of range
139
+ #
140
+ # @raise [LockedLayerError] if the {Layout::SketchUpModel} is on a locked
141
+ # {Layout::Layer}
142
+ #
143
+ # @raise [LockedEntityError] if the {Layout::SketchUpModel} is locked
144
+ #
145
+ # @version LayOut 2018
146
+ def current_scene=(index)
147
+ end
148
+
149
+ # The {#current_scene_modified?} method returns whether the most recently
150
+ # selected scene of the {Layout::SketchUpModel} has been modified.
151
+ #
152
+ # @example
153
+ # bounds = Geom::Bounds2d.new(1, 1, 3, 3)
154
+ # model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
155
+ # modified = model.current_scene_modified?
156
+ #
157
+ # @raise [ArgumentError] if the most recently selected scene no longer exists
158
+ #
159
+ # @return [Boolean]
160
+ #
161
+ # @version LayOut 2018
162
+ def current_scene_modified?
163
+ end
164
+
165
+ # The {#dash_scale} method returns the dash scale for the
166
+ # {Layout::SketchUpModel}. A scale value of 0.0 means the dashes are scaled
167
+ # based on the line weight.
168
+ #
169
+ # @example
170
+ # bounds = Geom::Bounds2d.new(1, 1, 3, 3)
171
+ # model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
172
+ # dash_scale = model.dash_scale
173
+ #
174
+ # @return [Float]
175
+ #
176
+ # @version LayOut 2019
177
+ def dash_scale
178
+ end
179
+
180
+ # The {#dash_scale=} method sets the dash scale for the {Layout::SketchUpModel}.
181
+ # A scale value of 0.0 or lower will "auto" scale the dashes based on the line
182
+ # weight.
183
+ #
184
+ # @example
185
+ # bounds = Geom::Bounds2d.new(1, 1, 3, 3)
186
+ # model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
187
+ # model.dash_scale = 2.5
188
+ #
189
+ # @param [Float] dash_scale
190
+ #
191
+ # @raise [LockedLayerError] if the {Layout::SketchUpModel} is on a locked
192
+ # {Layout::Layer}
193
+ #
194
+ # @raise [LockedEntityError] if the {Layout::SketchUpModel} is locked
195
+ #
196
+ # @version LayOut 2018
197
+ def dash_scale=(dash_scale)
198
+ end
199
+
200
+ # The {#display_background=} method sets whether the background is displayed
201
+ # for the {Layout::SketchUpModel}.
202
+ #
203
+ # @example
204
+ # bounds = Geom::Bounds2d.new(1, 1, 3, 3)
205
+ # model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
206
+ # model.display_background = false
207
+ #
208
+ # @param [Boolean] display
209
+ #
210
+ # @raise [LockedLayerError] if the {Layout::SketchUpModel} is on a locked
211
+ # {Layout::Layer}
212
+ #
213
+ # @raise [LockedEntityError] if the {Layout::SketchUpModel} is locked
214
+ #
215
+ # @version LayOut 2018
216
+ def display_background=(display)
217
+ end
218
+
219
+ # The {#display_background?} method returns whether the background is displayed
220
+ # for the {Layout::SketchUpModel}.
221
+ #
222
+ # @example
223
+ # bounds = Geom::Bounds2d.new(1, 1, 3, 3)
224
+ # model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
225
+ # displayed = model.display_background?
226
+ #
227
+ # @return [Boolean]
228
+ #
229
+ # @version LayOut 2018
230
+ def display_background?
231
+ end
232
+
233
+ # The {#effects_modified?} method returns whether the shadow or fog settings
234
+ # of the {Layout::SketchUpModel} have been modified.
235
+ #
236
+ # @example
237
+ # bounds = Geom::Bounds2d.new(1, 1, 3, 3)
238
+ # model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
239
+ # modified = model.effects_modified?
240
+ #
241
+ # @return [Boolean]
242
+ #
243
+ # @version LayOut 2020.1
244
+ def effects_modified?
245
+ end
246
+
247
+ # The {#entities} method returns the {Layout::Group} that represents the
248
+ # {Layout::SketchUpModel} in its exploded form. The {Layout::Group} will
249
+ # contain a {Layout::Image} for raster and hybrid-rendered models, and
250
+ # will contain a {Layout::Group} of LayOut entities for
251
+ # vector and hybrid-rendered models.
252
+ #
253
+ # @example
254
+ # bounds = Geom::Bounds2d.new(1, 1, 3, 3)
255
+ # model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
256
+ # entities = model.entities
257
+ #
258
+ # @return [Layout::Entity]
259
+ #
260
+ # @version LayOut 2018
261
+ def entities
262
+ end
263
+
264
+ # The {#initialize} method creates a new {Layout::SketchUpModel}.
265
+ #
266
+ # @example
267
+ # bounds = Geom::Bounds2d.new(1, 1, 3, 3)
268
+ # model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
269
+ #
270
+ # @param [String] path
271
+ # The path to a .skp file
272
+ #
273
+ # @param [Geom::Bounds2d] bounds
274
+ #
275
+ # @raise [ArgumentError] if path does not point to a valid SketchUp Model file
276
+ #
277
+ # @raise [ArgumentError] if bounds is zero size
278
+ #
279
+ # @return [Layout::SketchUpModel]
280
+ #
281
+ # @version LayOut 2018
282
+ def initialize(path, bounds)
283
+ end
284
+
285
+ # The {#layers_modified?} method returns whether the layers of the
286
+ # {Layout::SketchUpModel} has been modified.
287
+ #
288
+ #
289
+ # @note: In SketchUp 2020, SketchUp "layers" were renamed to "tags". For
290
+ # consistency with the SketchUp API, this will continue to refer to
291
+ # "tags" as "layers".
292
+ #
293
+ # @example
294
+ # bounds = Geom::Bounds2d.new(1, 1, 3, 3)
295
+ # model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
296
+ # modified = model.layers_modified?
297
+ #
298
+ # @return [Boolean]
299
+ #
300
+ # @version LayOut 2020.1
301
+ def layers_modified?
302
+ end
303
+
304
+ # The {#line_weight} method returns the line weight for the
305
+ # {Layout::SketchUpModel}.
306
+ #
307
+ # @example
308
+ # bounds = Geom::Bounds2d.new(1, 1, 3, 3)
309
+ # model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
310
+ # line_weight = model.line_weight
311
+ #
312
+ # @return [Float]
313
+ #
314
+ # @version LayOut 2018
315
+ def line_weight
316
+ end
317
+
318
+ # The {#line_weight=} method sets the line weight for the
319
+ # {Layout::SketchUpModel}. Line weight must be at least 0.01.
320
+ #
321
+ # @example
322
+ # bounds = Geom::Bounds2d.new(1, 1, 3, 3)
323
+ # model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
324
+ # model.line_weight = 2.5
325
+ #
326
+ # @param [Float] line_weight
327
+ #
328
+ # @raise [ArgumentError] if line_weight is less than 0.01
329
+ #
330
+ # @raise [LockedLayerError] if the {Layout::SketchUpModel} is on a locked
331
+ # {Layout::Layer}
332
+ #
333
+ # @raise [LockedEntityError] if the {Layout::SketchUpModel} is locked
334
+ #
335
+ # @version LayOut 2018
336
+ def line_weight=(line_weight)
337
+ end
338
+
339
+ # The {#model_to_paper_point} method converts the {Geom::Point3d} in the
340
+ # {Layout::SketchUpModel} to a {Geom::Point2d} in paper space.
341
+ #
342
+ # @example
343
+ # bounds = Geom::Bounds2d.new(1, 1, 3, 3)
344
+ # model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
345
+ # point_3d = [200, 100, 100]
346
+ # point_2d = model.model_to_paper_point(point_3d)
347
+ #
348
+ # @param [Geom::Point3d] model_point
349
+ #
350
+ # @return [Geom::Point2d]
351
+ #
352
+ # @version LayOut 2018
353
+ def model_to_paper_point(model_point)
354
+ end
355
+
356
+ # The {#perspective=} method sets whether the {Layout::SketchUpModel}'s view
357
+ # is perspective or orthographic.
358
+ #
359
+ # @example
360
+ # bounds = Geom::Bounds2d.new(1, 1, 3, 3)
361
+ # model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
362
+ # model.perspective = false
363
+ #
364
+ # @param [Boolean] perspective
365
+ #
366
+ # @raise [LockedLayerError] if the {Layout::SketchUpModel} is on a locked
367
+ # {Layout::Layer}
368
+ #
369
+ # @raise [LockedEntityError] if the {Layout::SketchUpModel} is locked
370
+ #
371
+ # @version LayOut 2018
372
+ def perspective=(perspective)
373
+ end
374
+
375
+ # The {#perspective?} method returns whether the {Layout::SketchUpModel}'s view
376
+ # is perspective or orthographic.
377
+ #
378
+ # @example
379
+ # bounds = Geom::Bounds2d.new(1, 1, 3, 3)
380
+ # model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
381
+ # perspective = model.perspective?
382
+ #
383
+ # @return [Boolean]
384
+ #
385
+ # @version LayOut 2018
386
+ def perspective?
387
+ end
388
+
389
+ # The {#preserve_scale_on_resize=} method sets whether the scale is preserved
390
+ # when the {Layout::SketchUpModel} is resized.
391
+ #
392
+ # @example
393
+ # bounds = Geom::Bounds2d.new(1, 1, 3, 3)
394
+ # model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
395
+ # model.preserve_scale_on_resize = true
396
+ #
397
+ # @param [Boolean] preserve_scale
398
+ #
399
+ # @raise [LockedLayerError] if the {Layout::SketchUpModel} is on a locked
400
+ # {Layout::Layer}
401
+ #
402
+ # @raise [LockedEntityError] if the {Layout::SketchUpModel} is locked
403
+ #
404
+ # @version LayOut 2018
405
+ def preserve_scale_on_resize=(preserve_scale)
406
+ end
407
+
408
+ # The {#preserve_scale_on_resize?} method returns whether the scale is
409
+ # preserved when the {Layout::SketchUpModel} is resized.
410
+ #
411
+ # @example
412
+ # bounds = Geom::Bounds2d.new(1, 1, 3, 3)
413
+ # model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
414
+ # will_scale = model.preserve_scale_on_resize?
415
+ #
416
+ # @return [Boolean]
417
+ #
418
+ # @version LayOut 2018
419
+ def preserve_scale_on_resize?
420
+ end
421
+
422
+ # The {#render} method renders the {Layout::SketchUpModel}. If the model
423
+ # belongs to a {Layout::Document}, then the render will be performed at the
424
+ # quality set in document.page_info (see {Layout::Document} and
425
+ # {Layout::PageInfo}). Otherwise, the render will be performed at Low quality.
426
+ #
427
+ # @example
428
+ # bounds = Geom::Bounds2d.new(1, 1, 3, 3)
429
+ # model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
430
+ # model.render if model.render_needed?
431
+ #
432
+ # @raise [LockedLayerError] if the {Layout::SketchUpModel} is on a locked
433
+ # {Layout::Layer}
434
+ #
435
+ # @raise [LockedEntityError] if the {Layout::SketchUpModel} is locked
436
+ #
437
+ # @version LayOut 2018
438
+ def render
439
+ end
440
+
441
+ # The {#render_mode} method returns the render mode of the
442
+ # {Layout::SketchUpModel}.
443
+ #
444
+ # The render mode can be one of the following:
445
+ # [+Layout::SketchUpModel::RASTER_RENDER+]
446
+ # [+Layout::SketchUpModel::HYBRID_RENDER+]
447
+ # [+Layout::SketchUpModel::VECTOR_RENDER+]
448
+ #
449
+ # @example
450
+ # bounds = Geom::Bounds2d.new(1, 1, 3, 3)
451
+ # model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
452
+ # render_mode = model.render_mode
453
+ #
454
+ # @return [Integer]
455
+ #
456
+ # @version LayOut 2018
457
+ def render_mode
458
+ end
459
+
460
+ # The {#render_mode=} method sets the render mode of the
461
+ # {Layout::SketchUpModel}.
462
+ #
463
+ # The render mode can be one of the following:
464
+ # [+Layout::SketchUpModel::RASTER_RENDER+]
465
+ # [+Layout::SketchUpModel::HYBRID_RENDER+]
466
+ # [+Layout::SketchUpModel::VECTOR_RENDER+]
467
+ #
468
+ # @example
469
+ # bounds = Geom::Bounds2d.new(1, 1, 3, 3)
470
+ # model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
471
+ # model.render_mode = Layout::SketchUpModel::RASTER_RENDER
472
+ #
473
+ # @param [Integer] render_mode
474
+ #
475
+ # @raise [ArgumentError] if render_mode is not a valid render mode
476
+ #
477
+ # @raise [LockedLayertError] if the {Layout::SketchUpModel} is on a locked
478
+ # {Layout::Layer}
479
+ #
480
+ # @raise [LockedEntityError] if the {Layout::SketchUpModel} is locked
481
+ #
482
+ # @version LayOut 2018
483
+ def render_mode=(render_mode)
484
+ end
485
+
486
+ # The {#render_needed?} method returns whether the {Layout::SketchUpModel}
487
+ # needs to be rendered.
488
+ #
489
+ # @example
490
+ # bounds = Geom::Bounds2d.new(1, 1, 3, 3)
491
+ # model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
492
+ # model.render if model.render_needed?
493
+ #
494
+ # @return [Boolean]
495
+ #
496
+ # @version LayOut 2018
497
+ def render_needed?
498
+ end
499
+
500
+ # The {#reset_camera} method resets the {Layout::SketchUpModel}'s camera to
501
+ # the scene's setting.
502
+ #
503
+ # @example
504
+ # bounds = Geom::Bounds2d.new(1, 1, 3, 3)
505
+ # model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
506
+ # model.reset_camera if model.camera_modified?
507
+ #
508
+ # @raise [LockedLayerError] if the {Layout::SketchUpModel} is on a locked
509
+ # {Layout::Layer}
510
+ #
511
+ # @raise [LockedEntityError] if the {Layout::SketchUpModel} is locked
512
+ #
513
+ # @version LayOut 2020.1
514
+ def reset_camera
515
+ end
516
+
517
+ # The {#reset_effects} method resets the {Layout::SketchUpModel}'s shadow and
518
+ # fog settings to the scene's settings.
519
+ #
520
+ # @example
521
+ # bounds = Geom::Bounds2d.new(1, 1, 3, 3)
522
+ # model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
523
+ # model.reset_effects if model.effects_modified?
524
+ #
525
+ # @raise [LockedLayerError] if the {Layout::SketchUpModel} is on a locked
526
+ # {Layout::Layer}
527
+ #
528
+ # @raise [LockedEntityError] if the {Layout::SketchUpModel} is locked
529
+ #
530
+ # @version LayOut 2020.1
531
+ def reset_effects
532
+ end
533
+
534
+ # The {#reset_layers} method resets the {Layout::SketchUpModel}'s layers to
535
+ # the scene's setting.
536
+ #
537
+ #
538
+ # @note: In SketchUp 2020, SketchUp "layers" were renamed to "tags". For
539
+ # consistency with the SketchUp API, this will continue to refer to
540
+ # "tags" as "layers".
541
+ #
542
+ # @example
543
+ # bounds = Geom::Bounds2d.new(1, 1, 3, 3)
544
+ # model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
545
+ # model.reset_layers if model.layers_modified?
546
+ #
547
+ # @raise [LockedLayerError] if the {Layout::SketchUpModel} is on a locked
548
+ # {Layout::Layer}
549
+ #
550
+ # @raise [LockedEntityError] if the {Layout::SketchUpModel} is locked
551
+ #
552
+ # @version LayOut 2020.1
553
+ def reset_layers
554
+ end
555
+
556
+ # The {#reset_style} method resets the {Layout::SketchUpModel}'s style to
557
+ # the scene's setting.
558
+ #
559
+ # @example
560
+ # bounds = Geom::Bounds2d.new(1, 1, 3, 3)
561
+ # model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
562
+ # model.reset_style if model.style_modified?
563
+ #
564
+ # @raise [LockedLayerError] if the {Layout::SketchUpModel} is on a locked
565
+ # {Layout::Layer}
566
+ #
567
+ # @raise [LockedEntityError] if the {Layout::SketchUpModel} is locked
568
+ #
569
+ # @version LayOut 2020.1
570
+ def reset_style
571
+ end
572
+
573
+ # The {#scale} method returns the scale of the {Layout::SketchUpModel}.
574
+ #
575
+ # @example
576
+ # bounds = Geom::Bounds2d.new(1, 1, 3, 3)
577
+ # model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
578
+ # scale = model.scale
579
+ #
580
+ # @return [Float]
581
+ #
582
+ # @version LayOut 2018
583
+ def scale
584
+ end
585
+
586
+ # The {#scale=} method sets the scale of the {Layout::SketchUpModel}. Scale
587
+ # must be at least 0.0000001, and the view must be orthographic.
588
+ #
589
+ # @example
590
+ # bounds = Geom::Bounds2d.new(1, 1, 3, 3)
591
+ # model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
592
+ # model.scale = 2.0
593
+ #
594
+ # @param [Float] scale
595
+ #
596
+ # @raise [ArgumentError] if the {Layout::SketchUpModel} view is not orthographic
597
+ #
598
+ # @raise [ArgumentError] if scale is less than 0.0000001
599
+ #
600
+ # @raise [LockedLayerError] if the {Layout::SketchUpModel} is on a locked
601
+ # {Layout::Layer}
602
+ #
603
+ # @raise [LockedEntityError] if the {Layout::SketchUpModel} is locked
604
+ #
605
+ # @version LayOut 2018
606
+ def scale=(scale)
607
+ end
608
+
609
+ # The {#scenes} method returns an array of scene names that are available
610
+ # for the {Layout::SketchUpModel}. The first scene will always be the default
611
+ # scene, called "Last saved SketchUp View".
612
+ #
613
+ # @example
614
+ # bounds = Geom::Bounds2d.new(1, 1, 3, 3)
615
+ # model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
616
+ # scene_names = model.scenes
617
+ #
618
+ # @return [Array<String>]
619
+ #
620
+ # @version LayOut 2018
621
+ def scenes
622
+ end
623
+
624
+ # The {#style_modified?} method returns whether the style of the
625
+ # {Layout::SketchUpModel} has been modified.
626
+ #
627
+ # @example
628
+ # bounds = Geom::Bounds2d.new(1, 1, 3, 3)
629
+ # model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
630
+ # modified = model.style_modified?
631
+ #
632
+ # @return [Boolean]
633
+ #
634
+ # @version LayOut 2020.1
635
+ def style_modified?
636
+ end
637
+
638
+ # The {#view} method returns the standard view of the {Layout::SketchUpModel}.
639
+ #
640
+ # The standard view can be one of the following values:
641
+ # [+Layout::SketchUpModel::CUSTOM_VIEW+]
642
+ # [+Layout::SketchUpModel::TOP_VIEW+]
643
+ # [+Layout::SketchUpModel::TOP_RELATIVE_VIEW+]
644
+ # [+Layout::SketchUpModel::BOTTOM_VIEW+]
645
+ # [+Layout::SketchUpModel::BOTTOM_RELATIVE_VIEW+]
646
+ # [+Layout::SketchUpModel::FRONT_VIEW+]
647
+ # [+Layout::SketchUpModel::BACK_VIEW+]
648
+ # [+Layout::SketchUpModel::LEFT_VIEW+]
649
+ # [+Layout::SketchUpModel::RIGHT_VIEW+]
650
+ # [+Layout::SketchUpModel::ISO_VIEW+]
651
+ #
652
+ # @example
653
+ # bounds = Geom::Bounds2d.new(1, 1, 3, 3)
654
+ # model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
655
+ # view = model.view
656
+ #
657
+ # @return [Integer]
658
+ #
659
+ # @version LayOut 2018
660
+ def view
661
+ end
662
+
663
+ # The {#view=} method sets the standard view of the {Layout::SketchUpModel}.
664
+ #
665
+ # The standard view can be one of the following values:
666
+ # [+Layout::SketchUpModel::TOP_VIEW+]
667
+ # [+Layout::SketchUpModel::TOP_RELATIVE_VIEW+]
668
+ # [+Layout::SketchUpModel::BOTTOM_VIEW+]
669
+ # [+Layout::SketchUpModel::BOTTOM_RELATIVE_VIEW+]
670
+ # [+Layout::SketchUpModel::FRONT_VIEW+]
671
+ # [+Layout::SketchUpModel::BACK_VIEW+]
672
+ # [+Layout::SketchUpModel::LEFT_VIEW+]
673
+ # [+Layout::SketchUpModel::RIGHT_VIEW+]
674
+ # [+Layout::SketchUpModel::ISO_VIEW+]
675
+ #
676
+ # @example
677
+ # bounds = Geom::Bounds2d.new(1, 1, 3, 3)
678
+ # model = Layout::SketchUpModel.new("C:/Path/to/model.skp", bounds)
679
+ # model.view = Layout::SketchUpModel::FRONT_VIEW
680
+ #
681
+ # @param [Integer] view
682
+ #
683
+ # @raise [ArgumentError] if view is not a valid standard view
684
+ #
685
+ # @raise [LockedLayerError] if the {Layout::SketchUpModel} is on a locked
686
+ # {Layout::Layer}
687
+ #
688
+ # @raise [LockedEntityError] if the {Layout::SketchUpModel} is locked
689
+ #
690
+ # @version LayOut 2018
691
+ def view=(view)
692
+ end
693
+
694
+ end