123456789_123456789_123456789_123456789_123456789_

Class: Sketchup::EdgeUse

Relationships
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, Entity
Instance Chain:
self, Entity
Inherits: Sketchup::Entity

Overview

The EdgeUse class defines how an Edge is used in the definition of a Face.

Version:

  • SketchUp 6.0

Instance Attribute Summary

  • #reversed? ⇒ Boolean readonly

    The reversed? method is used to determine if the edge direction is opposite of the edge use direction.

Entity - Inherited

#deleted?

The deleted? method is used to determine if your entity is still valid (not deleted by another script, for example.).

#valid?

The #valid? method is used to determine if your entity is still valid (not deleted by another script, for example).

Instance Method Summary

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 AttributeDictionaries collection attached to the entity.

#attribute_dictionary

The attribute_dictionary method is used to retrieve an attribute dictionary with a given name that is attached to an Entity.

#delete_attribute

The #delete_attribute method is used to delete an attribute from an entity.

#entityID

The entityID method is used to retrieve a unique ID assigned to an entity.

#get_attribute

The #get_attribute method is used to retrieve the value of an attribute in the entity’s attribute dictionary.

#inspect

The #inspect method is used to retrieve the string representation of the entity.

#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 #persistent_id method is used to retrieve a unique persistent id assigned to an entity.

#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 #to_s method is used to retrieve the string representation of the entity.

#typename

The typename method retrieves the type of the entity, which will be a string such as “Face”, “Edge”, or “Group”.

Instance Attribute Details

#reversed?Boolean (readonly)

The reversed? method is used to determine if the edge direction is opposite of the edge use direction. The edge use direction is the same as the loop it belongs to.

Examples:

entities = Sketchup.active_model.active_entities
points = []
points << Geom::Point3d.new(0, 0, 0)
points << Geom::Point3d.new(100, 0, 0)
points << Geom::Point3d.new(100, 200, 0)
points << Geom::Point3d.new(0, 200, 0)
face = entities.add_face(points)
loop = face.outer_loop
edgeuses = loop.edgeuses
edgeuse = edgeuses[0]
reversed = edgeuse.reversed?

Returns:

  • (Boolean)

    boolean - true if reversed, false if not reversed.

Version:

  • SketchUp 6.0

Instance Method Details

#edgeObject

The edge method is used to retrieve the edge for the edge use.

Examples:

entities = Sketchup.active_model.active_entities
points = []
points << Geom::Point3d.new(0, 0, 0)
points << Geom::Point3d.new(100, 0, 0)
points << Geom::Point3d.new(100, 200, 0)
points << Geom::Point3d.new(0, 200, 0)
face = entities.add_face(points)
loop = face.outer_loop
edgeuses = loop.edgeuses
edgeuse = edgeuses[0]
edge = edgeuse.edge

Returns:

  • edge - an Edge object used by this edge use

Version:

  • SketchUp 6.0

#end_vertex_normalObject

The end_vertex_normal method is used to retrieve the vertex normal for the end point of this edgeuse.

Examples:

entities = Sketchup.active_model.active_entities
points = []
points << Geom::Point3d.new(0, 0, 0)
points << Geom::Point3d.new(100, 0, 0)
points << Geom::Point3d.new(100, 200, 0)
points << Geom::Point3d.new(0, 200, 0)
face = entities.add_face(points)
loop = face.outer_loop
edgeuses = loop.edgeuses
edgeuse = edgeuses[0]
vector3d = edgeuse.end_vertex_normal

Returns:

  • vector3d - a vector3d object if successful.

Version:

  • SketchUp 6.0

#faceObject

The face method is used to retrieve the face used by this edge use.

Examples:

entities = Sketchup.active_model.active_entities
points = []
points << Geom::Point3d.new(0, 0, 0)
points << Geom::Point3d.new(100, 0, 0)
points << Geom::Point3d.new(100, 200, 0)
points << Geom::Point3d.new(0, 200, 0)
face = entities.add_face(points)
loop = face.outer_loop
edgeuses = loop.edgeuses
edgeuse = edgeuses[0]
face = edgeuse.face

