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,38 +1,42 @@
|
|
1
|
-
# Copyright:: Copyright 2020 Trimble Inc.
|
2
|
-
# License:: The MIT License (MIT)
|
3
|
-
|
4
|
-
# This observer interface is implemented to react to changes in dimension text.
|
5
|
-
#
|
6
|
-
# @
|
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
|
-
|
1
|
+
# Copyright:: Copyright 2020 Trimble Inc.
|
2
|
+
# License:: The MIT License (MIT)
|
3
|
+
|
4
|
+
# This observer interface is implemented to react to changes in dimension text.
|
5
|
+
#
|
6
|
+
# @abstract To implement this observer, create a Ruby class of this type,
|
7
|
+
# override the desired methods, and add an instance of the observer to the
|
8
|
+
# dimensions of interest.
|
9
|
+
#
|
10
|
+
# @example
|
11
|
+
# # This is an example of a DimensionObserver
|
12
|
+
# class MyDimensionObserver < Sketchup::DimensionObserver
|
13
|
+
# def onTextChanged(dimension)
|
14
|
+
# puts "onTextChanged: #{dimension}, new_text= #{dimension.text}"
|
15
|
+
# end
|
16
|
+
# end
|
17
|
+
#
|
18
|
+
# # Attach the observer. (Assumes there is a dimension in the model root.)
|
19
|
+
# dim = Sketchup.active_model.entities.grep(Sketchup::Dimension).first
|
20
|
+
# dim.add_observer(MyDimensionObserver.new)
|
21
|
+
#
|
22
|
+
# @version SketchUp 2014
|
23
|
+
class Sketchup::DimensionObserver
|
24
|
+
|
25
|
+
# Instance Methods
|
26
|
+
|
27
|
+
# The {#onTextChanged} method is invoked when your entity is erased.
|
28
|
+
#
|
29
|
+
# @example
|
30
|
+
# def onTextChanged(dimension)
|
31
|
+
# puts "onTextChanged: #{dimension}, new_text= #{dimension.text}"
|
32
|
+
# end
|
33
|
+
#
|
34
|
+
# @param [Sketchup::Dimension] dimension
|
35
|
+
# The dimension object whose text has
|
36
|
+
# been changed.
|
37
|
+
#
|
38
|
+
# @version SketchUp 2014
|
39
|
+
def onTextChanged(dimension)
|
40
|
+
end
|
41
|
+
|
42
|
+
end
|
@@ -1,87 +1,87 @@
|
|
1
|
-
# Copyright:: Copyright 2020 Trimble Inc.
|
2
|
-
# License:: The MIT License (MIT)
|
3
|
-
|
4
|
-
# The DimensionRadial class represents radius and diameter dimensions on
|
5
|
-
# arcs and circles.
|
6
|
-
#
|
7
|
-
# @version SketchUp 2014
|
8
|
-
class Sketchup::DimensionRadial < Sketchup::Dimension
|
9
|
-
|
10
|
-
# Instance Methods
|
11
|
-
|
12
|
-
# The arc_curve method returns the ArcCurve object to which this dimension is
|
13
|
-
# attached.
|
14
|
-
#
|
15
|
-
# @example
|
16
|
-
# arc = dim.arc_curve
|
17
|
-
#
|
18
|
-
# @return The ArcCurve object to which the dimension is attached.
|
19
|
-
#
|
20
|
-
# @version SketchUp 2014
|
21
|
-
def arc_curve
|
22
|
-
end
|
23
|
-
|
24
|
-
# The arc_curve= method is used to set the ArcCurve object to which this
|
25
|
-
# dimension is attached.
|
26
|
-
#
|
27
|
-
# @example
|
28
|
-
# dim.arc_curve = arc
|
29
|
-
#
|
30
|
-
# @param arc_curve
|
31
|
-
# The ArcCurve object to which the dimension is to be
|
32
|
-
# attached.
|
33
|
-
#
|
34
|
-
# @return The ArcCurve object to which the dimension was attached.
|
35
|
-
#
|
36
|
-
# @version SketchUp 2014
|
37
|
-
def arc_curve=(arc_curve)
|
38
|
-
end
|
39
|
-
|
40
|
-
# The leader_break_point method returns the break point on the leader where the
|
41
|
-
# dimension text is attached.
|
42
|
-
#
|
43
|
-
# @example
|
44
|
-
# pt = dim.leader_break_point
|
45
|
-
# puts "Break point is #{pt}"
|
46
|
-
#
|
47
|
-
# @return the leader break point
|
48
|
-
#
|
49
|
-
# @version SketchUp 2014
|
50
|
-
def leader_break_point
|
51
|
-
end
|
52
|
-
|
53
|
-
# The leader_break_point= method is used to set the break point on the leader
|
54
|
-
# where the dimension text is attached.
|
55
|
-
#
|
56
|
-
# @example
|
57
|
-
# dim.leader_break_point = [10, 0, 0]
|
58
|
-
#
|
59
|
-
# @param point
|
60
|
-
# the point to be set
|
61
|
-
#
|
62
|
-
# @return the point that was set
|
63
|
-
#
|
64
|
-
# @version SketchUp 2014
|
65
|
-
def leader_break_point=(point)
|
66
|
-
end
|
67
|
-
|
68
|
-
# The leader_points method returns the 3 significant points along the dimension
|
69
|
-
# line in world coordinates.
|
70
|
-
#
|
71
|
-
# @example
|
72
|
-
# pts = dim.leader_points
|
73
|
-
# puts "Break point is #{pts[0]}"
|
74
|
-
# puts "Attach point is #{pts[1]}"
|
75
|
-
# puts "Opposite point is #{pts[2]}"
|
76
|
-
#
|
77
|
-
# @return Array of 3 Point3d objects. Point 0: leader break point,
|
78
|
-
# where the text extension attaches. Point 1: attach point,
|
79
|
-
# where leader touches the arc/circle. Point 2: opposite
|
80
|
-
# point, where the diameter leader touches the circle on
|
81
|
-
# the opposite side.
|
82
|
-
#
|
83
|
-
# @version SketchUp 2014
|
84
|
-
def leader_points
|
85
|
-
end
|
86
|
-
|
87
|
-
end
|
1
|
+
# Copyright:: Copyright 2020 Trimble Inc.
|
2
|
+
# License:: The MIT License (MIT)
|
3
|
+
|
4
|
+
# The DimensionRadial class represents radius and diameter dimensions on
|
5
|
+
# arcs and circles.
|
6
|
+
#
|
7
|
+
# @version SketchUp 2014
|
8
|
+
class Sketchup::DimensionRadial < Sketchup::Dimension
|
9
|
+
|
10
|
+
# Instance Methods
|
11
|
+
|
12
|
+
# The arc_curve method returns the ArcCurve object to which this dimension is
|
13
|
+
# attached.
|
14
|
+
#
|
15
|
+
# @example
|
16
|
+
# arc = dim.arc_curve
|
17
|
+
#
|
18
|
+
# @return The ArcCurve object to which the dimension is attached.
|
19
|
+
#
|
20
|
+
# @version SketchUp 2014
|
21
|
+
def arc_curve
|
22
|
+
end
|
23
|
+
|
24
|
+
# The arc_curve= method is used to set the ArcCurve object to which this
|
25
|
+
# dimension is attached.
|
26
|
+
#
|
27
|
+
# @example
|
28
|
+
# dim.arc_curve = arc
|
29
|
+
#
|
30
|
+
# @param arc_curve
|
31
|
+
# The ArcCurve object to which the dimension is to be
|
32
|
+
# attached.
|
33
|
+
#
|
34
|
+
# @return The ArcCurve object to which the dimension was attached.
|
35
|
+
#
|
36
|
+
# @version SketchUp 2014
|
37
|
+
def arc_curve=(arc_curve)
|
38
|
+
end
|
39
|
+
|
40
|
+
# The leader_break_point method returns the break point on the leader where the
|
41
|
+
# dimension text is attached.
|
42
|
+
#
|
43
|
+
# @example
|
44
|
+
# pt = dim.leader_break_point
|
45
|
+
# puts "Break point is #{pt}"
|
46
|
+
#
|
47
|
+
# @return the leader break point
|
48
|
+
#
|
49
|
+
# @version SketchUp 2014
|
50
|
+
def leader_break_point
|
51
|
+
end
|
52
|
+
|
53
|
+
# The leader_break_point= method is used to set the break point on the leader
|
54
|
+
# where the dimension text is attached.
|
55
|
+
#
|
56
|
+
# @example
|
57
|
+
# dim.leader_break_point = [10, 0, 0]
|
58
|
+
#
|
59
|
+
# @param point
|
60
|
+
# the point to be set
|
61
|
+
#
|
62
|
+
# @return the point that was set
|
63
|
+
#
|
64
|
+
# @version SketchUp 2014
|
65
|
+
def leader_break_point=(point)
|
66
|
+
end
|
67
|
+
|
68
|
+
# The leader_points method returns the 3 significant points along the dimension
|
69
|
+
# line in world coordinates.
|
70
|
+
#
|
71
|
+
# @example
|
72
|
+
# pts = dim.leader_points
|
73
|
+
# puts "Break point is #{pts[0]}"
|
74
|
+
# puts "Attach point is #{pts[1]}"
|
75
|
+
# puts "Opposite point is #{pts[2]}"
|
76
|
+
#
|
77
|
+
# @return Array of 3 Point3d objects. Point 0: leader break point,
|
78
|
+
# where the text extension attaches. Point 1: attach point,
|
79
|
+
# where leader touches the arc/circle. Point 2: opposite
|
80
|
+
# point, where the diameter leader touches the circle on
|
81
|
+
# the opposite side.
|
82
|
+
#
|
83
|
+
# @version SketchUp 2014
|
84
|
+
def leader_points
|
85
|
+
end
|
86
|
+
|
87
|
+
end
|
@@ -1,390 +1,396 @@
|
|
1
|
-
# Copyright:: Copyright 2020 Trimble Inc.
|
2
|
-
# License:: The MIT License (MIT)
|
3
|
-
|
4
|
-
# Drawingelement is a base class for an item in the model that can be
|
5
|
-
# displayed. These items include edges, construction points, construction
|
6
|
-
# lines, and images. Arc curves and arcs are not included because they are not
|
7
|
-
# drawing elements by themselves, but are a composition of edges.
|
8
|
-
#
|
9
|
-
# @version SketchUp 6.0
|
10
|
-
class Sketchup::Drawingelement < Sketchup::Entity
|
11
|
-
|
12
|
-
# Instance Methods
|
13
|
-
|
14
|
-
# The bounds method is used to retrieve the BoundingBox
|
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
|
-
|
74
|
-
|
75
|
-
|
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
|
-
#
|
103
|
-
#
|
104
|
-
#
|
105
|
-
#
|
106
|
-
#
|
107
|
-
#
|
108
|
-
#
|
109
|
-
#
|
110
|
-
#
|
111
|
-
#
|
112
|
-
#
|
113
|
-
#
|
114
|
-
#
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
#
|
119
|
-
#
|
120
|
-
# @
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
#
|
125
|
-
#
|
126
|
-
#
|
127
|
-
#
|
128
|
-
#
|
129
|
-
#
|
130
|
-
#
|
131
|
-
#
|
132
|
-
#
|
133
|
-
#
|
134
|
-
#
|
135
|
-
#
|
136
|
-
#
|
137
|
-
#
|
138
|
-
#
|
139
|
-
#
|
140
|
-
#
|
141
|
-
#
|
142
|
-
#
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
#
|
147
|
-
#
|
148
|
-
#
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
#
|
153
|
-
#
|
154
|
-
#
|
155
|
-
#
|
156
|
-
#
|
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
|
-
#
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
#
|
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
|
-
#
|
232
|
-
#
|
233
|
-
#
|
234
|
-
#
|
235
|
-
#
|
236
|
-
#
|
237
|
-
#
|
238
|
-
#
|
239
|
-
#
|
240
|
-
#
|
241
|
-
#
|
242
|
-
#
|
243
|
-
#
|
244
|
-
#
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
#
|
249
|
-
#
|
250
|
-
#
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
#
|
255
|
-
#
|
256
|
-
#
|
257
|
-
#
|
258
|
-
#
|
259
|
-
#
|
260
|
-
#
|
261
|
-
#
|
262
|
-
#
|
263
|
-
#
|
264
|
-
#
|
265
|
-
#
|
266
|
-
#
|
267
|
-
#
|
268
|
-
#
|
269
|
-
#
|
270
|
-
#
|
271
|
-
#
|
272
|
-
#
|
273
|
-
#
|
274
|
-
#
|
275
|
-
#
|
276
|
-
#
|
277
|
-
#
|
278
|
-
#
|
279
|
-
#
|
280
|
-
# @
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
#
|
285
|
-
#
|
286
|
-
#
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
#
|
291
|
-
#
|
292
|
-
#
|
293
|
-
#
|
294
|
-
#
|
295
|
-
#
|
296
|
-
#
|
297
|
-
#
|
298
|
-
#
|
299
|
-
#
|
300
|
-
#
|
301
|
-
#
|
302
|
-
#
|
303
|
-
#
|
304
|
-
#
|
305
|
-
#
|
306
|
-
#
|
307
|
-
#
|
308
|
-
#
|
309
|
-
#
|
310
|
-
# @
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
#
|
315
|
-
#
|
316
|
-
#
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
#
|
321
|
-
#
|
322
|
-
#
|
323
|
-
#
|
324
|
-
#
|
325
|
-
#
|
326
|
-
#
|
327
|
-
#
|
328
|
-
#
|
329
|
-
#
|
330
|
-
#
|
331
|
-
#
|
332
|
-
#
|
333
|
-
#
|
334
|
-
#
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
#
|
339
|
-
#
|
340
|
-
#
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
#
|
345
|
-
#
|
346
|
-
#
|
347
|
-
#
|
348
|
-
#
|
349
|
-
#
|
350
|
-
#
|
351
|
-
#
|
352
|
-
#
|
353
|
-
#
|
354
|
-
#
|
355
|
-
#
|
356
|
-
#
|
357
|
-
#
|
358
|
-
#
|
359
|
-
#
|
360
|
-
#
|
361
|
-
#
|
362
|
-
# @
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
#
|
367
|
-
#
|
368
|
-
# @
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
#
|
373
|
-
#
|
374
|
-
#
|
375
|
-
#
|
376
|
-
#
|
377
|
-
#
|
378
|
-
#
|
379
|
-
#
|
380
|
-
#
|
381
|
-
#
|
382
|
-
#
|
383
|
-
#
|
384
|
-
#
|
385
|
-
#
|
386
|
-
#
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
1
|
+
# Copyright:: Copyright 2020 Trimble Inc.
|
2
|
+
# License:: The MIT License (MIT)
|
3
|
+
|
4
|
+
# Drawingelement is a base class for an item in the model that can be
|
5
|
+
# displayed. These items include edges, construction points, construction
|
6
|
+
# lines, and images. Arc curves and arcs are not included because they are not
|
7
|
+
# drawing elements by themselves, but are a composition of edges.
|
8
|
+
#
|
9
|
+
# @version SketchUp 6.0
|
10
|
+
class Sketchup::Drawingelement < Sketchup::Entity
|
11
|
+
|
12
|
+
# Instance Methods
|
13
|
+
|
14
|
+
# The {#bounds} method is used to retrieve the {Geom::BoundingBox} bounding a
|
15
|
+
# {Sketchup::Drawingelement}.
|
16
|
+
#
|
17
|
+
# For a {Sketchup::Edge}, {Sketchup::ComponentInstance} and most other
|
18
|
+
# {Sketchup::Drawingelement}s, the boundingbox follows the coordinate system
|
19
|
+
# the drawing element is placed in.
|
20
|
+
# For {Sketchup::ComponentDefinition}, the box bounds the contents of the
|
21
|
+
# component and follows the component's own internal coordinate system.
|
22
|
+
#
|
23
|
+
# @example
|
24
|
+
# depth = 100
|
25
|
+
# width = 100
|
26
|
+
# model = Sketchup.active_model
|
27
|
+
# entities = model.active_entities
|
28
|
+
# pts = []
|
29
|
+
# pts[0] = [0, 0, 0]
|
30
|
+
# pts[1] = [width, 0, 0]
|
31
|
+
# pts[2] = [width, depth, 0]
|
32
|
+
# pts[3] = [0, depth, 0]
|
33
|
+
# # Add the face to the entities in the model
|
34
|
+
# face = entities.add_face pts
|
35
|
+
# # Remember, anything that can be displayed, such as a face, is also
|
36
|
+
# # a Drawingelement. So I can call bounds on a face because Face
|
37
|
+
# # is a sub-class of Drawingelement.
|
38
|
+
# boundingbox = face.bounds
|
39
|
+
#
|
40
|
+
# @return [Geom::BoundingBox]
|
41
|
+
#
|
42
|
+
# @version SketchUp 6.0
|
43
|
+
def bounds
|
44
|
+
end
|
45
|
+
|
46
|
+
# The casts_shadows= method is used to set the Drawingelement to cast shadows.
|
47
|
+
#
|
48
|
+
# @example
|
49
|
+
# depth = 100
|
50
|
+
# width = 100
|
51
|
+
# model = Sketchup.active_model
|
52
|
+
# entities = model.active_entities
|
53
|
+
# pts = []
|
54
|
+
# pts[0] = [0, 0, 100]
|
55
|
+
# pts[1] = [width, 0, 100]
|
56
|
+
# pts[2] = [width, depth, 100]
|
57
|
+
# pts[3] = [0, depth, 100]
|
58
|
+
# # Add the face to the entities in the model.
|
59
|
+
# face = entities.add_face pts
|
60
|
+
#
|
61
|
+
# # Make the face not cast shadows.
|
62
|
+
# status = face.casts_shadows = false
|
63
|
+
# UI.messagebox status.to_s
|
64
|
+
#
|
65
|
+
# @param [Boolean] casts
|
66
|
+
# true if you want the Drawingelement object to cast
|
67
|
+
# shadows, false if you do not want the Drawingelement
|
68
|
+
# object to cast shadows.
|
69
|
+
#
|
70
|
+
# @return [Boolean] true if successful, false if unsuccessful.
|
71
|
+
#
|
72
|
+
# @version SketchUp 6.0
|
73
|
+
def casts_shadows=(casts)
|
74
|
+
end
|
75
|
+
|
76
|
+
# The casts_shadows? method is used to determine if the Drawingelement is
|
77
|
+
# casting shadows.
|
78
|
+
#
|
79
|
+
# @example
|
80
|
+
# depth = 100
|
81
|
+
# width = 100
|
82
|
+
# model = Sketchup.active_model
|
83
|
+
# entities = model.active_entities
|
84
|
+
# pts = []
|
85
|
+
# pts[0] = [0, 0, 0]
|
86
|
+
# pts[1] = [width, 0, 0]
|
87
|
+
# pts[2] = [width, depth, 0]
|
88
|
+
# pts[3] = [0, depth, 0]
|
89
|
+
# # Add the face to the entities in the model
|
90
|
+
# face = entities.add_face pts
|
91
|
+
# status = face.casts_shadows?
|
92
|
+
# UI.messagebox status.to_s
|
93
|
+
#
|
94
|
+
# @return [Boolean]
|
95
|
+
#
|
96
|
+
# @version SketchUp 6.0
|
97
|
+
def casts_shadows?
|
98
|
+
end
|
99
|
+
|
100
|
+
# The erase! method is used to erase an element from the model.
|
101
|
+
#
|
102
|
+
# Erasing an Edge also erases all of the Face objects that use the Edge.
|
103
|
+
#
|
104
|
+
# @example
|
105
|
+
# depth = 100
|
106
|
+
# width = 100
|
107
|
+
# model = Sketchup.active_model
|
108
|
+
# entities = model.active_entities
|
109
|
+
# pts = []
|
110
|
+
# pts[0] = [0, 0, 0]
|
111
|
+
# pts[1] = [width, 0, 0]
|
112
|
+
# pts[2] = [width, depth, 0]
|
113
|
+
# pts[3] = [0, depth, 0]
|
114
|
+
# # Add the face to the entities in the model
|
115
|
+
# face = entities.add_face pts
|
116
|
+
# status = face.erase!
|
117
|
+
#
|
118
|
+
# @return [Boolean] true if successful, false if unsuccessful
|
119
|
+
#
|
120
|
+
# @version SketchUp 6.0
|
121
|
+
def erase!
|
122
|
+
end
|
123
|
+
|
124
|
+
# The hidden= method is used to set the hidden status for an element.
|
125
|
+
#
|
126
|
+
# @example
|
127
|
+
# depth = 100
|
128
|
+
# width = 100
|
129
|
+
# model = Sketchup.active_model
|
130
|
+
# entities = model.active_entities
|
131
|
+
# pts = []
|
132
|
+
# pts[0] = [0, 0, 0]
|
133
|
+
# pts[1] = [width, 0, 0]
|
134
|
+
# pts[2] = [width, depth, 0]
|
135
|
+
# pts[3] = [0, depth, 0]
|
136
|
+
# # Add the face to the entities in the model
|
137
|
+
# face = entities.add_face pts
|
138
|
+
# UI.messagebox "Click OK to Hide the Box"
|
139
|
+
# status = face.hidden = true
|
140
|
+
#
|
141
|
+
# @param [Boolean] hidden
|
142
|
+
# true if you want to hide the element, false if you do
|
143
|
+
# not want to hide the element.
|
144
|
+
#
|
145
|
+
# @return [Boolean] true if the element has been hidden, false if
|
146
|
+
# the element has not been hidden.
|
147
|
+
#
|
148
|
+
# @version SketchUp 6.0
|
149
|
+
def hidden=(hidden)
|
150
|
+
end
|
151
|
+
|
152
|
+
# The hidden? method is used to determine if the element is hidden.
|
153
|
+
#
|
154
|
+
# Hidden elements are still in the model, but they are not displayed.
|
155
|
+
#
|
156
|
+
# @example
|
157
|
+
# depth = 100
|
158
|
+
# width = 100
|
159
|
+
# model = Sketchup.active_model
|
160
|
+
# entities = model.active_entities
|
161
|
+
# pts = []
|
162
|
+
# pts[0] = [0, 0, 0]
|
163
|
+
# pts[1] = [width, 0, 0]
|
164
|
+
# pts[2] = [width, depth, 0]
|
165
|
+
# pts[3] = [0, depth, 0]
|
166
|
+
# # Add the face to the entities in the model
|
167
|
+
# face = entities.add_face pts
|
168
|
+
# status = face.hidden?
|
169
|
+
# UI.messagebox "hidden? " + status.to_s
|
170
|
+
#
|
171
|
+
# @return [Boolean]
|
172
|
+
#
|
173
|
+
# @version SketchUp 6.0
|
174
|
+
def hidden?
|
175
|
+
end
|
176
|
+
|
177
|
+
# The layer method is used to retrieve the Layer object of the drawing
|
178
|
+
# element.
|
179
|
+
#
|
180
|
+
# @example
|
181
|
+
# depth = 100
|
182
|
+
# width = 100
|
183
|
+
# model = Sketchup.active_model
|
184
|
+
# entities = model.active_entities
|
185
|
+
# pts = []
|
186
|
+
# pts[0] = [0, 0, 0]
|
187
|
+
# pts[1] = [width, 0, 0]
|
188
|
+
# pts[2] = [width, depth, 0]
|
189
|
+
# pts[3] = [0, depth, 0]
|
190
|
+
# # Add the face to the entities in the model
|
191
|
+
# face = entities.add_face pts
|
192
|
+
# layer = face.layer
|
193
|
+
#
|
194
|
+
# @return [Sketchup::Layer] a layer object if successful
|
195
|
+
#
|
196
|
+
# @version SketchUp 6.0
|
197
|
+
def layer
|
198
|
+
end
|
199
|
+
|
200
|
+
# The layer= method is used to set the layer for the drawing element.
|
201
|
+
#
|
202
|
+
# An exception is raised if you give a string that doesn't match any layer
|
203
|
+
# name.
|
204
|
+
#
|
205
|
+
# @example
|
206
|
+
# depth = 100
|
207
|
+
# width = 100
|
208
|
+
# model = Sketchup.active_model
|
209
|
+
# entities = model.active_entities
|
210
|
+
# pts = []
|
211
|
+
# pts[0] = [0, 0, 0]
|
212
|
+
# pts[1] = [width, 0, 0]
|
213
|
+
# pts[2] = [width, depth, 0]
|
214
|
+
# pts[3] = [0, depth, 0]
|
215
|
+
# # Add the face to the entities in the model
|
216
|
+
# face = entities.add_face pts
|
217
|
+
# # Add a layer
|
218
|
+
# layer = Sketchup.active_model.layers.add "joe"
|
219
|
+
# # Put the face on the joe layer (instead of layer 0)
|
220
|
+
# newlayer = face.layer = layer
|
221
|
+
#
|
222
|
+
# @param [Sketchup::Layer, String] layer
|
223
|
+
# A layer or layer name.
|
224
|
+
#
|
225
|
+
# @return [Sketchup::Layer, String] the new Layer object if successful
|
226
|
+
#
|
227
|
+
# @version SketchUp 6.0
|
228
|
+
def layer=(layer)
|
229
|
+
end
|
230
|
+
|
231
|
+
# The material method is used to retrieve the material for the drawing
|
232
|
+
# element.
|
233
|
+
#
|
234
|
+
# @example
|
235
|
+
# depth = 100
|
236
|
+
# width = 100
|
237
|
+
# model = Sketchup.active_model
|
238
|
+
# entities = model.active_entities
|
239
|
+
# pts = []
|
240
|
+
# pts[0] = [0, 0, 0]
|
241
|
+
# pts[1] = [width, 0, 0]
|
242
|
+
# pts[2] = [width, depth, 0]
|
243
|
+
# pts[3] = [0, depth, 0]
|
244
|
+
# # Add the face to the entities in the model
|
245
|
+
# face = entities.add_face pts
|
246
|
+
# material = face.material
|
247
|
+
#
|
248
|
+
# @return [Sketchup::Material] the Material object if successful
|
249
|
+
#
|
250
|
+
# @version SketchUp 6.0
|
251
|
+
def material
|
252
|
+
end
|
253
|
+
|
254
|
+
# The material= method is used to set the material for the drawing
|
255
|
+
# element.
|
256
|
+
#
|
257
|
+
# @example
|
258
|
+
# depth = 100
|
259
|
+
# width = 100
|
260
|
+
# model = Sketchup.active_model
|
261
|
+
# entities = model.active_entities
|
262
|
+
# pts = []
|
263
|
+
# pts[0] = [0, 0, 0]
|
264
|
+
# pts[1] = [width, 0, 0]
|
265
|
+
# pts[2] = [width, depth, 0]
|
266
|
+
# pts[3] = [0, depth, 0]
|
267
|
+
# # Add the face to the entities in the model
|
268
|
+
# face = entities.add_face pts
|
269
|
+
# m = model.materials.add "Joe"
|
270
|
+
# begin
|
271
|
+
# # Returns nil if not successful, path if successful.
|
272
|
+
# # Should return a texture object.
|
273
|
+
# m.texture = "c:\\My Textures\\Carpet.jpg"
|
274
|
+
# rescue
|
275
|
+
# UI.messagebox $!.message
|
276
|
+
# end
|
277
|
+
# # You will see the material applied when you reverse the box's faces
|
278
|
+
# material = face.material = m
|
279
|
+
#
|
280
|
+
# @param [Sketchup::Material, String, Sketchup::Color] material
|
281
|
+
# A Material, name of a material, Color, or name of a
|
282
|
+
# color.
|
283
|
+
#
|
284
|
+
# @return [Sketchup::Material, String, Sketchup::Color] the new Material object if successful
|
285
|
+
#
|
286
|
+
# @version SketchUp 6.0
|
287
|
+
def material=(material)
|
288
|
+
end
|
289
|
+
|
290
|
+
# The receive_shadows= method is used to set the Drawingelement to receive
|
291
|
+
# shadows.
|
292
|
+
#
|
293
|
+
# @example
|
294
|
+
# depth = 100
|
295
|
+
# width = 100
|
296
|
+
# model = Sketchup.active_model
|
297
|
+
# entities = model.active_entities
|
298
|
+
# pts = []
|
299
|
+
# pts[0] = [0, 0, 100]
|
300
|
+
# pts[1] = [width, 0, 100]
|
301
|
+
# pts[2] = [width, depth, 100]
|
302
|
+
# pts[3] = [0, depth, 100]
|
303
|
+
# # Add the face to the entities in the model.
|
304
|
+
# face = entities.add_face pts
|
305
|
+
#
|
306
|
+
# # Make the face not receive shadows.
|
307
|
+
# status = face.receives_shadows = false
|
308
|
+
# UI.messagebox status.to_s
|
309
|
+
#
|
310
|
+
# @param [Boolean] receive
|
311
|
+
# true if you want the Drawingelement object to
|
312
|
+
# receive shadows, false if not.
|
313
|
+
#
|
314
|
+
# @return [Boolean] true if successful, false if unsuccessful.
|
315
|
+
#
|
316
|
+
# @version SketchUp 6.0
|
317
|
+
def receives_shadows=(receive)
|
318
|
+
end
|
319
|
+
|
320
|
+
# The receive_shadows? method is used to determine if the Drawingelement is
|
321
|
+
# receiving shadows.
|
322
|
+
#
|
323
|
+
# @example
|
324
|
+
# depth = 100
|
325
|
+
# width = 100
|
326
|
+
# model = Sketchup.active_model
|
327
|
+
# entities = model.active_entities
|
328
|
+
# pts = []
|
329
|
+
# pts[0] = [0, 0, 0]
|
330
|
+
# pts[1] = [width, 0, 0]
|
331
|
+
# pts[2] = [width, depth, 0]
|
332
|
+
# pts[3] = [0, depth, 0]
|
333
|
+
# # Add the face to the entities in the model
|
334
|
+
# face = entities.add_face pts
|
335
|
+
# status = face.receives_shadows?
|
336
|
+
# UI.messagebox status.to_s
|
337
|
+
#
|
338
|
+
# @return [Boolean]
|
339
|
+
#
|
340
|
+
# @version SketchUp 6.0
|
341
|
+
def receives_shadows?
|
342
|
+
end
|
343
|
+
|
344
|
+
# The visible= method is used to set the visible status for an element. This
|
345
|
+
# method performs an opposite function to the hidden= method.
|
346
|
+
#
|
347
|
+
# @example
|
348
|
+
# depth = 100
|
349
|
+
# width = 100
|
350
|
+
# model = Sketchup.active_model
|
351
|
+
# entities = model.active_entities
|
352
|
+
# pts = []
|
353
|
+
# pts[0] = [0, 0, 0]
|
354
|
+
# pts[1] = [width, 0, 0]
|
355
|
+
# pts[2] = [width, depth, 0]
|
356
|
+
# pts[3] = [0, depth, 0]
|
357
|
+
# # Add the face to the entities in the model
|
358
|
+
# face = entities.add_face pts
|
359
|
+
# UI.messagebox "Click OK to Hide the Box"
|
360
|
+
# status = face.visible = false
|
361
|
+
#
|
362
|
+
# @param [Boolean] visibility
|
363
|
+
# true if you want to hide the element, false if not
|
364
|
+
#
|
365
|
+
# @return [Boolean] true if the element has been hidden, false if
|
366
|
+
# the element has not been hidden.
|
367
|
+
#
|
368
|
+
# @version SketchUp 6.0
|
369
|
+
def visible=(visibility)
|
370
|
+
end
|
371
|
+
|
372
|
+
# The visible? method is used to get the visible status for an element.
|
373
|
+
#
|
374
|
+
# @example
|
375
|
+
# depth = 100
|
376
|
+
# width = 100
|
377
|
+
# model = Sketchup.active_model
|
378
|
+
# entities = model.active_entities
|
379
|
+
# pts = []
|
380
|
+
# pts[0] = [0, 0, 0]
|
381
|
+
# pts[1] = [width, 0, 0]
|
382
|
+
# pts[2] = [width, depth, 0]
|
383
|
+
# pts[3] = [0, depth, 0]
|
384
|
+
# # Add the face to the entities in the model
|
385
|
+
# face = entities.add_face pts
|
386
|
+
# UI.messagebox "Click OK to Hide the Box"
|
387
|
+
# face.visible = false
|
388
|
+
# UI.messagebox "Is the face visible? " + face.visible?.to_s
|
389
|
+
#
|
390
|
+
# @return [Boolean]
|
391
|
+
#
|
392
|
+
# @version SketchUp 6.0
|
393
|
+
def visible?
|
394
|
+
end
|
395
|
+
|
396
|
+
end
|