Variable offset

As a design script function.

def unEqOffset (pgn,dst:var[]..[])
{
	crv = List.ShiftIndices(pgn.Explode().Offset(dst),[1,0]);
	cr1 = crv[0].ExtendEnd(crv[0].Length*10);
	cr2 = crv[1].ExtendStart(crv[1].Length*10);
	pnt = List.Flatten(cr1.Intersect(cr2),-1);
	return Polygon.ByPoints(pnt);
};

UnequalOffset.dyn (8.9 KB)

3 Likes