-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Real mid and more #993
base: master
Are you sure you want to change the base?
Real mid and more #993
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 7 of 11 files at r1, all commit messages.
Reviewable status: 1 change requests, 0 of 1 approvals obtained (waiting on @andrewheumann, @ikeough, @jamesbradleym, and @wynged)
Elements/src/Geometry/Interfaces/IHasArcLength.cs
line 7 at r2 (raw file):
/// Implementing classes define methods for computing points and performing operations based on arc length. /// </summary> public interface IHasArcLength
In general, I feel like this should just be bundled with IBoundedCurve
. I don't see the distinction here for Arc Lengths, these seem to just be general curve methods.
It seems like maybe Circle is the exception since it is not a BoundedCurve
...
Either way, it seems like we can abstract these into ICurve
or IBoundedCurve
unless there is an Arc
specific method in here, which I would then recommend it gets named appropriately. Although, I don't see anything specific to arcs, such as arguments that are an Angle
type.
Elements/src/Geometry/Interfaces/IHasArcLength.cs
line 22 at r2 (raw file):
/// <param name="normalizedLength">The normalized length along the curve.</param> /// <returns>The point on the curve at the specified normalized length.</returns> Vector3 PointAtNormalizedLength(double normalizedLength);
Is this different than PointAtNormalized
in IBoundedCurve
?
Elements/src/Geometry/Interfaces/IHasArcLength.cs
line 28 at r2 (raw file):
/// </summary> /// <returns>The midpoint of the curve.</returns> Vector3 MidPoint();
How is this different than Mid()
?
Elements/src/Geometry/Interfaces/IHasArcLength.cs
line 35 at r2 (raw file):
/// <param name="length">The desired length for dividing the curve.</param> /// <returns>A list of points representing the divisions along the curve.</returns> Vector3[] DivideByLength(double length);
I think this needs some more arguments to allow for division types (remainder at one end, remainder at both ends, evenly divided, etc). See how Grid divisions are handled
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 11 files at r1, all commit messages.
Reviewable status: 2 change requests, 0 of 1 approvals obtained (waiting on @anthonie-kramer, @ikeough, @jamesbradleym, and @wynged)
Elements/src/Geometry/Interfaces/IHasArcLength.cs
line 7 at r2 (raw file):
Previously, anthonie-kramer (Anthonie Kramer) wrote…
In general, I feel like this should just be bundled with
IBoundedCurve
. I don't see the distinction here for Arc Lengths, these seem to just be general curve methods.It seems like maybe Circle is the exception since it is not a
BoundedCurve
...Either way, it seems like we can abstract these into
ICurve
orIBoundedCurve
unless there is anArc
specific method in here, which I would then recommend it gets named appropriately. Although, I don't see anything specific to arcs, such as arguments that are anAngle
type.
I agree I would like to see this get bundled up in some parent classes / potentially other interfaces. Are there any BoundedCurve
s that don't / cant support this? (re: naming though, "ArcLength" is the term for measured length along any curve, not just arcs )
A couple of high level comments. I'm moving this out to 2.1 for further design. Much of what is in here should be, if we choose to bring it in, part of the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 2 change requests, 0 of 1 approvals obtained (waiting on @anthonie-kramer, @ikeough, and @wynged)
Elements/src/Geometry/Interfaces/IHasArcLength.cs
line 22 at r2 (raw file):
Previously, anthonie-kramer (Anthonie Kramer) wrote…
Is this different than
PointAtNormalized
inIBoundedCurve
?
Yes, This does not normalize the parameter value to the length of the curve, it simply remaps the parameter space from 0->1. As Polyline and Bezier are not equally parameterized you would not get the midpoint from something like PointAtNormalized(0.5).
Elements/src/Geometry/Interfaces/IHasArcLength.cs
line 28 at r2 (raw file):
Previously, anthonie-kramer (Anthonie Kramer) wrote…
How is this different than
Mid()
?
Mid() finds the mid parameter, for a Line or Circle this is fine as the middle of the parameter space is the same as the length based midpoint. For Polyline and Bezier, however, parameter space is not length based. For bezier the parameter is weighted by control points and for polyline it is vertex based.
Left side = MidPoint()
Right side = Mid()
de2c595
to
8a1675a
Compare
BACKGROUND:
DESCRIPTION:
TESTING:
FUTURE WORK:
REQUIRED:
CHANGELOG.md
.COMMENTS:
This change is