Library
Module
Module type
Parameter
Class
Class type
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.
class 'l pslg : 'l Bigarray.layout -> 'l Mesh.pslg
An alias for Mesh.pslg
. (Use this if you wan to ba able to easily switch mesh generators as some may require objects with more methods.)
val pslg :
?hole:'l Mesh.mat ->
?region:'l Mesh.mat ->
?point_marker:'l Mesh.int_vec ->
'l Mesh.mat ->
?segment_marker:'l Mesh.int_vec ->
'l Mesh.int_mat ->
'l pslg
Same as Mesh.pslg
. Duplicated here to ease the writing of code that is easily ported to various meshers.
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
.
val read : 'layout Bigarray.layout -> string -> 'layout 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 : 'layout Mesh.t -> string -> unit
write mesh file
writes the mesh
in the files file
.n, file
.e and file
.s in easymesh format.