VARKON Version 1.18 2004-07-11


mesh_arr - Geometric procedure

Creates a mesh.


Description

Creates a mesh. Geometry (vertex coordinates) and topology (edges and faces) are defined by data in arrays. Edges can belong to only one face or join two different faces.An edge that joins 2 faces is implemented as a pair of halfedges with opposite direction, each belonging to one of the two faces. An edge belonging only to one face is also implemented as a pair of halfedges. In this case the extra halfedge has no parent face. All edges must be represented by two halfedges. Current implementation of faces assume all faces are triangular.

A mesh can be defined without faces. If faces are missing, the mesh becomes a wireframe mesh without any surface. A mesh can even be defined without edges. If edges are missing the mesh is reduced to a point cloud.

An optional array of floats with arbitary length can be saved together with the mesh. If for example nxfloats = nvertices, a float value can be saved for each vertex.

Syntax

mesh_arr(id, nvertices,p,eh,nhalfedges,ev,oh,nh,pf,nfaces,h,nxfloats,xf:attributes);


REF id;
INT
nvertices;
VECTOR
p(nvertices);
INT
eh(nvertices);
INT
nhalfedges;
INT
ev(nhalfedges);
INT
oh(nhalfedges);
INT
nh(nhalfedges);
INT
pf(nhalfedges);
INT
nfaces;
INT
h(nfaces);
INT
nxfloats
FLOAT
xf(nxfloats)

Principal parameters


id - Local identity
nvertices
- Number of vertices
p
- Array of vertex coordinates
eh
- Array of indexes to emanating halfedges (the halfedge that starts in this vertex)
nhalfedges
- Number of  halfedges (may be zero if nfaces is zero)
ev
- Array of indexes to end vertices (the vertex that ends this halfedge)
oh
- Array of indexes to opposite halfedges (the other halfedge of this edge)
nh
- Array of indexes to next halfedges (the next halfedge around the face)
pf
- Array of indexes to parent faces (the face bounded by this halfedge)
nfaces
- Number of faces (may be zero)
h
- Array of indexes to halfedges (any one of the the halfedges belonging to this face)

Optional parameters

nxfloats
- Number of extra float values
xf
- Array of extra float values

Attributes


PEN - Pen or colour number
LEVEL - Level number
BLANK - Visible(0=default) or invisible(1)
WIDTH - Linewidth
MFONT
- Mesh font.  Auto(0=default),  Box(1),  Pointcloud(2),  Edges(3),  Faces(4)



VARKON Homepage Index