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.
The code
Public, no email needed. Read it, fork it, run it, break it.
walls_to_vectors.pyThe nine steps, from the wall-evidence grid to a DXF read back from disk.visualize.pyThe stepped 3D replay, one Open3D window per stage.sweeps.pyThe split, closing and merge sweeps, and the stability runs (rerun, shuffled, moved, rounded, rotated).tests/test_walls_to_vectors.pySeventeen pytest checks on synthetic rooms with known answers (python -m pytest tests -q).run.batWindows double-click runner, pipeline then replay.
The data and the reference output
Too big to paste out of an article, so tell me where to send them.
classroom_scene.plyThe classified classroom, 1,422,440 points with colour and a scalar_semantic_label field, 27 MB.floor_plan.dxfThe drawing in metres, six layers, evidence on every wall, the file your run should reproduce. 55 kB.metrics.jsonEvery 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.
Here they are
Yours to keep. Run the pipeline on this scene first to reproduce every number in the article, then point it at something of your own.
The same links are in your inbox. If nothing arrives, check spam, then mail me and I will send them by hand.
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.
See the book or buy it on O’ReillyThese 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/.