Mesh Scripting

Introduction
To get access to the module you have to import it first:

Creation
To create an empty mesh object just use the standard constructor:

You can also create an object from a file:

Or create it out of a set of triangles described by their corner points:

The Mesh-Kernel takes care of creating a topologically correct data structure by sorting coincident points and edges.

top

Modeling
To create regular geometries you can use the Python module :

This module provides methods to define simple rotation bodies like spheres, ellipsoids, cylinders, toroids and cones. And it also has a method to create a simple cube. A toroid, for instance, can be created as follows:

The first two parameters define the radii of the toroid and the third parameter is a sub-sampling factor for how many triangles are created. The higher this value the smoother the mesh.

The module also provides three Boolean methods:,  and :

Here is an example that creates a pipe using the method:

top

Exporting
You can even write a mesh to a python module:

top