Offset direction?

Hi again,

Im having a major problem with an offset not going in the right direction.  

I imagine it has something to do with the direction in which the plane this offset derives from is drawn (there are some 1200 planes)

here is the basic function and where the problem lies:

the script takes a set of planes, extracts the curve (explode) > derives the edges > joins edges to form closed curve > offset the curve (i want it inside) > planars the two and extrudes up to form a parapet


my problem is the direction of the offsets being randomly in and out of the plane.

is there a better way to do this, im thinking something along the lines of using the box to derive a plane normal to help this thing offset all the same way?

help!

thanks!

chris
  • up

    Vicente Soler

    The offset direction depends on the plane orientation and the direction of the curve. If the surfaces are planar you can extract a frame from the surface and use it as the offset plane for its corresponding curve. Even if the surface is reversed it will offset in the same direction because the curve direction will be reversed too.

    But in case everything else fails you can always offset to both sides using a positive and negative number (it will create a new branch for every curve containing two items) and filter out the longest or shortest curve.
    6
  • up

    Troy McNamara

    Lads I think I got it!

    I know we all love grasshopper but I've solved this issue within Rhino.

    Use the "Flip" Command on the curve and hey presto! Obviously this is also available in grasshopper but my problem was half were one way and half were the other. So it took a little while but now I have a bunch of curves behaving themselves!

    Yay my first helpful Grasshopper post!!!

    1