Hey guys,
Rhino 7 provides new method called Headless to create a new RhinoDoc, by the way brilliant!
In order to import a .dxf inside rhino using C#:
if (run)
{
using( var doc = Rhino.RhinoDoc.CreateHeadless(null) )
{
doc.Import(path);
var geometryList = new System.Collections.Generic.List<GeometryBase>();
var names = new System.Collections.Generic.List<string>();
foreach(var obj in doc.Objects)
{
geometryList.Add(obj.Geometry.Duplicate());
var layer = doc.Layers[obj.Attributes.LayerIndex];
names.Add(layer.FullPath);
}
geometry = geometryList;
layerNames = names;
}
}
Working great importing geometry, but using 3D Text Tag is not working properly, the text don’t follow its justification. Seems point is not correctly located.
Is it a bug because of WIP or something else?
Thank you!
F
ImportC#.3dm (38.8 KB)
ImportC#.gh (9.6 KB)
TestFile.dxf (117.4 KB)