I’m working on writing 3dm files from scratch using the File3dm class. I can add geometry to the file and write it without problems. When I open the file, however, I find that the views do not show the geometry because their camera’s (I guess) are not oriented correctly.
I found that I can do
File3dm f = new File3dm(); // add geometry double angle = Math.PI/6; BoundingBox boundingBox; // defined from the geometry foreach(ViewInfo vi in f.Views) vi.Extents(angle, boundingbox)
But, when debugging this it appears that the Views table is empty. Well, no problem, I’ll add some views to it, for instance by copying from the current RhinoDoc.
This is where I run into problems though.
- The RhinoDoc does not seem to use ViewInfo anywhere that is useful (only in NamedViews which is empty in the RhinoDoc)
- I can’t instantiate ViewInfo because the constructor is not publicly accessible.
Any help on understanding the use of ViewInfo is highly appreciated. The final goal is to write a 3dm file from scratch and have the views correctly display the content upon opening.