Grasshopper

algorithmic modeling for Rhino

Dear all,

I am trying to export specific geometry generated from grasshopper into a new rhino file.
I am using the Rhino.FileIO class that allows to write rhino files and add geometry to it.

Somehow I don't manage to make it happening. Maybe I am not using the right method.

 I noticed that there is a difference between the type of "Rhino.DocObjects.BrepObject" which is "BrepObject" and the type of a Brep coming from Rhino-Grasshopper, which is "Brep".
I am not sure if this plays a difference once I add the geometry to the created 3dm file.

Let me know if you have any hints.

Thanks in advance

Paul

PS: please find attached the not-working ghpython code!

Views: 707

Attachments:

Replies to This Discussion

Hi Paul,

All you need to do is fix the filepath when you call the function. Be sure to separate directories with two backslashes and include the name of the file at the end. See below for an example that works on my machine.

geometryto3DM(x, "C:\\Users\\smaher\\Desktop\\test.3dm", "hello")

Hope all is well,
/SPM

Just noticed now that you didn't add the filename.extension to the path. Remember to also use double backslashes like so:

"C:\\Users\\adel\\Desktop\\foo.3dm"

Edit: What Stephen said ;)

Thanks to both of you guys!
Stephen, hope everything is good for you too :)

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service