sketchup-api-stubs 0.3.1 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (148) hide show
  1. checksums.yaml +5 -5
  2. data/.yardopts +7 -7
  3. data/SketchUp/Geom/BoundingBox.rb +7 -15
  4. data/SketchUp/Geom/Bounds2d.rb +18 -18
  5. data/SketchUp/Geom/LatLong.rb +6 -6
  6. data/SketchUp/Geom/OrientedBounds2d.rb +1 -1
  7. data/SketchUp/Geom/Point2d.rb +42 -6
  8. data/SketchUp/Geom/Point3d.rb +32 -21
  9. data/SketchUp/Geom/PolygonMesh.rb +22 -17
  10. data/SketchUp/Geom/Transformation.rb +35 -35
  11. data/SketchUp/Geom/Transformation2d.rb +153 -13
  12. data/SketchUp/Geom/UTM.rb +1 -1
  13. data/SketchUp/Geom/Vector2d.rb +45 -9
  14. data/SketchUp/Geom/Vector3d.rb +11 -11
  15. data/SketchUp/Layout.rb +1 -1
  16. data/SketchUp/Layout/AngularDimension.rb +25 -25
  17. data/SketchUp/Layout/AutoTextDefinition.rb +5 -5
  18. data/SketchUp/Layout/AutoTextDefinitions.rb +1 -1
  19. data/SketchUp/Layout/ConnectionPoint.rb +1 -1
  20. data/SketchUp/Layout/Document.rb +6 -5
  21. data/SketchUp/Layout/Ellipse.rb +1 -1
  22. data/SketchUp/Layout/Entities.rb +1 -1
  23. data/SketchUp/Layout/Entity.rb +16 -16
  24. data/SketchUp/Layout/FormattedText.rb +21 -21
  25. data/SketchUp/Layout/Grid.rb +1 -1
  26. data/SketchUp/Layout/Group.rb +18 -18
  27. data/SketchUp/Layout/Image.rb +6 -6
  28. data/SketchUp/Layout/Label.rb +15 -15
  29. data/SketchUp/Layout/Layer.rb +5 -5
  30. data/SketchUp/Layout/LayerInstance.rb +3 -3
  31. data/SketchUp/Layout/Layers.rb +1 -1
  32. data/SketchUp/Layout/LinearDimension.rb +25 -25
  33. data/SketchUp/Layout/LockedEntityError.rb +1 -1
  34. data/SketchUp/Layout/LockedLayerError.rb +1 -1
  35. data/SketchUp/Layout/Page.rb +3 -3
  36. data/SketchUp/Layout/PageInfo.rb +1 -1
  37. data/SketchUp/Layout/Pages.rb +1 -1
  38. data/SketchUp/Layout/Path.rb +47 -27
  39. data/SketchUp/Layout/Rectangle.rb +8 -8
  40. data/SketchUp/Layout/SketchUpModel.rb +61 -26
  41. data/SketchUp/Layout/Style.rb +18 -17
  42. data/SketchUp/Layout/Table.rb +14 -14
  43. data/SketchUp/Layout/TableCell.rb +5 -5
  44. data/SketchUp/Layout/TableColumn.rb +7 -7
  45. data/SketchUp/Layout/TableRow.rb +7 -7
  46. data/SketchUp/Sketchup/Animation.rb +1 -1
  47. data/SketchUp/Sketchup/AppObserver.rb +1 -1
  48. data/SketchUp/Sketchup/ArcCurve.rb +1 -1
  49. data/SketchUp/Sketchup/AttributeDictionaries.rb +1 -1
  50. data/SketchUp/Sketchup/AttributeDictionary.rb +7 -7
  51. data/SketchUp/Sketchup/Axes.rb +4 -4
  52. data/SketchUp/Sketchup/Behavior.rb +1 -1
  53. data/SketchUp/Sketchup/Camera.rb +30 -41
  54. data/SketchUp/Sketchup/ClassificationSchema.rb +1 -1
  55. data/SketchUp/Sketchup/Classifications.rb +1 -1
  56. data/SketchUp/Sketchup/Color.rb +1 -1
  57. data/SketchUp/Sketchup/ComponentDefinition.rb +3 -3
  58. data/SketchUp/Sketchup/ComponentInstance.rb +10 -10
  59. data/SketchUp/Sketchup/Console.rb +5 -5
  60. data/SketchUp/Sketchup/ConstructionLine.rb +11 -11
  61. data/SketchUp/Sketchup/ConstructionPoint.rb +1 -1
  62. data/SketchUp/Sketchup/Curve.rb +1 -1
  63. data/SketchUp/Sketchup/DefinitionList.rb +12 -9
  64. data/SketchUp/Sketchup/DefinitionObserver.rb +6 -7
  65. data/SketchUp/Sketchup/DefinitionsObserver.rb +3 -3
  66. data/SketchUp/Sketchup/Dimension.rb +1 -1
  67. data/SketchUp/Sketchup/DimensionLinear.rb +81 -1
  68. data/SketchUp/Sketchup/DimensionObserver.rb +1 -1
  69. data/SketchUp/Sketchup/DimensionRadial.rb +1 -1
  70. data/SketchUp/Sketchup/Drawingelement.rb +1 -1
  71. data/SketchUp/Sketchup/Edge.rb +13 -16
  72. data/SketchUp/Sketchup/EdgeUse.rb +1 -1
  73. data/SketchUp/Sketchup/Entities.rb +181 -100
  74. data/SketchUp/Sketchup/EntitiesObserver.rb +1 -1
  75. data/SketchUp/Sketchup/Entity.rb +29 -26
  76. data/SketchUp/Sketchup/EntityObserver.rb +1 -1
  77. data/SketchUp/Sketchup/ExtensionsManager.rb +1 -1
  78. data/SketchUp/Sketchup/Face.rb +7 -7
  79. data/SketchUp/Sketchup/FrameChangeObserver.rb +4 -4
  80. data/SketchUp/Sketchup/Group.rb +1 -1
  81. data/SketchUp/Sketchup/Http.rb +1 -1
  82. data/SketchUp/Sketchup/Http/Request.rb +3 -3
  83. data/SketchUp/Sketchup/Http/Response.rb +1 -1
  84. data/SketchUp/Sketchup/Image.rb +1 -1
  85. data/SketchUp/Sketchup/ImageRep.rb +16 -16
  86. data/SketchUp/Sketchup/Importer.rb +1 -1
  87. data/SketchUp/Sketchup/InputPoint.rb +8 -4
  88. data/SketchUp/Sketchup/InstanceObserver.rb +1 -1
  89. data/SketchUp/Sketchup/InstancePath.rb +15 -12
  90. data/SketchUp/Sketchup/Layer.rb +27 -1
  91. data/SketchUp/Sketchup/Layers.rb +1 -1
  92. data/SketchUp/Sketchup/LayersObserver.rb +1 -1
  93. data/SketchUp/Sketchup/Licensing.rb +1 -1
  94. data/SketchUp/Sketchup/Licensing/ExtensionLicense.rb +1 -1
  95. data/SketchUp/Sketchup/LineStyle.rb +24 -0
  96. data/SketchUp/Sketchup/LineStyles.rb +123 -0
  97. data/SketchUp/Sketchup/Loop.rb +1 -1
  98. data/SketchUp/Sketchup/Material.rb +16 -10
  99. data/SketchUp/Sketchup/Materials.rb +9 -1
  100. data/SketchUp/Sketchup/MaterialsObserver.rb +3 -3
  101. data/SketchUp/Sketchup/Menu.rb +1 -1
  102. data/SketchUp/Sketchup/Model.rb +47 -21
  103. data/SketchUp/Sketchup/ModelObserver.rb +3 -3
  104. data/SketchUp/Sketchup/OptionsManager.rb +1 -1
  105. data/SketchUp/Sketchup/OptionsProvider.rb +5 -5
  106. data/SketchUp/Sketchup/OptionsProviderObserver.rb +1 -1
  107. data/SketchUp/Sketchup/Page.rb +1 -1
  108. data/SketchUp/Sketchup/Pages.rb +13 -8
  109. data/SketchUp/Sketchup/PagesObserver.rb +1 -1
  110. data/SketchUp/Sketchup/PickHelper.rb +49 -50
  111. data/SketchUp/Sketchup/RegionalSettings.rb +1 -1
  112. data/SketchUp/Sketchup/RenderingOptions.rb +4 -4
  113. data/SketchUp/Sketchup/RenderingOptionsObserver.rb +3 -3
  114. data/SketchUp/Sketchup/SectionPlane.rb +1 -1
  115. data/SketchUp/Sketchup/Selection.rb +3 -3
  116. data/SketchUp/Sketchup/SelectionObserver.rb +3 -3
  117. data/SketchUp/Sketchup/Set.rb +1 -1
  118. data/SketchUp/Sketchup/ShadowInfo.rb +3 -3
  119. data/SketchUp/Sketchup/ShadowInfoObserver.rb +1 -1
  120. data/SketchUp/Sketchup/Style.rb +1 -1
  121. data/SketchUp/Sketchup/Styles.rb +1 -1
  122. data/SketchUp/Sketchup/Text.rb +28 -1
  123. data/SketchUp/Sketchup/Texture.rb +1 -1
  124. data/SketchUp/Sketchup/TextureWriter.rb +13 -13
  125. data/SketchUp/Sketchup/Tool.rb +68 -64
  126. data/SketchUp/Sketchup/Tools.rb +13 -1
  127. data/SketchUp/Sketchup/ToolsObserver.rb +13 -13
  128. data/SketchUp/Sketchup/UVHelper.rb +1 -1
  129. data/SketchUp/Sketchup/Vertex.rb +1 -1
  130. data/SketchUp/Sketchup/View.rb +57 -56
  131. data/SketchUp/Sketchup/ViewObserver.rb +2 -2
  132. data/SketchUp/UI/Command.rb +4 -1
  133. data/SketchUp/UI/HtmlDialog.rb +23 -14
  134. data/SketchUp/UI/Notification.rb +10 -10
  135. data/SketchUp/UI/Toolbar.rb +1 -1
  136. data/SketchUp/UI/WebDialog.rb +38 -20
  137. data/SketchUp/_top_level.rb +32 -34
  138. data/SketchUp/array.rb +125 -112
  139. data/SketchUp/geom.rb +2 -2
  140. data/SketchUp/languagehandler.rb +1 -1
  141. data/SketchUp/length.rb +1 -1
  142. data/SketchUp/numeric.rb +3 -3
  143. data/SketchUp/sketchup.rb +11 -11
  144. data/SketchUp/sketchupextension.rb +6 -2
  145. data/SketchUp/string.rb +1 -1
  146. data/SketchUp/ui.rb +14 -14
  147. data/autoload/sketchup.rb +2 -0
  148. metadata +5 -3
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2017 Trimble Inc.
1
+ # Copyright:: Copyright 2019 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # The ClassificationSchema class represent schemas loaded in the model.
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2017 Trimble Inc.
1
+ # Copyright:: Copyright 2019 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # The Classifications class is a container/manager for all classifications in
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2017 Trimble Inc.
1
+ # Copyright:: Copyright 2019 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # The Color class is used to create and manipulate colors within SketchUp
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2017 Trimble Inc.
1
+ # Copyright:: Copyright 2019 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # The {Sketchup::ComponentDefinition} class is used to define the contents for
@@ -548,11 +548,11 @@ class Sketchup::ComponentDefinition < Sketchup::Drawingelement
548
548
  # @raise [NotImplementedError] when trying to set the value of "choice"
