Import .DXF C# - Rhino 7 bug

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)

Hi Felipe -
I’m afraid that your description of this problem threw me off completely…
This doesn’t have anything to do with either the new Headless method or C#.

It appears that justification in the Rhino 7 WIP doesn’t work correctly, yes, and I have filed this as RH-58478.
Thanks for reporting,
-wim

1 Like

Thank you @wim! I’m sorry for the confusion.

Is it possible to add CreateHeadless in Rhino6 updates?

F

Hi Felipe -

No, all the development work that is being carried out around Inside/Compute/Rhino3dm is only for Rhino 7.
-wim

1 Like

Cool, thank you!