Class: ModraUp::ArcCurve
- Inherits:
-
ModraUp::Curve
- Object
- ModraUp::Entity
- ModraUp::Curve
- ModraUp::ArcCurve
Overview
Arcs or arcs (pline edge chain). Obtain using ModraUp::Edge#curve. The parent class is ModraUp::Curve.
Instance Method Summary # collapse
-
#plane ⇒ Array<Float>
The four coefficients [A, B, C, D] of the plane containing the arc.
-
#num_segments ⇒ Integer
Number of Segments (for arcs and circles in the entity).
-
#num_segments=(count) ⇒ Integer
Modify the number of segments while keeping the center/radius/angle. Use the ModraUp::Model transaction operator.
-
#center ⇒ Geom::Point3d
Center.
-
#radius ⇒ Float
Radius (in inches).
-
#circular? ⇒ Boolean
Returns whether the arc curve is a closed circle.
-
#start_angle ⇒ Float
Start angle (radians).
-
#end_angle ⇒ Float
Terminates angle (radians).
-
#normal ⇒ Geom::Vector3d
Arc plane normal.
-
#xaxis ⇒ Geom::Vector3d
Arc coordinate system X-axis. Length equals the radius.
-
#yaxis ⇒ Geom::Vector3d
Arc coordinate system Y-axis. Length equals the radius.
Inherited from ModraUp::Curve
-
#vertices ⇒ Array<ModraUp::Vertex>
Returns the vertices of the curve in the order of curve edges, without repeating the starting point for closed curves.
-
#each_edge ⇒ nil, Enumerator
Iterate through each edge of the curve; returns an Enumerator if no block is passed.
-
#length ⇒ Length, Float
The length of a general curve is the sum of the lengths of its segments, while an arc length is calculated by multiplying the radius by the swept angle.
-
#is_polygon? ⇒ Boolean
Returns true if the curve is a polygon created by a polygon tool, add_ngon, or a conversion operation.
-
#move_vertices(points) ⇒ Boolean
Move all vertices of the curve, the number of vertices must match the input, preserving curve association for non-circular transformations.
-
#count_edges ⇒ Integer
The number of edges that compose the curve.
-
#edges ⇒ Array<ModraUp::Edge>
The edges that compose this curve.
-
#first_edge ⇒ ModraUp::Edge, nil
The first edge.
-
#last_edge ⇒ ModraUp::Edge, nil
The last edge.
-
#typename ⇒ String
Type Name ArcCurve.
-
#entityID ⇒ Integer
The curve entity ID within the current Sketchup session.
-
#persistent_id ⇒ Integer
Curve ID saved with the model, see ModraUp::Entity#persistent_id.
-
#parent ⇒ ModraUp::Model, ModraUp::ComponentDefinition
The owner in the drawing context.
-
#attribute_dictionaries ⇒ nil
Arc curves do not have attribute dictionaries.
-
#set_attribute(dict_name, key, value) ⇒ Object
Arc curves do not support attribute dictionaries.
Inherited from ModraUp::Entity
-
#add_observer(observer) ⇒ Boolean
Register a ModraUp::EntityObserver. Adding the same object a second time returns false. Locking, property, and material changes will dispatch an onChangeEntity event.
-
#remove_observer(observer) ⇒ Boolean
Remove the entity observer.
-
#model ⇒ ModraUp::Model
The model it belongs to.
-
#to_s ⇒ String
String form. Returns "#<Deleted Entity>” when the entity has been deleted.
-
#inspect ⇒ String
Same as #to_s.
-
#attribute_dictionary(name) ⇒ ModraUp::AttributeDictionary, nil
Retrieve an attribute dictionary by name. If none exists, return nil; if create is true, create an empty dictionary. ModraUp::Loop / ModraUp::EdgeUse / ModraUp::Curve always return nil.
-
#valid? ⇒ Boolean
Returns true if the entity is valid, meaning it has not been deleted from the model. Revoked entities are false; even if new geometry is drawn occupying its original position, this object remains an invalid entity (still false). Repeating the action to restore it makes it valid again.
-
#deleted? ⇒ Boolean
Opposite of #valid?.
-
#get_attribute(dict_name, key, default = nil) ⇒ Object
Read the attribute. If dict_name and key are Symbols, convert them to strings (similar to SketchUp). If the dictionary or key does not exist, return default. The return value type is the same as what is written by #set_attribute.
-
#delete_attribute(dict_name) ⇒ Boolean
Delete a key, or delete the entire dictionary when the key is omitted.
Instance Method Details
curve.plane ⇒ Array<Float>
The four coefficients [A, B, C, D] of the plane containing the arc.
curve.num_segments ⇒ Integer
Number of Segments (for arcs and circles in the entity).
curve.num_segments=(count) ⇒ Integer
Modify the number of segments while keeping the center/radius/angle. Use the ModraUp::Model transaction operator.
curve.center ⇒ Geom::Point3d
Center.
curve.radius ⇒ Float
Radius (in inches).
curve.circular? ⇒ Boolean
Returns whether the arc curve is a closed circle.
curve.start_angle ⇒ Float
Start angle (radians).
curve.end_angle ⇒ Float
Terminates angle (radians).
curve.normal ⇒ Geom::Vector3d
Arc plane normal.
curve.xaxis ⇒ Geom::Vector3d
Arc coordinate system X-axis. Length equals the radius.
curve.yaxis ⇒ Geom::Vector3d
Arc coordinate system Y-axis. Length equals the radius.