sketchup-api-stubs 0.7.8 → 0.7.10
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.
- checksums.yaml +4 -4
- data/lib/sketchup-api-stubs/sketchup.rb +3 -0
- data/lib/sketchup-api-stubs/stubs/Array.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Geom/BoundingBox.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Geom/Bounds2d.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Geom/LatLong.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Geom/OrientedBounds2d.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Geom/Point2d.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Geom/Point3d.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Geom/PolygonMesh.rb +4 -18
- data/lib/sketchup-api-stubs/stubs/Geom/Transformation.rb +17 -19
- data/lib/sketchup-api-stubs/stubs/Geom/Transformation2d.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Geom/UTM.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Geom/Vector2d.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Geom/Vector3d.rb +3 -3
- data/lib/sketchup-api-stubs/stubs/Geom.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/LanguageHandler.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/AngularDimension.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/AutoTextDefinition.rb +50 -1
- data/lib/sketchup-api-stubs/stubs/Layout/AutoTextDefinitions.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/ConnectionPoint.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Document.rb +56 -3
- data/lib/sketchup-api-stubs/stubs/Layout/Ellipse.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Entities.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Entity.rb +4 -1
- data/lib/sketchup-api-stubs/stubs/Layout/FormattedText.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Grid.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Group.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Image.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Label.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Layer.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/LayerInstance.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Layers.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/LinearDimension.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/LockedEntityError.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/LockedLayerError.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Page.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/PageInfo.rb +73 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Pages.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Path.rb +7 -7
- data/lib/sketchup-api-stubs/stubs/Layout/Rectangle.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/ReferenceEntity.rb +82 -0
- data/lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb +24 -2
- data/lib/sketchup-api-stubs/stubs/Layout/Style.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/Table.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/TableCell.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/TableColumn.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout/TableRow.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Layout.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Length.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Numeric.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Animation.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/AppObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/ArcCurve.rb +18 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/AttributeDictionaries.rb +3 -5
- data/lib/sketchup-api-stubs/stubs/Sketchup/AttributeDictionary.rb +4 -9
- data/lib/sketchup-api-stubs/stubs/Sketchup/Axes.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Behavior.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Camera.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/ClassificationSchema.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Classifications.rb +4 -5
- data/lib/sketchup-api-stubs/stubs/Sketchup/Color.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/ComponentDefinition.rb +44 -4
- data/lib/sketchup-api-stubs/stubs/Sketchup/ComponentInstance.rb +2 -2
- data/lib/sketchup-api-stubs/stubs/Sketchup/Console.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/ConstructionLine.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/ConstructionPoint.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Curve.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionList.rb +25 -2
- data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionsObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Dimension.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionLinear.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionRadial.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Drawingelement.rb +13 -3
- data/lib/sketchup-api-stubs/stubs/Sketchup/Edge.rb +62 -167
- data/lib/sketchup-api-stubs/stubs/Sketchup/EdgeUse.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Entities.rb +246 -209
- data/lib/sketchup-api-stubs/stubs/Sketchup/EntitiesBuilder.rb +3 -14
- data/lib/sketchup-api-stubs/stubs/Sketchup/EntitiesObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Entity.rb +10 -36
- data/lib/sketchup-api-stubs/stubs/Sketchup/EntityObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/ExtensionsManager.rb +4 -5
- data/lib/sketchup-api-stubs/stubs/Sketchup/Face.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/FrameChangeObserver.rb +1 -3
- data/lib/sketchup-api-stubs/stubs/Sketchup/Group.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Http/Request.rb +16 -26
- data/lib/sketchup-api-stubs/stubs/Sketchup/Http/Response.rb +2 -2
- data/lib/sketchup-api-stubs/stubs/Sketchup/Http.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Image.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/ImageRep.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Importer.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/InputPoint.rb +29 -30
- data/lib/sketchup-api-stubs/stubs/Sketchup/InstanceObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/InstancePath.rb +2 -2
- data/lib/sketchup-api-stubs/stubs/Sketchup/Layer.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/LayerFolder.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Layers.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/LayersObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Licensing/ExtensionLicense.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Licensing.rb +2 -2
- data/lib/sketchup-api-stubs/stubs/Sketchup/LineStyle.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/LineStyles.rb +9 -7
- data/lib/sketchup-api-stubs/stubs/Sketchup/Loop.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Material.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Materials.rb +2 -3
- data/lib/sketchup-api-stubs/stubs/Sketchup/MaterialsObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Menu.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Model.rb +28 -23
- data/lib/sketchup-api-stubs/stubs/Sketchup/ModelObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsManager.rb +4 -5
- data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsProvider.rb +5 -18
- data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsProviderObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Overlay.rb +490 -0
- data/lib/sketchup-api-stubs/stubs/Sketchup/OverlaysManager.rb +116 -0
- data/lib/sketchup-api-stubs/stubs/Sketchup/Page.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Pages.rb +15 -17
- data/lib/sketchup-api-stubs/stubs/Sketchup/PagesObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/PickHelper.rb +21 -18
- data/lib/sketchup-api-stubs/stubs/Sketchup/RegionalSettings.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptions.rb +18 -9
- data/lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptionsObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/SectionPlane.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Selection.rb +4 -5
- data/lib/sketchup-api-stubs/stubs/Sketchup/SelectionObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Set.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/ShadowInfo.rb +15 -20
- data/lib/sketchup-api-stubs/stubs/Sketchup/ShadowInfoObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Skp.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Style.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Styles.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Text.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Texture.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/TextureWriter.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Tool.rb +17 -20
- data/lib/sketchup-api-stubs/stubs/Sketchup/Tools.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/ToolsObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/UVHelper.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/Vertex.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup/View.rb +30 -18
- data/lib/sketchup-api-stubs/stubs/Sketchup/ViewObserver.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/Sketchup.rb +48 -14
- data/lib/sketchup-api-stubs/stubs/SketchupExtension.rb +2 -2
- data/lib/sketchup-api-stubs/stubs/String.rb +1 -1
- data/lib/sketchup-api-stubs/stubs/UI/Command.rb +29 -31
- data/lib/sketchup-api-stubs/stubs/UI/HtmlDialog.rb +18 -9
- data/lib/sketchup-api-stubs/stubs/UI/Notification.rb +3 -3
- data/lib/sketchup-api-stubs/stubs/UI/Toolbar.rb +5 -4
- data/lib/sketchup-api-stubs/stubs/UI/WebDialog.rb +16 -18
- data/lib/sketchup-api-stubs/stubs/UI.rb +71 -26
- data/lib/sketchup-api-stubs/stubs/_top_level.rb +1 -9
- metadata +10 -7
@@ -0,0 +1,116 @@
|
|
1
|
+
# Copyright:: Copyright 2024 Trimble Inc.
|
2
|
+
# License:: The MIT License (MIT)
|
3
|
+
|
4
|
+
# An overlay added to a model is invalidated once it's removed from the model.
|
5
|
+
# It cannot be re-added or added to another model. Create another unique
|
6
|
+
# instance for that.
|
7
|
+
#
|
8
|
+
# Contains the registered overlays for a model along with methods to manage
|
9
|
+
# them.
|
10
|
+
#
|
11
|
+
# A model can not have multiple overlays with the same id.
|
12
|
+
#
|
13
|
+
# @api Overlays
|
14
|
+
#
|
15
|
+
# @example
|
16
|
+
# Sketchup.active_model.overlays.each { |overlay|
|
17
|
+
# puts "#{overlay.name} (#{overlay.overlay_id}) Enabled: #{overlay.enabled?}"
|
18
|
+
# }
|
19
|
+
#
|
20
|
+
# @see Sketchup::Overlay
|
21
|
+
# Documentation for overlays for more details.
|
22
|
+
#
|
23
|
+
# @version SketchUp 2023.0
|
24
|
+
class Sketchup::OverlaysManager
|
25
|
+
|
26
|
+
# Includes
|
27
|
+
|
28
|
+
include Enumerable
|
29
|
+
|
30
|
+
# Instance Methods
|
31
|
+
|
32
|
+
#
|
33
|
+
# @api Overlays
|
34
|
+
#
|
35
|
+
# @example
|
36
|
+
# overlay = Sketchup.active_model.overlays[0]
|
37
|
+
#
|
38
|
+
# @return [Sketchup::Overlay]
|
39
|
+
#
|
40
|
+
# @version SketchUp 2023.0
|
41
|
+
def [](index)
|
42
|
+
end
|
43
|
+
alias_method :at, :[]
|
44
|
+
|
45
|
+
#
|
46
|
+
# @api Overlays
|
47
|
+
#
|
48
|
+
# @example
|
49
|
+
# class ExampleOverlay < Sketchup::Overlay
|
50
|
+
# def initialize
|
51
|
+
# super('example_inc.my_overlay', 'Example Overlay')
|
52
|
+
# end
|
53
|
+
# end
|
54
|
+
#
|
55
|
+
# overlay = ExampleOverlay.new
|
56
|
+
# Sketchup.active_model.overlays.add(overlay)
|
57
|
+
#
|
58
|
+
# @raise [ArgumentError] If the overlay is already added to a model.
|
59
|
+
#
|
60
|
+
# @return [Boolean] +false+ if an overlay with the same id already exists.
|
61
|
+
#
|
62
|
+
# @version SketchUp 2023.0
|
63
|
+
def add(service)
|
64
|
+
end
|
65
|
+
|
66
|
+
#
|
67
|
+
# @api Overlays
|
68
|
+
#
|
69
|
+
# @example
|
70
|
+
# Sketchup.active_model.overlays.each { |overlay|
|
71
|
+
# puts "#{overlay.name} (#{overlay.overlay_id}) Enabled: #{overlay.enabled?}"
|
72
|
+
# }
|
73
|
+
#
|
74
|
+
# @return [nil]
|
75
|
+
#
|
76
|
+
# @version SketchUp 2023.0
|
77
|
+
#
|
78
|
+
# @yieldparam [Sketchup::Overlay] overlay
|
79
|
+
def each
|
80
|
+
end
|
81
|
+
|
82
|
+
#
|
83
|
+
# @api Overlays
|
84
|
+
#
|
85
|
+
# @example
|
86
|
+
# class ExampleOverlay < Sketchup::Overlay
|
87
|
+
# def initialize
|
88
|
+
# super('example_inc.my_overlay', 'Example Overlay')
|
89
|
+
# end
|
90
|
+
# end
|
91
|
+
#
|
92
|
+
# overlay = ExampleOverlay.new
|
93
|
+
# Sketchup.active_model.overlays.add(overlay)
|
94
|
+
#
|
95
|
+
# Sketchup.active_model.overlays.remove(overlay)
|
96
|
+
#
|
97
|
+
# @return [Boolean]
|
98
|
+
#
|
99
|
+
# @version SketchUp 2023.0
|
100
|
+
def remove(service)
|
101
|
+
end
|
102
|
+
|
103
|
+
#
|
104
|
+
# @api Overlays
|
105
|
+
#
|
106
|
+
# @example
|
107
|
+
# num_overlays = Sketchup.active_model.overlays.size
|
108
|
+
#
|
109
|
+
# @return [Integer]
|
110
|
+
#
|
111
|
+
# @version SketchUp 2023.0
|
112
|
+
def size
|
113
|
+
end
|
114
|
+
alias_method :length, :size
|
115
|
+
|
116
|
+
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright:: Copyright
|
1
|
+
# Copyright:: Copyright 2024 Trimble Inc.
|
2
2
|
# License:: The MIT License (MIT)
|
3
3
|
|
4
4
|
# The Pages class contains methods for manipulating a collection of Pages
|
@@ -136,27 +136,25 @@ class Sketchup::Pages < Sketchup::Entity
|
|
136
136
|
def add(name = nil, flags = PAGE_USE_ALL, index = self.size)
|
137
137
|
end
|
138
138
|
|
139
|
-
# The add_matchphoto_page method is used to add a photomatch page to the
|
139
|
+
# The {#add_matchphoto_page} method is used to add a photomatch page to the
|
140
140
|
# model. This is an advanced feature that was added to support internal
|
141
141
|
# SketchUp work, so it is unlikely to be useful to you.
|
142
142
|
#
|
143
143
|
# @example
|
144
144
|
# pages = Sketchup.active_model.pages
|
145
|
-
# page = pages.add_matchphoto_page
|
145
|
+
# page = pages.add_matchphoto_page("/path/to/image.png")
|
146
146
|
#
|
147
|
-
# @param
|
148
|
-
#
|
147
|
+
# @param [String] image_filename
|
148
|
+
# The image file to use as the background.
|
149
149
|
#
|
150
|
-
# @param [
|
151
|
-
# Camera object.
|
150
|
+
# @param [Sketchup::Camera] camera
|
152
151
|
#
|
153
|
-
# @param [
|
154
|
-
# String page name.
|
152
|
+
# @param [String] page_name
|
155
153
|
#
|
156
|
-
# @return
|
154
|
+
# @return [Sketchup::Page]
|
157
155
|
#
|
158
156
|
# @version SketchUp 7.0
|
159
|
-
def add_matchphoto_page(
|
157
|
+
def add_matchphoto_page(image_filename, camera = nil, page_name = nil)
|
160
158
|
end
|
161
159
|
|
162
160
|
# The add_observer method is used to add an observer to the Pages object.
|
@@ -194,20 +192,20 @@ class Sketchup::Pages < Sketchup::Entity
|
|
194
192
|
def count
|
195
193
|
end
|
196
194
|
|
197
|
-
# The each method is used to iterate through pages.
|
195
|
+
# The {#each} method is used to iterate through pages in the model.
|
198
196
|
#
|
199
197
|
# @example
|
200
198
|
# model = Sketchup.active_model
|
201
199
|
# pages = model.pages
|
202
|
-
#
|
203
|
-
#
|
204
|
-
# pages.each {|page| puts page}
|
200
|
+
# pages.add("Page 1")
|
201
|
+
# pages.add("Page 2")
|
202
|
+
# pages.each { |page| puts page.name }
|
205
203
|
#
|
206
|
-
# @return nil
|
204
|
+
# @return [nil]
|
207
205
|
#
|
208
206
|
# @version SketchUp 6.0
|
209
207
|
#
|
210
|
-
# @
|
208
|
+
# @yieldparam [Sketchup::Page] page
|
211
209
|
def each
|
212
210
|
end
|
213
211
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright:: Copyright
|
1
|
+
# Copyright:: Copyright 2024 Trimble Inc.
|
2
2
|
# License:: The MIT License (MIT)
|
3
3
|
|
4
4
|
# The {Sketchup::PickHelper} class is used to pick entities that reside under
|
@@ -69,12 +69,10 @@ class Sketchup::PickHelper
|
|
69
69
|
def best_picked
|
70
70
|
end
|
71
71
|
|
72
|
-
# Used to pick a set of entities from a model from a BoundingBox. The pick
|
72
|
+
# Used to pick a set of entities from a model from a {Geom::BoundingBox}. The pick
|
73
73
|
# criteria can be for completely-contained or partially-contained entities,
|
74
74
|
# similar to how the Selection tool works.
|
75
75
|
#
|
76
|
-
# transformation) if num_picked > 0 Sketchup.active_model.selection.add(ph.all_picked) end
|
77
|
-
#
|
78
76
|
# @example
|
79
77
|
# boundingbox = Geom::BoundingBox.new
|
80
78
|
# boundingbox.add([1, 1, 1], [100, 100, 100])
|
@@ -85,20 +83,23 @@ class Sketchup::PickHelper
|
|
85
83
|
# transformation = Geom::Transformation.new(ORIGIN, Z_AXIS, angle)
|
86
84
|
#
|
87
85
|
# num_picked = ph.boundingbox_pick(boundingbox, Sketchup::PickHelper::PICK_CROSSING,
|
86
|
+
# transformation)
|
87
|
+
# if num_picked > 0
|
88
|
+
# Sketchup.active_model.selection.add(ph.all_picked)
|
89
|
+
# end
|
88
90
|
#
|
89
|
-
# @param bounding_box
|
90
|
-
#
|
91
|
+
# @param [Geom::BoundingBox] bounding_box
|
92
|
+
# Bounding box defining the volume to use for picking.
|
91
93
|
#
|
92
|
-
# @param pick_type
|
93
|
-
# PICK_INSIDE to select entities completely contained or
|
94
|
-
# PICK_CROSSING to select entities partially contained.
|
94
|
+
# @param [Integer] pick_type
|
95
|
+
# {PICK_INSIDE} to select entities completely contained or
|
96
|
+
# {PICK_CROSSING} to select entities partially contained.
|
95
97
|
#
|
96
|
-
# @param [
|
97
|
-
# Transformation that will be applied to the
|
98
|
-
#
|
99
|
-
# rotation.
|
98
|
+
# @param [Geom::Transformation] transformation
|
99
|
+
# Transformation that will be applied to the volume defined by the
|
100
|
+
# +bounding_box+ that allows for a rotation.
|
100
101
|
#
|
101
|
-
# @return The number of
|
102
|
+
# @return [Integer] The number of entities picked
|
102
103
|
#
|
103
104
|
# @version SketchUp 2016
|
104
105
|
def boundingbox_pick(bounding_box, pick_type, transformation = IDENTITY)
|
@@ -208,7 +209,7 @@ class Sketchup::PickHelper
|
|
208
209
|
# @param [Integer] aperture
|
209
210
|
# aperture in pixels.
|
210
211
|
#
|
211
|
-
# @return [PickHelper]
|
212
|
+
# @return [Sketchup::PickHelper]
|
212
213
|
#
|
213
214
|
# @version SketchUp 6.0
|
214
215
|
def init(x, y, aperture = 0)
|
@@ -436,12 +437,14 @@ class Sketchup::PickHelper
|
|
436
437
|
def transformation_at(index)
|
437
438
|
end
|
438
439
|
|
439
|
-
# The view method is used to get the view associated with the PickHelper.
|
440
|
+
# The {#view} method is used to get the view associated with the {Sketchup::PickHelper}.
|
440
441
|
#
|
441
442
|
# @example
|
442
|
-
# view =
|
443
|
+
# view = Sketchup.active_model.active_view
|
444
|
+
# ph = view.pick_helper
|
445
|
+
# ph.view
|
443
446
|
#
|
444
|
-
# @return
|
447
|
+
# @return [Sketchup::View]
|
445
448
|
#
|
446
449
|
# @version SketchUp 6.0
|
447
450
|
def view
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright:: Copyright
|
1
|
+
# Copyright:: Copyright 2024 Trimble Inc.
|
2
2
|
# License:: The MIT License (MIT)
|
3
3
|
|
4
4
|
# The RenderingOptions class contains method to extract the rendering
|
@@ -85,6 +85,11 @@
|
|
85
85
|
# - +ROPDrawHiddenGeometry+
|
86
86
|
# - +ROPDrawHiddenObjects+
|
87
87
|
#
|
88
|
+
# Added in SketchUp 2024.0:
|
89
|
+
# - +AmbientOcclusion+
|
90
|
+
# - +AmbientOcclusionDistance+
|
91
|
+
# - +AmbientOcclusionIntensity+
|
92
|
+
#
|
88
93
|
# @version SketchUp 6.0
|
89
94
|
class Sketchup::RenderingOptions < Sketchup::Entity
|
90
95
|
|
@@ -100,6 +105,9 @@ class Sketchup::RenderingOptions < Sketchup::Entity
|
|
100
105
|
ROPDrawHiddenObjects = nil # Stub value.
|
101
106
|
ROPEditComponent = nil # Stub value.
|
102
107
|
ROPSectionDisplayTurnedOff = nil # Stub value.
|
108
|
+
ROPSetAODistance = nil # Stub value.
|
109
|
+
ROPSetAOEnabled = nil # Stub value.
|
110
|
+
ROPSetAOIntensity = nil # Stub value.
|
103
111
|
ROPSetBackgroundColor = nil # Stub value.
|
104
112
|
ROPSetConstructionColor = nil # Stub value.
|
105
113
|
ROPSetDepthQueEdges = nil # Stub value.
|
@@ -131,6 +139,7 @@ class Sketchup::RenderingOptions < Sketchup::Entity
|
|
131
139
|
ROPSetGroundTransparency = nil # Stub value.
|
132
140
|
ROPSetHideConstructionGeometry = nil # Stub value.
|
133
141
|
ROPSetHighlightColor = nil # Stub value.
|
142
|
+
ROPSetHorizonColor = nil # Stub value.
|
134
143
|
ROPSetJitterEdges = nil # Stub value.
|
135
144
|
ROPSetLineEndEdges = nil # Stub value.
|
136
145
|
ROPSetLineEndWidth = nil # Stub value.
|
@@ -162,7 +171,7 @@ class Sketchup::RenderingOptions < Sketchup::Entity
|
|
162
171
|
|
163
172
|
# Class Methods
|
164
173
|
|
165
|
-
# The each_key method iterates through all of the rendering options keys.
|
174
|
+
# The {#each_key} method iterates through all of the rendering options keys.
|
166
175
|
#
|
167
176
|
# @example
|
168
177
|
# Sketchup.active_model.rendering_options.each_key { |key|
|
@@ -173,7 +182,7 @@ class Sketchup::RenderingOptions < Sketchup::Entity
|
|
173
182
|
#
|
174
183
|
# @version SketchUp 6.0
|
175
184
|
#
|
176
|
-
# @
|
185
|
+
# @yieldparam [String] key
|
177
186
|
def self.each_key
|
178
187
|
end
|
179
188
|
|
@@ -216,6 +225,10 @@ class Sketchup::RenderingOptions < Sketchup::Entity
|
|
216
225
|
# @param [Object] value
|
217
226
|
# The value to be set.
|
218
227
|
#
|
228
|
+
# @raise [ArgumentError] If the given key is invalid, the key's value is not settable,
|
229
|
+
# or the given value is invalid. SketchUp versions earlier than 2024.0 will not raise
|
230
|
+
# this error.
|
231
|
+
#
|
219
232
|
# @return [Object] the value that was set
|
220
233
|
#
|
221
234
|
# @version SketchUp 6.0
|
@@ -263,17 +276,13 @@ class Sketchup::RenderingOptions < Sketchup::Entity
|
|
263
276
|
#
|
264
277
|
# @version SketchUp 6.0
|
265
278
|
#
|
266
|
-
# @yield [key, value]
|
267
|
-
#
|
268
279
|
# @yieldparam [String] key
|
269
|
-
# The key of each pair found.
|
270
280
|
#
|
271
281
|
# @yieldparam [Object] value
|
272
|
-
# The value of each pair found.
|
273
282
|
def each
|
274
283
|
end
|
275
284
|
|
276
|
-
# The each_key method iterates through all of the rendering options keys.
|
285
|
+
# The {#each_key} method iterates through all of the rendering options keys.
|
277
286
|
#
|
278
287
|
# @example
|
279
288
|
# Sketchup.active_model.rendering_options.each_key { |key|
|
@@ -284,7 +293,7 @@ class Sketchup::RenderingOptions < Sketchup::Entity
|
|
284
293
|
#
|
285
294
|
# @version SketchUp 6.0
|
286
295
|
#
|
287
|
-
# @
|
296
|
+
# @yieldparam [String] key
|
288
297
|
def each_key
|
289
298
|
end
|
290
299
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright:: Copyright
|
1
|
+
# Copyright:: Copyright 2024 Trimble Inc.
|
2
2
|
# License:: The MIT License (MIT)
|
3
3
|
|
4
4
|
# A set of the currently selected entities. Use the Model.selection method
|
@@ -166,10 +166,10 @@ class Sketchup::Selection
|
|
166
166
|
def count
|
167
167
|
end
|
168
168
|
|
169
|
-
# The each method is used to iterate through all of the selected entities.
|
169
|
+
# The {#each} method is used to iterate through all of the selected entities.
|
170
170
|
#
|
171
171
|
# If you want to do something with all of the selected Entities, this is more
|
172
|
-
# efficient than using [].
|
172
|
+
# efficient than using {#[]}.
|
173
173
|
#
|
174
174
|
# @example
|
175
175
|
# selection.each { |entity| puts entity }
|
@@ -183,8 +183,7 @@ class Sketchup::Selection
|
|
183
183
|
#
|
184
184
|
# @version SketchUp 6.0
|
185
185
|
#
|
186
|
-
# @
|
187
|
-
# are found.
|
186
|
+
# @yieldparam [Sketchup::Entity] entity
|
188
187
|
def each
|
189
188
|
end
|
190
189
|
|
@@ -1,20 +1,20 @@
|
|
1
|
-
# Copyright:: Copyright
|
1
|
+
# Copyright:: Copyright 2024 Trimble Inc.
|
2
2
|
# License:: The MIT License (MIT)
|
3
3
|
|
4
|
-
# The ShadowInfo class contains method to extract the shadow
|
5
|
-
# model. The majority of the shadow information returned
|
6
|
-
# Info > Location and Model Info > Shadows dialogs inside
|
4
|
+
# The {Sketchup::ShadowInfo} class contains method to extract the shadow
|
5
|
+
# information for a model. The majority of the shadow information returned
|
6
|
+
# exists in the Model Info > Location and Model Info > Shadows dialogs inside
|
7
|
+
# SketchUp.
|
7
8
|
#
|
8
9
|
# The following shadow information keys are maintained in SketchUp:
|
9
10
|
#
|
10
|
-
# - +City+ (in Model Info > Geo-location > Set Manual Location...) Note that
|
11
|
-
# 'Location' in the UI
|
11
|
+
# - +City+ (in Model Info > Geo-location > Set Manual Location...) Note that
|
12
|
+
# 'City' is called 'Location' in the UI
|
12
13
|
# - +Country+ (in Model Info > Geo-location > Set Manual Location...)
|
13
14
|
# - +Dark+ (in Window > Shadows)
|
14
15
|
# - +DayOfYear+
|
15
16
|
# - +DaylightSavings+
|
16
|
-
# - +DisplayNorth+
|
17
|
-
# on Mac
|
17
|
+
# - +DisplayNorth+
|
18
18
|
# - +DisplayOnAllFaces+ (in Window > Shadows)
|
19
19
|
# - +DisplayOnGroundPlane+ (in Window > Shadows)
|
20
20
|
# - +DisplayShadows+ (in Window > Shadows)
|
@@ -22,8 +22,7 @@
|
|
22
22
|
# - +Latitude+ (in Model Info > Geo-location > Set Manual Location...)
|
23
23
|
# - +Light+ (in Window > Shadows)
|
24
24
|
# - +Longitude+ (in Model Info > Geo-location > Set Manual Location...)
|
25
|
-
# - +NorthAngle+
|
26
|
-
# on Mac
|
25
|
+
# - +NorthAngle+
|
27
26
|
# - +ShadowTime+ (in Window > Shadows)
|
28
27
|
# - +ShadowTime_time_t+ (ShadowTime in Epoch time)
|
29
28
|
# - +SunDirection+ (Generated based on ShadowTime)
|
@@ -34,12 +33,12 @@
|
|
34
33
|
# - +TZOffset+ (in Window > Shadows)
|
35
34
|
# - +UseSunForAllShading+ (in Window > Shadows)
|
36
35
|
#
|
37
|
-
# You access the ShadowInfo object by calling Model
|
36
|
+
# You access the {Sketchup::ShadowInfo} object by calling {Sketchup::Model#shadow_info}:
|
38
37
|
#
|
39
38
|
# @example
|
40
39
|
# model = Sketchup.active_model
|
41
40
|
# shadowinfo = model.shadow_info
|
42
|
-
#
|
41
|
+
# puts "My city is: #{shadowinfo["City"]}"
|
43
42
|
#
|
44
43
|
# @version SketchUp 6.0
|
45
44
|
class Sketchup::ShadowInfo < Sketchup::Entity
|
@@ -50,7 +49,7 @@ class Sketchup::ShadowInfo < Sketchup::Entity
|
|
50
49
|
|
51
50
|
# Class Methods
|
52
51
|
|
53
|
-
# The each_key method iterates through all of the shadow information keys.
|
52
|
+
# The {#each_key} method iterates through all of the shadow information keys.
|
54
53
|
#
|
55
54
|
# @example
|
56
55
|
# shadowinfo.each_key { |key| puts key }
|
@@ -59,7 +58,7 @@ class Sketchup::ShadowInfo < Sketchup::Entity
|
|
59
58
|
#
|
60
59
|
# @version SketchUp 6.0
|
61
60
|
#
|
62
|
-
# @
|
61
|
+
# @yieldparam [String] key
|
63
62
|
def self.each_key
|
64
63
|
end
|
65
64
|
|
@@ -157,15 +156,13 @@ class Sketchup::ShadowInfo < Sketchup::Entity
|
|
157
156
|
#
|
158
157
|
# @version SketchUp 6.0
|
159
158
|
#
|
160
|
-
# @yield [key, value]
|
161
|
-
#
|
162
159
|
# @yieldparam [String] key
|
163
160
|
#
|
164
161
|
# @yieldparam [Object] value
|
165
162
|
def each
|
166
163
|
end
|
167
164
|
|
168
|
-
# The each_key method iterates through all of the shadow information keys.
|
165
|
+
# The {#each_key} method iterates through all of the shadow information keys.
|
169
166
|
#
|
170
167
|
# @example
|
171
168
|
# shadowinfo.each_key { |key| puts key }
|
@@ -174,7 +171,7 @@ class Sketchup::ShadowInfo < Sketchup::Entity
|
|
174
171
|
#
|
175
172
|
# @version SketchUp 6.0
|
176
173
|
#
|
177
|
-
# @
|
174
|
+
# @yieldparam [String] key
|
178
175
|
def each_key
|
179
176
|
end
|
180
177
|
|
@@ -193,8 +190,6 @@ class Sketchup::ShadowInfo < Sketchup::Entity
|
|
193
190
|
#
|
194
191
|
# @version SketchUp 6.0
|
195
192
|
#
|
196
|
-
# @yield [key, value]
|
197
|
-
#
|
198
193
|
# @yieldparam [String] key
|
199
194
|
#
|
200
195
|
# @yieldparam [Object] value
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright:: Copyright
|
1
|
+
# Copyright:: Copyright 2024 Trimble Inc.
|
2
2
|
# License:: The MIT License (MIT)
|
3
3
|
|
4
4
|
# Tool is the interface that you implement to create a SketchUp tool.
|
@@ -175,7 +175,7 @@ class Sketchup::Tool
|
|
175
175
|
# instead, use the normal context menu found on all entities.
|
176
176
|
#
|
177
177
|
# If you do implement this method, the argument is a Menu. You should use the
|
178
|
-
# add_item method to build the context menu.
|
178
|
+
# {Sketchup::Menu#add_item} method to build the context menu.
|
179
179
|
#
|
180
180
|
# Your tool will use a standard context menu by default if you do not
|
181
181
|
# implement this method. Implement this method if you want a context-click to
|
@@ -209,30 +209,27 @@ class Sketchup::Tool
|
|
209
209
|
# end
|
210
210
|
# end
|
211
211
|
#
|
212
|
-
# @
|
213
|
-
# A Menu object.
|
212
|
+
# @overload getMenu(menu)
|
214
213
|
#
|
215
|
-
#
|
216
|
-
# A bit mask that tells the state of the
|
217
|
-
# modifier keys and other mouse buttons at the time.
|
218
|
-
# Added in SU2015.
|
214
|
+
# @param [Sketchup::Menu] menu
|
219
215
|
#
|
220
|
-
# @
|
221
|
-
# The X coordinate on the screen where the
|
222
|
-
# event occurred. Added in SU2015.
|
216
|
+
# @overload getMenu(menu, flags, x, y, view)
|
223
217
|
#
|
224
|
-
#
|
225
|
-
#
|
226
|
-
#
|
218
|
+
# @version SketchUp 2015
|
219
|
+
# @param [Sketchup::Menu] menu
|
220
|
+
# @param [Integer] flags
|
221
|
+
# A bit mask that tells the state of the modifier keys and other mouse
|
222
|
+
# buttons at the time.
|
223
|
+
# @param [Integer] x
|
224
|
+
# The X coordinate on the screen where the event occurred.
|
225
|
+
# @param [Integer] y
|
226
|
+
# The Y coordinate on the screen where the event occurred.
|
227
|
+
# @param [Sketchup::View] view
|
227
228
|
#
|
228
|
-
# @
|
229
|
-
# A View object where the method was invoked.
|
230
|
-
# Added in SU2015.
|
231
|
-
#
|
232
|
-
# @return nil
|
229
|
+
# @return [nil]
|
233
230
|
#
|
234
231
|
# @version SketchUp 6.0
|
235
|
-
def getMenu
|
232
|
+
def getMenu
|
236
233
|
end
|
237
234
|
|
238
235
|
# The {#onCancel} method is called by SketchUp to cancel the current operation
|