sketchup-api-stubs 0.7.9 → 0.7.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/sketchup-api-stubs/sketchup.rb +157 -151
- data/lib/sketchup-api-stubs/stubs/Array.rb +741 -741
- data/lib/sketchup-api-stubs/stubs/Geom/BoundingBox.rb +322 -322
- data/lib/sketchup-api-stubs/stubs/Geom/Bounds2d.rb +182 -172
- data/lib/sketchup-api-stubs/stubs/Geom/LatLong.rb +111 -126
- data/lib/sketchup-api-stubs/stubs/Geom/OrientedBounds2d.rb +102 -102
- data/lib/sketchup-api-stubs/stubs/Geom/Point2d.rb +423 -400
- data/lib/sketchup-api-stubs/stubs/Geom/Point3d.rb +693 -661
- data/lib/sketchup-api-stubs/stubs/Geom/PolygonMesh.rb +535 -509
- data/lib/sketchup-api-stubs/stubs/Geom/Transformation.rb +500 -476
- data/lib/sketchup-api-stubs/stubs/Geom/Transformation2d.rb +267 -263
- data/lib/sketchup-api-stubs/stubs/Geom/UTM.rb +133 -141
- data/lib/sketchup-api-stubs/stubs/Geom/Vector2d.rb +547 -522
- data/lib/sketchup-api-stubs/stubs/Geom/Vector3d.rb +678 -693
- data/lib/sketchup-api-stubs/stubs/Geom.rb +351 -351
- data/lib/sketchup-api-stubs/stubs/LanguageHandler.rb +93 -93
- data/lib/sketchup-api-stubs/stubs/Layout/AngularDimension.rb +595 -595
- data/lib/sketchup-api-stubs/stubs/Layout/AutoTextDefinition.rb +751 -747
- data/lib/sketchup-api-stubs/stubs/Layout/AutoTextDefinitions.rb +183 -183
- data/lib/sketchup-api-stubs/stubs/Layout/ConnectionPoint.rb +70 -70
- data/lib/sketchup-api-stubs/stubs/Layout/Dictionary.rb +234 -0
- data/lib/sketchup-api-stubs/stubs/Layout/Document.rb +683 -517
- data/lib/sketchup-api-stubs/stubs/Layout/Ellipse.rb +29 -29
- data/lib/sketchup-api-stubs/stubs/Layout/Entities.rb +148 -148
- data/lib/sketchup-api-stubs/stubs/Layout/Entity.rb +464 -353
- data/lib/sketchup-api-stubs/stubs/Layout/FormattedText.rb +354 -354
- 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 -370
- 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 -225
- data/lib/sketchup-api-stubs/stubs/Layout/LinearDimension.rb +614 -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 +282 -183
- data/lib/sketchup-api-stubs/stubs/Layout/PageInfo.rb +458 -387
- data/lib/sketchup-api-stubs/stubs/Layout/Pages.rb +209 -209
- data/lib/sketchup-api-stubs/stubs/Layout/Path.rb +346 -344
- data/lib/sketchup-api-stubs/stubs/Layout/Rectangle.rb +174 -174
- data/lib/sketchup-api-stubs/stubs/Layout/ReferenceEntity.rb +82 -82
- data/lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb +714 -692
- data/lib/sketchup-api-stubs/stubs/Layout/Style.rb +1565 -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/Layout.rb +25 -25
- data/lib/sketchup-api-stubs/stubs/Length.rb +286 -278
- data/lib/sketchup-api-stubs/stubs/Numeric.rb +249 -249
- data/lib/sketchup-api-stubs/stubs/Sketchup/Animation.rb +196 -144
- data/lib/sketchup-api-stubs/stubs/Sketchup/AppObserver.rb +169 -169
- data/lib/sketchup-api-stubs/stubs/Sketchup/ArcCurve.rb +226 -209
- data/lib/sketchup-api-stubs/stubs/Sketchup/AttributeDictionaries.rb +145 -150
- data/lib/sketchup-api-stubs/stubs/Sketchup/AttributeDictionary.rb +294 -281
- data/lib/sketchup-api-stubs/stubs/Sketchup/Axes.rb +149 -149
- data/lib/sketchup-api-stubs/stubs/Sketchup/Behavior.rb +296 -302
- data/lib/sketchup-api-stubs/stubs/Sketchup/Camera.rb +473 -478
- data/lib/sketchup-api-stubs/stubs/Sketchup/ClassificationSchema.rb +63 -63
- data/lib/sketchup-api-stubs/stubs/Sketchup/Classifications.rb +121 -121
- data/lib/sketchup-api-stubs/stubs/Sketchup/Color.rb +294 -294
- data/lib/sketchup-api-stubs/stubs/Sketchup/ComponentDefinition.rb +673 -659
- data/lib/sketchup-api-stubs/stubs/Sketchup/ComponentInstance.rb +600 -593
- data/lib/sketchup-api-stubs/stubs/Sketchup/Console.rb +76 -76
- data/lib/sketchup-api-stubs/stubs/Sketchup/ConstructionLine.rb +252 -257
- data/lib/sketchup-api-stubs/stubs/Sketchup/ConstructionPoint.rb +32 -32
- data/lib/sketchup-api-stubs/stubs/Sketchup/Curve.rb +201 -201
- data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionList.rb +443 -449
- data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionObserver.rb +74 -74
- data/lib/sketchup-api-stubs/stubs/Sketchup/DefinitionsObserver.rb +104 -104
- data/lib/sketchup-api-stubs/stubs/Sketchup/Dimension.rb +167 -165
- data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionLinear.rb +306 -306
- data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionObserver.rb +42 -42
- data/lib/sketchup-api-stubs/stubs/Sketchup/DimensionRadial.rb +87 -87
- data/lib/sketchup-api-stubs/stubs/Sketchup/Drawingelement.rb +403 -406
- data/lib/sketchup-api-stubs/stubs/Sketchup/Edge.rb +397 -397
- data/lib/sketchup-api-stubs/stubs/Sketchup/EdgeUse.rb +211 -211
- data/lib/sketchup-api-stubs/stubs/Sketchup/Entities.rb +1282 -1239
- data/lib/sketchup-api-stubs/stubs/Sketchup/EntitiesBuilder.rb +261 -261
- data/lib/sketchup-api-stubs/stubs/Sketchup/EntitiesObserver.rb +127 -127
- data/lib/sketchup-api-stubs/stubs/Sketchup/Entity.rb +519 -545
- data/lib/sketchup-api-stubs/stubs/Sketchup/EntityObserver.rb +60 -60
- data/lib/sketchup-api-stubs/stubs/Sketchup/Environment.rb +406 -0
- data/lib/sketchup-api-stubs/stubs/Sketchup/Environments.rb +185 -0
- data/lib/sketchup-api-stubs/stubs/Sketchup/EnvironmentsObserver.rb +113 -0
- data/lib/sketchup-api-stubs/stubs/Sketchup/ExtensionsManager.rb +122 -125
- data/lib/sketchup-api-stubs/stubs/Sketchup/Face.rb +1006 -937
- data/lib/sketchup-api-stubs/stubs/Sketchup/FrameChangeObserver.rb +102 -102
- data/lib/sketchup-api-stubs/stubs/Sketchup/Group.rb +740 -750
- data/lib/sketchup-api-stubs/stubs/Sketchup/Http/Request.rb +289 -282
- data/lib/sketchup-api-stubs/stubs/Sketchup/Http/Response.rb +64 -62
- data/lib/sketchup-api-stubs/stubs/Sketchup/Http.rb +27 -27
- data/lib/sketchup-api-stubs/stubs/Sketchup/Image.rb +405 -468
- data/lib/sketchup-api-stubs/stubs/Sketchup/ImageRep.rb +266 -266
- data/lib/sketchup-api-stubs/stubs/Sketchup/Importer.rb +189 -189
- data/lib/sketchup-api-stubs/stubs/Sketchup/InputPoint.rb +432 -406
- data/lib/sketchup-api-stubs/stubs/Sketchup/InstanceObserver.rb +84 -84
- data/lib/sketchup-api-stubs/stubs/Sketchup/InstancePath.rb +307 -306
- data/lib/sketchup-api-stubs/stubs/Sketchup/Layer.rb +332 -326
- data/lib/sketchup-api-stubs/stubs/Sketchup/LayerFolder.rb +380 -422
- data/lib/sketchup-api-stubs/stubs/Sketchup/Layers.rb +409 -427
- data/lib/sketchup-api-stubs/stubs/Sketchup/LayersObserver.rb +241 -249
- data/lib/sketchup-api-stubs/stubs/Sketchup/Licensing/ExtensionLicense.rb +86 -86
- data/lib/sketchup-api-stubs/stubs/Sketchup/Licensing.rb +55 -48
- data/lib/sketchup-api-stubs/stubs/Sketchup/LineStyle.rb +24 -24
- data/lib/sketchup-api-stubs/stubs/Sketchup/LineStyles.rb +114 -114
- data/lib/sketchup-api-stubs/stubs/Sketchup/LoadHandler.rb +70 -0
- data/lib/sketchup-api-stubs/stubs/Sketchup/Loop.rb +137 -137
- data/lib/sketchup-api-stubs/stubs/Sketchup/Material.rb +1115 -414
- data/lib/sketchup-api-stubs/stubs/Sketchup/Materials.rb +330 -317
- data/lib/sketchup-api-stubs/stubs/Sketchup/MaterialsObserver.rb +142 -142
- data/lib/sketchup-api-stubs/stubs/Sketchup/Menu.rb +93 -93
- data/lib/sketchup-api-stubs/stubs/Sketchup/Model.rb +1714 -1652
- data/lib/sketchup-api-stubs/stubs/Sketchup/ModelObserver.rb +372 -357
- data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsManager.rb +133 -130
- data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsProvider.rb +271 -271
- data/lib/sketchup-api-stubs/stubs/Sketchup/OptionsProviderObserver.rb +58 -58
- data/lib/sketchup-api-stubs/stubs/Sketchup/Overlay.rb +463 -490
- data/lib/sketchup-api-stubs/stubs/Sketchup/OverlaysManager.rb +104 -116
- data/lib/sketchup-api-stubs/stubs/Sketchup/Page.rb +939 -797
- data/lib/sketchup-api-stubs/stubs/Sketchup/Pages.rb +388 -361
- data/lib/sketchup-api-stubs/stubs/Sketchup/PagesObserver.rb +77 -77
- data/lib/sketchup-api-stubs/stubs/Sketchup/PickHelper.rb +501 -478
- data/lib/sketchup-api-stubs/stubs/Sketchup/RegionalSettings.rb +43 -43
- data/lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptions.rb +385 -361
- data/lib/sketchup-api-stubs/stubs/Sketchup/RenderingOptionsObserver.rb +45 -45
- data/lib/sketchup-api-stubs/stubs/Sketchup/SectionPlane.rb +150 -150
- data/lib/sketchup-api-stubs/stubs/Sketchup/Selection.rb +451 -458
- data/lib/sketchup-api-stubs/stubs/Sketchup/SelectionObserver.rb +115 -115
- data/lib/sketchup-api-stubs/stubs/Sketchup/Set.rb +211 -212
- data/lib/sketchup-api-stubs/stubs/Sketchup/ShadowInfo.rb +259 -255
- data/lib/sketchup-api-stubs/stubs/Sketchup/ShadowInfoObserver.rb +59 -59
- data/lib/sketchup-api-stubs/stubs/Sketchup/Skp.rb +40 -40
- data/lib/sketchup-api-stubs/stubs/Sketchup/Snap.rb +125 -0
- data/lib/sketchup-api-stubs/stubs/Sketchup/Style.rb +88 -69
- data/lib/sketchup-api-stubs/stubs/Sketchup/Styles.rb +263 -217
- data/lib/sketchup-api-stubs/stubs/Sketchup/Text.rb +283 -262
- data/lib/sketchup-api-stubs/stubs/Sketchup/Texture.rb +199 -217
- data/lib/sketchup-api-stubs/stubs/Sketchup/TextureWriter.rb +237 -237
- data/lib/sketchup-api-stubs/stubs/Sketchup/Tool.rb +924 -834
- data/lib/sketchup-api-stubs/stubs/Sketchup/Tools.rb +132 -132
- data/lib/sketchup-api-stubs/stubs/Sketchup/ToolsObserver.rb +156 -156
- data/lib/sketchup-api-stubs/stubs/Sketchup/UVHelper.rb +75 -75
- data/lib/sketchup-api-stubs/stubs/Sketchup/Vertex.rb +143 -142
- data/lib/sketchup-api-stubs/stubs/Sketchup/View.rb +1566 -1311
- data/lib/sketchup-api-stubs/stubs/Sketchup/ViewObserver.rb +71 -45
- data/lib/sketchup-api-stubs/stubs/Sketchup.rb +1429 -1377
- 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/Command.rb +399 -389
- data/lib/sketchup-api-stubs/stubs/UI/HtmlDialog.rb +580 -494
- data/lib/sketchup-api-stubs/stubs/UI/Notification.rb +280 -269
- data/lib/sketchup-api-stubs/stubs/UI/Toolbar.rb +258 -241
- data/lib/sketchup-api-stubs/stubs/UI/WebDialog.rb +636 -635
- data/lib/sketchup-api-stubs/stubs/UI.rb +791 -683
- data/lib/sketchup-api-stubs/stubs/_top_level.rb +303 -303
- data/lib/sketchup-api-stubs.rb +1 -1
- metadata +10 -24
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
# Copyright:: Copyright
|
|
2
|
-
# License:: The MIT License (MIT)
|
|
3
|
-
|
|
4
|
-
# The {Sketchup::Skp} module is used to read metadata from external SketchUp
|
|
5
|
-
# files without loading the whole file.
|
|
6
|
-
#
|
|
7
|
-
# @version SketchUp 2021.0
|
|
8
|
-
module Sketchup::Skp
|
|
9
|
-
|
|
10
|
-
# Class Methods
|
|
11
|
-
|
|
12
|
-
# The {.read_guid} method is used to read the GUID, globally unique identifier,
|
|
13
|
-
# for an external model.
|
|
14
|
-
#
|
|
15
|
-
# In SketchUp, GUIDs are used to test if {Sketchup::ComponentDefinition}s and
|
|
16
|
-
# {Sketchup::Model}s match (a component being an embedded model).
|
|
17
|
-
# When you insert a component to a model, its GUID is compared to existing
|
|
18
|
-
# component definitions in that model, and if there is a match the existing
|
|
19
|
-
# component definition is re-used rather than a duplicate being added.
|
|
20
|
-
# When a component definition is modified or a model is saved, their GUIDs are
|
|
21
|
-
# renewed.
|
|
22
|
-
#
|
|
23
|
-
# @example
|
|
24
|
-
# model = Sketchup.active_model
|
|
25
|
-
# definitions = model.definitions
|
|
26
|
-
# definition = definitions.find { |definition| !definition.internal? }
|
|
27
|
-
# # true if component matches its external file.
|
|
28
|
-
# definition.guid == Sketchup::Skp.read_guid(definition.path)
|
|
29
|
-
#
|
|
30
|
-
# @param [String] filepath
|
|
31
|
-
#
|
|
32
|
-
# @raise [ArgumentError] if the file is missing or is not a SketchUp model.
|
|
33
|
-
#
|
|
34
|
-
# @return [String]
|
|
35
|
-
#
|
|
36
|
-
# @version SketchUp 2021.0
|
|
37
|
-
def self.read_guid(filepath)
|
|
38
|
-
end
|
|
39
|
-
|
|
40
|
-
end
|
|
1
|
+
# Copyright:: Copyright 2026 Trimble Inc.
|
|
2
|
+
# License:: The MIT License (MIT)
|
|
3
|
+
|
|
4
|
+
# The {Sketchup::Skp} module is used to read metadata from external SketchUp
|
|
5
|
+
# files without loading the whole file.
|
|
6
|
+
#
|
|
7
|
+
# @version SketchUp 2021.0
|
|
8
|
+
module Sketchup::Skp
|
|
9
|
+
|
|
10
|
+
# Class Methods
|
|
11
|
+
|
|
12
|
+
# The {.read_guid} method is used to read the GUID, globally unique identifier,
|
|
13
|
+
# for an external model.
|
|
14
|
+
#
|
|
15
|
+
# In SketchUp, GUIDs are used to test if {Sketchup::ComponentDefinition}s and
|
|
16
|
+
# {Sketchup::Model}s match (a component being an embedded model).
|
|
17
|
+
# When you insert a component to a model, its GUID is compared to existing
|
|
18
|
+
# component definitions in that model, and if there is a match the existing
|
|
19
|
+
# component definition is re-used rather than a duplicate being added.
|
|
20
|
+
# When a component definition is modified or a model is saved, their GUIDs are
|
|
21
|
+
# renewed.
|
|
22
|
+
#
|
|
23
|
+
# @example
|
|
24
|
+
# model = Sketchup.active_model
|
|
25
|
+
# definitions = model.definitions
|
|
26
|
+
# definition = definitions.find { |definition| !definition.internal? }
|
|
27
|
+
# # true if component matches its external file.
|
|
28
|
+
# definition.guid == Sketchup::Skp.read_guid(definition.path)
|
|
29
|
+
#
|
|
30
|
+
# @param [String] filepath
|
|
31
|
+
#
|
|
32
|
+
# @raise [ArgumentError] if the file is missing or is not a SketchUp model.
|
|
33
|
+
#
|
|
34
|
+
# @return [String]
|
|
35
|
+
#
|
|
36
|
+
# @version SketchUp 2021.0
|
|
37
|
+
def self.read_guid(filepath)
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
end
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
# Copyright:: Copyright 2026 Trimble Inc.
|
|
2
|
+
# License:: The MIT License (MIT)
|
|
3
|
+
|
|
4
|
+
# A Snap is a custom grip used by SketchUp's Move tool.
|
|
5
|
+
# Snaps can be added at strategic places such as connectors to help
|
|
6
|
+
# assembling objects.
|
|
7
|
+
#
|
|
8
|
+
# rdoc-image:../images/snaps.png
|
|
9
|
+
#
|
|
10
|
+
# {#direction} is the direction a snap is "pointing". This can be thought of as
|
|
11
|
+
# the normal direction of the snap. It can also be thought of as the direction
|
|
12
|
+
# you move an object when plugging it into another object, e.g. inserting a
|
|
13
|
+
# power coord.
|
|
14
|
+
#
|
|
15
|
+
# {#up} controls the rotation around the Snap's axis.
|
|
16
|
+
#
|
|
17
|
+
# When two objects are snapped together, the Snaps have opposite
|
|
18
|
+
# {#direction} vectors but matching {#up} vectors.
|
|
19
|
+
#
|
|
20
|
+
# @example
|
|
21
|
+
# # Copy all snaps from source group/component to the corresponding
|
|
22
|
+
# # location in a target group/component, as if the objects have
|
|
23
|
+
# # have been snapped together.
|
|
24
|
+
# #
|
|
25
|
+
# # @param [Sketchup::Group, Sketchup::ComponentInstance] source
|
|
26
|
+
# # @param [Sketchup::Group, Sketchup::ComponentInstance] target
|
|
27
|
+
# def copy_snap(source, target)
|
|
28
|
+
# # Transformation for going from the coordinate system of the source to
|
|
29
|
+
# # that of the target.
|
|
30
|
+
# transformation =
|
|
31
|
+
# target.transformation.inverse * source.transformation
|
|
32
|
+
#
|
|
33
|
+
# source.definition.entities.grep(Sketchup::Snap) do |source_snap|
|
|
34
|
+
# # Transform position and orientation between local coordinate systems.
|
|
35
|
+
# position = source_snap.position.transform(transformation)
|
|
36
|
+
# # Direction vector is reversed between two connected snaps;
|
|
37
|
+
# # the snaps point "into" each other.
|
|
38
|
+
# direction = source_snap.direction.transform(transformation).reverse
|
|
39
|
+
# # Up vector is aligned between two connected snaps.
|
|
40
|
+
# up = source_snap.up.transform(transformation)
|
|
41
|
+
#
|
|
42
|
+
# target.entities.add_snap(position, direction, up)
|
|
43
|
+
# end
|
|
44
|
+
# end
|
|
45
|
+
#
|
|
46
|
+
# @version SketchUp 2025.0
|
|
47
|
+
class Sketchup::Snap < Sketchup::Drawingelement
|
|
48
|
+
|
|
49
|
+
# Instance Methods
|
|
50
|
+
|
|
51
|
+
# The {#direction} method is used to get the direction this Snap is "pointing".
|
|
52
|
+
#
|
|
53
|
+
# When two Snaps are snapped into each other, they have the opposite {#direction}.
|
|
54
|
+
#
|
|
55
|
+
# @example
|
|
56
|
+
# snap = Sketchup.active_model.entities.add_snap(ORIGIN)
|
|
57
|
+
# direction = snap.direction
|
|
58
|
+
#
|
|
59
|
+
# @return [Geom::Vector3d]
|
|
60
|
+
#
|
|
61
|
+
# @version SketchUp 2025.0
|
|
62
|
+
def direction
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# The {#position} method is used to get the position of this Snap.
|
|
66
|
+
#
|
|
67
|
+
# @example
|
|
68
|
+
# snap = Sketchup.active_model.entities.add_snap(ORIGIN)
|
|
69
|
+
# position = snap.position
|
|
70
|
+
#
|
|
71
|
+
# @return [Geom::Point3d]
|
|
72
|
+
#
|
|
73
|
+
# @version SketchUp 2025.0
|
|
74
|
+
def position
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# The {#set} method is used to move and/or reorient a Snap.
|
|
78
|
+
#
|
|
79
|
+
# @example
|
|
80
|
+
# snap = Sketchup.active_model.entities.add_snap(ORIGIN)
|
|
81
|
+
# snap.set(Geom::Point3d.new(1.m, 0, 0))
|
|
82
|
+
#
|
|
83
|
+
# @overload set(position)
|
|
84
|
+
#
|
|
85
|
+
# With only a position provided, the Snap keeps its current orientation.
|
|
86
|
+
# @param [Geom::Point3d] position
|
|
87
|
+
#
|
|
88
|
+
# @overload set(position, direction)
|
|
89
|
+
#
|
|
90
|
+
# With a position and a direction vector provided, but no up vector, SketchUp
|
|
91
|
+
# tries to keep the Snap upright.
|
|
92
|
+
# @param [Geom::Point3d] position
|
|
93
|
+
# @param [Geom::Vector3d] direction
|
|
94
|
+
#
|
|
95
|
+
# @overload set(position, direction, up)
|
|
96
|
+
#
|
|
97
|
+
# @param [Geom::Point3d] position
|
|
98
|
+
# @param [Geom::Vector3d] direction
|
|
99
|
+
# @param [Geom::Vector3d] up
|
|
100
|
+
#
|
|
101
|
+
# @raise ArgumentError if +direction+ and +up+ are parallel.
|
|
102
|
+
#
|
|
103
|
+
# @return [Sketchup::Snap] self
|
|
104
|
+
#
|
|
105
|
+
# @version SketchUp 2025.0
|
|
106
|
+
def set(*args)
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# The {#up} method is used to get a vector representing the rotation of this
|
|
110
|
+
# Snap along its axis.
|
|
111
|
+
#
|
|
112
|
+
# When two Snaps are snapped into each other, they have the same aligned {#up}
|
|
113
|
+
# direction.
|
|
114
|
+
#
|
|
115
|
+
# @example
|
|
116
|
+
# snap = Sketchup.active_model.entities.add_snap(ORIGIN)
|
|
117
|
+
# up = snap.up
|
|
118
|
+
#
|
|
119
|
+
# @return [Geom::Vector3d]
|
|
120
|
+
#
|
|
121
|
+
# @version SketchUp 2025.0
|
|
122
|
+
def up
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
end
|
|
@@ -1,69 +1,88 @@
|
|
|
1
|
-
# Copyright:: Copyright
|
|
2
|
-
# License:: The MIT License (MIT)
|
|
3
|
-
|
|
4
|
-
# The Style class contains methods for modifying information about a specific
|
|
5
|
-
# style. Styles are a collection of display settings that tell SketchUp how to
|
|
6
|
-
# draw the model.
|
|
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
|
-
|
|
1
|
+
# Copyright:: Copyright 2026 Trimble Inc.
|
|
2
|
+
# License:: The MIT License (MIT)
|
|
3
|
+
|
|
4
|
+
# The Style class contains methods for modifying information about a specific
|
|
5
|
+
# style. Styles are a collection of display settings that tell SketchUp how to
|
|
6
|
+
# draw the model.
|
|
7
|
+
#
|
|
8
|
+
# In SketchUp, there are two important style objects in a model:
|
|
9
|
+
# The {Sketchup::Styles#selected_style} is the style currently selected in the Styles Browser.
|
|
10
|
+
# The {Sketchup::Styles#active_style} is a temporary copy of the selected style that allows
|
|
11
|
+
# editing without committing changes. Changes to the active style are not saved unless you call
|
|
12
|
+
# {Sketchup::Styles#update_selected_style}.
|
|
13
|
+
#
|
|
14
|
+
# @example
|
|
15
|
+
# styles = Sketchup.active_model.styles
|
|
16
|
+
# puts "Your first style is named #{styles.first.name}"
|
|
17
|
+
#
|
|
18
|
+
# @version SketchUp 6.0
|
|
19
|
+
class Sketchup::Style < Sketchup::Entity
|
|
20
|
+
|
|
21
|
+
# Instance Methods
|
|
22
|
+
|
|
23
|
+
# The {#description} method gets the description for a {Sketchup::Style}.
|
|
24
|
+
#
|
|
25
|
+
# @example
|
|
26
|
+
# styles = Sketchup.active_model.styles
|
|
27
|
+
# style = styles.first
|
|
28
|
+
# puts "Your first style description is: #{style.description}"
|
|
29
|
+
#
|
|
30
|
+
# @return [String] description
|
|
31
|
+
#
|
|
32
|
+
# @version SketchUp 6.0
|
|
33
|
+
def description
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# The {#description=} method sets the description for a {Sketchup::Style}.
|
|
37
|
+
#
|
|
38
|
+
# @example
|
|
39
|
+
# styles = Sketchup.active_model.styles
|
|
40
|
+
# style = styles.first
|
|
41
|
+
# style.description = "My new style description."
|
|
42
|
+
#
|
|
43
|
+
# @param [String] description
|
|
44
|
+
#
|
|
45
|
+
# @version SketchUp 6.0
|
|
46
|
+
def description=(description)
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# The {#name} method gets the name for a {Sketchup::Style}.
|
|
50
|
+
#
|
|
51
|
+
# @example
|
|
52
|
+
# styles = Sketchup.active_model.styles
|
|
53
|
+
# style = styles.first
|
|
54
|
+
# name = style.name
|
|
55
|
+
#
|
|
56
|
+
# @return [String]
|
|
57
|
+
#
|
|
58
|
+
# @version SketchUp 6.0
|
|
59
|
+
def name
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# The {#name=} method sets the name for a {Sketchup::Style}.
|
|
63
|
+
#
|
|
64
|
+
# @example
|
|
65
|
+
# styles = Sketchup.active_model.styles
|
|
66
|
+
# style = styles.first
|
|
67
|
+
# style.name = 'My Very Own Style'
|
|
68
|
+
#
|
|
69
|
+
# @param [String] name
|
|
70
|
+
#
|
|
71
|
+
# @version SketchUp 6.0
|
|
72
|
+
def name=(name)
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# The {#path} method gets the file path the {Sketchup::Style} was loaded from.
|
|
76
|
+
#
|
|
77
|
+
# @example
|
|
78
|
+
# styles = Sketchup.active_model.styles
|
|
79
|
+
# style = styles.first
|
|
80
|
+
# name = style.path
|
|
81
|
+
#
|
|
82
|
+
# @return [String] path The file path the style was loaded from.
|
|
83
|
+
#
|
|
84
|
+
# @version SketchUp 2025.0
|
|
85
|
+
def path
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
end
|