Hi All

I’ve got a surface made by creating a list of cross sections which are lofted to create the surface.

How would I go about closing the ends in a manner that continues the curve of the surface. Not by a flat surface.

Please see dyn file attached.

Thanks in advance.

Curved Form.dyn (124.0 KB)

2 Likes

Curved Form.dyn (15.7 KB)

```
p0 = Point.ByCoordinates([-lw,0,rw,0],[0,d/2,0,-d/2]);
xc = NurbsCurve.ByPoints(p0,true);
p1 = xc.PointAtParameter(List.DropItems(0..1..#11,-1));
p2 = List.Transpose(List.Chop(p1,5));
p3 = List.Insert(p2<1>,Point.ByCoordinates(0,0,th),0);
p4 = List.Insert(p3<1>,Point.ByCoordinates(0,0,-bh),2);
c1 = NurbsCurve.ByPoints(p4,true);
c2 = c1.SplitByPoints(Point.ByCoordinates(0,0,[th,-bh]));
c3 = List.Transpose(c2);
c4 = List.Flatten([c3[0],c3[1].Reverse(),c3[0][0]]);
p5 = c4<1>.PointAtParameter((0..1..#10)<2>);
s1 = NurbsSurface.ByPoints(p5);
```

5 Likes

Thanks so much. A much simpler solution.

I do need to learn how to script like this!

Much appreciated.

1 Like

Another solution (less complicated DesignScript in the codeblock)

pebbleTspine.dyn (67.5 KB)

Adding a mathematical approach …

```
u = 0..360..#50;
v = 0..180..#50;
x = (Math.Cos(u) * Math.Sin(v)<1>) * 1.25;
y = (Math.Sin(u) * Math.Sin(v)<1>) * 1.65;
z = Math.Pow(Math.Cos(0..55..#50),8)*-2+2;
NurbsSurface.ByPoints(Point.ByCoordinates(x,y,z));
```

3 Likes