package OCADml

  1. Overview
  2. Docs

Module OCADmlSource

Vectors

Vectors for describing transformations and points in 2/3-dimensional space.

Sourcetype v4 = Gg.v4

4-dimensional vector

Sourcetype v2 = Gg.v2

2-dimensional vector

Sourcetype v3 = Gg.v3

3-dimensional vector

Sourceval v2 : float -> float -> Gg.v2

v2 x y

Construct a 2d vector from x and y coordinates.

Sourceval v3 : float -> float -> float -> Gg.v3

v3 x y z

Construct a 3d vector from x, y, and z coordinates.

Sourceval v4 : float -> float -> float -> float -> Gg.v4

v4 x y z

Construct a 4d vector from x, y, z, and w coordinates.

Sourcemodule V2 : sig ... end

2-dimensional vector type, including basic mathematical/geometrical operations and transformations, allowing for points in 2d space, and higher level types composed of them (e.g. Path2.t and Poly2.t) to be manipulated.

Sourcemodule V3 : sig ... end

3-dimensional vector type, including basic mathematical/geometrical operations and transformations, allowing for points in 3d space, and higher level types composed of them (e.g. Path3.t, Poly3.t, and Mesh.t) to be manipulated.

Transformations

Sourcemodule Affine2 : sig ... end

A 2d affine transformation matrix.

Sourcemodule Affine3 : sig ... end

Affine transformation matrices for transforming 3d vectors (V3.t), and 3d shapes.

Sourcemodule Quaternion : sig ... end

Provides functions for the creation of and operations between quaternions. These can be used to create composable and interpolatable rotations to be applied to 3d vectors (V3.t), and shapes.

Sourcemodule Plane : sig ... end

Normalized cartesian plane operations facilitating conversion between 2d and 3d space.

2-dimensional paths and polygons

Sourcemodule Path2 : sig ... end

2d path generation (including arcs and basic shapes), manipulation (including offset and roundovers (see Round), and measurement.

Sourcemodule Bezier2 : sig ... end

Generation and measurement of 2d bezier curve (and patch/surface) functions. Including of_path, which produces a bezier spline function that passes through all points of the given path.

Sourcemodule CubicSpline : sig ... end

Cubic spline interpolation of 2d paths.

Sourcemodule Poly2 : sig ... end

2d polygons made up of an outer, and zero or more inner Path2.ts. Includes basic shape creation helpers, manipulations, (including offset and basic transformations), measurement, and validation.

Gg re-exports

Sourcemodule Box2 = Gg.Box2

3-dimensional paths, coplanar polygons, and meshes

Sourcemodule Path3 : sig ... end

3d path generation (including arcs and basic shapes), manipulation (including roundovers (see Round), and conversion to sweeping transformations with to_transforms), and measurement.

Sourcemodule Bezier3 : sig ... end

Generation and measurement of 3d bezier curve (and patch/surface) functions. Including of_path, which produces a bezier spline function that passes through all points of the given path.

Sourcemodule Poly3 : sig ... end

Planar 3d polygons made up of an outer, and zero or more inner Path3.ts. Includes basic shape creation helpers, manipulations, (including offset and basic transformations), measurement, and validation.

Sourcemodule Mesh : sig ... end

Generation, and manipulation of 3-dimensional meshes (points and faces).

Gg re-exports

Sourcemodule Box3 = Gg.Box3

Utilities

Sourcemodule Math : sig ... end

Various operations on floats (e.g. approximate equality, linear interpolation), and basic arbitrary size 2d matrix operations.

Sourcemodule Easing : sig ... end

Cubic bezier easing.

Sourcemodule BallTree2 : sig ... end

Construction of 2d vector space partitioning ball tree structures for nearest neighbour search. Implementation adapted from the BOSL2 vectors module.

Sourcemodule BallTree3 : sig ... end

Construction of 3d vector space partitioning ball tree structures for nearest neighbour search. Implementation adapted from the BOSL2 vectors module.