# Curve offset

Hi all,

I have a series of points and curves extracted from revit site boundary. I want to essentially create an offset for all edges, but have the freedom to set these offsets at different distances. Through the site boundary information we can extract the start and end points then create vector by two points to give a clockwise direction however as soon as you offset the curve created from line.bystartpoint the direction is never consistent. If anyone has any ideas to why or how please share!

Hi Frank,

You need to join those curves before you offset them using â€śPolycurve.ByJoinedCurvesâ€ť.

2 Likes

That only allows u to offset by 1 distance, i want to have different offsets for the different edges of the element

A simple way to solve this is by creating new points at each corner using the Point.ByCartesianCoordinates() node. Use the X and Y coordinate to perform the offset then create a polygon. Youâ€™ll need to specify each corners coordinates explicitly so it wont be very parametric. If you need a solution that can work on any type of shape, then its safe to say the only way to go is coding due to the myriad of possible conditions: 1. Offset directions, 2. Corners, 3. Inverted corners, 4. Extending lines, 5. Trimming lines, etc, etc.

EDIT:
@Kulkul suggestion could form a key part of a coded solution (could possibly be solved using visual programming, but for complex problems, coding makes life a lot easier):

Create vectors by two points from the corners of the existing shape to the corners of the offset shape. Sticking with the solution using points, the dot product can then be used to determine if the XY coordinates at each corner are any one of the four possible conditions: {+X, +Y} or {+X, -Y} or {-X, +Y} or {-X, -Y}

1 Like

You could construct some vectors and use Geometry.Translate.

1 Like

Springs has a few nodes that can help:

3 Likes