class Drawingelement |
Parent: Entity |
|
Methods: bounds, erase!, hidden=, hidden?, layer, layer=, material, material=, visible=, visible? |
|
Sample Code: drawingelementtests.rb |
|
Instance Methods |
bounds |
The bounds method is used to retrieve the bounding box for an drawing element. |
Syntax: |
boundingbox = drawingelement.bounds |
Arguments: |
|
Return Value: |
boundingbox - A BoundingBox object if successful |
Comments: |
|
Example: |
depth = 100 |
erase! |
The erase! method is used to erase an element from the model. |
Syntax: |
status = drawingelement.erase! |
Arguments: |
|
Return Value: |
status - true if successful, false if unsuccessful |
Comments: |
Erasing an Edge also erases all of the Face objects that use the Edge. |
Example: |
depth = 100 |
hidden= |
The hidden= method is used to set the hidden status for an element. |
Syntax: |
status = drawingelement.hidden = true | false |
Arguments: |
true | false - true if you want to hide the element, false if you do not want to hide the element |
Return Value: |
status - true if the element has been hidden, false if the element has not been hidden. |
Comments: |
|
Example: |
depth = 100 |
hidden? |
The hidden? method is used to determine if the element is hidden. |
Syntax: |
status = drawingelement.hidden? |
Arguments: |
|
Return Value: |
status - true if hidden, false if not hidden |
Comments: |
Hidden elements are still in the model, but they are not displayed. |
Example: |
depth = 100 |
layer |
The layer method is used to retrieve the Layer object of the drawing element. |
Syntax: |
layer = drawingelement.layer |
Arguments: |
|
Return Value: |
layer - a layer object if successful |
Comments: |
|
Example: |
depth = 100 |
layer= |
The layer= method is used to set the layer for the drawing element. |
Syntax: |
layer = drawingelement.layer = layer | "layername" |
Arguments: |
layer - a layer number layername - a layer name |
Return Value: |
layer - the new Layer object if successful |
Comments: |
An exception is raised if you give a string that doesn't match any layer name. |
Example: |
depth = 100 |
material |
The material method is used to retrieve the material for the drawing element. |
Syntax: |
material = drawingelement.material |
Arguments: |
|
Return Value: |
material - the Material object if successful |
Comments: |
|
Example: |
depth = 100 |
material= |
The material= method is used to set the material for the drawing element. |
Syntax: |
material = drawingelement.material = material | "materialname" | color | "colorname" |
Arguments: |
material - a material object materialname - the name of a material color - a color object colorname - the name of a color |
Return Value: |
material - the new Material object if successful |
Comments: |
|
Example: |
depth = 100 |
visible= |
The visible= method is used to set the visible status for an element. This method performs an opposite function to the hidden= method. |
Syntax: |
status = drawingelement.visible = true | false |
Arguments: |
true | false - true if you want to hide the element, false if you do not want to hide the element |
Return Value: |
status - true if the element has been hidden, false if the element has not been hidden. |
Comments: |
|
Example: |
depth = 100 |
visible? |
The visible? method is used to determine if the element is visible. This method performs an opposite function to the hidden? method. |
Syntax: |
status = drawingelement.visible? |
Arguments: |
|
Return Value: |
status - true if hidden, false if not hidden |
Comments: |
|
Example: |
depth = 100 |