Rhino8 Export Dwg

I have found an issue where even if I set the DWG file to be exported as a solid, when I select the Rhino Space solid, the exported object is still a line segment. However, when I set it as a mesh, everything is normal; I’m not sure if this is a new bug, can you help me check my Python code? May I have overlooked something?

import Rhino
import scriptcontext as sc

import os


temp_doc = Rhino.RhinoDoc.CreateHeadless(None)
wait_export_file = Rhino.FileIO.File3dm.Read(Import_File)

for obj in wait_export_file.Objects:
    temp_doc.Objects.Add(obj.Geometry)


file_name, file_extension = os.path.splitext(Import_File)
output_filepath = file_name + '.dwg'



options = Rhino.FileIO.FileDwgWriteOptions()

options.Version = Rhino.FileIO.FileDwgWriteOptions.AutocadVersion.Acad2007
options.Flatten = 0

options.ExportSurfacesAs = Rhino.FileIO.FileDwgWriteOptions.ExportSurfaceMode.Solids
options.ExportMeshesAs = Rhino.FileIO.FileDwgWriteOptions.ExportMeshMode.Meshes



Rhino.FileIO.FileDwg.Write(output_filepath, temp_doc, options)


Hi Niko,

I think there is a bug. I’m looking into it now.

Tim

A fix is in the works. See https://mcneel.myjetbrains.com/youtrack/issue/RH-84634 to track progress.

Hi Tim! I’m thrilled to be part of the code repair process and to see the progress being made. Could you let me know approximately when we can expect the latest Rhino 8 version for our follow-up code testing?

Hi Niko -

RH-84634 is currently “Needs Testing” with a fix in 8.14. Rhino 8.13 should become the stable Service Release next week, at which point a first release candidate of 8.14 will also become publicly available.
-wim

Hi Niko & Wim,

Because the change was trivial, and I was very confident in it, I actually merged it into 8.13. I plan on testing it today. So, unless there are issues (seriously doubt there will be), it should be in the build released this coming Tuesday, November 12, 2024.

Tim

RH-84634 is fixed in Rhino 8 Service Release 13