Repository navigation
DWG/DXF: 3D solids (ACIS/SAT data) cannot be imported or exported #34011
linghengqian
started this conversation in
Discussions that will turn in to issues but need refining
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Problem description
FreeCAD cannot import or export 3D solids stored in DWG and DXF files. In these formats a 3DSOLID/REGION/BODY entity keeps its geometry in a binary ACIS/SAT blob, which FreeCAD cannot read. Opening such a file loses the solids; only plain 2D/wireframe entities arrive. Export has the mirror problem: solids are written only as edges (C++ exporter, R14) or as flattened 2D views (legacy exporter, R12).
DWG adds a second limitation: it can only be opened through an external converter ( https://github.com/LibreDWG/libredwg or the ODA File Converter) that turns it into DXF first, and the documentation states that only 2D geometry is supported. https://github.com/LibreDWG/libredwg 's conversion leaves the ACIS blobs untouched in the DXF, so converting does not help.
Impact: DWG files with 3D solids received from AutoCAD or other DWG-based CAD users cannot be used in FreeCAD. The documented workarounds are a proprietary application that exports STEP, or the paid CAD Exchanger add-on.
Since then, https://github.com/LibreDWG/libredwg 's NEWS lists fixes to 3DSOLID/REGION SAT block decoding and the library has Python bindings, and https://github.com/HakanSeven12/OpenCADStudio (GPL-3.0, so a behavioural reference only) renders 3DSOLID/REGION/BODY entities from DWG by tessellating them. A reduced-scope first step, such as importing the solids as meshes, may be worth investigating.
Workbench affected?
Mod: CoreandFile format: DXFSteps to reproduce
Expected behavior
The solid is imported as a FreeCAD shape (ideally an editable solid; a mesh if that is the only feasible first step), and 3D solids can be written back to DXF/DWG.
Actual behavior
The solid does not appear. According to the documentation ( https://wiki.freecad.org/Draft_DXF ), FreeCAD cannot read the ACIS/SAT data, so only the 2D/wireframe entities of the file are imported. Export writes only edges or flattened 2D views.
Development version About Info (in Safe Mode)
N/A. Documentation consulted: https://wiki.freecad.org/Draft_DXF and https://wiki.freecad.org/FreeCAD_and_DWG_Import
Last known good version (optional)
N/A
All reactions