Help: Move a curve in z direction until intersect?

Met a simple problem but can’t figure it out

I want to move the top curve up and down (in z direction) until it intersects with the bottom curve (only 1 intersection, the first intersection), what command can I use? (ClosestPoint doesn’t work on one direction)

Hello - Move > Vertical starting in Top, with the Int Osnap and your mouse slightly more on the top curve - then the apparent Int will be on that curve - as the point to move from. You can switch to another view - Perspective - to finish the move with Int - it will find the right one on the lower curve. Or do it all in Top with your mouse favoring the lower curve for the second Int. Make sure Apparent Intersections is enabled in Options > Modeling aids.

-Pascal

Hi, You can draw a tangent line to the bottom curve. Then move the first line setting on the osnap “Int” unit you reach the tangent line. You may share the file.

Hi Pascal Thanks for the reply. I tried but the apparent int from top view doesn’t seem to be quite the right point. I took a screenshot of the point that got picked up (I tried a few time and its always this point that got picked up).

This is the file: help.3dm (18.7 MB)

I also put some red curves on the right side for reference, I eyeballed this one and should be close to the correct line that will result in a one point intersection when moving up and down.

!

Thanks for the reply. I just share the file above. I don’t know where to draw the tangent line that will result in the shortest path only follows the z-direction?

Hi, I guess you either have to do some geometrical calculation or use grasshopper to do these. You may find the following question-answer helpful.

I don’t think that it’s possible with osnaps and the discussion above is not about this problem.
Here a def how this could be accomplished approximately. One curve is subtracted from the other and we search for the min-value.
HTH Ferry

closestPointZ.gh (12.2 KB)

1 Like

Hello - I see, I thought from your images the problem was a different one. I think there is a more exact process to get the answer you want but right now it escapes me if it exists. I’ve made a quick script that should get you a very good estimate - it is fairly crude and does not do any checking for coplanarity, if that is a word, but it should work for the case you show and similar.

MoveToTangent.py (1.9 KB)

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

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

-Pascal

Thanks a lot

Thanks a lot. Maybe a feature that can be added in the future :smiley:

To find the amount to move in the -z direction you can use surface_x_surface intersection.
Extrude the curve you want to move in the direction (0,1,-1) and extrude the other curve in the y direction. Intersect the two surfaces. A point (x*,y*,z*) on this intersection curve is a point (x*,z*) on the fixed curve and a point (x*,z*-y*) on the moved curve. So then you just need to find the point on the intersection curve with minimum y* value, You can use bounding box for this.

1 Like

@GregArden - isn’t there a 2d (coplanar curves) version of this using offsets of one or both curves and finding intersections… ? I am pretty sure I once knew this but I could not conjure it up…

-Pascal

Doesn’t ring a bell