algorithmic modeling for Rhino

Seeking help for py script to export Obj sequnces from gh animation.Have tried Vb and Centipede plugin available on forum and they didn't work. TIA.

import rhinoscriptsyntax as rs

def ExportObjSequqnce():
"Export obj files "

if not : return

# specify a path

filename = rs.SaveFileName("Save obj As")
if not filename: return

file = open( filename, "w" )
for pt in points:

file.write( ", " )


if( __name__ == "__main__" ):

Views: 1272

Replies to This Discussion

Hi Shridhar

what is the problem with Rhino's command?

You could bake all objects, then call the Rhino command. Does it makes sense?

Giulio Piacentino
for Robert McNeel & Associates

HI,Guilio i want a huge sequence of obj to use them directly for complex animations. and alos i m not good using python yet :D.

Maybe i can figure out to write just one obj exporting script but not a sequence. 

You could definitely write the OBJ file on your own (it's a good programming lesson, not terrible but requires some thinking) but also, you could use the FileObj.Write() method to write the contents of the document to a file. Of course, this would mean that you'd need to bake first. 

There are also several threads regarding this:

Also, there are several add-ons that can save to OBJ, including Turtle and Centipede.

I hope this helps getting started,

Giulio Piacentino
for Robert McNeel & Associates

Thank u Giulio .






  • Add Photos
  • View All


  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service