3D Geodata Academy

All article materials Article materials

Scan to floor plan, from wall pixels to a DXF

The wall class of a 1.4 million point classroom scan becomes a layered DXF in metres: four walls snapped onto their own points, one flagged as assumed, a 55.42 m2 room and its dimensions. Seventeen tests with known answers, 0.4 seconds on a CPU.

Runs on Python 3.10, numpy, scipy, scikit-image, shapely, ezdxf, pytest for the tests, and open3d for the 3D replay.

Open

The code

Public, no email needed. Read it, fork it, run it, break it.

  • walls_to_vectors.py The nine steps, from the wall-evidence grid to a DXF read back from disk.
  • visualize.py The stepped 3D replay, one Open3D window per stage.
  • sweeps.py The split, closing and merge sweeps, and the stability runs (rerun, shuffled, moved, rounded, rotated).
  • tests/test_walls_to_vectors.py Seventeen pytest checks on synthetic rooms with known answers (python -m pytest tests -q).
  • run.bat Windows double-click runner, pipeline then replay.
View on GitHub
Email

The data and the reference output

Too big to paste out of an article, so tell me where to send them.

  • classroom_scene.ply The classified classroom, 1,422,440 points with colour and a scalar_semantic_label field, 27 MB.
  • floor_plan.dxf The drawing in metres, six layers, evidence on every wall, the file your run should reproduce. 55 kB.
  • metrics.json Every number the article quotes, step by step.

Data: The classroom scan is the example scene that ships with Neurones 3D, classified into seven classes (created in CloudCompare, November 2025).

Where should I send them?

One email, and the download links appear right here. You also get them in your inbox so you can come back to this any time.

Cover of 3D Data Science with Python by Dr. Florent Poux
Go deeper

3D Data Science with Python

Building Accurate Digital Environments with 3D Point Cloud Workflows

This kit is one pipeline. The book is the discipline underneath them: 690 pages from the Python foundations through point cloud processing, meshing and the engineering that keeps a 3D workflow standing up in production. If the script above makes sense and you want the structure they came from, that is where it lives.

O’Reilly Media, 2025 · ISBN 9781098161330 · 15,000+ readers

See the book or buy it on O’Reilly
Dr. Florent Poux

Dr. Florent Poux

Founder and Lead Instructor at the 3D Geodata Academy. 15+ years on the automation of reality capture, from point clouds and photogrammetry to spatial AI, and 1,700+ citations across 60+ peer-reviewed publications.

These are the materials for Scan to floor plan, from wall pixels to a DXF, one of the tutorials I publish on Medium and on learngeodata.eu. Every kit lives at learngeodata.eu/materials/.

Scroll to Top