549
549
  # attributes.
550
550
  #
551
+ # @raise [RuntimeError] if the attributes being set are corrupt.
552
+ #
551
553
  # @raise [TypeError] when trying to set a value that is not valid for the
552
554
  # attribute.
553
555
  #
554
- # @raise [RuntimeError] if the attributes being set are corrupt.
555
- #
556
556
  # @return [Boolean] true if the path was valid, false otherwise.
557
557
  #
558
558
  # @version SketchUp 2015
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2017 Trimble Inc.
1
+ # Copyright:: Copyright 2019 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # The {Sketchup::ComponentInstance} class is used to represent component
@@ -266,24 +266,24 @@ class Sketchup::ComponentInstance < Sketchup::Drawingelement
266
266
  def locked?
267
267
  end
268
268
 
269
- # The make_unique method is used to create a component definition for this
269
+ # The {#make_unique} method is used to create a component definition for this
270
270
  # instance that is not used by any other instances.
271
271
  #
272
272
  # @example
273
- # point = Geom::Point3d.new 10,20,30
274
- # transform = Geom::Transformation.new point
273
+ # point = Geom::Point3d.new(10,20,30)
274
+ # transform = Geom::Transformation.new(point)
275
275
  # model = Sketchup.active_model
276
276
  # entities = model.active_entities
