JSON encoders for the core OpenSolid types.
Encode a Vector3d as an array of three floating-point components.
Encode a Direction2d as an array of two floating-point components.
Encode a Direction3d as an array of three floating-point components.
Encode a Point2d as an array of two floating-point coordinates.
Encode a Point3d as an array of three floating-point coordinates.
Encode an Axis2d as an object with originPoint and direction fields.
Encode an Axis3d as an object with originPoint and direction fields.
Encode a Plane3d as an object with originPoint and normalDirection
fields.
Encode a Frame2d as an object with originPoint, xDirection and
yDirection fields.
Encode a Frame3d as an object with originPoint, xDirection,
yDirection and zDirection fields.
Encode a SketchPlane3d as an object with originPoint, xDirection and
yDirection fields.
Encode a LineSegment2d as an array of two endpoints.
Encode a LineSegment3d as an array of two endpoints.
Encode a Triangle2d as an array of three vertices.
Encode a Triangle3d as an array of three vertices.
Encode an Interval as an object with minValue and maxValue fields.
Encode a BoundingBox2d as an object with minX, maxX, minY and maxY
fields.
Encode a BoundingBox3d as an object with minX, maxX, minY, maxY,
minZ and maxZ fields.
Encode a Polyline2d as an array of vertices.
Encode a Polyline3d as an array of vertices.
Encode a Polygon2d as an array of vertices.
Encode a Circle2d as an object with centerPoint and radius fields.
Encode a Circle3d as an object with centerPoint, axialDirection and
radius fields.
Encode an Ellipse2d as an object with centerPoint, xDirection,
xRadius and yRadius fields.
Encode an Arc2d as an object with centerPoint, startPoint and
sweptAngle fields.
Encode an Arc3d as an object with axis, startPoint and sweptAngle
fields.
Encode an EllipticalArc2d as an object with centerPoint, xDirection,
xRadius, yRadius, startAngle and sweptAngle fields.
Encode a Sphere as an object with centerPoint and radius fields.
Encode a QuadraticSpline2d as an array of three control points.
Encode a QuadraticSpline3d as an array of three control points.
Encode a CubicSpline2d as an array of four control points.
Encode a CubicSpline3d as an array of four control points.
Encode a
Vector2das an array of two floating-point components.