DXF is a text description of a drawing: entities (lines, polylines, arcs, circles, text) grouped into layers, plus a header that may or may not declare units. It was designed for exchanging drawings between CAD programs, not for describing buildings, so there is no "wall" entity; there are only lines that a person drew where walls are. Turning a DXF into a walkable 3D model is therefore an inference problem, and the quality of the result depends mostly on how disciplined the drawing is.
What is in the file
A DXF has sections. HEADER holds variables such as the unit code and the drawing extents. TABLES lists the layers with their names, colours and line types. ENTITIES holds the geometry: each entity has a type, a layer, coordinates and a handful of properties. BLOCKS holds reusable symbols such as door swings and furniture, inserted into the drawing as INSERT entities with a position, scale and rotation. A converter reads all four: the header for units, the tables for layer roles, blocks to expand symbols, and entities for the geometry itself.
Units first
If the header declares units (the INSUNITS variable), trust it. If not, guess from the extents: a drawing 12,000 wide is in millimetres, one 12 wide is in metres, one 40 wide is probably in feet. Always show the guess so that the person can correct it; a plan converted at the wrong scale produces walls three metres thick or three millimetres thick, and both look like bugs in the converter rather than a units problem.
Walls
Architectural drawings draw walls as pairs of parallel lines. Find parallel pairs within a plausible thickness range (10–40 cm after unit conversion), merge them into thick wall segments, and close the corners where segments meet. Single lines on the wall layer become thin walls, which is right for partitions and glass. Polylines with width are already walls and convert directly. Arcs on the wall layer become curved walls, sampled into segments.
Wall height is not in the drawing. A default of 2.7 or 3 metres is reasonable; the converter should expose it per plan, and a multi-storey building needs it per floor.
Doors and windows
Doors are an arc plus a leaf line, usually on their own layer or inserted as a block. Windows are short parallel pairs inside a wall, often on a window layer. Both are cut out of the wall and rebuilt as framed openings: a door becomes a gap to the floor with a frame, a window becomes a gap with a sill height and a head height. Sill and head heights are not in the drawing either; defaults of 0.9 and 2.1 metres are standard and should be adjustable.
Rooms
Closed regions bounded by walls are rooms, and the text entities inside them are their names. Area and perimeter come for free once the regions are found. Room detection fails when walls do not quite meet; a tolerance of a few centimetres closes most gaps, and the converter should report regions it could not close so the person can fix the drawing.
Layers decide quality
Everything above relies on layer roles. Names such as WALL, A-WALL, DOOR, WINDOW, TEXT or their local-language equivalents map automatically; unusual names need a manual role assignment. A layer editor in the viewer lets the person reassign roles and rebuild instantly, which is far faster than fixing the drawing in CAD. A drawing with everything on layer 0 can still convert, but the converter has to guess roles from geometry alone, and the result needs more correction.
Preparing a drawing that converts cleanly
- Declare units in the header, or draw in millimetres and say so.
- One layer per role: walls, doors, windows, room names, furniture, dimensions. Keep dimensions and hatching off the wall layer.
- Close wall corners; snap endpoints.
- Use blocks for doors and windows so they are recognisable as symbols.
- Put one text entity per room, inside the room.
- Export as DXF R2010 or later in ASCII; binary DXF and very old versions confuse parsers.
Multiple floors
Keep each floor as a separate plan in one project, ordered by floor index. Stacking them into one building needs a consistent origin across drawings, which is drawing discipline rather than a software trick: draw every floor with the same corner at the same coordinates. Stair openings and double-height spaces are the hard cases and usually need a manual note.
Frequently asked
Does the converter handle furniture? Furniture blocks are recognised as symbols and placed as simple boxes at the right footprint. Detailed furniture models are out of scope for a plan converter.
What about PDF or image plans? They contain no geometry. They have to be traced or vectorised first, which is a different and less reliable process. DXF from the original CAD file is always better.
Why do some walls come out double thickness? Two overlapping wall pairs, usually from a drawing where a wall was redrawn without deleting the old one. Merge tolerance handles small overlaps; large ones need the drawing cleaned.