277
277
  #
278
- # path = Sketchup.find_support_file "Bed.skp",
279
- # "Components/Components Sampler/"
278
+ # path = Sketchup.find_support_file("Bed.skp",
279
+ # "Components/Components Sampler/")
280
280
  # definitions = model.definitions
281
- # componentdefinition = definitions.load path
282
- # instance = entities.add_instance componentdefinition, transform
281
+ # componentdefinition = definitions.load(path)
282
+ # instance = entities.add_instance(componentdefinition, transform)
283
283
  # # Returns unique component instance
284
- # status = instance.make_unique
284
+ # instance.make_unique
285
285
  #
286
- # @return [Boolean] true if successful, false if unsuccessful
286
+ # @return [Sketchup::ComponentInstance] returns itself
287
287
  #
288
288
  # @version SketchUp 6.0
289
289
  def make_unique
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2017 Trimble Inc.
1
+ # Copyright:: Copyright 2019 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # The Console class is used by SketchUp to direct $stdout and $stderr to the
@@ -13,10 +13,6 @@
13
13
  # not produce any output.
14
14
  #
15
15
  # @example
16
- # t = Thread.new { puts 'This will not be written to the console.' }
17
- # t.join
18
- #
19
- # @example
20
16
  # # By default $stdout is directed to SKETCHUP_CONSOLE.
