sketchup-api-stubs 0.7.4 → 0.7.5
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.rb +1 -1
- data/lib/sketchup-api-stubs/sketchup.rb +147 -145
- data/lib/sketchup-api-stubs/stubs/Geom/BoundingBox.rb +322 -318
- data/lib/sketchup-api-stubs/stubs/Geom/Bounds2d.rb +172 -172
- data/lib/sketchup-api-stubs/stubs/Geom/LatLong.rb +126 -126
- data/lib/sketchup-api-stubs/stubs/Geom/OrientedBounds2d.rb +102 -102
- data/lib/sketchup-api-stubs/stubs/Geom/Point2d.rb +400 -400
- data/lib/sketchup-api-stubs/stubs/Geom/Point3d.rb +661 -661
- data/lib/sketchup-api-stubs/stubs/Geom/PolygonMesh.rb +498 -492
- data/lib/sketchup-api-stubs/stubs/Geom/Transformation.rb +478 -478
- data/lib/sketchup-api-stubs/stubs/Geom/Transformation2d.rb +263 -263
- data/lib/sketchup-api-stubs/stubs/Geom/UTM.rb +141 -141
- data/lib/sketchup-api-stubs/stubs/Geom/Vector2d.rb +522 -522
- data/lib/sketchup-api-stubs/stubs/Geom/Vector3d.rb +691 -691
- data/lib/sketchup-api-stubs/stubs/Layout.rb +25 -25
- data/lib/sketchup-api-stubs/stubs/Layout/AngularDimension.rb +573 -573
- data/lib/sketchup-api-stubs/stubs/Layout/AutoTextDefinition.rb +411 -411
- data/lib/sketchup-api-stubs/stubs/Layout/AutoTextDefinitions.rb +179 -174
- data/lib/sketchup-api-stubs/stubs/Layout/ConnectionPoint.rb +70 -70
- data/lib/sketchup-api-stubs/stubs/Layout/Document.rb +515 -514
- data/lib/sketchup-api-stubs/stubs/Layout/Ellipse.rb +29 -29
- data/lib/sketchup-api-stubs/stubs/Layout/Entities.rb +148 -143
- data/lib/sketchup-api-stubs/stubs/Layout/Entity.rb +353 -353
- data/lib/sketchup-api-stubs/stubs/Layout/FormattedText.rb +349 -349
- data/lib/sketchup-api-stubs/stubs/Layout/Grid.rb +311 -311
- data/lib/sketchup-api-stubs/stubs/Layout/Group.rb +261 -261
- data/lib/sketchup-api-stubs/stubs/Layout/Image.rb +91 -91
- data/lib/sketchup-api-stubs/stubs/Layout/Label.rb +370 -371
- data/lib/sketchup-api-stubs/stubs/Layout/Layer.rb +218 -218
- data/lib/sketchup-api-stubs/stubs/Layout/LayerInstance.rb +128 -128
- data/lib/sketchup-api-stubs/stubs/Layout/Layers.rb +225 -220
- data/lib/sketchup-api-stubs/stubs/Layout/LinearDimension.rb +567 -567
- data/lib/sketchup-api-stubs/stubs/Layout/LockedEntityError.rb +10 -10
- data/lib/sketchup-api-stubs/stubs/Layout/LockedLayerError.rb +11 -11
- data/lib/sketchup-api-stubs/stubs/Layout/Page.rb +183 -183
- data/lib/sketchup-api-stubs/stubs/Layout/PageInfo.rb +387 -387
- data/lib/sketchup-api-stubs/stubs/Layout/Pages.rb +209 -204
- data/lib/sketchup-api-stubs/stubs/Layout/Path.rb +344 -344
- data/lib/sketchup-api-stubs/stubs/Layout/Rectangle.rb +174 -174
- data/lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb +694 -694
- data/lib/sketchup-api-stubs/stubs/Layout/Style.rb +1519 -1519
- data/lib/sketchup-api-stubs/stubs/Layout/Table.rb +290 -290
- data/lib/sketchup-api-stubs/stubs/Layout/TableCell.rb +149 -149
- data/lib/sketchup-api-stubs/stubs/Layout/TableColumn.rb +139 -139
- data/lib/sketchup-api-stubs/stubs/Layout/TableRow.rb +135 -135
- data/lib/sketchup-api-stubs/stubs/Sketchup/Animation.rb +144 -140
- data/lib/sketchup-api-stubs/stubs/Sketchup/AppObserver.rb +157 -157
- data/lib/sketchup-api-stubs/stubs/Sketchup/ArcCurve.rb +209 -209
- data/lib/sketchup-api-stubs/stubs/Sketchup/AttributeDictionaries.rb +152 -152
- data/lib/sketchup-api-stubs/stubs/Sketchup/AttributeDictionary.rb +286 -281
- data/lib/sketchup-api-stubs/stubs/Sketchup/Axes.rb +149 -149
- data/lib/sketchup-api-stubs/stubs/Sketchup/Behavior.rb +302 -328
- data/lib/sketchup-api-stubs/stubs/Sketchup/Camera.rb +478 -577
- data/lib/sketchup-api-stubs/stubs/Sketchup/ClassificationSchema.rb +63 -63
- data/lib/sketchup-api-stubs/stubs/Sketchup/Classifications.rb +122 -122
- data/lib/sketchup-api-stubs/stubs/Sketchup/Color.rb +294 -281
- data/lib/sketchup-api-stubs/stubs/Sketchup/ComponentDefinition.rb +577 -562
- data/lib/sketchup-api-stubs/stubs/Sketchup/ComponentInstance.rb +604 -593
- data/lib/sketchup-api-stubs/stubs/Sketchup/Console.rb +76 -76
- data/lib/sketchup-api-stubs/stubs/Sketchup/ConstructionLine.rb +257 -257
- data/lib/sketchup-api-stubs/stubs/Sketchup/ConstructionPoint.rb +32 -32
- data/lib/sketchup-api-stubs/stubs/Sketchup/Curve.rb +201 -194
- data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionList.rb +362 -329
- data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionObserver.rb +74 -72
- data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionsObserver.rb +104 -102
- data/lib/sketchup-api-stubs/stubs/Sketchup/Dimension.rb +165 -165
- data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionLinear.rb +306 -312
- data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionObserver.rb +42 -38
- data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionRadial.rb +87 -87
- data/lib/sketchup-api-stubs/stubs/Sketchup/Drawingelement.rb +396 -390
- data/lib/sketchup-api-stubs/stubs/Sketchup/Edge.rb +502 -508
- data/lib/sketchup-api-stubs/stubs/Sketchup/EdgeUse.rb +211 -211
- data/lib/sketchup-api-stubs/stubs/Sketchup/Entities.rb +1126 -1119
- data/lib/sketchup-api-stubs/stubs/Sketchup/EntitiesObserver.rb +127 -125
- data/lib/sketchup-api-stubs/stubs/Sketchup/Entity.rb +545 -544
- data/lib/sketchup-api-stubs/stubs/Sketchup/EntityObserver.rb +60 -59
- data/lib/sketchup-api-stubs/stubs/Sketchup/ExtensionsManager.rb +126 -125
- data/lib/sketchup-api-stubs/stubs/Sketchup/Face.rb +751 -750
- data/lib/sketchup-api-stubs/stubs/Sketchup/FrameChangeObserver.rb +104 -104
- data/lib/sketchup-api-stubs/stubs/Sketchup/Group.rb +699 -697
- data/lib/sketchup-api-stubs/stubs/Sketchup/Http.rb +27 -27
- data/lib/sketchup-api-stubs/stubs/Sketchup/Http/Request.rb +285 -285
- data/lib/sketchup-api-stubs/stubs/Sketchup/Http/Response.rb +62 -62
- data/lib/sketchup-api-stubs/stubs/Sketchup/Image.rb +417 -409
- data/lib/sketchup-api-stubs/stubs/Sketchup/ImageRep.rb +266 -226
- data/lib/sketchup-api-stubs/stubs/Sketchup/Importer.rb +189 -190
- data/lib/sketchup-api-stubs/stubs/Sketchup/InputPoint.rb +405 -393
- data/lib/sketchup-api-stubs/stubs/Sketchup/InstanceObserver.rb +84 -82
- data/lib/sketchup-api-stubs/stubs/Sketchup/InstancePath.rb +306 -303
- data/lib/sketchup-api-stubs/stubs/Sketchup/Layer.rb +327 -285
- data/lib/sketchup-api-stubs/stubs/Sketchup/LayerFolder.rb +422 -0
- data/lib/sketchup-api-stubs/stubs/Sketchup/Layers.rb +427 -244
- data/lib/sketchup-api-stubs/stubs/Sketchup/LayersObserver.rb +249 -136
- data/lib/sketchup-api-stubs/stubs/Sketchup/Licensing.rb +48 -48
- data/lib/sketchup-api-stubs/stubs/Sketchup/Licensing/ExtensionLicense.rb +86 -86
- data/lib/sketchup-api-stubs/stubs/Sketchup/LineStyle.rb +24 -24
- data/lib/sketchup-api-stubs/stubs/Sketchup/LineStyles.rb +112 -112
- data/lib/sketchup-api-stubs/stubs/Sketchup/Loop.rb +137 -137
- data/lib/sketchup-api-stubs/stubs/Sketchup/Material.rb +414 -416
- data/lib/sketchup-api-stubs/stubs/Sketchup/Materials.rb +318 -311
- data/lib/sketchup-api-stubs/stubs/Sketchup/MaterialsObserver.rb +142 -141
- data/lib/sketchup-api-stubs/stubs/Sketchup/Menu.rb +93 -95
- data/lib/sketchup-api-stubs/stubs/Sketchup/Model.rb +1651 -1638
- data/lib/sketchup-api-stubs/stubs/Sketchup/ModelObserver.rb +357 -356
- data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsManager.rb +131 -132
- data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsProvider.rb +284 -284
- data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsProviderObserver.rb +58 -58
- data/lib/sketchup-api-stubs/stubs/Sketchup/Page.rb +797 -770
- data/lib/sketchup-api-stubs/stubs/Sketchup/Pages.rb +363 -353
- data/lib/sketchup-api-stubs/stubs/Sketchup/PagesObserver.rb +77 -76
- data/lib/sketchup-api-stubs/stubs/Sketchup/PickHelper.rb +478 -456
- data/lib/sketchup-api-stubs/stubs/Sketchup/RegionalSettings.rb +43 -43
- data/lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptions.rb +364 -364
- data/lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptionsObserver.rb +45 -44
- data/lib/sketchup-api-stubs/stubs/Sketchup/SectionPlane.rb +150 -150
- data/lib/sketchup-api-stubs/stubs/Sketchup/Selection.rb +459 -454
- data/lib/sketchup-api-stubs/stubs/Sketchup/SelectionObserver.rb +115 -115
- data/lib/sketchup-api-stubs/stubs/Sketchup/Set.rb +212 -212
- data/lib/sketchup-api-stubs/stubs/Sketchup/ShadowInfo.rb +257 -257
- data/lib/sketchup-api-stubs/stubs/Sketchup/ShadowInfoObserver.rb +59 -57
- data/lib/sketchup-api-stubs/stubs/Sketchup/Skp.rb +40 -0
- data/lib/sketchup-api-stubs/stubs/Sketchup/Style.rb +69 -69
- data/lib/sketchup-api-stubs/stubs/Sketchup/Styles.rb +217 -211
- data/lib/sketchup-api-stubs/stubs/Sketchup/Text.rb +262 -262
- data/lib/sketchup-api-stubs/stubs/Sketchup/Texture.rb +217 -225
- data/lib/sketchup-api-stubs/stubs/Sketchup/TextureWriter.rb +237 -237
- data/lib/sketchup-api-stubs/stubs/Sketchup/Tool.rb +835 -829
- data/lib/sketchup-api-stubs/stubs/Sketchup/Tools.rb +132 -132
- data/lib/sketchup-api-stubs/stubs/Sketchup/ToolsObserver.rb +156 -154
- data/lib/sketchup-api-stubs/stubs/Sketchup/UVHelper.rb +71 -61
- data/lib/sketchup-api-stubs/stubs/Sketchup/Vertex.rb +142 -142
- data/lib/sketchup-api-stubs/stubs/Sketchup/View.rb +1307 -1301
- data/lib/sketchup-api-stubs/stubs/Sketchup/ViewObserver.rb +45 -43
- data/lib/sketchup-api-stubs/stubs/UI/Command.rb +317 -310
- data/lib/sketchup-api-stubs/stubs/UI/HtmlDialog.rb +387 -356
- data/lib/sketchup-api-stubs/stubs/UI/Notification.rb +255 -229
- data/lib/sketchup-api-stubs/stubs/UI/Toolbar.rb +240 -240
- data/lib/sketchup-api-stubs/stubs/UI/WebDialog.rb +633 -633
- data/lib/sketchup-api-stubs/stubs/_top_level.rb +311 -311
- data/lib/sketchup-api-stubs/stubs/array.rb +741 -741
- data/lib/sketchup-api-stubs/stubs/geom.rb +351 -348
- data/lib/sketchup-api-stubs/stubs/languagehandler.rb +92 -92
- data/lib/sketchup-api-stubs/stubs/length.rb +278 -278
- data/lib/sketchup-api-stubs/stubs/numeric.rb +249 -249
- data/lib/sketchup-api-stubs/stubs/sketchup.rb +1342 -1310
- data/lib/sketchup-api-stubs/stubs/sketchupextension.rb +353 -353
- data/lib/sketchup-api-stubs/stubs/string.rb +24 -24
- data/lib/sketchup-api-stubs/stubs/ui.rb +668 -667
- metadata +4 -2
@@ -1,104 +1,104 @@
|
|
1
|
-
# Copyright:: Copyright 2020 Trimble Inc.
|
2
|
-
# License:: The MIT License (MIT)
|
3
|
-
|
4
|
-
# This observer interface is implemented to react to changes in camera
|
5
|
-
# position (a frame) between one scene page and another. This observer's
|
6
|
-
# callback method is called when the user manually makes a scene change,
|
7
|
-
# or the internal animation feature runs.
|
8
|
-
#
|
9
|
-
# This abstract observer is any object that implements a callback method
|
10
|
-
# +frameChange+ with 3 arguments: +from_scene+ (the scene that you
|
11
|
-
# transition from), +to_scene+ (the scene that you transition toward)
|
12
|
-
# and a +percent_done+ between +0.0+ and +1.0+ (that indicates the percentage
|
13
|
-
# of transition between the two scenes.)
|
14
|
-
#
|
15
|
-
# # Basic Class Definition:
|
16
|
-
# class MyFrameChangeObserver
|
17
|
-
# def frameChange(from_scene, to_scene, percent_done)
|
18
|
-
# # Actual code here.
|
19
|
-
# end
|
20
|
-
# end
|
21
|
-
#
|
22
|
-
# The observer is attached using the {Sketchup::Pages.add_frame_change_observer}
|
23
|
-
# class method, which returns an integer id that can be stored and later
|
24
|
-
# used to detach the observer.
|
25
|
-
#
|
26
|
-
# # Attach an observer to the global Pages object:
|
27
|
-
# @id = Sketchup::Pages.add_frame_change_observer(MyFrameChangeObserver.new)
|
28
|
-
#
|
29
|
-
# Later, detaching this observer is done by passing this +id+ reference to
|
30
|
-
# the {Sketchup::Pages.remove_frame_change_observer} class method.
|
31
|
-
#
|
32
|
-
# # Basic Observer Detachment:
|
33
|
-
# Sketchup::Pages.remove_frame_change_observer(@id)
|
34
|
-
#
|
35
|
-
# @abstract Implement the methods described in this class to create a frame
|
36
|
-
# change observer. You can not sub-class this class because it is not
|
37
|
-
# defined by the API.
|
38
|
-
#
|
39
|
-
# @example Draws a progress bar on the status line.
|
40
|
-
# class MyFrameChangeObserver
|
41
|
-
# def frameChange(from_scene, to_scene, percent_done)
|
42
|
-
# if percent_done == 0.0
|
43
|
-
# Sketchup.status_text= "% done:"
|
44
|
-
# if from_scene.nil? # PC bug!
|
45
|
-
# puts "Animating to page: '#{to_scene.name}'"
|
46
|
-
# else
|
47
|
-
# puts "From page '#{from_scene.name}' to '#{to_scene.name}'"
|
48
|
-
# end
|
49
|
-
# else
|
50
|
-
# Sketchup.status_text= "% done: #{'|'*(percent_done*100).to_i}"
|
51
|
-
# UI.messagebox("All Done!") if percent_done >= 1.0
|
52
|
-
# end
|
53
|
-
# end
|
54
|
-
# end
|
55
|
-
# @id = Sketchup::Pages.add_frame_change_observer(MyFrameChangeObserver.new)
|
56
|
-
class Sketchup::FrameChangeObserver
|
57
|
-
|
58
|
-
# Instance Methods
|
59
|
-
|
60
|
-
# This callback method is called during a slide show or creation of an
|
61
|
-
# animation after the camera has been set up, but before the frame is
|
62
|
-
# displayed. It gives you a chance to perform your own actions during
|
63
|
-
# the animation. The arguments for +frameChange+ method are the scene
|
64
|
-
# page that you transition from (+from_scene+), the scene page that you
|
65
|
-
# transition to (+to_scene+), and a +percent_done+ between +0.0+ and +1.0+
|
66
|
-
# that tell you the percentage of the transition between the two scene
|
67
|
-
# pages.
|
68
|
-
#
|
69
|
-
# By watching for +percent_done >= 1.0+, you can activate Ruby code that
|
70
|
-
# executes as soon as the user's camera has finished animating.
|
71
|
-
#
|
72
|
-
# @example
|
73
|
-
# class MyFrameChangeObserver
|
74
|
-
# def frameChange(from_scene, to_scene, percent_done)
|
75
|
-
# if percent_done == 0.0
|
76
|
-
# puts "Animating to scene '#{to_scene.name}':"
|
77
|
-
# else
|
78
|
-
# puts format("% 7.2f %",percent_done*100)
|
79
|
-
# end
|
80
|
-
# end
|
81
|
-
# end
|
82
|
-
# @id = Sketchup::Pages.add_frame_change_observer(MyFrameChangeObserver.new)
|
83
|
-
#
|
84
|
-
# @note The +from_scene+ argument into this callback does not appear to
|
85
|
-
# be populated on the PC. You can store a variable that keeps track of
|
86
|
-
# the +to_scene+ and then use that on a subsequent Scene selection to
|
87
|
-
# determine the last Page that the user was on.
|
88
|
-
#
|
89
|
-
# @param [Sketchup::Page, nil] from_scene
|
90
|
-
# The previous scene page the view is transitioning from.
|
91
|
-
#
|
92
|
-
# @param [Sketchup::Page] to_scene
|
93
|
-
# The selected scene page the view is transitioning towards.
|
94
|
-
#
|
95
|
-
# @param [Float] percent_done
|
96
|
-
# The percentage of transition between the two scene pages.
|
97
|
-
#
|
98
|
-
# @return [void] Value can be anything, but is ignored by SketchUp.
|
99
|
-
#
|
100
|
-
# @version SketchUp 6.0
|
101
|
-
def frameChange(from_scene, to_scene, percent_done)
|
102
|
-
end
|
103
|
-
|
104
|
-
end
|
1
|
+
# Copyright:: Copyright 2020 Trimble Inc.
|
2
|
+
# License:: The MIT License (MIT)
|
3
|
+
|
4
|
+
# This observer interface is implemented to react to changes in camera
|
5
|
+
# position (a frame) between one scene page and another. This observer's
|
6
|
+
# callback method is called when the user manually makes a scene change,
|
7
|
+
# or the internal animation feature runs.
|
8
|
+
#
|
9
|
+
# This abstract observer is any object that implements a callback method
|
10
|
+
# +frameChange+ with 3 arguments: +from_scene+ (the scene that you
|
11
|
+
# transition from), +to_scene+ (the scene that you transition toward)
|
12
|
+
# and a +percent_done+ between +0.0+ and +1.0+ (that indicates the percentage
|
13
|
+
# of transition between the two scenes.)
|
14
|
+
#
|
15
|
+
# # Basic Class Definition:
|
16
|
+
# class MyFrameChangeObserver
|
17
|
+
# def frameChange(from_scene, to_scene, percent_done)
|
18
|
+
# # Actual code here.
|
19
|
+
# end
|
20
|
+
# end
|
21
|
+
#
|
22
|
+
# The observer is attached using the {Sketchup::Pages.add_frame_change_observer}
|
23
|
+
# class method, which returns an integer id that can be stored and later
|
24
|
+
# used to detach the observer.
|
25
|
+
#
|
26
|
+
# # Attach an observer to the global Pages object:
|
27
|
+
# @id = Sketchup::Pages.add_frame_change_observer(MyFrameChangeObserver.new)
|
28
|
+
#
|
29
|
+
# Later, detaching this observer is done by passing this +id+ reference to
|
30
|
+
# the {Sketchup::Pages.remove_frame_change_observer} class method.
|
31
|
+
#
|
32
|
+
# # Basic Observer Detachment:
|
33
|
+
# Sketchup::Pages.remove_frame_change_observer(@id)
|
34
|
+
#
|
35
|
+
# @abstract Implement the methods described in this class to create a frame
|
36
|
+
# change observer. You can not sub-class this class because it is not
|
37
|
+
# defined by the API.
|
38
|
+
#
|
39
|
+
# @example Draws a progress bar on the status line.
|
40
|
+
# class MyFrameChangeObserver
|
41
|
+
# def frameChange(from_scene, to_scene, percent_done)
|
42
|
+
# if percent_done == 0.0
|
43
|
+
# Sketchup.status_text= "% done:"
|
44
|
+
# if from_scene.nil? # PC bug!
|
45
|
+
# puts "Animating to page: '#{to_scene.name}'"
|
46
|
+
# else
|
47
|
+
# puts "From page '#{from_scene.name}' to '#{to_scene.name}'"
|
48
|
+
# end
|
49
|
+
# else
|
50
|
+
# Sketchup.status_text= "% done: #{'|'*(percent_done*100).to_i}"
|
51
|
+
# UI.messagebox("All Done!") if percent_done >= 1.0
|
52
|
+
# end
|
53
|
+
# end
|
54
|
+
# end
|
55
|
+
# @id = Sketchup::Pages.add_frame_change_observer(MyFrameChangeObserver.new)
|
56
|
+
class Sketchup::FrameChangeObserver
|
57
|
+
|
58
|
+
# Instance Methods
|
59
|
+
|
60
|
+
# This callback method is called during a slide show or creation of an
|
61
|
+
# animation after the camera has been set up, but before the frame is
|
62
|
+
# displayed. It gives you a chance to perform your own actions during
|
63
|
+
# the animation. The arguments for +frameChange+ method are the scene
|
64
|
+
# page that you transition from (+from_scene+), the scene page that you
|
65
|
+
# transition to (+to_scene+), and a +percent_done+ between +0.0+ and +1.0+
|
66
|
+
# that tell you the percentage of the transition between the two scene
|
67
|
+
# pages.
|
68
|
+
#
|
69
|
+
# By watching for +percent_done >= 1.0+, you can activate Ruby code that
|
70
|
+
# executes as soon as the user's camera has finished animating.
|
71
|
+
#
|
72
|
+
# @example
|
73
|
+
# class MyFrameChangeObserver
|
74
|
+
# def frameChange(from_scene, to_scene, percent_done)
|
75
|
+
# if percent_done == 0.0
|
76
|
+
# puts "Animating to scene '#{to_scene.name}':"
|
77
|
+
# else
|
78
|
+
# puts format("% 7.2f %",percent_done*100)
|
79
|
+
# end
|
80
|
+
# end
|
81
|
+
# end
|
82
|
+
# @id = Sketchup::Pages.add_frame_change_observer(MyFrameChangeObserver.new)
|
83
|
+
#
|
84
|
+
# @note The +from_scene+ argument into this callback does not appear to
|
85
|
+
# be populated on the PC. You can store a variable that keeps track of
|
86
|
+
# the +to_scene+ and then use that on a subsequent Scene selection to
|
87
|
+
# determine the last Page that the user was on.
|
88
|
+
#
|
89
|
+
# @param [Sketchup::Page, nil] from_scene
|
90
|
+
# The previous scene page the view is transitioning from.
|
91
|
+
#
|
92
|
+
# @param [Sketchup::Page] to_scene
|
93
|
+
# The selected scene page the view is transitioning towards.
|
94
|
+
#
|
95
|
+
# @param [Float] percent_done
|
96
|
+
# The percentage of transition between the two scene pages.
|
97
|
+
#
|
98
|
+
# @return [void] Value can be anything, but is ignored by SketchUp.
|
99
|
+
#
|
100
|
+
# @version SketchUp 6.0
|
101
|
+
def frameChange(from_scene, to_scene, percent_done)
|
102
|
+
end
|
103
|
+
|
104
|
+
end
|
@@ -1,697 +1,699 @@
|
|
1
|
-
# Copyright:: Copyright 2020 Trimble Inc.
|
2
|
-
# License:: The MIT License (MIT)
|
3
|
-
|
4
|
-
# A Group class contains methods for manipulating groups of entities.
|
5
|
-
#
|
6
|
-
# Groups in SketchUp are very similar to
|
7
|
-
#
|
8
|
-
#
|
9
|
-
#
|
10
|
-
#
|
11
|
-
#
|
12
|
-
#
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
#
|
18
|
-
|
19
|
-
#
|
20
|
-
#
|
21
|
-
#
|
22
|
-
#
|
23
|
-
#
|
24
|
-
#
|
25
|
-
#
|
26
|
-
#
|
27
|
-
#
|
28
|
-
#
|
29
|
-
#
|
30
|
-
#
|
31
|
-
# @
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
#
|
38
|
-
#
|
39
|
-
#
|
40
|
-
#
|
41
|
-
#
|
42
|
-
#
|
43
|
-
#
|
44
|
-
#
|
45
|
-
#
|
46
|
-
# @
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
#
|
53
|
-
#
|
54
|
-
#
|
55
|
-
#
|
56
|
-
#
|
57
|
-
#
|
58
|
-
#
|
59
|
-
#
|
60
|
-
#
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
#
|
67
|
-
#
|
68
|
-
#
|
69
|
-
#
|
70
|
-
#
|
71
|
-
#
|
72
|
-
#
|
73
|
-
# pts = []
|
74
|
-
# pts[
|
75
|
-
# pts[
|
76
|
-
#
|
77
|
-
#
|
78
|
-
#
|
79
|
-
#
|
80
|
-
#
|
81
|
-
#
|
82
|
-
#
|
83
|
-
#
|
84
|
-
#
|
85
|
-
#
|
86
|
-
#
|
87
|
-
#
|
88
|
-
#
|
89
|
-
# @
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
#
|
96
|
-
#
|
97
|
-
#
|
98
|
-
#
|
99
|
-
#
|
100
|
-
#
|
101
|
-
#
|
102
|
-
# pts = []
|
103
|
-
# pts[
|
104
|
-
# pts[
|
105
|
-
#
|
106
|
-
#
|
107
|
-
#
|
108
|
-
#
|
109
|
-
#
|
110
|
-
#
|
111
|
-
#
|
112
|
-
#
|
113
|
-
#
|
114
|
-
#
|
115
|
-
#
|
116
|
-
#
|
117
|
-
#
|
118
|
-
#
|
119
|
-
# UI.messagebox
|
120
|
-
#
|
121
|
-
#
|
122
|
-
#
|
123
|
-
#
|
124
|
-
#
|
125
|
-
#
|
126
|
-
#
|
127
|
-
# @
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
#
|
134
|
-
#
|
135
|
-
#
|
136
|
-
#
|
137
|
-
#
|
138
|
-
#
|
139
|
-
#
|
140
|
-
#
|
141
|
-
# pts = []
|
142
|
-
# pts[
|
143
|
-
# pts[
|
144
|
-
#
|
145
|
-
#
|
146
|
-
#
|
147
|
-
#
|
148
|
-
#
|
149
|
-
#
|
150
|
-
#
|
151
|
-
#
|
152
|
-
#
|
153
|
-
#
|
154
|
-
#
|
155
|
-
#
|
156
|
-
# UI.messagebox
|
157
|
-
#
|
158
|
-
#
|
159
|
-
#
|
160
|
-
#
|
161
|
-
# @
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
#
|
168
|
-
#
|
169
|
-
#
|
170
|
-
#
|
171
|
-
#
|
172
|
-
#
|
173
|
-
#
|
174
|
-
#
|
175
|
-
#
|
176
|
-
#
|
177
|
-
#
|
178
|
-
#
|
179
|
-
# @
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
#
|
186
|
-
#
|
187
|
-
#
|
188
|
-
#
|
189
|
-
#
|
190
|
-
# group.
|
191
|
-
#
|
192
|
-
#
|
193
|
-
#
|
194
|
-
# UI.messagebox "
|
195
|
-
#
|
196
|
-
#
|
197
|
-
#
|
198
|
-
#
|
199
|
-
#
|
200
|
-
#
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
#
|
207
|
-
#
|
208
|
-
#
|
209
|
-
#
|
210
|
-
#
|
211
|
-
#
|
212
|
-
#
|
213
|
-
#
|
214
|
-
#
|
215
|
-
# @
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
#
|
222
|
-
#
|
223
|
-
#
|
224
|
-
#
|
225
|
-
#
|
226
|
-
#
|
227
|
-
#
|
228
|
-
#
|
229
|
-
#
|
230
|
-
#
|
231
|
-
# @param [Sketchup::Group, Sketchup::ComponentInstance] group
|
232
|
-
# The group to intersect this group with.
|
233
|
-
#
|
234
|
-
# @return [Sketchup::Group, nil] The resultant group if the two objects
|
235
|
-
# (this and arg) represent manifold solids and the
|
236
|
-
# operation succeeds. Otherwise nil is returned.
|
237
|
-
#
|
238
|
-
# @version SketchUp 8.0
|
239
|
-
def intersect(group)
|
240
|
-
end
|
241
|
-
|
242
|
-
# The local_bounds method
|
243
|
-
#
|
244
|
-
#
|
245
|
-
#
|
246
|
-
#
|
247
|
-
#
|
248
|
-
# @example
|
249
|
-
# # Add a group to the model.
|
250
|
-
# group = Sketchup.active_model.entities.add_group
|
251
|
-
# group.entities.add_line([0,0,0],[100,100,100])
|
252
|
-
# transformation = Geom::Transformation.new([100,0,0])
|
253
|
-
#
|
254
|
-
# # Note that local_bounds_1 and local_bounds_2 will be identical, since
|
255
|
-
# # they both find the bounding box in group's untransformed state.
|
256
|
-
# local_bounds_1 = group.local_bounds
|
257
|
-
# group.transform! transformation
|
258
|
-
# local_bounds_2 = group.local_bounds
|
259
|
-
#
|
260
|
-
# @return [Geom::BoundingBox]
|
261
|
-
#
|
262
|
-
# @version SketchUp 7.0
|
263
|
-
def local_bounds
|
264
|
-
end
|
265
|
-
|
266
|
-
# The locked= method is used to lock a group.
|
267
|
-
#
|
268
|
-
# @example
|
269
|
-
# # Add a group to the model.
|
270
|
-
# group = Sketchup.active_model.entities.add_group
|
271
|
-
# group.entities.add_line([0,0,0],[100,100,100])
|
272
|
-
# status = group.locked = true
|
273
|
-
#
|
274
|
-
# @param [Boolean] lock
|
275
|
-
#
|
276
|
-
# @return [Boolean] true if the group is locked, false if not
|
277
|
-
#
|
278
|
-
# @version SketchUp 6.0
|
279
|
-
def locked=(lock)
|
280
|
-
end
|
281
|
-
|
282
|
-
# The locked? method is used to determine if a group is locked.
|
283
|
-
#
|
284
|
-
# @example
|
285
|
-
# depth = 100
|
286
|
-
# width = 100
|
287
|
-
# model = Sketchup.active_model
|
288
|
-
# entities = model.active_entities
|
289
|
-
# pts = []
|
290
|
-
# pts[0] = [0, 0, 0]
|
291
|
-
# pts[1] = [width, 0, 0]
|
292
|
-
# pts[2] = [width, depth, 0]
|
293
|
-
# pts[3] = [0, depth, 0]
|
294
|
-
#
|
295
|
-
# # Add the group to the entities in the model
|
296
|
-
# group = entities.add_group
|
297
|
-
# status = group.locked?
|
298
|
-
# UI.messagebox status
|
299
|
-
#
|
300
|
-
# @return [Boolean]
|
301
|
-
#
|
302
|
-
# @version SketchUp 6.0
|
303
|
-
def locked?
|
304
|
-
end
|
305
|
-
|
306
|
-
# The make_unique method is used to force a group to have a unique
|
307
|
-
#
|
308
|
-
#
|
309
|
-
#
|
310
|
-
#
|
311
|
-
#
|
312
|
-
#
|
313
|
-
#
|
314
|
-
#
|
315
|
-
# @example
|
316
|
-
# # Assume we have 2 groups, one copied from the other and sharing definitions
|
317
|
-
# groups = Sketchup.active_model.entities.grep(Sketchup::Group)
|
318
|
-
# groups[0].make_unique
|
319
|
-
# if (groups[0].entities.to_a == groups[1].entities.to_a)
|
320
|
-
# puts "This should not happen since we made the groups unique"
|
321
|
-
# end
|
322
|
-
#
|
323
|
-
# @return [Sketchup::Group] the unique group
|
324
|
-
#
|
325
|
-
# @version SketchUp 6.0
|
326
|
-
def make_unique
|
327
|
-
end
|
328
|
-
|
329
|
-
# The manifold? method is used to determine if a group is manifold.
|
330
|
-
#
|
331
|
-
# @example
|
332
|
-
# entities = Sketchup.active_model.entities
|
333
|
-
# definition = Sketchup.active_model.definitions[0]
|
334
|
-
# transformation = Geom::Transformation.new([0,0,0])
|
335
|
-
# group = entities.add_instance(definition, transformation)
|
336
|
-
# status = group.manifold?
|
337
|
-
#
|
338
|
-
# @return [Boolean]
|
339
|
-
#
|
340
|
-
# @version SketchUp 8.0
|
341
|
-
def manifold?
|
342
|
-
end
|
343
|
-
|
344
|
-
# The move! method is used to
|
345
|
-
#
|
346
|
-
#
|
347
|
-
#
|
348
|
-
#
|
349
|
-
#
|
350
|
-
#
|
351
|
-
#
|
352
|
-
#
|
353
|
-
#
|
354
|
-
#
|
355
|
-
#
|
356
|
-
#
|
357
|
-
#
|
358
|
-
# pts
|
359
|
-
# pts[
|
360
|
-
# pts[
|
361
|
-
# pts[
|
362
|
-
#
|
363
|
-
#
|
364
|
-
# group
|
365
|
-
#
|
366
|
-
#
|
367
|
-
#
|
368
|
-
#
|
369
|
-
#
|
370
|
-
# face
|
371
|
-
#
|
372
|
-
#
|
373
|
-
#
|
374
|
-
#
|
375
|
-
#
|
376
|
-
#
|
377
|
-
#
|
378
|
-
#
|
379
|
-
#
|
380
|
-
# @
|
381
|
-
#
|
382
|
-
#
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
#
|
390
|
-
#
|
391
|
-
#
|
392
|
-
#
|
393
|
-
#
|
394
|
-
#
|
395
|
-
#
|
396
|
-
#
|
397
|
-
#
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
#
|
405
|
-
#
|
406
|
-
#
|
407
|
-
#
|
408
|
-
#
|
409
|
-
#
|
410
|
-
#
|
411
|
-
#
|
412
|
-
#
|
413
|
-
# @
|
414
|
-
#
|
415
|
-
#
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
#
|
423
|
-
#
|
424
|
-
#
|
425
|
-
#
|
426
|
-
#
|
427
|
-
#
|
428
|
-
#
|
429
|
-
#
|
430
|
-
#
|
431
|
-
#
|
432
|
-
# @
|
433
|
-
#
|
434
|
-
#
|
435
|
-
#
|
436
|
-
#
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
#
|
444
|
-
#
|
445
|
-
#
|
446
|
-
#
|
447
|
-
#
|
448
|
-
#
|
449
|
-
#
|
450
|
-
#
|
451
|
-
#
|
452
|
-
#
|
453
|
-
#
|
454
|
-
# @
|
455
|
-
#
|
456
|
-
#
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
#
|
464
|
-
#
|
465
|
-
#
|
466
|
-
#
|
467
|
-
#
|
468
|
-
#
|
469
|
-
#
|
470
|
-
#
|
471
|
-
#
|
472
|
-
#
|
473
|
-
#
|
474
|
-
#
|
475
|
-
#
|
476
|
-
#
|
477
|
-
#
|
478
|
-
#
|
479
|
-
#
|
480
|
-
#
|
481
|
-
# @param [
|
482
|
-
#
|
483
|
-
#
|
484
|
-
#
|
485
|
-
#
|
486
|
-
#
|
487
|
-
#
|
488
|
-
# @
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
#
|
496
|
-
#
|
497
|
-
#
|
498
|
-
#
|
499
|
-
#
|
500
|
-
#
|
501
|
-
#
|
502
|
-
#
|
503
|
-
#
|
504
|
-
#
|
505
|
-
#
|
506
|
-
#
|
507
|
-
#
|
508
|
-
#
|
509
|
-
#
|
510
|
-
#
|
511
|
-
#
|
512
|
-
#
|
513
|
-
#
|
514
|
-
# the difference of volume
|
515
|
-
#
|
516
|
-
#
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
#
|
522
|
-
#
|
523
|
-
#
|
524
|
-
#
|
525
|
-
#
|
526
|
-
#
|
527
|
-
#
|
528
|
-
#
|
529
|
-
#
|
530
|
-
#
|
531
|
-
#
|
532
|
-
#
|
533
|
-
#
|
534
|
-
#
|
535
|
-
#
|
536
|
-
#
|
537
|
-
#
|
538
|
-
#
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
#
|
544
|
-
#
|
545
|
-
#
|
546
|
-
#
|
547
|
-
# group
|
548
|
-
# group.entities.
|
549
|
-
#
|
550
|
-
#
|
551
|
-
# group
|
552
|
-
#
|
553
|
-
#
|
554
|
-
#
|
555
|
-
#
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
#
|
561
|
-
#
|
562
|
-
#
|
563
|
-
#
|
564
|
-
#
|
565
|
-
#
|
566
|
-
#
|
567
|
-
#
|
568
|
-
#
|
569
|
-
# pts
|
570
|
-
# pts[
|
571
|
-
# pts[
|
572
|
-
# pts[
|
573
|
-
#
|
574
|
-
#
|
575
|
-
# group
|
576
|
-
#
|
577
|
-
#
|
578
|
-
#
|
579
|
-
#
|
580
|
-
#
|
581
|
-
# face
|
582
|
-
#
|
583
|
-
#
|
584
|
-
#
|
585
|
-
#
|
586
|
-
# UI.messagebox
|
587
|
-
#
|
588
|
-
#
|
589
|
-
#
|
590
|
-
#
|
591
|
-
#
|
592
|
-
#
|
593
|
-
#
|
594
|
-
#
|
595
|
-
#
|
596
|
-
#
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
#
|
602
|
-
#
|
603
|
-
#
|
604
|
-
#
|
605
|
-
# group
|
606
|
-
# group.entities.
|
607
|
-
#
|
608
|
-
#
|
609
|
-
#
|
610
|
-
#
|
611
|
-
#
|
612
|
-
#
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
#
|
618
|
-
#
|
619
|
-
#
|
620
|
-
#
|
621
|
-
# group
|
622
|
-
# group.entities.
|
623
|
-
#
|
624
|
-
#
|
625
|
-
#
|
626
|
-
#
|
627
|
-
#
|
628
|
-
#
|
629
|
-
#
|
630
|
-
# @
|
631
|
-
|
632
|
-
|
633
|
-
|
634
|
-
|
635
|
-
|
636
|
-
#
|
637
|
-
#
|
638
|
-
#
|
639
|
-
#
|
640
|
-
#
|
641
|
-
#
|
642
|
-
#
|
643
|
-
#
|
644
|
-
#
|
645
|
-
#
|
646
|
-
#
|
647
|
-
# @param [Sketchup::Group, Sketchup::ComponentInstance] group
|
648
|
-
# The group to trim this group against.
|
649
|
-
#
|
650
|
-
# @return [Sketchup::Group, nil] The resultant group if the two objects
|
651
|
-
# (this and arg) represent manifold solids and the
|
652
|
-
# operation succeeds otherwise nil is returned.
|
653
|
-
#
|
654
|
-
# @version SketchUp 8.0
|
655
|
-
def trim(group)
|
656
|
-
end
|
657
|
-
|
658
|
-
# The union method is used to compute the boolean union of the two groups
|
659
|
-
# representing manifold solid volumes (this | arg). If the specified
|
660
|
-
# objects (this and arg) do not represent manifold volumes, this method fails.
|
661
|
-
#
|
662
|
-
# @example
|
663
|
-
# entities = Sketchup.active_model.entities
|
664
|
-
# group1 = entities[0]
|
665
|
-
# group2 = entities[1]
|
666
|
-
# result = group1.union(group2)
|
667
|
-
#
|
668
|
-
# @
|
669
|
-
#
|
670
|
-
#
|
671
|
-
#
|
672
|
-
#
|
673
|
-
#
|
674
|
-
#
|
675
|
-
#
|
676
|
-
|
677
|
-
|
678
|
-
|
679
|
-
|
680
|
-
|
681
|
-
#
|
682
|
-
#
|
683
|
-
#
|
684
|
-
#
|
685
|
-
#
|
686
|
-
#
|
687
|
-
#
|
688
|
-
#
|
689
|
-
#
|
690
|
-
#
|
691
|
-
#
|
692
|
-
#
|
693
|
-
#
|
694
|
-
|
695
|
-
|
696
|
-
|
697
|
-
end
|
1
|
+
# Copyright:: Copyright 2020 Trimble Inc.
|
2
|
+
# License:: The MIT License (MIT)
|
3
|
+
|
4
|
+
# A Group class contains methods for manipulating groups of entities.
|
5
|
+
#
|
6
|
+
# Groups in SketchUp are very similar to components, but can from a user point
|
7
|
+
# of view be thought of as unique objects. Groups can be instanced when copied
|
8
|
+
# but are silently made unique when edited through the GUI. To honor this
|
9
|
+
# behavior, make sure to call {#make_unique} before modifying a group through
|
10
|
+
# the API.
|
11
|
+
#
|
12
|
+
# @version SketchUp 6.0
|
13
|
+
class Sketchup::Group < Sketchup::Drawingelement
|
14
|
+
|
15
|
+
# Instance Methods
|
16
|
+
|
17
|
+
# The add_observer method is used to add a ComponentInstance observer to the
|
18
|
+
# group.
|
19
|
+
#
|
20
|
+
# @example
|
21
|
+
# # Add a group to the model.
|
22
|
+
# group = Sketchup.active_model.entities.add_group
|
23
|
+
# group.entities.add_line([0,0,0],[100,100,100])
|
24
|
+
# status = group.add_observer observer
|
25
|
+
#
|
26
|
+
# @param [Object] observer
|
27
|
+
# An observer.
|
28
|
+
#
|
29
|
+
# @return [Boolean] true if successful, false if unsuccessful.
|
30
|
+
#
|
31
|
+
# @version SketchUp 6.0
|
32
|
+
def add_observer(observer)
|
33
|
+
end
|
34
|
+
|
35
|
+
# The copy method is used to create a new Group object that is a copy of the
|
36
|
+
# group.
|
37
|
+
#
|
38
|
+
# @example
|
39
|
+
# # Add a group to the model.
|
40
|
+
# group = Sketchup.active_model.entities.add_group
|
41
|
+
# group.entities.add_line([0,0,0],[100,100,100])
|
42
|
+
# group2 = group.copy
|
43
|
+
#
|
44
|
+
# @return [Sketchup::Group] a new Group object
|
45
|
+
#
|
46
|
+
# @version SketchUp 6.0
|
47
|
+
def copy
|
48
|
+
end
|
49
|
+
|
50
|
+
# The definition method is used to retrieve the component definition for this
|
51
|
+
# group.
|
52
|
+
#
|
53
|
+
# @example
|
54
|
+
# group = Sketchup.active_model.entities.add_group
|
55
|
+
# definition = group.definition
|
56
|
+
#
|
57
|
+
# @return [Sketchup::ComponentDefinition] a ComponentDefinition object if
|
58
|
+
# successful
|
59
|
+
#
|
60
|
+
# @version SketchUp 2015
|
61
|
+
def definition
|
62
|
+
end
|
63
|
+
|
64
|
+
# The description method is used to retrieve the description for the group.
|
65
|
+
#
|
66
|
+
# @example
|
67
|
+
# depth = 100
|
68
|
+
# width = 100
|
69
|
+
# model = Sketchup.active_model
|
70
|
+
# entities = model.active_entities
|
71
|
+
# pts = []
|
72
|
+
# pts[0] = [0, 0, 0]
|
73
|
+
# pts[1] = [width, 0, 0]
|
74
|
+
# pts[2] = [width, depth, 0]
|
75
|
+
# pts[3] = [0, depth, 0]
|
76
|
+
# # Add the group to the entities in the model
|
77
|
+
# group = entities.add_group
|
78
|
+
#
|
79
|
+
# # Get the entities within the group
|
80
|
+
# entities2 = group.entities
|
81
|
+
#
|
82
|
+
# # Add a face to within the group
|
83
|
+
# face = entities2.add_face pts
|
84
|
+
# group.description = "This is a Group with a 2d Face"
|
85
|
+
# description = group.description
|
86
|
+
#
|
87
|
+
# @return [String] a string description if successful
|
88
|
+
#
|
89
|
+
# @version SketchUp 6.0
|
90
|
+
def description
|
91
|
+
end
|
92
|
+
|
93
|
+
# The description= method is used to set the description for the group.
|
94
|
+
#
|
95
|
+
# @example
|
96
|
+
# depth = 100
|
97
|
+
# width = 100
|
98
|
+
# model = Sketchup.active_model
|
99
|
+
# entities = model.active_entities
|
100
|
+
# pts = []
|
101
|
+
# pts[0] = [0, 0, 0]
|
102
|
+
# pts[1] = [width, 0, 0]
|
103
|
+
# pts[2] = [width, depth, 0]
|
104
|
+
# pts[3] = [0, depth, 0]
|
105
|
+
#
|
106
|
+
# # Add the group to the entities in the model
|
107
|
+
# group = entities.add_group
|
108
|
+
#
|
109
|
+
# # Get the entities within the group
|
110
|
+
# entities2 = group.entities
|
111
|
+
#
|
112
|
+
# # Add a face to within the group
|
113
|
+
# face = entities2.add_face pts
|
114
|
+
# group.description = "This is a Group with a 2d Face"
|
115
|
+
# description = group.description
|
116
|
+
# if (description)
|
117
|
+
# UI.messagebox description
|
118
|
+
# else
|
119
|
+
# UI.messagebox "Failure"
|
120
|
+
# end
|
121
|
+
#
|
122
|
+
# @param [String] description
|
123
|
+
# A string description.
|
124
|
+
#
|
125
|
+
# @return [String] the new description if successful
|
126
|
+
#
|
127
|
+
# @version SketchUp 6.0
|
128
|
+
def description=(description)
|
129
|
+
end
|
130
|
+
|
131
|
+
# The entities method is used to retrieve a collection of entities in the
|
132
|
+
# group.
|
133
|
+
#
|
134
|
+
# @example
|
135
|
+
# depth = 100
|
136
|
+
# width = 100
|
137
|
+
# model = Sketchup.active_model
|
138
|
+
# entities = model.active_entities
|
139
|
+
# pts = []
|
140
|
+
# pts[0] = [0, 0, 0]
|
141
|
+
# pts[1] = [width, 0, 0]
|
142
|
+
# pts[2] = [width, depth, 0]
|
143
|
+
# pts[3] = [0, depth, 0]
|
144
|
+
# # Add the group to the entities in the model
|
145
|
+
# group = entities.add_group
|
146
|
+
#
|
147
|
+
# # Get the entities within the group
|
148
|
+
# entities2 = group.entities
|
149
|
+
#
|
150
|
+
# # Add a face to within the group
|
151
|
+
# face = entities2.add_face pts
|
152
|
+
# entities = group.entities
|
153
|
+
# if (entities)
|
154
|
+
# UI.messagebox entities
|
155
|
+
# else
|
156
|
+
# UI.messagebox "Failure"
|
157
|
+
# end
|
158
|
+
#
|
159
|
+
# @return [Sketchup::Entities] an Entities object if successful
|
160
|
+
#
|
161
|
+
# @version SketchUp 6.0
|
162
|
+
def entities
|
163
|
+
end
|
164
|
+
|
165
|
+
# The equals? method is used to determine if a group is geometrically
|
166
|
+
# equivalent to another group.
|
167
|
+
#
|
168
|
+
# @example
|
169
|
+
# entities = Sketchup.active_model.entities
|
170
|
+
# group1 = entities[0]
|
171
|
+
# group2 = entities[1]
|
172
|
+
# status = group1.equals?(group2)
|
173
|
+
#
|
174
|
+
# @param [Sketchup::Group] group
|
175
|
+
# The group to compare this group with.
|
176
|
+
#
|
177
|
+
# @return [Boolean]
|
178
|
+
#
|
179
|
+
# @version SketchUp 8.0
|
180
|
+
def equals?(group)
|
181
|
+
end
|
182
|
+
|
183
|
+
# The explode method is used to explode the group into individual entities.
|
184
|
+
#
|
185
|
+
# @example
|
186
|
+
# # Add a group to the model.
|
187
|
+
# group = Sketchup.active_model.entities.add_group
|
188
|
+
# group.entities.add_line([0,0,0],[100,100,100])
|
189
|
+
#
|
190
|
+
# array = group.explode
|
191
|
+
# if array
|
192
|
+
# UI.messagebox "Exploded the group"
|
193
|
+
# else
|
194
|
+
# UI.messagebox "Failure"
|
195
|
+
# end
|
196
|
+
#
|
197
|
+
# @return [Array<Sketchup::Drawingelement>] An array of entity objects if successful, false if
|
198
|
+
# unsuccessful.
|
199
|
+
#
|
200
|
+
# @version SketchUp 6.0
|
201
|
+
def explode
|
202
|
+
end
|
203
|
+
|
204
|
+
# The guid method is used to get the base 64 encoded unique id
|
205
|
+
# for this SketchUp object.
|
206
|
+
#
|
207
|
+
# @example
|
208
|
+
# # Add a group to the model.
|
209
|
+
# group = Sketchup.active_model.entities.add_group
|
210
|
+
# group.entities.add_line([0,0,0],[100,100,100])
|
211
|
+
# guid = group.guid
|
212
|
+
#
|
213
|
+
# @return [String] a unique 22 character string
|
214
|
+
#
|
215
|
+
# @version SketchUp 2014
|
216
|
+
def guid
|
217
|
+
end
|
218
|
+
|
219
|
+
# The intersect method is used to compute the boolean intersection of two
|
220
|
+
# groups representing manifold solid volumes (this & arg). If the specified
|
221
|
+
# objects (this and arg) do not represent manifold volumes, this method fails.
|
222
|
+
#
|
223
|
+
# @example
|
224
|
+
# entities = Sketchup.active_model.entities
|
225
|
+
# group1 = entities[0]
|
226
|
+
# group2 = entities[1]
|
227
|
+
# result = group1.intersect(group2)
|
228
|
+
#
|
229
|
+
# @note This method is not available in SketchUp Make.
|
230
|
+
#
|
231
|
+
# @param [Sketchup::Group, Sketchup::ComponentInstance] group
|
232
|
+
# The group to intersect this group with.
|
233
|
+
#
|
234
|
+
# @return [Sketchup::Group, nil] The resultant group if the two objects
|
235
|
+
# (this and arg) represent manifold solids and the
|
236
|
+
# operation succeeds. Otherwise nil is returned.
|
237
|
+
#
|
238
|
+
# @version SketchUp 8.0
|
239
|
+
def intersect(group)
|
240
|
+
end
|
241
|
+
|
242
|
+
# The {#local_bounds} method is used to retrieve the {Geom::BoundingBox}
|
243
|
+
# bounding the contents of a {Sketchup::Group}, in the group's own internal
|
244
|
+
# coordinate system.
|
245
|
+
#
|
246
|
+
# @deprecated In favor of `group.definition.bounds`.
|
247
|
+
#
|
248
|
+
# @example
|
249
|
+
# # Add a group to the model.
|
250
|
+
# group = Sketchup.active_model.entities.add_group
|
251
|
+
# group.entities.add_line([0,0,0],[100,100,100])
|
252
|
+
# transformation = Geom::Transformation.new([100,0,0])
|
253
|
+
#
|
254
|
+
# # Note that local_bounds_1 and local_bounds_2 will be identical, since
|
255
|
+
# # they both find the bounding box in group's untransformed state.
|
256
|
+
# local_bounds_1 = group.local_bounds
|
257
|
+
# group.transform! transformation
|
258
|
+
# local_bounds_2 = group.local_bounds
|
259
|
+
#
|
260
|
+
# @return [Geom::BoundingBox]
|
261
|
+
#
|
262
|
+
# @version SketchUp 7.0
|
263
|
+
def local_bounds
|
264
|
+
end
|
265
|
+
|
266
|
+
# The locked= method is used to lock a group.
|
267
|
+
#
|
268
|
+
# @example
|
269
|
+
# # Add a group to the model.
|
270
|
+
# group = Sketchup.active_model.entities.add_group
|
271
|
+
# group.entities.add_line([0,0,0],[100,100,100])
|
272
|
+
# status = group.locked = true
|
273
|
+
#
|
274
|
+
# @param [Boolean] lock
|
275
|
+
#
|
276
|
+
# @return [Boolean] true if the group is locked, false if not
|
277
|
+
#
|
278
|
+
# @version SketchUp 6.0
|
279
|
+
def locked=(lock)
|
280
|
+
end
|
281
|
+
|
282
|
+
# The locked? method is used to determine if a group is locked.
|
283
|
+
#
|
284
|
+
# @example
|
285
|
+
# depth = 100
|
286
|
+
# width = 100
|
287
|
+
# model = Sketchup.active_model
|
288
|
+
# entities = model.active_entities
|
289
|
+
# pts = []
|
290
|
+
# pts[0] = [0, 0, 0]
|
291
|
+
# pts[1] = [width, 0, 0]
|
292
|
+
# pts[2] = [width, depth, 0]
|
293
|
+
# pts[3] = [0, depth, 0]
|
294
|
+
#
|
295
|
+
# # Add the group to the entities in the model
|
296
|
+
# group = entities.add_group
|
297
|
+
# status = group.locked?
|
298
|
+
# UI.messagebox status
|
299
|
+
#
|
300
|
+
# @return [Boolean]
|
301
|
+
#
|
302
|
+
# @version SketchUp 6.0
|
303
|
+
def locked?
|
304
|
+
end
|
305
|
+
|
306
|
+
# The {#make_unique} method is used to force a group to have a unique
|
307
|
+
# definition. If the group is already unique in the model, nothing happens.
|
308
|
+
#
|
309
|
+
# Copying a group in SketchUp will create a group that shares the same
|
310
|
+
# definition. SketchUp implicitly makes group unique when edited from the GUI,
|
311
|
+
# and from a user point of view groups could be thought of as always being
|
312
|
+
# unique. To honor this behavior, call this method before editing a group
|
313
|
+
# through the API.
|
314
|
+
#
|
315
|
+
# @example
|
316
|
+
# # Assume we have 2 groups, one copied from the other and sharing definitions
|
317
|
+
# groups = Sketchup.active_model.entities.grep(Sketchup::Group)
|
318
|
+
# groups[0].make_unique
|
319
|
+
# if (groups[0].entities.to_a == groups[1].entities.to_a)
|
320
|
+
# puts "This should not happen since we made the groups unique"
|
321
|
+
# end
|
322
|
+
#
|
323
|
+
# @return [Sketchup::Group] the unique group
|
324
|
+
#
|
325
|
+
# @version SketchUp 6.0
|
326
|
+
def make_unique
|
327
|
+
end
|
328
|
+
|
329
|
+
# The manifold? method is used to determine if a group is manifold.
|
330
|
+
#
|
331
|
+
# @example
|
332
|
+
# entities = Sketchup.active_model.entities
|
333
|
+
# definition = Sketchup.active_model.definitions[0]
|
334
|
+
# transformation = Geom::Transformation.new([0,0,0])
|
335
|
+
# group = entities.add_instance(definition, transformation)
|
336
|
+
# status = group.manifold?
|
337
|
+
#
|
338
|
+
# @return [Boolean]
|
339
|
+
#
|
340
|
+
# @version SketchUp 8.0
|
341
|
+
def manifold?
|
342
|
+
end
|
343
|
+
|
344
|
+
# The {#move!} method is used to set the transformation of this group
|
345
|
+
# instance, similarly to {#transformation=} but without recording to the undo
|
346
|
+
# stack.
|
347
|
+
#
|
348
|
+
# This method is useful for moving entities inside of an animation or page
|
349
|
+
# transition.
|
350
|
+
#
|
351
|
+
# @example
|
352
|
+
# point = Geom::Point3d.new 500,500,500
|
353
|
+
# transformation = Geom::Transformation.new point
|
354
|
+
# depth = 100
|
355
|
+
# width = 100
|
356
|
+
# model = Sketchup.active_model
|
357
|
+
# entities = model.active_entities
|
358
|
+
# pts = []
|
359
|
+
# pts[0] = [0, 0, 0]
|
360
|
+
# pts[1] = [width, 0, 0]
|
361
|
+
# pts[2] = [width, depth, 0]
|
362
|
+
# pts[3] = [0, depth, 0]
|
363
|
+
#
|
364
|
+
# # Add the group to the entities in the model
|
365
|
+
# group = entities.add_group
|
366
|
+
#
|
367
|
+
# # Get the entities within the group
|
368
|
+
# entities2 = group.entities
|
369
|
+
#
|
370
|
+
# # Add a face to within the group
|
371
|
+
# face = entities2.add_face pts
|
372
|
+
# UI.messagebox "Group before Move"
|
373
|
+
# group = group.move!(transformation)
|
374
|
+
#
|
375
|
+
# @note Despite the name being similar to {#transform!}, this method closer
|
376
|
+
# corresponds to {#transformation=}.
|
377
|
+
#
|
378
|
+
# @param [Geom::Transformation] transformation
|
379
|
+
#
|
380
|
+
# @return [Sketchup::Group] the transformed Group object if successful
|
381
|
+
#
|
382
|
+
# @version SketchUp 6.0
|
383
|
+
def move!(transformation)
|
384
|
+
end
|
385
|
+
|
386
|
+
# The name method is used to retrieve the name of the group.
|
387
|
+
#
|
388
|
+
# @example
|
389
|
+
# # Add a group to the model.
|
390
|
+
# group = Sketchup.active_model.entities.add_group
|
391
|
+
# group.entities.add_line([0,0,0],[100,100,100])
|
392
|
+
# group.name = "A Line"
|
393
|
+
# name = group.name
|
394
|
+
#
|
395
|
+
# @return [String] The name of the group if successful
|
396
|
+
#
|
397
|
+
# @version SketchUp 6.0
|
398
|
+
def name
|
399
|
+
end
|
400
|
+
|
401
|
+
# The name= method is used to set the description for the group.
|
402
|
+
#
|
403
|
+
# @example
|
404
|
+
# # Add a group to the model.
|
405
|
+
# group = Sketchup.active_model.entities.add_group
|
406
|
+
# group.entities.add_line([0,0,0],[100,100,100])
|
407
|
+
# group.name = "A Line"
|
408
|
+
# name = group.name
|
409
|
+
#
|
410
|
+
# @param [String] name
|
411
|
+
# A string name.
|
412
|
+
#
|
413
|
+
# @return [String] a new name if successful
|
414
|
+
#
|
415
|
+
# @version SketchUp 6.0
|
416
|
+
def name=(name)
|
417
|
+
end
|
418
|
+
|
419
|
+
# The outer_shell method is used to compute the outer shell of the two groups
|
420
|
+
# representing manifold solid volumes (this || arg). If the specified objects
|
421
|
+
# (this and arg) do not represent manifold volumes, this method fails.
|
422
|
+
#
|
423
|
+
# @example
|
424
|
+
# entities = Sketchup.active_model.entities
|
425
|
+
# group1 = entities[0]
|
426
|
+
# group2 = entities[1]
|
427
|
+
# result = group1.outer_shell(group2)
|
428
|
+
#
|
429
|
+
# @param [Sketchup::Group, Sketchup::ComponentInstance] group
|
430
|
+
# The group to outer shell this group with.
|
431
|
+
#
|
432
|
+
# @return [Sketchup::Group, nil] The resultant group if the two objects
|
433
|
+
# (this and arg) represent manifold solids and the
|
434
|
+
# operation succeeds otherwise nil is returned.
|
435
|
+
#
|
436
|
+
# @version SketchUp 8.0
|
437
|
+
def outer_shell(group)
|
438
|
+
end
|
439
|
+
|
440
|
+
# The remove_observer method is used to remove a ComponentInstance observer
|
441
|
+
# from the group.
|
442
|
+
#
|
443
|
+
# @example
|
444
|
+
# group = Sketchup.active_model.entities[0]
|
445
|
+
# if group != nil
|
446
|
+
# if group.is_a? Sketchup::Group
|
447
|
+
# status = group.remove_observer observer
|
448
|
+
# end
|
449
|
+
# end
|
450
|
+
#
|
451
|
+
# @param [Object] observer
|
452
|
+
# An observer.
|
453
|
+
#
|
454
|
+
# @return [Boolean] true if successful, false if unsuccessful.
|
455
|
+
#
|
456
|
+
# @version SketchUp 6.0
|
457
|
+
def remove_observer(observer)
|
458
|
+
end
|
459
|
+
|
460
|
+
# The show_differences method is used to determine if a group is
|
461
|
+
# geometrically equivalent to another group and in addition move the non-
|
462
|
+
# matching and matching geometry to new layers.
|
463
|
+
#
|
464
|
+
# This method will move both groups to Layer0. Geometry that is the same
|
465
|
+
# in both groups will be moved to a new layer named group_name + "_same".
|
466
|
+
# Geometry that is not the same will be moved to a layer named group_name +
|
467
|
+
# "_diff".
|
468
|
+
#
|
469
|
+
# If verbose is true, a list of all the geometry that is different
|
470
|
+
# from one group to the other is displayed texturally in the Ruby Console.
|
471
|
+
#
|
472
|
+
# @example
|
473
|
+
# entities = Sketchup.active_model.entities
|
474
|
+
# group1 = entities[0]
|
475
|
+
# group2 = entities[1]
|
476
|
+
# status = group1.show_differences(group2, true)
|
477
|
+
#
|
478
|
+
# @param [Sketchup::Group, Sketchup::ComponentInstance] group
|
479
|
+
# The group to be compared with.
|
480
|
+
#
|
481
|
+
# @param [Boolean] verbose
|
482
|
+
# A boolean flag indicating whether to display a textural
|
483
|
+
# report of the found differences to the Ruby console.
|
484
|
+
#
|
485
|
+
# @return [Boolean] true if the groups are geometrically
|
486
|
+
# equivalent. Otherwise false.
|
487
|
+
#
|
488
|
+
# @version SketchUp 8.0
|
489
|
+
def show_differences(group, verbose)
|
490
|
+
end
|
491
|
+
|
492
|
+
# The split method is used to compute the boolean split (map overlay) of the
|
493
|
+
# two groups representing manifold solid volumes (this ^ arg). If the
|
494
|
+
# specified objects (this and arg) do not represent manifold volumes,
|
495
|
+
# this method fails.
|
496
|
+
#
|
497
|
+
# @example
|
498
|
+
# entities = Sketchup.active_model.entities
|
499
|
+
# group1 = entities[0]
|
500
|
+
# group2 = entities[1]
|
501
|
+
# result = group1.split(group2)
|
502
|
+
#
|
503
|
+
# @note This method is not available in SketchUp Make.
|
504
|
+
#
|
505
|
+
# @param [Sketchup::Group, Sketchup::ComponentInstance] group
|
506
|
+
# The group to split this group with.
|
507
|
+
#
|
508
|
+
# @return [Array(Sketchup::Group, Sketchup::Group, Sketchup::Group), nil] A vector (array) of the three resultant groups
|
509
|
+
# If the two objects (this and arg) represent manifold
|
510
|
+
# solids and the operation succeeds otherwise nil is
|
511
|
+
# returned. The 3 groups are as follows:
|
512
|
+
# The intersection of volume 1 & volume 2,
|
513
|
+
# the difference of volume 1 minus volume 2,
|
514
|
+
# and the reverse difference of volume 2 minus volume 1.
|
515
|
+
#
|
516
|
+
# @version SketchUp 8.0
|
517
|
+
def split(group)
|
518
|
+
end
|
519
|
+
|
520
|
+
# The subtract method is used to compute the boolean difference of the two
|
521
|
+
# groups representing manifold solid volumes (this - arg). If the specified
|
522
|
+
# objects (this and arg) do not represent manifold volumes, this method fails.
|
523
|
+
#
|
524
|
+
# @example
|
525
|
+
# entities = Sketchup.active_model.entities
|
526
|
+
# group1 = entities[0]
|
527
|
+
# group2 = entities[1]
|
528
|
+
# result = group1.subtract(group2)
|
529
|
+
#
|
530
|
+
# @note This method is not available in SketchUp Make.
|
531
|
+
#
|
532
|
+
# @param [Sketchup::Group, Sketchup::ComponentInstance] group
|
533
|
+
# The group to subtract this group from.
|
534
|
+
#
|
535
|
+
# @return [Sketchup::Group, nil] The resultant group if the two objects
|
536
|
+
# (this and arg) represent manifold solids and the
|
537
|
+
# operation succeeds. Otherwise nil is returned.
|
538
|
+
#
|
539
|
+
# @version SketchUp 8.0
|
540
|
+
def subtract(group)
|
541
|
+
end
|
542
|
+
|
543
|
+
# The to_component method is used to convert the group to a component
|
544
|
+
# instance.
|
545
|
+
#
|
546
|
+
# @example
|
547
|
+
# # Add a group to the model.
|
548
|
+
# group = Sketchup.active_model.entities.add_group
|
549
|
+
# group.entities.add_line([0,0,0],[100,100,100])
|
550
|
+
#
|
551
|
+
# # change the group to a component instance
|
552
|
+
# group.to_component
|
553
|
+
#
|
554
|
+
# @return [Sketchup::ComponentInstance] the new ComponentInstance object
|
555
|
+
#
|
556
|
+
# @version SketchUp 6.0
|
557
|
+
def to_component
|
558
|
+
end
|
559
|
+
|
560
|
+
# The transform! method is used to apply a transformation to a group.
|
561
|
+
#
|
562
|
+
# @example
|
563
|
+
# point = Geom::Point3d.new 500,500,500
|
564
|
+
# t = Geom::Transformation.new point
|
565
|
+
# depth = 100
|
566
|
+
# width = 100
|
567
|
+
# model = Sketchup.active_model
|
568
|
+
# entities = model.active_entities
|
569
|
+
# pts = []
|
570
|
+
# pts[0] = [0, 0, 0]
|
571
|
+
# pts[1] = [width, 0, 0]
|
572
|
+
# pts[2] = [width, depth, 0]
|
573
|
+
# pts[3] = [0, depth, 0]
|
574
|
+
#
|
575
|
+
# # Add the group to the entities in the model
|
576
|
+
# group = entities.add_group
|
577
|
+
#
|
578
|
+
# # Get the entities within the group
|
579
|
+
# entities2 = group.entities
|
580
|
+
#
|
581
|
+
# # Add a face to within the group
|
582
|
+
# face = entities2.add_face pts
|
583
|
+
# UI.messagebox "Group before Move"
|
584
|
+
# group = group.transform! t
|
585
|
+
# if (group)
|
586
|
+
# UI.messagebox "Group after move"
|
587
|
+
# UI.messagebox group
|
588
|
+
# else
|
589
|
+
# UI.messagebox "Failure"
|
590
|
+
# end
|
591
|
+
#
|
592
|
+
# @param [Geom::Transformation] transform
|
593
|
+
# A Transformation object.
|
594
|
+
#
|
595
|
+
# @return [Sketchup::Group] a transformed group object if successful
|
596
|
+
#
|
597
|
+
# @version SketchUp 6.0
|
598
|
+
def transform!(transform)
|
599
|
+
end
|
600
|
+
|
601
|
+
# The transformation method is used to retrieve the transformation for the
|
602
|
+
# group.
|
603
|
+
#
|
604
|
+
# @example
|
605
|
+
# # Add a group to the model.
|
606
|
+
# group = Sketchup.active_model.entities.add_group
|
607
|
+
# group.entities.add_line([0,0,0],[100,100,100])
|
608
|
+
#
|
609
|
+
# trans = group.transformation
|
610
|
+
#
|
611
|
+
# @return [Geom::Transformation] a Transformation object if successful
|
612
|
+
#
|
613
|
+
# @version SketchUp 6.0
|
614
|
+
def transformation
|
615
|
+
end
|
616
|
+
|
617
|
+
# The {#transformation=} method is used to set the transformation of this
|
618
|
+
# group
|
619
|
+
#
|
620
|
+
# @example
|
621
|
+
# # Add a group to the model.
|
622
|
+
# group = Sketchup.active_model.entities.add_group
|
623
|
+
# group.entities.add_line([0,0,0],[100,100,100])
|
624
|
+
#
|
625
|
+
# new_transformation = Geom::Transformation.new([100,0,0])
|
626
|
+
# group.transformation = new_transformation
|
627
|
+
#
|
628
|
+
# @param [Geom::Transformation] transformation
|
629
|
+
#
|
630
|
+
# @version SketchUp 6.0
|
631
|
+
def transformation=(transformation)
|
632
|
+
end
|
633
|
+
|
634
|
+
# The trim method is used to compute the (non-destructive) boolean difference
|
635
|
+
# of the two groups representing manifold solid volumes (this - arg). If
|
636
|
+
# the specified objects (this and arg) do not represent manifold volumes, this
|
637
|
+
# method fails.
|
638
|
+
#
|
639
|
+
# @example
|
640
|
+
# entities = Sketchup.active_model.entities
|
641
|
+
# group1 = entities[0]
|
642
|
+
# group2 = entities[1]
|
643
|
+
# result = group1.trim(group2)
|
644
|
+
#
|
645
|
+
# @note This method is not available in SketchUp Make.
|
646
|
+
#
|
647
|
+
# @param [Sketchup::Group, Sketchup::ComponentInstance] group
|
648
|
+
# The group to trim this group against.
|
649
|
+
#
|
650
|
+
# @return [Sketchup::Group, nil] The resultant group if the two objects
|
651
|
+
# (this and arg) represent manifold solids and the
|
652
|
+
# operation succeeds otherwise nil is returned.
|
653
|
+
#
|
654
|
+
# @version SketchUp 8.0
|
655
|
+
def trim(group)
|
656
|
+
end
|
657
|
+
|
658
|
+
# The union method is used to compute the boolean union of the two groups
|
659
|
+
# representing manifold solid volumes (this | arg). If the specified
|
660
|
+
# objects (this and arg) do not represent manifold volumes, this method fails.
|
661
|
+
#
|
662
|
+
# @example
|
663
|
+
# entities = Sketchup.active_model.entities
|
664
|
+
# group1 = entities[0]
|
665
|
+
# group2 = entities[1]
|
666
|
+
# result = group1.union(group2)
|
667
|
+
#
|
668
|
+
# @note This method is not available in SketchUp Make.
|
669
|
+
#
|
670
|
+
# @param [Sketchup::Group, Sketchup::ComponentInstance] group
|
671
|
+
# The group to union this group with.
|
672
|
+
#
|
673
|
+
# @return [Sketchup::Group, nil] The resultant group if the two objects
|
674
|
+
# (this and arg) represent manifold solids and the
|
675
|
+
# operation succeeds. Otherwise nil is returned.
|
676
|
+
#
|
677
|
+
# @version SketchUp 8.0
|
678
|
+
def union(group)
|
679
|
+
end
|
680
|
+
|
681
|
+
# The volume method is used to compute the volume of this group if and only
|
682
|
+
# if this group is manifold.
|
683
|
+
#
|
684
|
+
# @example
|
685
|
+
# entities = Sketchup.active_model.entities
|
686
|
+
# definition = Sketchup.active_model.definitions[0]
|
687
|
+
# transformation = Geom::Transformation.new([0,0,0])
|
688
|
+
# group = entities.add_instance(definition, transformation)
|
689
|
+
# volume = group.volume
|
690
|
+
#
|
691
|
+
# @return [Float] If the group represents a manifold volume,
|
692
|
+
# volume will be a positive value. If volume is negative,
|
693
|
+
# the group is not manifold.
|
694
|
+
#
|
695
|
+
# @version SketchUp 8.0
|
696
|
+
def volume
|
697
|
+
end
|
698
|
+
|
699
|
+
end
|