File size: 2,060 Bytes
8ec6c72 fbca0dd 8ec6c72 fbca0dd 8ec6c72 fbca0dd 8ec6c72 fbca0dd 8ec6c72 fbca0dd 8ec6c72 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 | """
floorplan — Parse floor plan images into structured wall/door/window data,
and generate 3D models from the structured representation.
Architecture:
schema.py — Pydantic data models (Wall, Opening, Room, FloorPlan, Corrections)
geometry.py — Computational geometry (wall polygons, room detection, centerline ops)
renderer.py — SVG + PIL rendering for visual verification and overlay
parser.py — VLM-based parsing with iterative correction loop
reconstruction.py — 3D model generation (extrude walls, cut openings, export GLB/OBJ)
"""
from .schema import (
FloorPlan,
Wall,
Opening,
OpeningType,
DoorSwing,
Point2D,
Room,
RoomLabel,
WallFaceRef,
WallSide,
Correction,
CorrectionAction,
CorrectionResult,
)
from .geometry import (
compute_centerline_length,
interpolate_along_centerline,
normal_at_distance,
wall_to_polygon,
wall_polygon_with_openings,
wall_union,
detect_rooms_from_walls,
build_rooms,
compute_floor_plan_geometry,
)
from .renderer import (
render_floorplan_svg,
render_to_image,
overlay_on_image,
)
from .parser import (
FloorPlanParser,
parse_floorplan,
)
from .reconstruction import (
generate_3d_model,
export_glb,
export_obj,
export_gltf,
)
__version__ = "0.2.0"
__all__ = [
# Schema
"FloorPlan", "Wall", "Opening", "OpeningType", "DoorSwing",
"Point2D", "Room", "RoomLabel", "WallFaceRef", "WallSide",
"Correction", "CorrectionAction", "CorrectionResult",
# Geometry
"compute_centerline_length", "interpolate_along_centerline",
"normal_at_distance", "wall_to_polygon", "wall_polygon_with_openings",
"wall_union", "detect_rooms_from_walls", "build_rooms",
"compute_floor_plan_geometry",
# Renderer
"render_floorplan_svg", "render_to_image", "overlay_on_image",
# Parser
"FloorPlanParser", "parse_floorplan",
# 3D Reconstruction
"generate_3d_model", "export_glb", "export_obj", "export_gltf",
]
|