Spaces:
Sleeping

File size: 2,997 Bytes
a84b04f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d9daf16
 
a84b04f
d9daf16
a84b04f
d9daf16
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
# workflow/structural_extractors.py

# ==========================================
# SUBSTRUCTURE (Foundations & Tie Beams)
# ==========================================

FOUNDATION_DIMS_PROMPT = """You are reading a FOUNDATION / FOOTING plan of a UAE villa.
Extract ONLY the overall building boundary dimensions (ALL in METRES):
- "longest_length": building footprint overall longest length (m)
- "longest_width":  building footprint overall width (m)
Return ONLY this JSON:
{"longest_length":null,"longest_width":null,"confidence":"high|medium|low","notes":""}"""

FOOTING_SCHEDULE_PROMPT = """You are reading a SCHEDULE OF FOOTINGS of a UAE villa.
The "footings" list is MANDATORY — read every row of the table.
Extract (ALL dimensions in METRES):
- "footings": one object per footing TYPE (F1, F2, CF1 …):
    {"mark":"F1","width":<m>,"length":<m>,"depth":<m>,"count":<how many>}
Return ONLY this JSON:
{"footings":[{"mark":"F1","width":1.5,"length":1.5,"depth":0.5,"count":4}],
 "confidence":"high|medium|low","notes":""}"""

TB_SCHEDULE_PROMPT = """You are reading a TIE BEAM (ground beam) schedule of a UAE villa.
Extract ONLY the typical dimensions (ALL in METRES):
- "tb_width": typical tie-beam width
- "tb_depth": typical tie-beam depth
Return ONLY this JSON:
{"tb_width":0.30,"tb_depth":0.60,"confidence":"high|medium|low","notes":""}"""

TB_AREA_PROMPT = """You are reading a TIE BEAM plan of a UAE villa.
Extract (ALL in METRES):
- "ext_perimeter": external building perimeter (m)
- "gf_area": ground-floor built-up area (m²)
Return ONLY this JSON:
{"ext_perimeter":null,"gf_area":null,"confidence":"high|medium|low","notes":""}"""

# ==========================================
# SUPERSTRUCTURE (Slabs, Beams)
# ==========================================

SLAB_AREA_PROMPT = """You are reading a SLAB framing plan of a UAE villa.
Extract ONLY the slab dimensions (ALL in METRES):
- "slab_area": slab area (m²)
- "slab_thickness": slab thickness (m, e.g. 0.20)
Return ONLY this JSON:
{"slab_area":null,"slab_thickness":0.20,"confidence":"high|medium|low","notes":""}"""

ROOF_SLAB_AREA_PROMPT = """You are reading a ROOF SLAB framing plan of a UAE villa.
Extract ONLY the roof slab dimensions (ALL in METRES):
- "slab_area": total roof slab area (m²)
- "slab_thickness": slab thickness (m, e.g. 0.20)
- "roof_perimeter": external perimeter of the roof slab (m) — for parapet calculation
Return ONLY this JSON:
{"slab_area":null,"slab_thickness":0.20,"roof_perimeter":null,"confidence":"high|medium|low","notes":""}"""

BEAM_SCHEDULE_PROMPT = """You are reading a BEAM plan and schedule of a UAE villa.
Extract ONLY the beam types, their section dimensions, AND their estimated total lengths from the plan (ALL in METRES):
- "beams": one object per beam TYPE:
    {"mark":"B1","width":<m>,"depth":<m>,"length":<total_length_of_all_segments_m>}
Return ONLY this JSON:
{"beams":[{"mark":"B1","width":0.20,"depth":0.60,"length":35.5}],"confidence":"high|medium|low","notes":""}"""