Hello everyone
I created a curve by generating points using some equation. After that, I used sweep command because I wanted to create a rectangular section which follows my curve and creates a curvy rectangular object.
In previous discussions, I have seen sweep command and it's usage but I can't seem to do what I want. I'm attaching images below.
This is the curve generated
and using the path i wanted to sweep a rectangle section. But instead of that, it is creating rectangle section at every point.
It will be very helpful if someone can tell what im doing wrong.
Also attaching code below.
for i in range(m): #Left side
angle = 0
xypoints=[]
x1y1points=[]
print(f"i: {i}, c: {c}")
for j in range(c):
new_ang = angle + start
x1 = 52 + R * (np.cos(new_ang+alpha) + (angle) * np.sin(new_ang+alpha))
y1 = 60 + R * (np.sin(new_ang+alpha) - (angle) * np.cos(new_ang+alpha))
angle += 1 * (np.pi/180)
x1y1points.append([x1,y1])
start+=((360/channel) * np.pi/180)#angle increment
c-= int((360/channel))#points reduction
plate = cq.Workplane().polyline(x1y1points)
inv_track = cq.Workplane().rect(1.56,1.2, centered=True).sweep(plate)
body=cq.Workplane().box(200,180,2)
final=body.cut(inv_track)
display(plate)
display(inv_track)
display(body)
display(final)
Basically this swept object will be used to make a cut in main body.