[Sidefx-houdini-list] geo.points() - what is it actually doing?

Rob Pieké rob-p at moving-picture.com
Wed Jun 11 12:37:58 EDT 2008


In a Python SOP, I was naively adding vertices by:

for i in xrange( XXXXX ) :
   poly = geo.createPolygon()
   for j in xrange( XXXXX ) :
     vert = poly.addVertex( geo.points()[ XXXXX ] )

This works, but it seemed like the computation time grew exponentially 
(a 1500 poly model took ~2 minutes to compute). By moving geo.points() 
outside the loop, the 1500 poly model now takes less than 1 second.

geoPts = geo.points()
for i in xrange( XXXXX ) :
   poly = geo.createPolygon()
   for j in xrange( XXXXX ) :
     vert = poly.addVertex( geoPts[ XXXXX ] )

Sooooo ... what is geo.points() actually doing? :)

Cheers!



More information about the Sidefx-houdini-list mailing list