This module contains the definitions of the core OpenSolid data types. Each
type also has a corresponding module providing related functionality. Suggested
practice is to import this module exposing everything, and import all other
necessary modules using as, for example:
import OpenSolid.Geometry.Types exposing (..)
import OpenSolid.Vector2d as Vector2d
import OpenSolid.Plane3d as Plane3dVectors represent quantities such as displacements or velocities. For positions,
Point2d or Point3d should be used instead.
A vector in 3D, defined by its X, Y and Z components. See the Vector3d
module for details.
A direction is effectively a vector with a length of one, used to represent quantities like the direction of an axis or the normal direction of a plane.
A direction in 2D, defined by its X and Y components. See the Direction2d
module for details.
A direction in 3D, defined by its X, Y and Z components. See the Direction3d
module for details.
Points represent positions in space. They are distinct from vectors but interact with them in well-defined ways; you can translate a point by a vector to result in a new point, or you can compute the vector from one point to another, but you cannot 'add' two points like you can add two vectors.
A point in 2D, defined by its X and Y coordinates. See the Point2d
module for details.
A point in 3D, defined by its X, Y and Z coordinates. See the Point3d
module for details.
Axes and planes are used extensively within OpenSolid to define different types of transformations. For instance, rotation in 3D is defined by a rotation axis and mirroring in 3D is defined by a mirror plane.
An axis in 2D, defined by its origin point and direction. See the Axis2d
module for details.
An axis in 3D, defined by its origin point and direction. See the Axis3d
module for details.
A plane in 3D, defined by its origin point and normal direction. See the
Plane3d module for details.
Frames represent local coordinate systems, and allow for conversions between local and global coordinates. They are also a common source of datums used in transformations, for example rotating around the Z axis of a 3D frame or mirroring across its XY plane.
A coordinate system in 2D space, defined by its origin point and X and Y
directions. See the Frame2d module for details.
A coordinate system in 3D space, defined by its origin point and X, Y and Z
directions. See the Frame3d module for details.
A 2D planar coordinate system embedded in 3D space, defined by its origin point
and X and Y directions. Used for operations such as projecting 3D geometry into
a 2D coordinate system or placing 2D geometry in 3D. See the SketchPlane3d
module for details.
A line segment in 2D, defined by its start and end points. See the
LineSegment2d module for details.
A line segment in 3D, defined by its start and end points. See the
LineSegment3d module for details.
A triangle in 2D, defined by its three vertices. See the Triangle2d
module for details.
A triangle in 3D, defined by its three vertices. See the Triangle3d
module for details.
These types represent bounding boxes around other geometric objects, and are useful for tasks such as fast spatial searching or culling non-visible objects during 3D rendering.
A bounding box in 2D, defined by its minimum and maximum X and Y values. See the
BoundingBox2d module for details.
A bounding box in 3D, defined by its minimum and maximum X, Y and Z values. See
the BoundingBox3d module for details.
A polyline in 2D, defined by a list of vertices. See the Polyline2d
module for details.
A polyline in 3D, defined by a list of vertices. See the Polyline3d
module for details.
A polygon in 2D, defined by a list of vertices. Very similar to a Polyline2d
but the last point is implicitly considered to connect back to the first point.
See the Polygon2d module for details.
A circle in 2D, defined by its center point and radius. See the Circle2d
module for details.
A circle in 3D, defined by its center point, axial direction and radius. See the
Circle3d module for details.
An arc in 2D, defined by its center point, start point and swept angle. See the
Arc2d module for details.
An arc in 3D, defined by its axis, start point and swept angle. See the
Arc3d module for details.
A quadratic Bezier spline in 2D, defined by its three control points. See the
QuadraticSpline2d module for details.
A quadratic Bezier spline in 3D, defined by its three control points. See the
QuadraticSpline3d module for details.
A cubic Bezier spline in 2D, defined by its four control points. See the
CubicSpline2d module for details.
A cubic Bezier spline in 3D, defined by its four control points. See the
CubicSpline3d module for details.
A vector in 2D, defined by its X and Y components. See the
Vector2dmodule for details.