package OCADml
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=fc0b0a0ff598ff06550dfe0a93b279dc2df018914cc7883872d676d7da4dc14c
sha512=e02d943fbed9334730223ea12447b2495812db0bab20302516891d24c088fa8c4a60c366d0e083f4e675a25b394d101d115d3595e05284298d5803acc92351cf
doc/index.html
OCADml
OCADml is a collection of types and functions built on top of Gg facilitating Computer Aided Design (CAD) in OCaml. In particular, the style of design currently supported is that of 2D drawing and mesh generation via sweeping/extrusion.
API
OCADml
-- top level library interfacePolyText
-- point representations of text (only installed if cairo is available)
Vectors and transformations
V2
-- 2d vector operationsV3
-- 3d vector operationsAffine2
-- 2d affine transformation matricesAffine3
-- 3d affine transformation matricesQuaternion
-- quaternion manipulation andl applicationPlane
-- normalized cartesian plane operations
2d paths and polygons
Path2
-- generation and manipulation of 2d pathsBezier2
-- 2d bezier curves, patches, and splinesCubicSpline
-- cubic spline interpolation of 2d pathsPoly2
-- 2d polygons (outer, and zero or more inner paths)PolyText
-- point representations of text (via cairo)
3d paths, coplanar polygons, and meshes
Path3
-- generation and manipulation of 3d pathsBezier3
-- 3d bezier curves, patches, and splinesPoly3
-- planar 3d polygons (outer, and zero or more inner paths)Mesh
-- triangular mesh generation
Utilities
Math
-- float and 2d matrix operationsBallTree2
-- 2d vector space partitioning search treeBallTree3
-- 3d vector space partitioning search tree
Using OCaml top-level
As this library uses vector types from Gg, the associated pretty printing functionality can be unlocked in the top-level via #require "gg.top";;
.
CAD Package Specific Frontends
This library only provides a means to generate point and face based geometries, in order to perform boolean operations, validation, and export, you'll need to work with a particular CAD package.
OSCADml
[@@deriving cad]
There is a companion ppx, [@@deriving cad] for generating transformation functions for user-defined records and abstract types composed of types for which the basic transformation functions are defined, such as vectors (V2.t
or V3.t
) (and those composed of them) provided in this library.