[Bf-python] Another Mesh question
Ken Hughes
khughes at pacific.edu
Sat Mar 4 00:22:53 CET 2006
Chris Want wrote:
> Willian Padovani Germano wrote:
>
>> Guess we can favor both speed and consistency, at least regarding
>> parts I know better in the API. There is a good reason to have pverts,
>> pfaces, etc. but much probably not for things they contain (aka
>> properties), like mcols.
>
> Speaking of speed, I'm actually getting really terrible
> speed using me.faces.extend([v1,v2,v3]) to create a mesh
> with about 17,000 faces. It takes around 8 minutes. When
> the script was using NMesh it only took a few seconds.
Don't add the faces one at a time; add them all at once.
newFaces=[]
for i in whateverYouIterateOn:
newFaces.extend([v1,v2,v3])
me.faces.extend(newFaces)
Ken
More information about the Bf-python
mailing list