Class: Sketchup::Drawingelement
- Defined in:
- lib/sketchup-api-stubs/stubs/Sketchup/Drawingelement.rb
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.
Direct Known Subclasses
ComponentDefinition, ComponentInstance, ConstructionLine, ConstructionPoint, Dimension, Edge, Face, Group, Image, SectionPlane, Text
Instance Method Summary collapse
-
#bounds ⇒ Geom::BoundingBox
The #bounds method is used to retrieve the Geom::BoundingBox bounding a Drawingelement.
-
#casts_shadows=(casts) ⇒ Boolean
The casts_shadows= method is used to set the Drawingelement to cast shadows.
-
#casts_shadows? ⇒ Boolean
The casts_shadows? method is used to determine if the Drawingelement is casting shadows.
-
#erase! ⇒ nil
The #erase! method is used to erase an element from the model.
-
#hidden=(hidden) ⇒ Boolean
The hidden= method is used to set the hidden status for an element.
-
#hidden? ⇒ Boolean
The hidden? method is used to determine if the element is hidden.
-
#layer ⇒ Sketchup::Layer
The layer method is used to retrieve the Layer object of the drawing element.
-
#layer=(layer) ⇒ Sketchup::Layer, String
The layer= method is used to set the layer for the drawing element.
-
#material ⇒ Sketchup::Material
The material method is used to retrieve the material for the drawing element.
-
#material=(material) ⇒ Sketchup::Material, ...
The material= method is used to set the material for the drawing element.
-
#receives_shadows=(receive) ⇒ Boolean
The receive_shadows= method is used to set the Drawingelement to receive shadows.
-
#receives_shadows? ⇒ Boolean
The receive_shadows? method is used to determine if the Drawingelement is receiving shadows.
-
#visible=(visibility) ⇒ Boolean
The visible= method is used to set the visible status for an element.
-
#visible? ⇒ Boolean
The visible? method is used to get the visible status for an element.
Methods inherited from Entity
#add_observer, #attribute_dictionaries, #attribute_dictionary, #delete_attribute, #deleted?, #entityID, #get_attribute, #inspect, #model, #parent, #persistent_id, #remove_observer, #set_attribute, #to_s, #typename, #valid?
Instance Method Details
#bounds ⇒ Geom::BoundingBox
The #bounds method is used to retrieve the Geom::BoundingBox bounding a Sketchup::Drawingelement.
For a Edge, ComponentInstance and most other Sketchup::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.
43 44 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/Drawingelement.rb', line 43 def bounds end |
#casts_shadows=(casts) ⇒ Boolean
The casts_shadows= method is used to set the Drawingelement to cast shadows.
73 74 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/Drawingelement.rb', line 73 def casts_shadows=(casts) end |
#casts_shadows? ⇒ Boolean
The casts_shadows? method is used to determine if the Drawingelement is casting shadows.
97 98 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/Drawingelement.rb', line 97 def casts_shadows? end |
#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.
131 132 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/Drawingelement.rb', line 131 def erase! end |
#hidden=(hidden) ⇒ Boolean
The hidden= method is used to set the hidden status for an element.
159 160 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/Drawingelement.rb', line 159 def hidden=(hidden) end |
#hidden? ⇒ Boolean
The hidden? method is used to determine if the element is hidden.
Hidden elements are still in the model, but they are not displayed.
184 185 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/Drawingelement.rb', line 184 def hidden? end |
#layer ⇒ Sketchup::Layer
The layer method is used to retrieve the Layer object of the drawing element.
207 208 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/Drawingelement.rb', line 207 def layer end |
#layer=(layer) ⇒ Sketchup::Layer, String
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.
238 239 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/Drawingelement.rb', line 238 def layer=(layer) end |
#material ⇒ Sketchup::Material
The material method is used to retrieve the material for the drawing element.
261 262 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/Drawingelement.rb', line 261 def material end |
#material=(material) ⇒ Sketchup::Material, ...
The material= method is used to set the material for the drawing element.
297 298 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/Drawingelement.rb', line 297 def material=(material) end |
#receives_shadows=(receive) ⇒ Boolean
The receive_shadows= method is used to set the Drawingelement to receive shadows.
327 328 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/Drawingelement.rb', line 327 def receives_shadows=(receive) end |
#receives_shadows? ⇒ Boolean
The receive_shadows? method is used to determine if the Drawingelement is receiving shadows.
351 352 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/Drawingelement.rb', line 351 def receives_shadows? end |
#visible=(visibility) ⇒ Boolean
The visible= method is used to set the visible status for an element. This method performs an opposite function to the hidden= method.
379 380 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/Drawingelement.rb', line 379 def visible=(visibility) end |
#visible? ⇒ Boolean
The visible? method is used to get the visible status for an element.
403 404 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/Drawingelement.rb', line 403 def visible? end |