Closed MartinSStewart closed 5 years ago
Seems reasonable, but raises a few questions it would be great to hear your thoughts on:
SketchPlane3d.through point direction
that the given direction
will be used as the normal direction of the sketch plane, instead of its X or Y direction?SketchPlane3d.withNormalDirection
be added too, for symmetry/consistency?SketchPlane3d.throughPoints
? This is an interesting one since I don't think you'd want to just make it a shortcut for calling Plane3d.throughPoints
and then SketchPlane3d.fromPlane
. In the sketch plane case, you could tweak the logic a bit to ensure that the X direction of the sketch plane is equal to the direction from the first point to the second and the Y direction is chosen such that the third point has a positive Y component.Plane3d.through
explains what it does: Construct a plane through the given point, with the given normal direction.
Additionally, if someone thought the direction parameter was for it's X or Y direction, they would probably pause and wonder how you control the rotation around that axis.SketchPlane3d.withNormalDirection
already exists? SketchPlane3d.throughPoints
also already exists?Ugh, thanks, my brain was clearly not working yesterday! You're right, especially with SketchPlane3d.withNormalDirection
and SketchPlane3d.throughPoints
already defined, SketchPlane3d.through
does seem like an omission.
I think I'm getting pretty close to an initial release of the next major version of elm-geometry
with units/coordinate systems tracking, so I might just roll this into that version.
Hehe, no worries. I look forward to the new version. 👍
As a side note, I was thinking it might also make sense to have SketchPlane3d.fromXAxis
and SketchPlane3d.fromYAxis
functions that arbitrarily choose a Y or X direction respectively. Useful if you want to do something like revolve a profile around an axis, so you need a sketch plane through that axis but don't really care where the revolution "starts".
The function
SketchPlane3d.through
is missing. If I want to create a sketch plane from a point + direction I have to instead usePlane3d.through
and thenPlane3d.fromPlane
.This is a minor inconvenience but it seems odd that
SketchPlane3d
can't do this directly.