Class: Layout::AngularDimension
- Defined in:
- lib/sketchup-api-stubs/stubs/Layout/AngularDimension.rb
Overview
References an angular dimension entity. An AngularDimension is composed of the following sub-entities:
-
two ‘extension lines’ that extend from the Entity being dimensioned.
-
a ‘dimension line’ connecting the ends of the leaders. This may be represented by one or two Paths depending on appearance.
-
an optional ‘leader line’ that is used for small AngularDimensions.
-
a ‘dimension text’ that displays the AngularDimension‘s text.
There are seven points that may be modified for an AngularDimension:
-
two ‘connection points’ that define the start and end of the AngularDimension.
-
two ‘extent points’ that define the start and end of the dimension line and are the ends of the two extension lines.
-
two ‘offset points’ that define the starting points of the extension lines.
-
one ‘arc center point’ that defines the center of the AngularDimension, where the extension lines intersect.
Constant Summary collapse
- LEADER_LINE_TYPE_BEZIER =
Constants
nil
- LEADER_LINE_TYPE_HIDDEN =
Stub value.
nil
- LEADER_LINE_TYPE_SINGLE_SEGMENT =
Stub value.
nil
- LEADER_LINE_TYPE_TWO_SEGMENT =
Stub value.
nil
Instance Method Summary collapse
-
#angle ⇒ Numeric
The #angle method returns the AngularDimension‘s angle.
-
#arc_center_point ⇒ Geom::Point2d
The #arc_center_point method returns the paper space location for the dimension arc center point.
-
#custom_text=(uses_custom_text) ⇒ Object
The #custom_text= sets whether or not the AngularDimension uses custom text.
-
#custom_text? ⇒ Boolean
The #custom_text? method returns whether the AngularDimension uses custom text.
-
#end_connection_point ⇒ Geom::Point2d
The #end_connection_point method returns the paper space location for the second connection.
-
#end_connection_point=(end_point) ⇒ Object
The #end_connection_point= method sets the paper space location for the second connection.
-
#end_extent_point ⇒ Geom::Point2d
The #end_extent_point method returns the paper space location for the end of the dimension line.
-
#end_extent_point=(end_extent) ⇒ Object
The #end_extent_point= method sets the paper space location for the end of the dimension line.
-
#end_offset_length=(offset_length) ⇒ Object
The #end_offset_length= method sets the length of the offset from the second connection point to the start of the second extension line.
-
#end_offset_point ⇒ Geom::Point2d
The #end_offset_point method returns the paper space location for the end of the first extension line.
-
#entities ⇒ Layout::Entities
The #entities method returns the Entities that represent the AngularDimension in its exploded form.
-
#initialize(start_point, end_point, start_extent_point, end_extent_point, inner_angle) ⇒ Layout::AngularDimension
constructor
The #initialize method creates a new disconnected AngularDimension.
-
#leader_line_type ⇒ Integer
The #leader_line_type method returns the type of leader line the AngularDimension is using.
-
#leader_line_type=(type) ⇒ Object
The #leader_line_type= method sets the type of leader line the AngularDimension is using.
-
#radius ⇒ Numeric
The #radius method returns the AngularDimension‘s radius.
-
#radius=(radius) ⇒ Object
The #radius= method sets the the AngularDimension‘s radius.
-
#start_connection_point ⇒ Geom::Point2d
The #start_connection_point method returns the paper space location for the first connection.
-
#start_connection_point=(start_point) ⇒ Object
The #start_connection_point= method sets the paper space location for the first connection.
-
#start_extent_point ⇒ Geom::Point2d
The #start_extent_point method returns the paper space location for the start of the dimension line.
-
#start_extent_point=(start_extent) ⇒ Object
The #start_extent_point= method sets the paper space location for the start of the dimension line.
-
#start_offset_length=(offset_length) ⇒ Object
The #start_offset_length= method sets the length of the offset from the first connection point to the start of the first extension line.
-
#start_offset_point ⇒ Geom::Point2d
The #start_offset_point method returns the paper space location for the start of the first extension line.
-
#text ⇒ Layout::FormattedText
The #text method returns a copy of the AngularDimension‘s FormattedText.
-
#text=(formatted_text) ⇒ Object
The #text= method sets the AngularDimension‘s FormattedText.
Methods inherited from Entity
#==, #bounds, #document, #drawing_bounds, #group, #layer_instance, #locked=, #locked?, #move_to_group, #move_to_layer, #on_shared_layer?, #page, #style, #style=, #transform!, #transformation, #untransformed_bounds, #untransformed_bounds=
Constructor Details
#initialize(start_point, end_point, start_extent_point, end_extent_point, inner_angle) ⇒ Layout::AngularDimension
The #initialize method creates a new disconnected Layout::AngularDimension.
298 299 |
# File 'lib/sketchup-api-stubs/stubs/Layout/AngularDimension.rb', line 298 def initialize(start_point, end_point, start_extent_point, end_extent_point, inner_angle) end |
Instance Method Details
#angle ⇒ Numeric
The #angle method returns the Layout::AngularDimension‘s angle. The angle is represented in radians.
49 50 |
# File 'lib/sketchup-api-stubs/stubs/Layout/AngularDimension.rb', line 49 def angle end |
#arc_center_point ⇒ Geom::Point2d
The #arc_center_point method returns the paper space location for the dimension arc center point.
67 68 |
# File 'lib/sketchup-api-stubs/stubs/Layout/AngularDimension.rb', line 67 def arc_center_point end |
#custom_text=(uses_custom_text) ⇒ Object
The #custom_text= sets whether or not the Layout::AngularDimension uses custom text. When true
, the text will display a custom string that doesn’t change. When false
, the text will display the length measurement and wil update automatically.
92 93 |
# File 'lib/sketchup-api-stubs/stubs/Layout/AngularDimension.rb', line 92 def custom_text=(uses_custom_text) end |
#custom_text? ⇒ Boolean
The #custom_text? method returns whether the Layout::AngularDimension uses custom text. When true
, the text will display a custom string that doesn’t change. When false
, the text will display the length measurement and will update automatically.
113 114 |
# File 'lib/sketchup-api-stubs/stubs/Layout/AngularDimension.rb', line 113 def custom_text? end |
#end_connection_point ⇒ Geom::Point2d
The #end_connection_point method returns the paper space location for the second connection.
131 132 |
# File 'lib/sketchup-api-stubs/stubs/Layout/AngularDimension.rb', line 131 def end_connection_point end |
#end_connection_point=(end_point) ⇒ Object
The #end_connection_point= method sets the paper space location for the second connection.
154 155 |
# File 'lib/sketchup-api-stubs/stubs/Layout/AngularDimension.rb', line 154 def end_connection_point=(end_point) end |
#end_extent_point ⇒ Geom::Point2d
The #end_extent_point method returns the paper space location for the end of the dimension line.
172 173 |
# File 'lib/sketchup-api-stubs/stubs/Layout/AngularDimension.rb', line 172 def end_extent_point end |
#end_extent_point=(end_extent) ⇒ Object
The #end_extent_point= method sets the paper space location for the end of the dimension line.
196 197 |
# File 'lib/sketchup-api-stubs/stubs/Layout/AngularDimension.rb', line 196 def end_extent_point=(end_extent) end |
#end_offset_length=(offset_length) ⇒ Object
The #end_offset_length= method sets the length of the offset from the second connection point to the start of the second extension line. The connection and extent points will not move.
221 222 |
# File 'lib/sketchup-api-stubs/stubs/Layout/AngularDimension.rb', line 221 def end_offset_length=(offset_length) end |
#end_offset_point ⇒ Geom::Point2d
The #end_offset_point method returns the paper space location for the end of the first extension line. The first extension line runs from this offset point to the end extent point.
240 241 |
# File 'lib/sketchup-api-stubs/stubs/Layout/AngularDimension.rb', line 240 def end_offset_point end |
#entities ⇒ Layout::Entities
The #entities method returns the Entities that represent the Layout::AngularDimension in its exploded form. Depending on the appearance of the Layout::AngularDimension being exploded, this may return anywhere from four to six Entitys: start extension line, end extension line, one or two dimension lines, dimension text, and optionally the leader line.
261 262 |
# File 'lib/sketchup-api-stubs/stubs/Layout/AngularDimension.rb', line 261 def entities end |
#leader_line_type ⇒ Integer
The #leader_line_type method returns the type of leader line the Layout::AngularDimension is using.
The leader line type can be one of the following:
Layout::AngularDimension::LEADER_LINE_TYPE_SINGLE_SEGMENT
Layout::AngularDimension::LEADER_LINE_TYPE_TWO_SEGMENT
Layout::AngularDimension::LEADER_LINE_TYPE_BEZIER
Layout::AngularDimension::LEADER_LINE_TYPE_HIDDEN
322 323 |
# File 'lib/sketchup-api-stubs/stubs/Layout/AngularDimension.rb', line 322 def leader_line_type end |
#leader_line_type=(type) ⇒ Object
The #leader_line_type= method sets the type of leader line the Layout::AngularDimension is using.
The leader line type can be one of the following:
Layout::AngularDimension::LEADER_LINE_TYPE_SINGLE_SEGMENT
Layout::AngularDimension::LEADER_LINE_TYPE_TWO_SEGMENT
Layout::AngularDimension::LEADER_LINE_TYPE_BEZIER
Layout::AngularDimension::LEADER_LINE_TYPE_HIDDEN
354 355 |
# File 'lib/sketchup-api-stubs/stubs/Layout/AngularDimension.rb', line 354 def leader_line_type=(type) end |
#radius ⇒ Numeric
The #radius method returns the Layout::AngularDimension‘s radius. This is the distance from the arc center point to the dimension line.
372 373 |
# File 'lib/sketchup-api-stubs/stubs/Layout/AngularDimension.rb', line 372 def radius end |
#radius=(radius) ⇒ Object
The #radius= method sets the the Layout::AngularDimension‘s radius. This is the distance from the arc center point to the dimension line.
397 398 |
# File 'lib/sketchup-api-stubs/stubs/Layout/AngularDimension.rb', line 397 def radius=(radius) end |
#start_connection_point ⇒ Geom::Point2d
The #start_connection_point method returns the paper space location for the first connection.
415 416 |
# File 'lib/sketchup-api-stubs/stubs/Layout/AngularDimension.rb', line 415 def start_connection_point end |
#start_connection_point=(start_point) ⇒ Object
The #start_connection_point= method sets the paper space location for the first connection.
438 439 |
# File 'lib/sketchup-api-stubs/stubs/Layout/AngularDimension.rb', line 438 def start_connection_point=(start_point) end |
#start_extent_point ⇒ Geom::Point2d
The #start_extent_point method returns the paper space location for the start of the dimension line.
456 457 |
# File 'lib/sketchup-api-stubs/stubs/Layout/AngularDimension.rb', line 456 def start_extent_point end |
#start_extent_point=(start_extent) ⇒ Object
The #start_extent_point= method sets the paper space location for the start of the dimension line.
480 481 |
# File 'lib/sketchup-api-stubs/stubs/Layout/AngularDimension.rb', line 480 def start_extent_point=(start_extent) end |
#start_offset_length=(offset_length) ⇒ Object
The #start_offset_length= method sets the length of the offset from the first connection point to the start of the first extension line. The connection and extent points will not move.
505 506 |
# File 'lib/sketchup-api-stubs/stubs/Layout/AngularDimension.rb', line 505 def start_offset_length=(offset_length) end |
#start_offset_point ⇒ Geom::Point2d
The #start_offset_point method returns the paper space location for the start of the first extension line. The first extension line runs from this offset point to the start extent point.
524 525 |
# File 'lib/sketchup-api-stubs/stubs/Layout/AngularDimension.rb', line 524 def start_offset_point end |
#text ⇒ Layout::FormattedText
With the addition of auto-text in dimensions for LayOut 2019.2, the copy of the dimension text incorrectly provided the plain text when requesting the display text. This has been fixed for LayOut 2020.1.
The #text method returns a copy of the Layout::AngularDimension‘s FormattedText.
546 547 |
# File 'lib/sketchup-api-stubs/stubs/Layout/AngularDimension.rb', line 546 def text end |
#text=(formatted_text) ⇒ Object
The #text= method sets the Layout::AngularDimension‘s FormattedText.
570 571 |
# File 'lib/sketchup-api-stubs/stubs/Layout/AngularDimension.rb', line 570 def text=(formatted_text) end |