Class: Sketchup::Vertex

Inherits:
Entity
  • Object
show all

Overview

A Vertex. A Vertex represents the end of an Edge or a point inside 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

#common_edge(vertex2) ⇒ Object

The common_edge method is used to find a common edge that is defined by this vertex and another vertex

Examples:

edge = entities[0]
# returns array of vertices that make up the line
verticies = edge.vertices
vertex1 = verticies[0]
vertex2 = verticies[1]
edge = vertex1.common_edge vertex2
if (edge)
  UI.messagebox edge
else
  UI.messagebox "Failure"
end

Returns edge - an Edge object common to both vertices if successful. Returns nil if there is no edge between the two vertices.

Parameters:

  • vertex2

    A Vertex object.

Returns:

  • edge - an Edge object common to both vertices if successful. Returns nil if there is no edge between the two vertices.

Version:

  • SketchUp 6.0

#curve_interior?Object

The curve_interior? method is used to determine if this vertex is on the interior of a Curve.

Examples:

edge = entities[0]
# returns array of vertices that make up the line
verticies = edge.vertices
vertex1 = verticies[0]
status = vertex1.curve_interior?
if (status)
  UI.messagebox status
else
  #returns nil if vertex is not on interior of a Curve
  UI.messagebox "Failure"
end

Returns:

  • status - true if it is used by exactly two edges which are both part of the same curve.

  • (Boolean)

Version:

  • SketchUp 6.0

#edgesObject

The edges method is used to retrieve an Array of edges that use the Vertex.

Examples:

edge = entities[0]
# Returns array of vertices that make up the line.
verticies = edge.vertices
vertex1 = verticies[0]
edges = vertex1.edges

Returns:

  • edges - an Array of edge objects if successful

Version:

  • SketchUp 6.0

#facesObject

The faces method is used to retrieve an Array of faces that use the vertex.

Examples:

edge = entities[0]
# Returns array of vertices that make up the line.
verticies = edge.vertices
vertex1 = verticies[0]
faces = vertex1.faces

Returns:

  • faces - an Array of faces that use the vertex if successful

Version:

  • SketchUp 6.0

#loopsObject

The loops method is used to retrieve an Array of loops that use the vertex.

Examples:

edge = entities[0]
# Returns array of vertices that make up the line.
verticies = edge.vertices
vertex1 = verticies[0]
loops = vertex1.loops

Returns:

  • loops - an Array of loops that use the vertex if successful

Version:

  • SketchUp 6.0

#positionObject

The position method is used to retrieve the Point3d position of a vertex.

Examples:

edge = entities[0]
# Returns array of vertices that make up the line.
verticies = edge.vertices
vertex1 = verticies[0]
position = vertex1.position

Returns:

  • point - a Point3d object representing the position of the vertex if successful

Version:

  • SketchUp 6.0

#used_by?(face_or_edge) ⇒ Object

The used_by? method is used to determine if the Vertex is used by a given Edge or Face.

Examples:

used = vertex1.used_by? my_face

Returns used - true if the Vertex is used in the given entity.

Parameters:

  • face_or_edge

    A Face or Edge ot test against.

Returns:

  • used - true if the Vertex is used in the given entity.

Returns:

  • (Boolean)

Version:

  • SketchUp 6.0