Loopwhile doesnt work!

Hi everyone

I am struggling with Loopwhile.
On the slab horizontal up surface, i select a point and try to move it till the cross surface boundries.
I use doesintersect node. When i check the point with doesintersect in and out of surface manually, i took true and false right answers. However when i bind it to Loopwhile, it stay at the loop and doesnt finish. Anyone help?

Why not do two calculations and be done with it instead of doing two calculations repeatedly until you get the answer you want?

Hi Jacob
I am not sure what you mean. Can you explain with detail.
(I am new at dynamo)

You know where you point is. You know where your surface is. You want to move the point along an axis until it hits the surface - why not measure the distance between the two (calculation 1) and move the point that distance (calculation 2)? Otherwise you’re moving the point (calculation 1), and checking the distance (calculation 2), and repeating that process n times. Also you may never actually hit the target (imagine if the point was moved 10 units each time, but it was 20.179 units away… it’d never get there).

thanx for tips. I tried but not achieved. however if try to explain my goal it will be better to have a solution.
I want to divide the slab into some pieces like at the right picture. I aim to place reinforcements then.
I thougt extending points to edge surface (It can exceed the boundry line. no problem if i can divide the slab with new line)

Actually I created lines at the points and extended along the x axis and diveded the slab into pieces . but it was not a good solution because i obtained some pieces that i dont want.(last pic)
How sould i continue to obtain the pieces of surfaces?

I’d convert the points (which are already on the surface) into lines that are twice as long as the shape could be (use the size of the bounding box to determine this), and center said line on the point. Then use those lines to intersect with the base surface.

thanx Jacob. it works. i add some other rules to generalize for other shapes.

1 Like