Class: Sketchup::Drawingelement
| Relationships | |
| Extension / Inclusion / Inheritance Descendants | |
| Subclasses: | |
| Super Chains via Extension / Inclusion / Inheritance | |
| Class Chain: 
          self,
           Entity | |
| Instance Chain: 
          self,
           Entity | |
| Inherits: | Sketchup::Entity 
 | 
Overview
Drawingelement is a base class for an item in the model that can be displayed. These items include edges, construction points, construction lines, and images. Arc curves and arcs are not included because they are not drawing elements by themselves, but are a composition of edges.
Instance Attribute Summary
- 
    
      #casts_shadows=(casts)  ⇒ Boolean 
    
    rw
    The casts_shadows= method is used to set the Drawingelementto cast shadows.
- 
    
      #casts_shadows?  ⇒ Boolean 
    
    rw
    The casts_shadows? method is used to determine if the Drawingelementis casting shadows.
- 
    
      #hidden=(hidden)  ⇒ Boolean 
    
    rw
    The hidden= method is used to set the hidden status for an element. 
- 
    
      #hidden?  ⇒ Boolean 
    
    rw
    The hidden? method is used to determine if the element is hidden. 
- 
    
      #layer  ⇒ Sketchup::Layer 
    
    rw
    The layer method is used to retrieve the Layerobject of the drawing element.
- 
    
      #layer=(layer)  ⇒ Sketchup::Layer, String 
    
    rw
    The layer= method is used to set the layer for the drawing element. 
- 
    
      #material  ⇒ Sketchup::Material 
    
    rw
    The material method is used to retrieve the material for the drawing element. 
- 
    
      #material=(material)  ⇒ Sketchup::Material, ... 
    
    rw
    The material= method is used to set the material for the drawing element. 
- 
    
      #receives_shadows=(receive)  ⇒ Boolean 
    
    rw
    The receive_shadows= method is used to set the Drawingelementto receive shadows.
- 
    
      #receives_shadows?  ⇒ Boolean 
    
    rw
    The receive_shadows? method is used to determine if the Drawingelementis receiving shadows.
- 
    
      #visible=(visibility)  ⇒ Boolean 
    
    rw
    The visible= method is used to set the visible status for an element. 
- 
    
      #visible?  ⇒ Boolean 
    
    rw
    The visible? method is used to get the visible status for an element. 
Entity - Inherited
Instance Method Summary
- 
    
      #bounds  ⇒ Geom::BoundingBox 
    
    The #bounds method is used to retrieve the ::Geom::BoundingBoxbounding aDrawingelement.
- 
    
      #erase!  ⇒ nil 
    
    The #erase! method is used to erase an element from the model. 
Entity - Inherited
| #add_observer | The add_observer method is used to add an observer to the current object. | 
| #attribute_dictionaries | The attribute_dictionaries method is used to retrieve the  | 
| #attribute_dictionary | The attribute_dictionary method is used to retrieve an attribute dictionary with a given name that is attached to an  | 
| #delete_attribute | The  | 
| #entityID | The entityID method is used to retrieve a unique ID assigned to an entity. | 
| #get_attribute | The  | 
| #inspect | The  | 
| #model | The model method is used to retrieve the model for the entity. | 
| #parent | The parent method is used to retrieve the parent of the entity. | 
| #persistent_id | The  | 
| #remove_observer | The remove_observer method is used to remove an observer from the current object. | 
| #set_attribute | The set attribute is used to set the value of an attribute in an attribute dictionary with the given name. | 
| #to_s | The  | 
| #typename | The typename method retrieves the type of the entity, which will be a string such as “Face”, “Edge”, or “Group”. | 
Instance Attribute Details
    #casts_shadows=(casts)  ⇒ Boolean  (rw)
  
The casts_shadows= method is used to set the Drawingelement to cast shadows.
    #casts_shadows?  ⇒ Boolean  (rw)
  
The casts_shadows? method is used to determine if the Drawingelement is casting shadows.
#layer ⇒ Sketchup::Layer (rw)
The layer method is used to retrieve the Layer object of the drawing element.
#layer=(layer) ⇒ Sketchup::Layer, String (rw)
The layer= method is used to set the layer for the drawing element.
An exception is raised if you give a string that doesn’t match any layer name.
#material ⇒ Sketchup::Material (rw)
The material method is used to retrieve the material for the drawing element.
#material=(material) ⇒ Sketchup::Material, ... (rw)
The material= method is used to set the material for the drawing element.
    #receives_shadows=(receive)  ⇒ Boolean  (rw)
  
The receive_shadows= method is used to set the Drawingelement to receive shadows.
    #receives_shadows?  ⇒ Boolean  (rw)
  
The receive_shadows? method is used to determine if the Drawingelement is receiving shadows.
    #visible=(visibility)  ⇒ Boolean  (rw)
  
The visible= method is used to set the visible status for an element. This method performs an opposite function to the hidden= method.
    #visible?  ⇒ Boolean  (rw)
  
The visible? method is used to get the visible status for an element.
Instance Method Details
#bounds ⇒ Geom::BoundingBox
The #bounds method is used to retrieve the ::Geom::BoundingBox bounding a Drawingelement.
For a Edge, ComponentInstance and most other Drawingelements, the boundingbox follows the coordinate system the drawing element is placed in. For ComponentDefinition, the box bounds the contents of the component and follows the component’s own internal coordinate system.
    #erase!  ⇒ nil 
  
When erasing multiple elements, it’s faster to use Entities#erase_entities and erase in bulk than to iterate individual drawing elements calling erase!.
The #erase! method is used to erase an element from the model.
Erasing an Edge also erases all of the Face objects that use the Edge.