Class: Sketchup::EdgeUse

Inherits:
Entity
  • Object
show all

Overview

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

Version:

  • SketchUp 6.0

Instance Method Summary # collapse

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

#edgeSketchup::Edge

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:

Version:

  • SketchUp 6.0

#end_vertex_normalGeom::Vector3d

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:

Version:

  • SketchUp 6.0

#faceSketchup::Face

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:

Version:

  • SketchUp 6.0

#loopSketchup::Loop

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:

Version:

  • SketchUp 6.0

#nextSketchup::EdgeUse

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:

Version:

  • SketchUp 6.0

#partnersArray<Sketchup::EdgeUse>

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:

Version:

  • SketchUp 6.0

#previousSketchup::EdgeUse

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:

Version:

  • SketchUp 6.0

#reversed?Boolean

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)

    true if reversed, false if not reversed.

Version:

  • SketchUp 6.0

#start_vertex_normalGeom::Vector3d

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:

Version:

  • SketchUp 6.0