Class: Layout::AngularDimension
| Relationships | |
| Super Chains via Extension / Inclusion / Inheritance | |
|
Class Chain:
self,
Entity
|
|
|
Instance Chain:
self,
Entity
|
|
| Inherits: |
Layout::Entity
|
Overview
References an angular dimension entity. An AngularDimension is composed of the following sub-entities:
-
two ‘extension lines’ that extend from the
Entitybeing 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
-
LEADER_LINE_TYPE_BEZIER =
# File 'lib/sketchup-api-stubs/stubs/Layout/AngularDimension.rb', line 27
Constants
nil -
LEADER_LINE_TYPE_HIDDEN =
# File 'lib/sketchup-api-stubs/stubs/Layout/AngularDimension.rb', line 28
Stub value.
nil -
LEADER_LINE_TYPE_SINGLE_SEGMENT =
# File 'lib/sketchup-api-stubs/stubs/Layout/AngularDimension.rb', line 29
Stub value.
nil -
LEADER_LINE_TYPE_TWO_SEGMENT =
# File 'lib/sketchup-api-stubs/stubs/Layout/AngularDimension.rb', line 30
Stub value.
nil
Class Method Summary
-
.new(start_point, end_point, start_extent_point, end_extent_point, inner_angle) ⇒ Layout::AngularDimension
constructor
The
#initializemethod creates a new disconnectedAngularDimension.
Instance Attribute Summary
-
#custom_text=(uses_custom_text)
rw
The #custom_text= sets whether or not the
AngularDimensionuses custom text. -
#custom_text? ⇒ Boolean
rw
The #custom_text? method returns whether the
AngularDimensionuses custom text. -
#end_connection_point ⇒ Geom::Point2d
rw
The #end_connection_point method returns the paper space location for the second connection.
-
#end_connection_point=(end_point)
rw
The #end_connection_point= method sets the paper space location for the second connection.
-
#end_extent_point ⇒ Geom::Point2d
rw
The #end_extent_point method returns the paper space location for the end of the dimension line.
-
#end_extent_point=(end_extent)
rw
The #end_extent_point= method sets the paper space location for the end of the dimension line.
-
#end_offset_length=(offset_length)
writeonly
The #end_offset_length= method sets the length of the offset from the second connection point to the start of the second extension line.
-
#leader_line_type ⇒ Integer
rw
The #leader_line_type method returns the type of leader line the
AngularDimensionis using. -
#leader_line_type=(type)
rw
The #leader_line_type= method sets the type of leader line the
AngularDimensionis using. -
#radius ⇒ Numeric
rw
The #radius method returns the
AngularDimension‘s radius. -
#radius=(radius)
rw
The #radius= method sets the the
AngularDimension‘s radius. -
#start_connection_point ⇒ Geom::Point2d
rw
The #start_connection_point method returns the paper space location for the first connection.
-
#start_connection_point=(start_point)
rw
The #start_connection_point= method sets the paper space location for the first connection.
-
#start_extent_point ⇒ Geom::Point2d
rw
The #start_extent_point method returns the paper space location for the start of the dimension line.
-
#start_extent_point=(start_extent)
rw
The #start_extent_point= method sets the paper space location for the start of the dimension line.
-
#start_offset_length=(offset_length)
writeonly
The #start_offset_length= method sets the length of the offset from the first connection point to the start of the first extension line.
-
#text ⇒ Layout::FormattedText
rw
The #text method returns a copy of the
AngularDimension‘sFormattedText. -
#text=(formatted_text)
rw
The #text= method sets the
AngularDimension‘sFormattedText.
Entity - Inherited
| #locked= | The |
| #locked? | The |
| #on_shared_layer? | |
| #style | |
| #style= | |
| #untransformed_bounds | The |
| #untransformed_bounds= | The |
Instance Method Summary
-
#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.
-
#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
-
#start_offset_point ⇒ Geom::Point2d
The #start_offset_point method returns the paper space location for the start of the first extension line.
Entity - Inherited
| #== | The |
| #bounds | The |
| #document | |
| #drawing_bounds | The |
| #group | |
| #layer_instance | The |
| #move_to_group | |
| #move_to_layer | |
| #page | |
| #transform! | The |
| #transformation | The |
Constructor Details
.new(start_point, end_point, start_extent_point, end_extent_point, inner_angle) ⇒ AngularDimension
The #initialize method creates a new disconnected AngularDimension.
inner_angle)
Instance Attribute Details
#custom_text=(uses_custom_text) (rw)
The #custom_text= sets whether or not the 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.
inner_angle) dim.custom_text = true
#custom_text? ⇒ Boolean (rw)
The #custom_text? method returns whether the 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.
inner_angle) # returns false uses_custom_text = dim.custom_text?
#end_connection_point ⇒ Geom::Point2d (rw)
The #end_connection_point method returns the paper space location for the second connection.
inner_angle) end_connection = dim.end_connection_point
#end_connection_point=(end_point) (rw)
The #end_connection_point= method sets the paper space location for the second connection.
inner_angle) dim.end_connection_point = ::Geom::Point2d.new(6, 6)
#end_extent_point ⇒ Geom::Point2d (rw)
The #end_extent_point method returns the paper space location for the end of the dimension line.
inner_angle) end_ext_point = dim.end_extent_point
#end_extent_point=(end_extent) (rw)
The #end_extent_point= method sets the paper space location for the end of the dimension line.
inner_angle) end_ext_point = ::Geom::Point2d.new(5, 6) dim.end_extent_point = ::Geom::Point2d.new(6, 6)
#end_offset_length=(offset_length) (writeonly)
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.
inner_angle) end_ext_point = ::Geom::Point2d.new(5, 6) dim.end_offset_length = 0.5
#leader_line_type ⇒ Integer (rw)
The #leader_line_type method returns the type of leader line the AngularDimension is using.
The leader line type can be one of the following:
Layout::AngularDimension::LEADER_LINE_TYPE_SINGLE_SEGMENTLayout::AngularDimension::LEADER_LINE_TYPE_TWO_SEGMENTLayout::AngularDimension::LEADER_LINE_TYPE_BEZIERLayout::AngularDimension::LEADER_LINE_TYPE_HIDDEN-
inner_angle) type = dim.leader_line_type
#leader_line_type=(type) (rw)
The #leader_line_type= method sets the type of leader line the AngularDimension is using.
The leader line type can be one of the following:
Layout::AngularDimension::LEADER_LINE_TYPE_SINGLE_SEGMENTLayout::AngularDimension::LEADER_LINE_TYPE_TWO_SEGMENTLayout::AngularDimension::LEADER_LINE_TYPE_BEZIERLayout::AngularDimension::LEADER_LINE_TYPE_HIDDEN-
inner_angle) dim.leader_line_type = Layout::AngularDimension::LEADER_LINE_TYPE_BEZIER
#radius ⇒ Numeric (rw)
The #radius method returns the AngularDimension‘s radius. This is the distance from the arc center point to the dimension line.
inner_angle) radius = dim.radius
#radius=(radius) (rw)
The #radius= method sets the the AngularDimension‘s radius. This is the distance from the arc center point to the dimension line.
inner_angle) dim.radius = 2.0
#start_connection_point ⇒ Geom::Point2d (rw)
The #start_connection_point method returns the paper space location for the first connection.
inner_angle) start_connection = dim.start_connection_point
#start_connection_point=(start_point) (rw)
The #start_connection_point= method sets the paper space location for the first connection.
inner_angle) dim.start_connection_point = ::Geom::Point2d.new(2, 2)
#start_extent_point ⇒ Geom::Point2d (rw)
The #start_extent_point method returns the paper space location for the start of the dimension line.
inner_angle) start_ext_point = dim.start_extent_point
#start_extent_point=(start_extent) (rw)
The #start_extent_point= method sets the paper space location for the start of the dimension line.
inner_angle) start_ext_point = ::Geom::Point2d.new(2, 3) dim.start_extent_point = ::Geom::Point2d.new(2, 2)
#start_offset_length=(offset_length) (writeonly)
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.
inner_angle) end_ext_point = ::Geom::Point2d.new(5, 6) dim.start_offset_length = 0.5
#text ⇒ Layout::FormattedText (rw)
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 AngularDimension‘s FormattedText.
inner_angle) text = dim.text
#text=(formatted_text) (rw)
The #text= method sets the AngularDimension‘s FormattedText.
inner_angle) anchor_type = Layout::FormattedText::ANCHOR_TYPE_TOP_LEFT dim.text = FormattedText.new(“Hello LayOut”, start_point, anchor_type)
Instance Method Details
#angle ⇒ Numeric
The #angle method returns the AngularDimension‘s angle. The angle is represented in radians.
inner_angle) angle = dim.angle
#arc_center_point ⇒ Geom::Point2d
The #arc_center_point method returns the paper space location for the dimension arc center point.
inner_angle) center = dim.arc_center_point
#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.
inner_angle) end_offset = dim.end_offset_point
#entities ⇒ Layout::Entities
The #entities method returns the Entities that represent the AngularDimension in its exploded form. Depending on the appearance of the 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.
inner_angle) entites = dim.entities
#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.
inner_angle) start_offset = dim.start_offset_point