Vertex

class Vertex

Parent: Entity | Class Index
Methods:common_edge, curve_interior?, edges, faces, loops, position, used_by? |
Sample Code: vertextests.rb |

A Vertex. A Vertex represents the end of an Edge.

Instance Methods

common_edge
The common_edge method is used to find a common edge that is defined by this vertex and another vertex
Syntax:
edge = vertex.common_edge vertex2
Arguments:
vertex2 - a Vertex object
Return Value:
edge - an Edge object common to both vertices if successful. Returns nil if there is no edge between the two vertices.
Comments:
Example:

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

curve_interior?
The curve_interior? method is used to determine if this vertex is on the interior of a curve.
Syntax:
status - vertex.curve_interior?
Arguments:
Return Value:
status - true if it is used by exactly two edges which are both part of the same curve.
Comments:
Example:

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

edges
The edges method is used to retrieve an Array of edges that use the Vertex.
Syntax:
edges = vertex.edges
Arguments:
Return Value:
edges - an Array of edge objects if successful
Comments:
Example:
edge = entities[0] # returns array of vertices that make up the line verticies = edge.vertices vertex1 = verticies[0] edges = vertex1.edges

faces
The faces method is used to retrieve an Array of faces that use the vertex.
Syntax:
faces = vertex.faces
Arguments:
Return Value:
faces - an Array of faces that use the vertex if successful
Comments:
Example:
edge = entities[0] # returns array of vertices that make up the line verticies = edge.vertices vertex1 = verticies[0] faces = vertex1.faces

loops
The loops method is used to retrieve an Array of loops that use the vertex.
Syntax:
loops = vertex.loops
Arguments:
Return Value:
loops - an Array of loops that use the vertex if successful
Comments:
Example:
edge = entities[0] # returns array of vertices that make up the line verticies = edge.vertices vertex1 = verticies[0] loops = vertex1.loops

position
The position method is used to retrieve the Point3d position of a vertex.
Syntax:
point = vertex.position
Arguments:
Return Value:
point - a Point3d object representing the position of the vertex if successful
Comments:
Returns: a Point3d.
Example:
edge = entities[0] # returns array of vertices that make up the line verticies = edge.vertices vertex1 = verticies[0] position = vertex1.position

used_by?
The used_by? method is used to determine if the Vertex is used by a given edge or face.
Syntax:
vertex.used_by? edge vertex.used_by? face
Arguments:
Return Value:
status - true if the vertex is used by the edge or face. False if the vertex is not used by the edge or face.
Comments:
Example:
edge = entities[0] # returns array of vertices that make up the line verticies = edge.vertices vertex1 = verticies[0] status = vertex1.used_by? face