Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 5823

Extrusion of surface on curve with orientation

$
0
0

I want to extrude a plane surface on a curve in python. But the orientation of the extruded object is always the same and does not follow the curve. Can someone help me?

# -*- encoding: utf-8 -*-
import rhinoscriptsyntax as rs
import math
# delete all
objs = rs.AllObjects()
for obj in objs: 
   rs.DeleteObject(obj)
L=5;
surface = rs.AddSrfPt([(0,0,0), (L,0,0), (L,L,0), (0,L,0)])
radius=10;
n=20
m=3;
myLine=[]
for i in range(0,m*n):
    myLine.append((i*1,radius*math.sin(i/n*2.0*math.pi),radius*math.cos(i/n*2.0*math.pi)))

curve = rs.AddPolyline(myLine)
obj = rs.ExtrudeSurface(surface,curve,True)
rs.DeleteObject(curve)

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 5823

Trending Articles