Jump to content
bentway23

Make line length match width of object directly underneath

Recommended Posts

I have a line hovering above another object (in this example, it's just a grid, but it's more irregularly shaped in what I need). I would like it so that the line length matches the width of the object directly underneath, without reorienting the line, and preferably without actually snapping it to the new point (in y).

Ideally, if I could extract a bbox D_XMIN (/MAX) (or a getbbox min.x), but only at the point in z where the line is, then I could just translate the points to that location. I'm sure this is super-simple, but I'm not quite sure how to go about it.

A ray SOP gets me in the ballpark, but presents some problems, as in the pics.

Thanks!

overhead.PNG

with ray.PNG

hangsOnCorner.PNG

lineray.hiplc

Edited by bentway23

Share this post


Link to post
Share on other sites

Look for the intersection analysis node.

Share this post


Link to post
Share on other sites

I know how to use that to, well, detect intersections, but I don't see any options on it useful here. Is it one of the output attributes?

Share this post


Link to post
Share on other sites

Easy fix, use a grid that's bigger than your line and then ray SOP it down with a vector, not closest.

Share this post


Link to post
Share on other sites

That's actually the reverse of what I want--I want the points to match the edges of the grid (and preferably not move in y). That moves the line in y but doesn't match the length to the point of the grid where it drops down.

Share this post


Link to post
Share on other sites

Is this what you want? Im kind of confused what you are asking.

06Mf3ZWd0m.gif

houdini_q57wm3jQyY.png

Edited by Sepu

Share this post


Link to post
Share on other sites

That's exactly what I want! What is happening with the intersection analysis and add?

Share this post


Link to post
Share on other sites

nothing much the intersection analysis is just the default and the add is to make a line from the pts (which are coming from the intersection analysys)

Share this post


Link to post
Share on other sites

Perfect. I sort the points, use a wrangle to delete all but the first and last, and I'm good to go. This requires it to be even with the grid(/surface) in y, but it's easy enough to throw a transform after to raise it up afterwards.

 

Thanks!

Share this post


Link to post
Share on other sites

Cool. In this case I didn't actually have a grid, but a very lumpy thing so there were few actual inline points. That's a good thing to keep in mind, though!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×