Wish: Angle to be able to measure curve tangents

It would be nice to be able to measure the angle between curves that are not straight lines, such like arks or free-form curves. The “Angle” command could use the tangent direction as a reference for the calculation of the angle. Picking the end of a free-form curve or an arc should take into account its control polygon’s tangent direction instead. The “GCon” command already does that.
Currently, in order to measure the angle between non-linear curves I have to show their control points and then manually pick either end of their control polygon, which requires plenty of mouse clicks. Sometimes, that manual approach even requires to change the camera orientation or zoom-out far away from the close-up view, because the 2nd control point of the curve may be located many meters away from the end point of the latter. Here is an example of such case:

would allowing the control polygon line to be used for a line input do what you are asking?
it may be possible to add a “draw a line” option in this command that would allow you to make temp lines.

Or am I missing your request?

1 Like

It seems to me it would only make sense to measure angles of non-linear curves if they intersect - or share an end point, would be the best - in that case it is straightforward, I think.

-Pascal

1 Like

Yes, the request is exactly like you described it, i.e. taking the control polygon’s dotted line as a vector for measuring the angle to a non-linear curve. :slight_smile:

So the curves will always share an end point? That is not needed for lines - what happens in this case:


It is not hard to return an angle there, you just need to decide which one… see if this does anything - the angle depends on pick location.
CurveAngle.py (1.9 KB)

To use the Python script use RunPythonScript, or a macro:

_-RunPythonScript "Full path to py file inside double-quotes"

-Pascal

1 Like

The ideal way would be to take into account the direction of the first control polygon of the curve and the position of the actual curve relative to the other curve/line/edge. Here is an exemple using your screen-shot as a reference. The white dots represent the locations of mouse clicks used to measure the angle. The yellow dashed lines are the control polygons that determine the angle. Since the mouse clicks were both outside the curves, the angle should be positioned on the outside, too. :slight_smile:

@pascal , I tried your script but it evokes the following error message:

Ooops - sorry…

CurveAngle.py (1.9 KB)

It should be possible to get some useful angle info even if the curves do not quite intersect - it is, but unfortunately, it is only going to be reliable in some cases.

-Pascal

1 Like

Thanks, Pascal! Now it works and I can say that it does what I mean in my original post. :slight_smile: Is there a way to make a similar approach for building an angle dimension between non-linear curves, like the ! _DimAngle command?

It may be possible to hack a dimension as a P.O.C but it will be fake and not pay attention to History.
fyi, the angle given is the actual angle between the curves at the point of intersection, it is not looking at the control point segments.

-Pascal

1 Like

I think that this would be perfectly fine, because now I did a test with your script and it says the angle between the larger uncut curves is 71,22 degrees. Then I made a copy of them in the rights side and split them together, then used their updated control polygon as a reference to draw two lines that I ultimately used to put an angle dimension in-between. It also shows 71,22 degrees angle. :slight_smile: Could this process be automated?

Angle between curves.3dm (29.9 KB)

yep - it is a complete hack but -

DimCurveAngle.py (2.2 KB)

-Pascal

1 Like

Wow, this is great! :slight_smile: Thanks again. I will add this script also in the dimensions toolbar, as I think that both scripts are usable: one for a quick examination and the second one for drawing a dimensions.