aila
March 19, 2024, 12:18am
1
Hi, i would like to export a mesh to a 3mf file from grasshopper without baking it.
Would that be doable?
I don’t see any options in the RhinoCommon API for 3MF FileWriteOptions
I was able to do export to STL with a c# script however i would rather use the 3MF as it’s much lighter
Thanks in advance!
1 Like
I too would like to have the ability to export 3MF files directly from Grasshopper. This file format is already a 3D printing industry standard, so it is worth supporting.
For those who want to export .STL files directly from GH without scripting, the Pancake plugin provides this capability.
Hello
yes it is possible in Rhino 8
in theory it’s possible (also) in a custom script using the export function
so you need to create a new RhinoDoc, add the geometry you need to that new doc, and use the export function on that doc to write the file
the inputs could be something like
gemetry (mesh)
filePath (string)
write (button)
and no output is necessary. perhaps a printout if the file write is successful
stevebaer
(Steve Baer)
March 31, 2024, 5:31pm
5
Do the same thing for 3mf in your script. Use the RhinoDoc.Export function for this
scottd
(Scott Davidson)
April 1, 2024, 1:10am
6
Here is a thread on this. We had to add 3mf support:
We just implemented a build that this might work. The code looks like this:
#! python3
import math
import System
import System.Collections.Generic
import Rhino
import scriptcontext
import Rhino
import os
if scriptcontext.doc is not None:
options = Rhino.FileIO.File3mfWriteOptions()
options.Title = "2578R"
options.Designer = "MyDesign"
options.MoveOutputToPositiveXYZOctant = True;
options_dictionary = options.ToDictionary()
#Get the filename to create
filter = "3M…
3 Likes