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

Simon Barrick simon at primalpictures.com
Wed Jun 11 12:35:09 EDT 2008


I imagine its returning an array of every point in the model. Probably a slow thing to process. Doing it once and cacheing it makes sense.

-----Original Message-----
From: sidefx-houdini-list-bounces at sidefx.com [mailto:sidefx-houdini-list-bounces at sidefx.com] On Behalf Of Rob Pieké
Sent: 11 June 2008 17:38
To: sidefx-houdini-list at sidefx.com
Subject: [Sidefx-houdini-list] geo.points() - what is it actually doing?


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!
_______________________________________________
Sidefx-houdini-list mailing list
Sidefx-houdini-list at sidefx.com https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list

______________________________________________________________________
This communication is from Primal Pictures Ltd., a company registered in England and Wales with registration No. 02622298 and registered office: 4th Floor, Tennyson House, 159-165 Great Portland Street, London, W1W 5PA, UK. VAT registration No. 648874577.

This e-mail is confidential and may be privileged. It may be read, copied and used only by the intended recipient. If you have received it in error, please contact the sender immediately by return e-mail or by telephoning +44(0)20 7637 1010. Please then delete the e-mail and do not disclose its contents to any person.
This email has been scanned for Primal Pictures by the MessageLabs Email Security System.
______________________________________________________________________



More information about the Sidefx-houdini-list mailing list