opensolid/geometry/2.1.0

NOTE: this package is not compatible with Elm 0.19.1

OpenSolid.Geometry.Decode

JSON decoders for the core OpenSolid types.

vector2d : Decoder Vector2d

Decodes a Vector2d from an array of two floating-point components.

vector3d : Decoder Vector3d

Decodes a Vector3d from an array of three floating-point components.

direction2d : Decoder Direction2d

Decodes a Direction2d from an array of two floating-point components.

direction3d : Decoder Direction3d

Decodes a Direction3d from an array of three floating-point components.

point2d : Decoder Point2d

Decodes a Point2d from an array of two floating-point coordinates.

point3d : Decoder Point3d

Decodes a Point3d from an array of three floating-point coordinates.

axis2d : Decoder Axis2d

Decodes an Axis2d from an object with originPoint and direction fields.

axis3d : Decoder Axis3d

Decodes an Axis3d from an object with originPoint and direction fields.

plane3d : Decoder Plane3d

Decodes a Plane3d from an object with originPoint and normalDirection fields.

frame2d : Decoder Frame2d

Decodes a Frame2d from an object with originPoint, xDirection and yDirection fields.

frame3d : Decoder Frame3d

Decodes a Frame3d from an object with originPoint, xDirection, yDirection and zDirection fields.

sketchPlane3d : Decoder SketchPlane3d

Decodes a SketchPlane3d from an object with originPoint, xDirection and yDirection fields.

lineSegment2d : Decoder LineSegment2d

Decodes a LineSegment2d from an array of two endpoints.

lineSegment3d : Decoder LineSegment3d

Decodes a LineSegment3d from an array of two endpoints.

triangle2d : Decoder Triangle2d

Decodes a Triangle2d from an array of three vertices.

triangle3d : Decoder Triangle3d

Decodes a Triangle3d from an array of three vertices.

interval : Decoder Interval

Decodes an Interval from an object with minValue and maxValue fields.

boundingBox2d : Decoder BoundingBox2d

Decodes a BoundingBox2d from an object with minX, maxX, minY and maxY fields.

boundingBox3d : Decoder BoundingBox3d

Decodes a BoundingBox3d from an object with minX, maxX, minY, maxY, minZ and maxZ fields.

polyline2d : Decoder Polyline2d

Decodes a Polyline2d from an array of vertices.

polyline3d : Decoder Polyline3d

Decodes a Polyline3d from an array of vertices.

polygon2d : Decoder Polygon2d

Decodes a Polygon2d from an array of vertices.

circle2d : Decoder Circle2d

Decodes a Circle2d from an object with centerPoint and radius fields.

circle3d : Decoder Circle3d

Decodes a Circle3d from an object with centerPoint, axialDirection and radius fields.

ellipse2d : Decoder Ellipse2d

Decodes an Ellipse2d from an object with centerPoint, xDirection, xRadius and yRadius fields.

arc2d : Decoder Arc2d

Decodes an Arc2d from an object with centerPoint, startPoint and sweptAngle fields.

arc3d : Decoder Arc3d

Decodes an Arc3d from an object with axis, startPoint and sweptAngle fields.

ellipticalArc2d : Decoder EllipticalArc2d

Decodes an EllipticalArc2d from an object with centerPoint, xDirection, xRadius, yRadius, startAngle and sweptAngle fields.

sphere3d : Decoder Sphere3d

Decodes a Sphere3d from an object with centerPoint and radius fields.

quadraticSpline2d : Decoder QuadraticSpline2d

Decodes a QuadraticSpline2d from an array of three control points.

quadraticSpline3d : Decoder QuadraticSpline3d

Decodes a QuadraticSpline3d from an array of three control points.

cubicSpline2d : Decoder CubicSpline2d

Decodes a CubicSpline2d from an array of four control points.

cubicSpline3d : Decoder CubicSpline3d

Decodes a CubicSpline3d from an array of four control points.