I am trying to create a coon's patch in blender using scripting. So far, I have made the 4 bezier curves I need to make by reading the coordinates from a text file. Each curve has a start point, end point and two control points. However, in blender all the curves have one end at the world origin, even though I don't think I have added an extra vertex anywhere. The following is what I am stuck with: enter image description here

I have used the following procedure to obtain each curve. I have done this individually for each one since I think it will be easier to interpolate between the opposite curves in the next step towards getting the coon's patch.

polyline1 = curveData1.splines.new('BEZIER')
for i in enumerate(coords1):
   polyline1.bezier_points[0].co = c1[0]
   polyline1.bezier_points[0].handle_right = c1[1]
   polyline1.bezier_points[1].co = c1[2]
   polyline1.bezier_points[1].handle_left = c1[3]

I have followed the above procedure for each of the 4 curves. When I print the coordinate list of each curve, I get only 4 coordinates (which is what I need) and (0,0) is not in any of these.

[[-1.  -1.   0.5]
 [-0.2 -1.   0.8]
 [ 1.  -1.   0. ]
 [ 0.  -1.   0. ]]

Can anyone guide me as to what I might be doing wrong here? I just need the curves to be attached to one another and not have any vertices at the origin. Thanks!



Browse other questions tagged .