21
17
  # p $stdout
22
18
  #
@@ -24,6 +20,10 @@
24
20
  # # SketchUp console is by using the SKETCHUP_CONSOLE constant.
25
21
  # p SKETCHUP_CONSOLE
26
22
  #
23
+ # @example
24
+ # t = Thread.new { puts 'This will not be written to the console.' }
25
+ # t.join
26
+ #
27
27
  # @version SketchUp 2014
28
28
  class Sketchup::Console
29
29
 
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2017 Trimble Inc.
1
+ # Copyright:: Copyright 2019 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # The ConstructionLine class contains methods for modifying construction
@@ -214,25 +214,26 @@ class Sketchup::ConstructionLine < Sketchup::Drawingelement
214
214
  def start=(arg)
215
215
  end
216
216
 
217
- # The stipple method is used to retrieve the stipple pattern used to display
217
+ # The {#stipple} method is used to retrieve the stipple pattern used to display
218
218
  # the construction line.
219
219
  #
220
220
  # @example
221
221
  # model = Sketchup.active_model
222
222
  # entities = model.active_entities
223
- # point1 = Geom::Point3d.new(0,0,0)
224
- # point2 = Geom::Point3d.new(20,20,20)
223
+ # point1 = Geom::Point3d.new(0, 0, 0)
224
+ # point2 = Geom::Point3d.new(20, 20, 20)
225
225
  # constline = entities.add_cline(point1, point2)
226
- # UI.messagebox(constline.stipple)
226
+ # puts constline.stipple
227
227
  #
228
- # @return pattern - the stipple pattern being used
228
+ # @return [String]
229
229
  #
230
230
  # @version SketchUp 6.0
231
231
  def stipple
232
232
  end
233
233
 
234
- # The stipple= method is used to set the stipple pattern used to display
234
+ # The {#stipple=} method is used to set the stipple pattern used to display
235
235
  # the construction line. The stipple pattern is given as a string.
236
+ #
236
237
  # Valid strings are:
237
238
  # - <code>"."</code> (Dotted Line),
238
239
  # - <code>"-"</code> (Short Dashes Line),
@@ -242,13 +243,12 @@ class Sketchup::ConstructionLine < Sketchup::Drawingelement
242
243
  # @example
243
244
  # model = Sketchup.active_model
244
245
  # entities = model.active_entities
245
- # point1 = Geom::Point3d.new(0,0,0)
246
- # point2 = Geom::Point3d.new(20,20,20)
246
+ # point1 = Geom::Point3d.new(0, 0, 0)
247
+ # point2 = Geom::Point3d.new(20, 20, 20)
247
248
  # constline = entities.add_cline(point1, point2)
