Class: ModraUp::Axes
- Inherits:
-
ModraUp::Entity
- Object
- ModraUp::Entity
- ModraUp::Axes
Overview
Read-only view of the current drawing axes, following the model's editing context.
Instance Method Summary # collapse
-
#transformation ⇒ Geom::Transformation
Transformation from drawing axes to world coordinates, with the direction vector being a unit length.
-
#origin ⇒ Geom::Point3d
The origin of the current drawing coordinate axis.
-
#xaxis ⇒ Geom::Vector3d
The unit direction vector of the x-axis.
-
#yaxis ⇒ Geom::Vector3d
The unit direction vector of the y-axis.
-
#zaxis ⇒ Geom::Vector3d
The unit direction vector of the z-axis.
-
#axes ⇒ Array<Geom::Vector3d>
Returns the red, green, and blue axis directions in sequence.
-
#to_a ⇒ Array
Returns the origin and directions of the red, green, and blue axes in sequence.
-
#sketch_plane ⇒ Array<Float>
The coefficients of the four plane equations for the red-green axis plane.
-
#model ⇒ ModraUp::Model
The model it belongs to.
-
#parent ⇒ ModraUp::Model
The model it belongs to.
-
#valid? ⇒ Boolean
The model is still open.
-
#deleted? ⇒ Boolean
Whether the containing model is closed.
Inherited from ModraUp::Entity
-
#typename ⇒ String
Type name (e.g., Face / Edge / Group).
-
#entityID ⇒ Integer
Entity ID within the current session: A small integer starting from 1 that increments and remains constant for the lifetime of the entity, unchanged by undo/redo operations. This ID is not preserved when saving the file; it will be renumbered upon reopening the model. For cross-session identification, use #persistent_id. Copied entities will receive new IDs.
-
#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.
-
#persistent_id ⇒ Integer
Number assigned with the model: A unique, incrementing small integer starting from 1 that persists across model saves and reloads, independent of #entityID. Copied entities receive new numbers, and deleted entities do not reuse their numbers. Edges, faces, vertices, curves, groups, component instances/definitions, dimensions, leader lines/points, section planes, materials, layers, layer folders, and drawing sheets have assigned numbers; all others (rings, EdgeUses, attribute dictionaries, line types, sets, etc.) return 0.
-
#to_s ⇒ String
String form. Returns "#<Deleted Entity>” when the entity has been deleted.
-
#inspect ⇒ String
Same as #to_s.
-
#attribute_dictionaries ⇒ ModraUp::AttributeDictionaries, nil
Collection of attribute dictionaries. Returns nil (evaluates to false) if there are no dictionaries.
-
#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.
-
#set_attribute(dict_name, key, value) ⇒ Object
Write attribute values. Materials, groups, component instances, faces, and edges are supported. When dict_name and key are Symbols, they are converted to strings. The type of data written is the same type that will be read back.
-
#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
axes.transformation ⇒ Geom::Transformation
Transformation from drawing axes to world coordinates, with the direction vector being a unit length.
axes.origin ⇒ Geom::Point3d
The origin of the current drawing coordinate axis.
axes.xaxis ⇒ Geom::Vector3d
The unit direction vector of the x-axis.
axes.yaxis ⇒ Geom::Vector3d
The unit direction vector of the y-axis.
axes.zaxis ⇒ Geom::Vector3d
The unit direction vector of the z-axis.
axes.axes ⇒ Array<Geom::Vector3d>
Returns the red, green, and blue axis directions in sequence.
axes.to_a ⇒ Array
Returns the origin and directions of the red, green, and blue axes in sequence.
axes.sketch_plane ⇒ Array<Float>
The coefficients of the four plane equations for the red-green axis plane.
axes.model ⇒ ModraUp::Model
The model it belongs to.
axes.parent ⇒ ModraUp::Model
The model it belongs to.
axes.valid? ⇒ Boolean
The model is still open.
axes.deleted? ⇒ Boolean
Whether the containing model is closed.