Grasshopper

algorithmic modeling for Rhino

I am trying to save a surface from a brep as an .STL file through a Python script, using the following command:

rs.Command("-Export " + Directory\Filename + ".stl")

Unfortunately it doesn't work - where can I find the documentation of the correct syntax for the "-Export" command?

Any suggestions for a better way forwards?

Views: 2215

Replies to This Discussion

Wait

is this surface a GH object or a rhino object?

Its a rhino object

Hmm,

I have't used this command before. 

I have a standar routine for exporting things automatically from GH.

I've tweaked this to export .stl. 

Have a look this might be helpfull.

Ta,

M

Attachments:

Thanks a lot Marios!

This was the syntax I was looking for:

"-_Export\n\"" + savename + "\"\n _Enter\n _Enter"

I attached the python version, the only other nice thing would now be to include the Rhino file name directly into the script - didn't find out yet how to do that using Python.

Attachments:

And the geometry selection is also missing, right now it just does "-SelAll"

Glad it helped

Best,

M

Thanks Tom, I need a mesh from a surface - therefor STL is what I need.

Not Nothing, It does export a triangulated mesh.

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service