This release is a pre-release and may not be stable for production use.
plangeom
Reads construction floor plans from vector PDFs by geometry alone and writes a checked JSON description. No model training.
pip install plangeom
plangeom plan.pdf --page 0 -o sheet.json
from plangeom import parse_page
sheet = parse_page("plan.pdf", 0)
print(sheet["verdict"], sheet["scale"]["mm_per_pt"], len(sheet["doors"]))
A whole set of drawings, one PDF or several volumes of a project:
plangeom ar.pdf kr.pdf --all -o building.json
from plangeom import parse_document
result = parse_document(["ar.pdf", "kr.pdf"], workers=4)
for building in result["buildings"]:
print(building["parts_named"], building["floors"]["storey_m"], len(building["sheets"]))
What it does
- Scale from the axis grid. Axes are found as circles of paper-fixed size with a long line through the centre. Values printed between axes give millimetres. With no text, axis spacing as multiples of a building module does, with door leaves and round wall thickness settling the harmonic.
- Walls from filled bodies, thickness from opposite edges, centrelines from parallel edge pairs.
- Materials as clusters of hatch geometry, without reading colour. Clusters have no names until a legend or a person names them.
- Doors as a circular arc plus a radial leaf. The sweep angle is deliberately not a criterion.
- Rooms as exact planar faces where walls close them, a watershed from room tags where they do not, and a clearance watershed when the sheet has no text.
- Repeated symbols by D2 shape distribution and size, confirmed by modified Hausdorff distance.
- Windows and openings as gaps between wall ends, in a belt along the slab edge, looking out.
- Stairs as rows of treads, drawn or painted, with flights, landings and the hole in the slab.
- Fixtures and cars by real sizes and shape; a room's type from its name or from what stands in it.
- Whole sets. Stamps give the section, floor, typical floors and level. Sheets on one axis grid under one name are one building; risers, stair wells and lifts run through its floors, and what a floor could not read is taken from the floors around it and marked as taken. Structural sheets judge the wall roles of architectural ones.
It does not guess silently
Every stroke ends in one row of a ledger. Whatever no rule owns goes to queue. Checks come from the sheet itself: printed values against axes, room areas against the schedule, thickness and door plausibility. A sheet that fails any of them gets "verdict": "needs_review".
Status: alpha
Tested on synthetic drawings in tests/, and by hand on a private corpus of real sheets. Known limits today:
- Most real sheets end as
needs_review: read them with their checks, not as finished models. - Room areas agree with schedules at a median error of 4 to 9 % on real projects, and much worse on garages.
- Stamps are read in Russian.
- The scale from axes without text can land on a harmonic of the true scale.
- Scanned pages are not handled: a page with no vector strokes returns
not_a_vector_drawing. - The plan for services in
plangeom.mepis a first pass with planning defaults, not a design.
Output
JSON Schema: plangeom.schema.SCHEMA. Lengths are millimetres in a sheet frame with y down.
License
No license has been granted yet: all rights reserved.
Metadata
Release files for plangeom 0.1.0a1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| plangeom-0.1.0a1.tar.gz | 94.6 kB | Without provenance | Details for plangeom-0.1.0a1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| plangeom-0.1.0a1-py3-none-any.whl | Python 3 | none | any | Details for plangeom-0.1.0a1-py3-none-any.whl |
Total release size: 185.2 kB
Release files / plangeom-0.1.0a1.tar.gz
| Download URL | plangeom-0.1.0a1.tar.gz |
|---|---|
| Size | 94.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
040f3ac05db0df141c523a146e253e198ac5f48619a623dd06353784ef98f07e
|
|
BLAKE2b-256 checksum How to use checksums |
a074b3168c77534c420a7754244effaf6ead8bb12bb10adf0016c2412a611924
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.2
|
Release files / plangeom-0.1.0a1-py3-none-any.whl
| Download URL | plangeom-0.1.0a1-py3-none-any.whl |
|---|---|
| Size | 90.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c0c8f2e3c91e6b04227619b70959dd76f5bb29c7e1516ba007630c600d64caa3
|
|
BLAKE2b-256 checksum How to use checksums |
27d186d2590124d20f30482e193b7c30f523004d9001580b9ad0cee74f012951
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.2
|
Security for plangeom 0.1.0a1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.