Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 4125

Rhino8 Export Dwg

$
0
0

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)


1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 4125

Trending Articles