248
249
  # constline.stipple = "-.-"
249
250
  #
250
- # @param pattern
251
- # - the stipple pattern to use
251
+ # @param [String, Integer] pattern
252
252
  #
253
253
  # @version SketchUp 6.0
254
254
  def stipple=(pattern)
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2017 Trimble Inc.
1
+ # Copyright:: Copyright 2019 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # A construction point represents a point in the model that can be used to aid
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2017 Trimble Inc.
1
+ # Copyright:: Copyright 2019 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # The Curve class is used by SketchUp to unite a series of Edge objects into
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2017 Trimble Inc.
1
+ # Copyright:: Copyright 2019 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # A DefinitionList object holds a list of all of the ComponentDefinition
@@ -32,14 +32,14 @@ class Sketchup::DefinitionList < Sketchup::Entity
32
32
  # @param [Integer] index The index for a specific component definition.
33
33
  # @return [Sketchup::ComponentDefinition, nil]
34
34
  #
35
- # @overload [](guid)
35
+ # @overload [](name)
36
36
  #
37
- # @param [String] guid The name of an existing component definition.
37
+ # @param [String] name The unique GUID for the component definition.
38
38
  # @return [Sketchup::ComponentDefinition, nil]
39
39
  #
40
- # @overload [](name)
40
+ # @overload [](guid)
41
41
  #
42
- # @param [String] name The unique GUID for the component definition.
42
+ # @param [String] guid The name of an existing component definition.
43
43
  # @return [Sketchup::ComponentDefinition, nil]
44
44
  #
45
45
  # @version SketchUp 6.0
@@ -99,14 +99,14 @@ class Sketchup::DefinitionList < Sketchup::Entity
99
99
  # @param [Integer] index The index for a specific component definition.
100
100
  # @return [Sketchup::ComponentDefinition, nil]
101
101
  #
102
- # @overload [](guid)
102
+ # @overload [](name)
103
103
  #
104
- # @param [String] guid The name of an existing component definition.
104
+ # @param [String] name The unique GUID for the component definition.
105
105
  # @return [Sketchup::ComponentDefinition, nil]
106
106
  #
107
- # @overload [](name)
107
+ # @overload [](guid)
108
108
  #
109
- # @param [String] name The unique GUID for the component definition.
109
+ # @param [String] guid The name of an existing component definition.
110
110
  # @return [Sketchup::ComponentDefinition, nil]
111
111
  #
112
112
  # @version SketchUp 6.0
@@ -178,6 +178,9 @@ class Sketchup::DefinitionList < Sketchup::Entity
178
178
  # @param [String] path
179
179
  # The path where the component definition file is located.
180
180
  #
181
+ # @raise RuntimeError If filename is an invalid SketchUp model. Added in
182
+ # SketchUp 2019. Possible that prior versions of SketchUp will crash.
183
+ #
181
184
  # @return [Sketchup::ComponentDefinition] the loaded ComponentDefinition
182
185
  # object if successful
183
186
  #
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2017 Trimble Inc.
1
+ # Copyright:: Copyright 2019 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # This observer interface is implemented to react to component definition
@@ -47,23 +47,22 @@ class Sketchup::DefinitionObserver < Sketchup::EntityObserver
47
47
  # The {#onComponentInstanceRemoved} method is called when a component
48
48
  # instance is removed from a model.
49
49
  #
50
- # implemented, this method is fired on a Move + Copy operation even
51
- # though no {Sketchup::ComponentInstance} is apparently removed.
52
- #
53
50
  # @example
54
51
  # def onComponentInstanceRemoved(definition, instance)
55
52
  # puts "onComponentInstanceRemoved(#{definition}, #{instance})"
56
53
  # end
57
54
  #
58
55
  # @note Due to the underlying way that the SketchUp Move Tool is
59
- #
60
- # @param [Sketchup::ComponentInstance] instance
61
- # The removed instance
56
+ # implemented, this method is fired on a Move + Copy operation even
57
+ # though no {Sketchup::ComponentInstance} is apparently removed.
62
58
  #
63
59
  # @param [Sketchup::ComponentDefinition] definition
