Closing/triangulating an outline?

Scripting in Blender with Python, and working on the API

Moderators: jesterKing, stiv

mmelo
Posts: 17
Joined: Sun Oct 20, 2002 11:20 pm
Contact:

Closing/triangulating an outline?

Postby mmelo » Fri Oct 25, 2002 12:18 am

Hi,

I have a few outlines that I imported into blender via python. Basically they are made up of vertices connected by edges, that are cyclic (i.e. closed). If I extrude them, I'm able to create a cylinder'oid with the outline and that works great.

But what I need is to be able to cap the solid, i.e. close the top and/or bottom of the object. Now if the outlines were convex I just needed to extrude once again, scale the last extruded points to zero, remove duplicates and that would be it. Obviously this does not work on a concave outline as you get triangles covering the holes.

I read that you cannot create curves from Python, so I can't go via there. So is there a way to automatically triangulate an outline (which is, in blender terms, a mesh)? Does anyone maybe have a script that does that?

Please let me know...

Thanks in advance,


Miguel

Anthony
Posts: 16
Joined: Fri Oct 25, 2002 5:14 am

Postby Anthony » Fri Oct 25, 2002 5:27 am

I have python code to triangulate an n-sided convex polygon, but I don't think it will help you.

Why don't you just select your concave mesh outline, enter edit mode, and press shift-f? Then alt-f a few times to make it look better.

__
http://ourworld.compuserve.com/homepages/scorpius

mmelo
Posts: 17
Joined: Sun Oct 20, 2002 11:20 pm
Contact:

Postby mmelo » Fri Oct 25, 2002 11:07 am

Anthony wrote:I have python code to triangulate an n-sided convex polygon, but I don't think it will help you.

Why don't you just select your concave mesh outline, enter edit mode, and press shift-f? Then alt-f a few times to make it look better.

__
http://ourworld.compuserve.com/homepages/scorpius


Well, as the other guy said "slap me with a trout"! I didn't know you could do that in Blender! I don't have my specific outlines here, but I knocked one together and it seems that this is just what I need!

Thanks a lot,


Miguel

Anthony
Posts: 16
Joined: Fri Oct 25, 2002 5:14 am

Postby Anthony » Wed Oct 30, 2002 5:13 am

By the way, what outlines are you importing? Adobe Illustrator? I'd be curious to have a look at your script.


Return to “Python”

Who is online

Users browsing this forum: No registered users and 1 guest