Hello,
I would like to ask few “maybe simple” questins, which I am not sure of the answers. Recently, I deal with task of generating .3dm files from inside of the Rhino/Grasshopper.
I was able to do so (and I am absolutely ok with this approach, but want to know more) using var doc = Rhino.RhinoDoc.CreateHeadless(null)
, add staff into it and save it as .3dm file.
However, I came across Rhino.FileIO.File3dm
class and tried it. It seems to work in similar way when .3dm file needs to be created and stuff added. However, if I put my methods under unit tests with Rhino.Testing
library I got errors. First, Visual studio missed .pdb file for opennurbs.dll. I was able to solve this based on this OpenNURBS Debug Symbols - Rhino 7 SDK - openNURBS - McNeel Forum topic.
However, it solves problem only for creating .3dm file and adding layers, linetypes, dimstyles and settings. If I add geometry Visual studio raise another error that opennurbs_wstring.cpp file cannot be found.
So my the question is, what are the differences between Rhino.FileIO.File3dm
and Rhino.RhinoDoc
approach when I am creating .3dm file and which is better?
As I understand it Rhino.FileIO.File3dm
class can be used outside Rhino and with Rhino.Compute. It is also somehow connected to opennurbs library and Visual Studio has a problem with it during debugging and testing. Am I wrong?
Thanks for reply and your time.
Ondrej