This is a collection of scripts to convert from and to the dxf (Drawing Exchange Format) file format and dotbim file format :
- Converting dotbim files to dxf :
- The dotbim geometry is exported in the dxf file using MESH entities (most lightweight entity type for 3D in dxf)
- Entities are exported in BLOCKs
- Entities that use the same dotbim mesh id will reference the same BLOCK
- Entities color will be exported as the BLOCK BYOBJECT true color
- Entities transparency will be exported as the BLOCK BYOBJECT transparency
- Entities properties are exported using BLOCK attributes
- File properties are copied to the dxf header custom variables
- Entities are placed in a layer corresponding to their type
- DXF file is exported in the same folder as the dotbim file
- Converting dxf files to dotbim :
- Only type of supported geometry is dxf MESH
- Only geometry that is placed in the first level of a block is exported
- Top level BLOCKs BYOBJECT true color and transparency are exported
- Block attributes are exported as entity properties
- DXF header custom vars are exported as file info properties
- dotbim file is exported in the same folder as the dotbim file
Important : Make sure you installed both dotbimpy
and ezdxf
modules and all their dependencies in your local python environment.
After installing python and adding pip to the PATH system variables, you can install a new module by opening a system console and typing :
pip install dotbimpy
and
pip install ezdxf
The example file contains geometry for a house :