opensolid/geometry/3.0.1

NOTE: this package is not compatible with Elm 0.19.1

Axis2d

Axis2d

An Axis2d represents an infinitely long straight line in 2D and is defined by an origin point and direction. Axes have several uses, such as:

  • Mirroring across the axis
  • Projecting onto the axis
  • Measuring distance along the axis from the origin point
type alias Axis2d =
Axis2d

Constants

x : Axis2d
y : Axis2d

Constructors

through : Point2d -> Direction2d -> Axis2d
withDirection : Direction2d -> Point2d -> Axis2d

Properties

originPoint : Axis2d -> Point2d
direction : Axis2d -> Direction2d

Transformations

reverse : Axis2d -> Axis2d
moveTo : Point2d -> Axis2d -> Axis2d
rotateAround : Point2d -> Float -> Axis2d -> Axis2d
translateBy : Vector2d -> Axis2d -> Axis2d
translateIn : Direction2d -> Float -> Axis2d -> Axis2d
mirrorAcross : Axis2d -> Axis2d -> Axis2d

Coordinate conversions

Functions for transforming axes between local and global coordinates in different coordinate frames.

relativeTo : Frame2d -> Axis2d -> Axis2d
placeIn : Frame2d -> Axis2d -> Axis2d