Returns:

  • face - a Face object used by this edge use

Version:

  • SketchUp 6.0

#loopObject

The loop method is used to retrieve the loop for this edge use.

Examples:

entities = Sketchup.active_model.active_entities
points = []
points << Geom::Point3d.new(0, 0, 0)
points << Geom::Point3d.new(100, 0, 0)
points << Geom::Point3d.new(100, 200, 0)
points << Geom::Point3d.new(0, 200, 0)
face = entities.add_face(points)
loop = face.outer_loop
edgeuses = loop.edgeuses
edgeuse = edgeuses[0]
loop = edgeuse.loop

Returns:

  • loop - a Loop object that contains this edge use.

Version:

  • SketchUp 6.0

#nextObject

The next method is used to retrieve the next edge use in a loop.

Examples:

entities = Sketchup.active_model.active_entities
points = []
points << Geom::Point3d.new(0, 0, 0)
points << Geom::Point3d.new(100, 0, 0)
points << Geom::Point3d.new(100, 200, 0)
points << Geom::Point3d.new(0, 200, 0)
face = entities.add_face(points)
loop = face.outer_loop
edgeuses = loop.edgeuses
edgeuse = edgeuses[0]
next_edgeuse = edgeuse.next

Returns:

  • edgeuse - the next EdgeUse object in a loop

Version:

  • SketchUp 6.0

#partnersObject

The partners method is used to retrieve all of the partner edge uses that uses the same edge.

Examples:

entities = Sketchup.active_model.active_entities
points1 = []
points1 << Geom::Point3d.new(0, 0, 0)
points1 << Geom::Point3d.new(100, 0, 0)
points1 << Geom::Point3d.new(100, 200, 0)
points1 << Geom::Point3d.new(0, 200, 0)
face1 = entities.add_face(points1)
points2 = []
points2 << Geom::Point3d.new(100, 0, 0)
points2 << Geom::Point3d.new(200, 0, 0)
points2 << Geom::Point3d.new(200, 200, 0)
points2 << Geom::Point3d.new(100, 200, 0)
face2 = entities.add_face(points2)
loop = face1.outer_loop
edgeuses = loop.edgeuses
edgeuse = edgeuses[1]
partners = edgeuse.partners

Returns:

  • array - an array of partner Edge Use objects.

Version:

  • SketchUp 6.0

#previousObject

The previous method is used to retrieve the previous edge use in a loop.

Examples:

entities = Sketchup.active_model.active_entities
points = []
points << Geom::Point3d.new(0, 0, 0)
points << Geom::Point3d.new(100, 0, 0)
points << Geom::Point3d.new(100, 200, 0)
points << Geom::Point3d.new(0, 200, 0)
face = entities.add_face(points)
loop = face.outer_loop
edgeuses = loop.edgeuses
edgeuse = edgeuses[0]
previous_edgeuse = edgeuse.previous

Returns:

  • edgeuse - the previous Edge Use object in the loop

Version:

  • SketchUp 6.0

#start_vertex_normalObject

The start_vertex_normal method is used to retrieve the vertex normal for the start point of this edgeuse.

Examples:

entities = Sketchup.active_model.active_entities
points = []
points << Geom::Point3d.new(0, 0, 0)
points << Geom::Point3d.new(100, 0, 0)
points << Geom::Point3d.new(100, 200, 0)
points << Geom::Point3d.new(0, 200, 0)
face = entities.add_face(points)
loop = face.outer_loop
edgeuses = loop.edgeuses
edgeuse = edgeuses[0]
vector3d = edgeuse.start_vertex_normal

Returns:

  • vector3d - a vector3d object if successful.

Version:

  • SketchUp 6.0