Skip to content

This is a Python module wrapping the Advancing Front Surface Reconstruction algorithm from CGAL by using Ctypes

Notifications You must be signed in to change notification settings

pastranacl/meshgen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Meshgen

Cesar L. Pastrana, 2022

Introduction

Meshgen is Python module that uses Ctypes to wrap the Advancing Front Surface Reconstruction algorithm from the C++-based library CGAL to obtain a triangulated surface from a 3D set of points. The algorithm is valid for both convex and non-convex surfaces, as well as for open and closed surfaces. Importantly, the resulting triangulation is oriented.

Calling

Import the module, for instance via from meshgen import gentrimesh. For a set of N points defining the surface and organised as a numpy array r of Nx3 (with x, y and z in columns), the triangulation is obtained as:

tri, n_tri = gentrimesh(r)

Here tri is an int array of n_trix3, where the three columns indicate the indices in r defining a triangle.

Requirements

The libary is included as a Linux-based pre-compiled shared libary meshgen.so in the folder clib. For other Unix-based operative systems, the libary can be recompiled using the Makefile included in the folder, simply run make (MinGW can be used in Windows). It is necessary, both for compilation and execution of the module, to have CGAL and its dependencies installed on the system.

About

This is a Python module wrapping the Advancing Front Surface Reconstruction algorithm from CGAL by using Ctypes

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published