Class: ModraUp::Loop
- Inherits:
-
ModraUp::Entity
- Object
- ModraUp::Entity
- ModraUp::Loop
Overview
An ordered loop of edges bounding a face. Each face has one outer loop and one inner loop for each hole. ModraUp::Loop#edgeuses returns the ModraUp::EdgeUse objects around the loop. Inherits from ModraUp::Entity.
Instance Method Summary # collapse
-
#typename ⇒ String
typename + "Loop".
-
#entityID ⇒ Integer
The loop entity ID within the current session.
-
#persistent_id ⇒ Integer
Loops do not have persistent IDs and always have 0 (consistent with SketchUp).
-
#parent ⇒ ModraUp::Model, ModraUp::ComponentDefinition
The owner in the drawing context.
-
#valid? ⇒ Boolean
Returns true if the face still exists.
-
#deleted? ⇒ Boolean
Opposite of #valid?.
-
#attribute_dictionaries ⇒ nil
Loops do not have attribute dictionaries.
-
#attribute_dictionary(name) ⇒ nil
Loops cannot have attribute dictionaries.
-
#set_attribute(dict_name, key, value) ⇒ Object
Loops do not support attribute dictionaries.
-
#get_attribute(dict_name, key) ⇒ Object, nil
The loop does not have any attributes, so it returns the default value.
-
#delete_attribute(dict_name) ⇒ nil
Edges have no attributes to delete.
-
#convex? ⇒ Boolean
Checks if the loop is convex.
-
#edges ⇒ Array<ModraUp::Edge>
Edges in the order of the loop.
-
#face ⇒ ModraUp::Face
The face to which the loop belongs.
-
#outer? ⇒ Boolean
Returns true if the loop is an outer loop.
-
#vertices ⇒ Array<ModraUp::Vertex>
Vertices in the order of the loop.
-
#edgeuses ⇒ Array<ModraUp::EdgeUse>
Edge uses in the order of the loop.
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.
Instance Method Details
loop.typename ⇒ String
typename + "Loop".
loop.entityID ⇒ Integer
The loop entity ID within the current session.
loop.persistent_id ⇒ Integer
Loops do not have persistent IDs and always have 0 (consistent with SketchUp).
loop.parent ⇒ ModraUp::Model, ModraUp::ComponentDefinition
The owner in the drawing context.
loop.valid? ⇒ Boolean
Returns true if the face still exists.
loop.deleted? ⇒ Boolean
Opposite of #valid?.
loop.attribute_dictionaries ⇒ nil
Loops do not have attribute dictionaries.
loop.attribute_dictionary(name) ⇒ nilloop.attribute_dictionary(name, create) ⇒ nil
Loops cannot have attribute dictionaries.
loop.set_attribute(dict_name, key, value) ⇒ value
Loops do not support attribute dictionaries.
loop.get_attribute(dict_name, key) ⇒ nilloop.get_attribute(dict_name, key, default) ⇒ Object
The loop does not have any attributes, so it returns the default value.
loop.delete_attribute(dict_name) ⇒ nilloop.delete_attribute(dict_name, key) ⇒ nil
Edges have no attributes to delete.
loop.convex? ⇒ Boolean
Checks if the loop is convex.
loop.edges ⇒ Array<ModraUp::Edge>
Edges in the order of the loop.
loop.face ⇒ ModraUp::Face
The face to which the loop belongs.
loop.outer? ⇒ Boolean
Returns true if the loop is an outer loop.
loop.vertices ⇒ Array<ModraUp::Vertex>
Vertices in the order of the loop.
loop.edgeuses ⇒ Array<ModraUp::EdgeUse>
Edge uses in the order of the loop.