Hi,
Just wondering if there’s an equivalent node in Dynamo for “Dash Pattern” in grasshopper?
The intent is to try and create a repeating line pattern of varying lengths with constant gaps in between ie -
[1m solid curve] [0.5m gap] [2m solid curve] [0.5m gap]… (Screengrab attached is of randomised lengths of solid curves)
Thanks,
@Chin_Tan You can script your own functionality in Dynamo quite conveniently
Note: Below is a quick example, could be refined to work better
l1 = Line.ByStartPointDirectionLength(Point.Origin(),Vector.XAxis(),len);
l2 = l1.Translate(Vector.YAxis(),0..#num..spc);
d1 = Math.Ceiling((Math.RandomList(num)*10)+4);
d2 = Math.Round(Math.RemapRange(List.Sort(Math.RandomList(d1)),(gap/len)*3,1),3);
l3 = l2.SplitByParameter(d2);
l4 = List.DropItems(l3<1>,-1);
l5 = List.LastItem(l3<1>);
l6 = List.AddItemToEnd(l5,l4.ExtendEnd(-gap));
1 Like
Thanks Vikram, that is really cool!
1 Like