Skip to content

Add Axis3d.intersectionWithSketchPlane #124

Open
@MartinSStewart

Description

@MartinSStewart

I've found it helpful to have the following function.

{-| Try to find the unique intersection point of an axis with a sketch plane. If the axis does not intersect the sketch plane, or if it is coplanar with it (lying perfectly in the sketch plane), returns Nothing.
-}
intersectionWithSketchPlane : SketchPlane3d units coordinates { defines : coordinates2d } -> Axis3d units coordinates -> Maybe (Point2d units coordinates2d)
intersectionWithSketchPlane sketchPlane axis3d =
    Axis3d.intersectionWithPlane (SketchPlane3d.toPlane sketchPlane) axis3d |> Maybe.map (Point3d.projectInto sketchPlane)

It behaves the same way as Axis3d.intersectionWithPlane except that it returns a 2d point on the sketch plane rather than a 3d point in global coordinates.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions