Not all pairs of finite length curves have a line which is perpendicular to both curves. Simple, perhaps trivial, example attached. NoPerpLineDC1.3dm (9.3 KB)
The command does not report if it succeeds or not. Which i would consider not optimal. Next time you run this in the same situation note what @davidcockey explained, in certain cases there is no line which is perpendicular and it is required to pick each curve close to where the perpendicularity is asumed. (There could be multiple perpendicular lines for 2 freeform curves, which equals an infinite amount for parallel curves or lines). If you clicked not close enough to one of the points where a perpendicular line mathematically exists (within tolerance), then no line will be created.
On the other hand, it could be that it created a line but since the distance between your curve was very small, you did not see the created line or the line was not added because itâs length was below the tolerance. It is not selected after it is added to the document as well. In this case it makes sense to window select over the area and look closer, also at the commandline to find out how many curves (if at all) where selected / created.
_
c.
If you have ever used the crvdeviation command you should have observed that the command shows you what the overlapping interval is. It shows you the start and end of the interval that the command measures the deviation. Even a child can understand what the interval is by simply using the command and observing.
One useful purpose for limiting the deviation test to an interval is for the purpose of checking if surface edges are within tolerance to see if the surfaces can be joined.
Here is an example of 2 green surfaces that could be joined if the deviation inside the interval is small enough.
If the deviation test included the entire edges instead of just the overlapping interval the command would become useless for this important purpose.
When that happens, try instead with ClosestPt between the two objects and see what the results sayâŚ
These are curves which clearly have a common perpendicular. I suspect that the reason for the problem is that the curves are very close to intersecting. Not close enough for Rhino to actually find an intersection. But too close for Rhino to find the tiny short line perpendicular to both of them. I said âDraw lineâ. No indication that it failed. So to look for the line, I said âSelect shortâ. Nothing selected. Oh, I guess somehow âDraw lineâ failed - WITH NO INDICATION. So I spend more time correcting the curves that should intersect by finding the right point to pull, cut, whatever.
What Iâm suggesting is that a function should do what is says it does, or, if it canât, say so. Just like a human being that you hired.
I also did software for 20 years. System design. Got award from the company for making the project work.
Great. This is the beginning of an explanation. I suggest the Rhino include it in the documentation.
Look: The guy who designed this function had to figure out what it means. He should put that in the documentation.
Thank you. A useful suggestion.
More like the developer(s) had to invent what it means. That is they had to figure out how to restrict the comparison to an overlapping region that produced a maximum deviation that was useful. Without creating the concept of overlapping interval the command would return a useless result for max deviation that often would look something like this
You havenât made it clear what you mean when you say documentation
Iâm guessing when you say âdocumentationâ you mean the help function. This is what the help says about the Curve Deviation function
Select two curves.
The command may find one or more intervals of overlap between the two curves, or it may report that the curves do not overlap.
For each overlap interval, three pairs of indicator marks with indicator lines between them will appear, joining the ends of the overlap interval to the points of greatest deviation within the interval.
Minimum deviation = Green Marks
Maximum deviation = Red Marks
For each overlap interval, the three deviation distances are reported at the command line, along with the world coordinates of the interval ends on each curve.
Use the command history window or press F2 to view the data in a separate window.
Press Enter to turn off the deviation display.
CrvDeviation failure: For curves which are in a common plane and intersect CrvDeviation reports a minimum distance which is non-zero. Example: (Rhino 6 results but saved as Rhino 5 file. Rhino 5 gave identical results.)
CrvDeviationFailA1.3dm (41.4 KB)
Command: CrvDeviation
Select curves to test
Select curves to test
Overlap interval 1 of 1:
start: distance = 1.57103
crvA( 0) = (-30, 8, 0)
crvB( 3.22729) = (-30.8278, 6.66472, 0)
end: distance = 2.83404
crvA( 46.1424) = (11.8855, -1.83173, 0)
crvB( 51.4242) = (12, 1, 0)
Minimum deviation = 0.186688
Maximum deviation = 2.83404
My guess is the curves are sampled at discreet points and in this example no points coincided with the intersection. If so then the code needs to check for intersection(s) and if found use the intersection point as the minimum distance location.
The bug I reported in the post above - intersecting curves being reported as having a non-zero distance between them, needs to be logged and fixed.

