Class: Sketchup::EdgeUse

Inherits:
Entity
  • Object
show all
Defined in:
lib/sketchup-api-stubs/stubs/Sketchup/EdgeUse.rb

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

#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



29
30
# File 'lib/sketchup-api-stubs/stubs/Sketchup/EdgeUse.rb', line 29

def edge
end

#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



51
52
# File 'lib/sketchup-api-stubs/stubs/Sketchup/EdgeUse.rb', line 51

def end_vertex_normal
end

#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



72
73
# File 'lib/sketchup-api-stubs/stubs/Sketchup/EdgeUse.rb', line 72

def face
end

#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



93
94
# File 'lib/sketchup-api-stubs/stubs/Sketchup/EdgeUse.rb', line 93

def loop
end

#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



114
115
# File 'lib/sketchup-api-stubs/stubs/Sketchup/EdgeUse.rb', line 114

def next
end

#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



142
143
# File 'lib/sketchup-api-stubs/stubs/Sketchup/EdgeUse.rb', line 142

def partners
end

#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



163
164
# File 'lib/sketchup-api-stubs/stubs/Sketchup/EdgeUse.rb', line 163

def previous
end

#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)

    boolean - true if reversed, false if not reversed.

Version:

  • SketchUp 6.0



186
187
# File 'lib/sketchup-api-stubs/stubs/Sketchup/EdgeUse.rb', line 186

def reversed?
end

#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



208
209
# File 'lib/sketchup-api-stubs/stubs/Sketchup/EdgeUse.rb', line 208

def start_vertex_normal
end