Geometric Entities

The geometric entities are used for advanced algorithms, such as tessellation. The AbstractEntity class provides the abstract base for all geometric and topological entities.

This module provides the following geometric and topological entities:

Class Reference

class geomdl.elements.Vertex(*args, **kwargs)

Bases: geomdl.elements.AbstractEntity

3-dimensional Vertex entity with spatial and parametric position.

data

(x,y,z) components of the vertex.

Getter:Gets the 3-dimensional components
Setter:Sets the 3-dimensional components
id

Identifier for the geometric entity.

It must be an integer number, otherwise the setter will raise a ValueError.

Getter:Gets the identifier
Setter:Sets the identifier
Type:int
inside

Inside-outside flag

Getter:Gets the flag
Setter:Sets the flag
Type:bool
u

Parametric u-component of the vertex

Getter:Gets the u-component of the vertex
Setter:Sets the u-component of the vertex
Type:float
uv

Parametric (u,v) pair of the vertex

Getter:Gets the uv-component of the vertex
Setter:Sets the uv-component of the vertex
Type:list, tuple
v

Parametric v-component of the vertex

Getter:Gets the v-component of the vertex
Setter:Sets the v-component of the vertex
Type:float
x

x-component of the vertex

Getter:Gets the x-component of the vertex
Setter:Sets the x-component of the vertex
Type:float
y

y-component of the vertex

Getter:Gets the y-component of the vertex
Setter:Sets the y-component of the vertex
Type:float
z

z-component of the vertex

Getter:Gets the z-component of the vertex
Setter:Sets the z-component of the vertex
Type:float
class geomdl.elements.Triangle(*args, **kwargs)

Bases: geomdl.elements.AbstractEntity

Triangle entity which represents a triangle composed of vertices.

add_vertex(*args)

Adds vertices to the Triangle object.

This method takes a single or a list of vertices as its function arguments.

edges

Edges of the triangle

Getter:Gets the list of vertices that generates the edges of the triangle
Type:list
id

Identifier for the geometric entity.

It must be an integer number, otherwise the setter will raise a ValueError.

Getter:Gets the identifier
Setter:Sets the identifier
Type:int
inside

Inside-outside flag

Getter:Gets the flag
Setter:Sets the flag
Type:bool
vertex_ids

Vertex indices

Vertex numbering starts from 1.

Getter:Gets the vertex indices
Type:list
vertex_ids_zero

Zero-indexed vertex indices

Vertex numbering starts from 0.

Getter:Gets the vertex indices
Type:list
vertices

Vertices of the triangle

Getter:Gets the list of vertices
Type:tuple
vertices_raw

Vertices which generates a closed triangle

Adds the first vertex as a last element of the return value (good for plotting)

Getter:Gets the list of vertices
Type:list
vertices_uv

Parametric coordinates of the triangle vertices

Getter:Gets the parametric coordinates of the vertices
Type:list
class geomdl.elements.Quad(*args, **kwargs)

Bases: geomdl.elements.AbstractEntity

Quad entity which represents a quadrilateral structure composed of vertices.

add_vertex(*args)

Adds vertices to the Quad object.

This method takes a single or a list of vertices as its function arguments.

data

Vertex indices.

Getter:Gets the vertex indices
Setter:Sets the vertex indices
id

Identifier for the geometric entity.

It must be an integer number, otherwise the setter will raise a ValueError.

Getter:Gets the identifier
Setter:Sets the identifier
Type:int
class geomdl.elements.Face(*args, **kwargs)

Bases: geomdl.elements.AbstractEntity

Representation of Face entity which is composed of triangles or quads.

add_triangle(*args)

Adds triangles to the Face object.

This method takes a single or a list of triangles as its function arguments.

id

Identifier for the geometric entity.

It must be an integer number, otherwise the setter will raise a ValueError.

Getter:Gets the identifier
Setter:Sets the identifier
Type:int
triangles

Triangles of the face

Getter:Gets the list of triangles
Type:tuple
class geomdl.elements.Body(*args, **kwargs)

Bases: geomdl.elements.AbstractEntity

Representation of Body entity which is composed of faces.

add_face(*args)

Adds faces to the Body object.

This method takes a single or a list of faces as its function arguments.

faces

Faces of the body

Getter:Gets the list of faces
Type:tuple
id

Identifier for the geometric entity.

It must be an integer number, otherwise the setter will raise a ValueError.

Getter:Gets the identifier
Setter:Sets the identifier
Type:int