Module Easymesh

module Easymesh: sig .. end
OCaml interface to EasyMesh.

EasyMesh is a simple and easy to use mesh generator. However, it is not very robust and can segfault instead of reporting an error.
Author(s): Christophe Troestler (
Version: 0.5

class ['a] pslg : 'a Bigarray.layout -> ['a] Mesh.pslg
An alias for Mesh.pslg.
val triangulate : max_area:float -> 'a Mesh.pslg -> 'a Mesh.t
triangulate ~max_area pslg returns a triangulation of the Planar Straight Line Graph pslg given by pslg.Mesh.points and pslg.Mesh.segment. BEWARE that for EasyMesh, the boundary must have a positive (counterclockwise) orientation, holes must be delimited by a negatively oriented paths.

pslg.Mesh.points_marker and pslg.Mesh.segment_marker may be set.

The returned mesh sets point, point_marker, triangle, neighbor and should genrally set edge and edge_marker.

max_area : is given as an indication to the algorithm and may not be respected.
val read : 'a Bigarray.layout -> string -> 'a Mesh.t
read layout file reads the mesh described by the files file.n, file.e and file.s into a Mesh.t structure. Only the fact that the files are well formed is checked (various exceptions may be thrown), not the fact that the data describe a real mesh.
val write : 'a #Mesh.t -> string -> unit
write mesh file writes the mesh in the files file.n, file.e and file.s in easymesh format.