Offsetting curve in a random direction

hello, I have set of curves that I would like to offset towards the ‘outside’. However I’m not sure how to control it.

thank you! script is attached below



curve out.dyn (72.4 KB)

Hi @mrkpkimEMSRM,

Your explanation I think is a little bit vague. What do you mean “outside”? Away from a specific point? If its away from a specific point, can you define it? A little bit more explanation is helpful.
Thanks.

I’m trying to offset mid points of each rectangles towards inside (where the blue point is).
However, the offset happening on the long rectangle is keep going outward or the other side.

this is the script that i used

You can either reverse the direction of the vector OR multiply the distance with -1.

thank you - but wouldnt that apply to everything? including the points that have been offsetted in a correct direction? Is there a way where ddynamo can find out the ones that are incorrect and change the vector?

Yes, it would apply to everything. So the direction has to be reversed based on an IF condition.

Dynamo is not there yet. So it won’t be able to identify the incorrect ones by itself.

You would probably have to find a pattern or logic to find the incorrect ones and then translate that logic into nodes for Dynamo!