64
60
  # The definition of the
65
61
  # instance removed
66
62
  #
63
+ # @param [Sketchup::ComponentInstance] instance
64
+ # The removed instance
65
+ #
67
66
  # @return [nil]
68
67
  #
69
68
  # @version SketchUp 6.0
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2017 Trimble Inc.
1
+ # Copyright:: Copyright 2019 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # This observer interface is implemented to react to events on a definitions
@@ -69,10 +69,10 @@ class Sketchup::DefinitionsObserver
69
69
  #
70
70
  # @note This methods fires twice for each Component/Group erased.
71
71
  #
72
- # @param [Sketchup::ComponentDefinition] definition
73
- #
74
72
  # @param [Sketchup::DefinitionList] definitions
75
73
  #
74
+ # @param [Sketchup::ComponentDefinition] definition
75
+ #
76
76
  # @return [nil]
77
77
  #
78
78
  # @version SketchUp 6.0
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2017 Trimble Inc.
1
+ # Copyright:: Copyright 2019 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # The Dimension class provides base functionality for classes DimensionLinear
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2017 Trimble Inc.
1
+ # Copyright:: Copyright 2019 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # The DimensionLinear class represents linear dimensions.
@@ -108,6 +108,46 @@ class Sketchup::DimensionLinear < Sketchup::Dimension
108
108
  def end=(pt_or_entity)
109
109
  end
110
110
 
111
+ # The {#end_attached_to} method will return the attached end point via an array
112
+ # containing the {Sketchup::InstancePath} and {Geom::Point3d}.
113
+ #
114
+ # @example
115
+ # # Assuming you have a valid dimension selected that is attached to a
116
+ # # component instance
117
+ # dim = Sketchup.active_model.selection[0]
118
+ # dim.end_attached_to
119
+ #
120
+ # @return [Array(Sketchup::InstancePath, Geom::Point3d), nil]
121
+ #
122
+ # @version SketchUp 2019
123
+ def end_attached_to
124
+ end
125
+
126
+ # The {#end_attached_to=} method will attach the ending point to the
127
+ # {Sketchup::InstancePath} and {Geom::Point3d}.
128
+ #
129
+ # @example
130
+ # # Assuming you have a valid dimension selected that is attached to a
131
+ # # component instance
132
+ # dim = Sketchup.active_model.selection[0]
133
+ # # get the path (instance_path, point)
134
+ # path = dim.end_attached_to
135
+ # instance_path = path[0]
136
+ # instance = instance_path.to_a[0]
137
+ # point1 = Geom::Point3d.new(0, 0, 0)
138
+ # point2 = Geom::Point3d.new(20, 20, 20)
139
+ # instance.definition.entities.add_edges(point1, point2)
140
+ # edge = instance.definition.entities.grep(Sketchup::Edge).first
141
+ # new_instance_path = Sketchup::InstancePath.new([instance, edge])
142
+ # point2 = point2.transform(new_instance_path.transformation.inverse)
143
+ # dim.end_attached_to = [new_instance_path, point2]
144
+ #
145
+ # @param [Array(Sketchup::InstancePath, Geom::Point3d)] path
146
+ #
147
+ # @version SketchUp 2019
148
+ def end_attached_to=(path)
149
+ end
150
+
111
151
  # The offset_vector method returns the parallel offset vector from the
112
152
  # reference line to the dimension line measured from the 'start' reference
113
153
  # point.
@@ -189,6 +229,46 @@ class Sketchup::DimensionLinear < Sketchup::Dimension
189
229
  def start=(pt_or_entity)
190
230
  end
191
231
 
