123456789_123456789_123456789_123456789_123456789_

Class: Sketchup::Vertex

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

Overview

A Vertex. A Vertex represents the end of an Edge or a point inside a Face.

Version:

  • SketchUp 6.0

Instance Attribute Summary

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

#curve_interior?Boolean (readonly)

Note:

This method doesn’t actually return a boolean as the question mark post-fix would normally indicate. But the result still evaluates to truthy or falsy.

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

Version:

  • SketchUp 6.0

Instance Method Details

#common_edge(vertex2) ⇒ Sketchup::Edge?

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

Parameters:

  • vertex2 (Vertex)

    A Vertex object.

Returns:

  • (Sketchup::Edge, nil)

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

Version:

  • SketchUp 6.0

#edgesArray<Sketchup::Edge>

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:

Version:

  • SketchUp 6.0

#facesArray<Sketchup::Face>

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:

Version:

  • SketchUp 6.0

#loopsArray<Sketchup::Loop>

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:

Version:

  • SketchUp 6.0

#positionGeom::Point3d

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:

  • (Geom::Point3d)

    a Point3d object representing the position of the vertex if successful

Version:

  • SketchUp 6.0

#used_by?(face_or_edge) ⇒ Boolean

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

Parameters:

Version:

  • SketchUp 6.0