Point on a 2D curve at a certain slope

Does anyone know of a simple control in grasshopper to find a point(parameter) on a gently curving 2d curve at a given slope.
I have been experimenting with graphing all slopes on curve at even intervals,then interpoloating data to find my slope, it just seems very involved.I am hoping there is a control or cluster that is readily available.
i have searched the discourse forum and internet with little success.

i have my crappy attempt to post , i am embarrassed that it is so cumbersome.
curve slope attempt.gh (62.3 KB)

phil

Probably not the one component fits all solution you were hoping for, but anyway…You can specify a slope and it will find the corresponding point (with a little leeway for rounding) For purposes of visibility, I scaled your curve x100 in the y direction to do all the geometry.


curve slope attempt-b.gh (53.2 KB)

Method I use in Rhino, not Grasshopper for curves without wiggles:
Create line with the desired slope
CrvDeviation to find the closest and furtherest points
Depending on whether the curve is convex or concave relative to the test line, the point with the same slope is either the closest or futherest point.
Find Slope.3dm (1.5 MB)

2 Likes

I figured I’d try @davidcockey’s method in GH. Definitely simpler than mine. It uses the Curve Proximity component which looks for the closest point between two curves. As mentioned elsewhere, the curve can’t have any squiggles.

curve slope by proximity.gh (47.5 KB)

2 Likes

rhino / (non-grasshopper):
set Cplane by X-Axis
snap to Quadrant
(see screenshot)

grasshopper-concept:
cplane-boundingbox and intersect with curve.
filter start / end - point

but notice: there are some special geometrical cases to filter:

  • 2d-curve might have curvature-changes / direction change and have multiple points that fit.
  • the curve might not have the slope
  • … (maybe some more)

kind regards -tom

David
thanks for the reply, your method is like snapping a line tangent to the curve(like i would do it in solidworks).
however, my curve is a raw ,precision cmm measurement of a master sphere+system noise.
i have a calibration file with thouands of points that represent the error in my probe tip.
this file is two column data (slope and error at that slope) and need to superimpose it on the raw curve data, so i need grasshopper or rhinoscript for automation.

I do like you method though
kind regards
Phil

Ethan
thanks for the quick reply
this method is basically the same as mine. A lot of “stuff” to get a simple answer.
i was surprised that threre was not a stock control available.
Pascal had shown me some of the new slope tools in V7 for surfaces when released,but seems 2d was not on anyones radar.
thanks for looking and giving me ideas.
Phil

Thanks Tom

not sure if i completely understood. Why do you need to find a specific slope ?
can t the information of the calibration be represented (approximated) geometrically ?

another thought - you might benefit from using a line-arc approximation of the initial curve.
then query each segment of this polycurve.

what does the screenshot in your initial post show ? or is your problem already solved ?

Tom
at the risk of sounding rude(which is not my intention), in my original question i was asking if there was a control available to do this, my image was of my version, which works but is cluttered, i was hoping for a pointer to a food 4 rhino download. That said i appreciate what you have posted, my problem is solved already, this is a small aspect of overall project, and was looking for something clean and reliable.
This problem should probably be solved using the 1st derivative of curve and a converging search using a tree,
but that stuff still gives me nighmares whenever i delve into the data tree world.i Know that some of the superstars here would make this so slick, but i am not asking for it to be solved ,unless perhaps if you count an existing control that i was asking about.
i also do appreciate your input, there are always many ways to solve a problem and this place is where i get most of my ideas to solve problems,so thanks for contributing.
Kind regards
Phil