232
+ # The {#start_attached_to} method will return the attached start point via an
233
+ # array containing the {Sketchup::InstancePath} and {Geom::Point3d}.
234
+ #
235
+ # @example
236
+ # # Assuming you have a valid dimension selected that is attached to a
237
+ # # component instance
238
+ # dim = Sketchup.active_model.selection[0]
239
+ # dim.start_attached_to
240
+ #
241
+ # @return [Array(Sketchup::InstancePath, Geom::Point3d), nil]
242
+ #
243
+ # @version SketchUp 2019
244
+ def start_attached_to
245
+ end
246
+
247
+ # The {#start_attached_to=} method will attach the starting point to the
248
+ # {Sketchup::InstancePath} and {Geom::Point3d}.
249
+ #
250
+ # @example
251
+ # # Assuming you have a valid dimension selected that is attached to a
252
+ # # component instance
253
+ # dim = Sketchup.active_model.selection[0]
254
+ # # get the path (instance_path, point)
255
+ # path = dim.start_attached_to
256
+ # instance_path = path[0]
257
+ # instance = instance_path.to_a[0]
258
+ # point1 = Geom::Point3d.new(0, 0, 0)
259
+ # point2 = Geom::Point3d.new(20, 20, 20)
260
+ # instance.definition.entities.add_edges(point1, point2)
261
+ # edge = instance.definition.entities.grep(Sketchup::Edge).first
262
+ # new_instance_path = Sketchup::InstancePath.new([instance, edge])
263
+ # point2 = point2.transform(new_instance_path.transformation.inverse)
264
+ # dim.start_attached_to = [new_instance_path, point2]
265
+ #
266
+ # @param [Array(Sketchup::InstancePath, Geom::Point3d)] path
267
+ #
268
+ # @version SketchUp 2019
269
+ def start_attached_to=(path)
270
+ end
271
+
192
272
  # The text_position method returns the position of the text along the dimension
193
273
  # line. Valid values are class constants:
194
274
  # - DimensionLinear::TEXT_OUTSIDE_START
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2017 Trimble Inc.
1
+ # Copyright:: Copyright 2019 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # This observer interface is implemented to react to changes in dimension text.
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2017 Trimble Inc.
1
+ # Copyright:: Copyright 2019 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # The DimensionRadial class represents radius and diameter dimensions on
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2017 Trimble Inc.
1
+ # Copyright:: Copyright 2019 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # Drawingelement is a base class for an item in the model that can be
@@ -1,4 +1,4 @@
1
- # Copyright:: Copyright 2017 Trimble Inc.
1
+ # Copyright:: Copyright 2019 Trimble Inc.
2
2
  # License:: The MIT License (MIT)
3
3
 
4
4
  # The Edge class contains methods modifying and extracting information for
@@ -209,32 +209,29 @@ class Sketchup::Edge < Sketchup::Drawingelement
209
209
  def find_faces
210
210
  end
211
211
 
212
- # The length method is used to retrieve the length of an edge in current
212
+ # The {#length} method is used to retrieve the length of an edge in current
213
213
  # units.
214
214
  #
215
- # You can pass in an optional Transformation (or an array that can represent a
216
- # transformation), to correct for a parent group's transformation. For example,
217
- # if an edge is inside of a group that is scaled to 200%, the length method
218
- # will return the unscaled length of the edge. So by passing a 200%
219
- # transformation object to this method, you can account for that to get the
220
- # "visual" length of the edge.
215
+ # You can pass in an optional {Geom::Transformation} (or an array that can
216
+ # represent a transformation), to correct for a parent group's transformation.
217
+ # For example, if an edge is inside of a group that is scaled to 200%, the
218
+ # length method will return the unscaled length of the edge. So by passing a
219
+ # 200% transformation object to this method, you can account for that to get
220
+ # the "visual" length of the edge.
221
221
  #
222
222
  # @example
223
- # edge = Sketchup.active_model.entities.add_line([0,0,0],[100,100,0])
224
- # length = edge.length
225
- # if (length)
226
- # UI.messagebox length
227
- # end
223
+ # edge = Sketchup.active_model.entities.add_line([0, 0, 0], [100, 100, 0])
224
+ # puts "#{edge.length} (#{edge.length.inspect})"
228
225
  #
229
226
  # @overload length
230
227
  #
231
- # @return [Length] the length of the edge in current units
228
+ # @return [Length] the length of the edge
232
229
  #
233
230
  # @overload length(transform)
234
231
  #
235
232
  # @param transform [Geom::Transformation] A Transformation object or array
236
- # that can be interpreted as a Transformation object.
237
- # @return [Length] the length of the edge in current units
233
+ # that can be interpreted as a Transformation object.
234
+ # @return [Length] the length of the edge
238
235
  #
239
236
  # @version SketchUp 6.0
240
237
  def length(*args)