# aryaan147/antenna-reconstruction architecture

> Architecture diagram of the GitHub repository aryaan147/antenna-reconstruction, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-22). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/aryaan147/antenna-reconstruction
- Repository: https://github.com/aryaan147/antenna-reconstruction

## Overview

Antenna Reconstruction turns research-paper dimensions into traceable antenna geometry and DXF. Its primary workflow ingests a PDF, combines table, prose, and derived parameters, selects a shape template, verifies symbol bindings against paper-stated redundancies, then builds and exports CAD geometry. It also retains an original sentence-level extraction and constraint-solving pipeline. The graph includes major documented capabilities such as derived physics and shape templates; unsampled implementation details are represented only where README or indexed references support them.

Main entry points: [`src/antenna_reconstruction/template_pipeline.py`](https://github.com/aryaan147/antenna-reconstruction/blob/main/src/antenna_reconstruction/template_pipeline.py) (Template pipeline), [`src/antenna_reconstruction/templates/__init__.py`](https://github.com/aryaan147/antenna-reconstruction/blob/main/src/antenna_reconstruction/templates/__init__.py) (Template catalog), [`src/antenna_reconstruction/pipeline.py`](https://github.com/aryaan147/antenna-reconstruction/blob/main/src/antenna_reconstruction/pipeline.py) (Sentence pipeline), [`src/antenna_reconstruction/geometry_extraction/ingestion/pdf.py`](https://github.com/aryaan147/antenna-reconstruction/blob/main/src/antenna_reconstruction/geometry_extraction/ingestion/pdf.py) (PDF reader)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ingest["Paper ingestion"]
  node_pdf["PDF reader<br/>[pdf.py]"]
  node_prose["Prose parameters<br/>[prose.py]"]
  node_wordtables["Word-position tables<br/>[word_tables.py]"]
  node_physics["Derived physics<br/>[physics.py]"]
end

subgraph group_interpret["Geometry interpretation"]
  node_templateflow["Template pipeline"]
  node_binding["Binding verifier<br/>[verifier.py]"]
  node_templates["Template catalog<br/>[__init__.py]"]
  node_templatebase["Template contract<br/>[base.py]"]
  node_hex["Hex-ring template<br/>[hexagonal_ring.py]"]
  node_horse["Horse-shoe template<br/>[horse_shoe.py]"]
  node_shapes["Shape templates<br/>[shapes.py]"]
end

subgraph group_cad["Geometry and CAD"]
  node_primitives["Geometry primitives<br/>[primitives.py]"]
  node_feeds["Feed geometry<br/>[feeds.py]"]
  node_builder["Geometry builder<br/>[builder.py]"]
  node_cadmodel["CAD model<br/>[models.py]"]
  node_dxf["DXF exporter<br/>[dxf.py]"]
end

subgraph group_legacy["Constraint pipeline"]
  node_legacy_pipeline["Sentence pipeline<br/>[pipeline.py]"]
  node_extract_service["Geometry extraction<br/>[service.py]"]
  node_ir["Geometry IR<br/>[models.py]"]
  node_coordinate_service["Coordinate resolver<br/>[service.py]"]
  node_solver["Constraint solver<br/>[solver.py]"]
  node_resolved["Resolved geometry<br/>[models.py]"]
  node_legacycad["CAD service<br/>[service.py]"]
end

node_researcher(("Engineer / user"))
node_dxf_file["DXF file"]

node_researcher -->|"submits PDF"| node_templateflow
node_templateflow -->|"extracts parameters"| node_pdf
node_pdf -->|"parses prose"| node_prose
node_pdf -->|"parses tables"| node_wordtables
node_pdf -->|"derives values"| node_physics
node_templateflow -->|"ranks templates"| node_templates
node_templates -->|"registers templates"| node_templatebase
node_templateflow -->|"checks binding"| node_binding
node_templates -->|"provides template"| node_hex
node_templates -->|"provides template"| node_horse
node_templates -->|"provides templates"| node_shapes
node_templateflow -->|"builds shapes"| node_builder
node_builder -->|"creates model"| node_cadmodel
node_templateflow -->|"exports DXF"| node_dxf
node_dxf -->|"writes file"| node_dxf_file
node_hex -->|"uses primitives"| node_primitives
node_horse -->|"uses primitives"| node_primitives
node_horse -->|"uses feed geometry"| node_feeds
node_researcher -->|"submits text"| node_legacy_pipeline
node_legacy_pipeline -->|"extracts geometry"| node_extract_service
node_extract_service -->|"returns validated IR"| node_ir
node_legacy_pipeline -->|"resolves constraints"| node_coordinate_service
node_coordinate_service -->|"invokes solver"| node_solver
node_coordinate_service -->|"accepts IR"| node_ir
node_coordinate_service -->|"returns coordinates"| node_resolved
node_legacy_pipeline -->|"builds and exports"| node_legacycad
node_legacycad -->|"builds CAD"| node_builder
node_legacycad -->|"exports DXF"| node_dxf
node_legacy_pipeline -->|"passes geometry"| node_resolved

click node_pdf "https://github.com/aryaan147/antenna-reconstruction/blob/main/src/antenna_reconstruction/geometry_extraction/ingestion/pdf.py"
click node_prose "https://github.com/aryaan147/antenna-reconstruction/blob/main/src/antenna_reconstruction/geometry_extraction/ingestion/prose.py"
click node_wordtables "https://github.com/aryaan147/antenna-reconstruction/blob/main/src/antenna_reconstruction/geometry_extraction/ingestion/word_tables.py"
click node_physics "https://github.com/aryaan147/antenna-reconstruction/blob/main/src/antenna_reconstruction/derived/physics.py"
click node_templateflow "https://github.com/aryaan147/antenna-reconstruction/blob/main/src/antenna_reconstruction/template_pipeline.py"
click node_binding "https://github.com/aryaan147/antenna-reconstruction/blob/main/src/antenna_reconstruction/binding/verifier.py"
click node_templates "https://github.com/aryaan147/antenna-reconstruction/blob/main/src/antenna_reconstruction/templates/__init__.py"
click node_templatebase "https://github.com/aryaan147/antenna-reconstruction/blob/main/src/antenna_reconstruction/templates/base.py"
click node_hex "https://github.com/aryaan147/antenna-reconstruction/blob/main/src/antenna_reconstruction/templates/hexagonal_ring.py"
click node_horse "https://github.com/aryaan147/antenna-reconstruction/blob/main/src/antenna_reconstruction/templates/horse_shoe.py"
click node_shapes "https://github.com/aryaan147/antenna-reconstruction/blob/main/src/antenna_reconstruction/templates/shapes.py"
click node_primitives "https://github.com/aryaan147/antenna-reconstruction/blob/main/src/antenna_reconstruction/geometry/primitives.py"
click node_feeds "https://github.com/aryaan147/antenna-reconstruction/blob/main/src/antenna_reconstruction/geometry/feeds.py"
click node_builder "https://github.com/aryaan147/antenna-reconstruction/blob/main/src/antenna_reconstruction/cad_builder/builder.py"
click node_cadmodel "https://github.com/aryaan147/antenna-reconstruction/blob/main/src/antenna_reconstruction/cad_builder/models.py"
click node_dxf "https://github.com/aryaan147/antenna-reconstruction/blob/main/src/antenna_reconstruction/cad_builder/exporters/dxf.py"
click node_legacy_pipeline "https://github.com/aryaan147/antenna-reconstruction/blob/main/src/antenna_reconstruction/pipeline.py"
click node_extract_service "https://github.com/aryaan147/antenna-reconstruction/blob/main/src/antenna_reconstruction/geometry_extraction/service.py"
click node_ir "https://github.com/aryaan147/antenna-reconstruction/blob/main/src/antenna_reconstruction/geometry_extraction/ir/models.py"
click node_coordinate_service "https://github.com/aryaan147/antenna-reconstruction/blob/main/src/antenna_reconstruction/coordinate_engine/service.py"
click node_solver "https://github.com/aryaan147/antenna-reconstruction/blob/main/src/antenna_reconstruction/coordinate_engine/solver.py"
click node_resolved "https://github.com/aryaan147/antenna-reconstruction/blob/main/src/antenna_reconstruction/coordinate_engine/models.py"
click node_legacycad "https://github.com/aryaan147/antenna-reconstruction/blob/main/src/antenna_reconstruction/cad_builder/service.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_pdf,node_prose,node_wordtables,node_physics,node_researcher toneBlue
class node_templateflow,node_binding,node_templates,node_templatebase,node_hex,node_horse,node_shapes toneAmber
class node_primitives,node_feeds,node_builder,node_cadmodel,node_dxf toneMint
class node_legacy_pipeline,node_extract_service,node_ir,node_coordinate_service,node_solver,node_resolved,node_legacycad toneRose
class node_dxf_file toneIndigo
```

## Components

### Paper ingestion

- [PDF reader](https://github.com/aryaan147/antenna-reconstruction/blob/main/src/antenna_reconstruction/geometry_extraction/ingestion/pdf.py): `src/antenna_reconstruction/geometry_extraction/ingestion/pdf.py`
- [Prose parameters](https://github.com/aryaan147/antenna-reconstruction/blob/main/src/antenna_reconstruction/geometry_extraction/ingestion/prose.py): `src/antenna_reconstruction/geometry_extraction/ingestion/prose.py`
- [Word-position tables](https://github.com/aryaan147/antenna-reconstruction/blob/main/src/antenna_reconstruction/geometry_extraction/ingestion/word_tables.py): `src/antenna_reconstruction/geometry_extraction/ingestion/word_tables.py`
- [Derived physics](https://github.com/aryaan147/antenna-reconstruction/blob/main/src/antenna_reconstruction/derived/physics.py): `src/antenna_reconstruction/derived/physics.py`

### Geometry interpretation

- [Template pipeline](https://github.com/aryaan147/antenna-reconstruction/blob/main/src/antenna_reconstruction/template_pipeline.py): `src/antenna_reconstruction/template_pipeline.py`
- [Binding verifier](https://github.com/aryaan147/antenna-reconstruction/blob/main/src/antenna_reconstruction/binding/verifier.py): `src/antenna_reconstruction/binding/verifier.py`
- [Template catalog](https://github.com/aryaan147/antenna-reconstruction/blob/main/src/antenna_reconstruction/templates/__init__.py): `src/antenna_reconstruction/templates/__init__.py`
- [Template contract](https://github.com/aryaan147/antenna-reconstruction/blob/main/src/antenna_reconstruction/templates/base.py): `src/antenna_reconstruction/templates/base.py`
- [Hex-ring template](https://github.com/aryaan147/antenna-reconstruction/blob/main/src/antenna_reconstruction/templates/hexagonal_ring.py): `src/antenna_reconstruction/templates/hexagonal_ring.py`
- [Horse-shoe template](https://github.com/aryaan147/antenna-reconstruction/blob/main/src/antenna_reconstruction/templates/horse_shoe.py): `src/antenna_reconstruction/templates/horse_shoe.py`
- [Shape templates](https://github.com/aryaan147/antenna-reconstruction/blob/main/src/antenna_reconstruction/templates/shapes.py): `src/antenna_reconstruction/templates/shapes.py`

### Geometry and CAD

- [Geometry primitives](https://github.com/aryaan147/antenna-reconstruction/blob/main/src/antenna_reconstruction/geometry/primitives.py): `src/antenna_reconstruction/geometry/primitives.py`
- [Feed geometry](https://github.com/aryaan147/antenna-reconstruction/blob/main/src/antenna_reconstruction/geometry/feeds.py): `src/antenna_reconstruction/geometry/feeds.py`
- [Geometry builder](https://github.com/aryaan147/antenna-reconstruction/blob/main/src/antenna_reconstruction/cad_builder/builder.py): `src/antenna_reconstruction/cad_builder/builder.py`
- [CAD model](https://github.com/aryaan147/antenna-reconstruction/blob/main/src/antenna_reconstruction/cad_builder/models.py): `src/antenna_reconstruction/cad_builder/models.py`
- [DXF exporter](https://github.com/aryaan147/antenna-reconstruction/blob/main/src/antenna_reconstruction/cad_builder/exporters/dxf.py): `src/antenna_reconstruction/cad_builder/exporters/dxf.py`

### Constraint pipeline

- [Sentence pipeline](https://github.com/aryaan147/antenna-reconstruction/blob/main/src/antenna_reconstruction/pipeline.py): `src/antenna_reconstruction/pipeline.py`
- [Geometry extraction](https://github.com/aryaan147/antenna-reconstruction/blob/main/src/antenna_reconstruction/geometry_extraction/service.py): `src/antenna_reconstruction/geometry_extraction/service.py`
- [Geometry IR](https://github.com/aryaan147/antenna-reconstruction/blob/main/src/antenna_reconstruction/geometry_extraction/ir/models.py): `src/antenna_reconstruction/geometry_extraction/ir/models.py`
- [Coordinate resolver](https://github.com/aryaan147/antenna-reconstruction/blob/main/src/antenna_reconstruction/coordinate_engine/service.py): `src/antenna_reconstruction/coordinate_engine/service.py`
- [Constraint solver](https://github.com/aryaan147/antenna-reconstruction/blob/main/src/antenna_reconstruction/coordinate_engine/solver.py): `src/antenna_reconstruction/coordinate_engine/solver.py`
- [Resolved geometry](https://github.com/aryaan147/antenna-reconstruction/blob/main/src/antenna_reconstruction/coordinate_engine/models.py): `src/antenna_reconstruction/coordinate_engine/models.py`
- [CAD service](https://github.com/aryaan147/antenna-reconstruction/blob/main/src/antenna_reconstruction/cad_builder/service.py): `src/antenna_reconstruction/cad_builder/service.py`

### Other components

- **Engineer / user**
- **DXF file**

## Connections

- Engineer / user → Template pipeline: submits PDF (evidence: `README.md`)
- Template pipeline → PDF reader: extracts parameters (evidence: `src/antenna_reconstruction/template_pipeline.py`)
- PDF reader → Prose parameters: parses prose (evidence: `src/antenna_reconstruction/geometry_extraction/ingestion/pdf.py`)
- PDF reader → Word-position tables: parses tables (evidence: `src/antenna_reconstruction/geometry_extraction/ingestion/pdf.py`)
- PDF reader → Derived physics: derives values (evidence: `src/antenna_reconstruction/geometry_extraction/ingestion/pdf.py`)
- Template pipeline → Template catalog: ranks templates (evidence: `src/antenna_reconstruction/template_pipeline.py`)
- Template catalog → Template contract: registers templates (evidence: `src/antenna_reconstruction/templates/__init__.py`)
- Template pipeline → Binding verifier: checks binding (evidence: `README.md`)
- Template catalog → Hex-ring template: provides template (evidence: `src/antenna_reconstruction/templates/__init__.py`)
- Template catalog → Horse-shoe template: provides template (evidence: `src/antenna_reconstruction/templates/__init__.py`)
- Template catalog → Shape templates: provides templates (evidence: `src/antenna_reconstruction/templates/__init__.py`)
- Template pipeline → Geometry builder: builds shapes (evidence: `src/antenna_reconstruction/template_pipeline.py`)
- Geometry builder → CAD model: creates model (evidence: `src/antenna_reconstruction/cad_builder/builder.py`)
- Template pipeline → DXF exporter: exports DXF (evidence: `src/antenna_reconstruction/template_pipeline.py`)
- DXF exporter → DXF file: writes file (evidence: `README.md`)
- Hex-ring template → Geometry primitives: uses primitives (evidence: `src/antenna_reconstruction/templates/hexagonal_ring.py`)
- Horse-shoe template → Geometry primitives: uses primitives (evidence: `src/antenna_reconstruction/templates/horse_shoe.py`)
- Horse-shoe template → Feed geometry: uses feed geometry (evidence: `src/antenna_reconstruction/templates/horse_shoe.py`)
- Engineer / user → Sentence pipeline: submits text (evidence: `src/antenna_reconstruction/pipeline.py`)
- Sentence pipeline → Geometry extraction: extracts geometry (evidence: `src/antenna_reconstruction/pipeline.py`)
- Geometry extraction → Geometry IR: returns validated IR (evidence: `src/antenna_reconstruction/geometry_extraction/service.py`)
- Sentence pipeline → Coordinate resolver: resolves constraints (evidence: `src/antenna_reconstruction/pipeline.py`)
- Coordinate resolver → Constraint solver: invokes solver (evidence: `src/antenna_reconstruction/coordinate_engine/service.py`)
- Coordinate resolver → Geometry IR: accepts IR (evidence: `src/antenna_reconstruction/coordinate_engine/service.py`)
- Coordinate resolver → Resolved geometry: returns coordinates (evidence: `src/antenna_reconstruction/coordinate_engine/service.py`)
- Sentence pipeline → CAD service: builds and exports (evidence: `src/antenna_reconstruction/pipeline.py`)
- CAD service → Geometry builder: builds CAD (evidence: `src/antenna_reconstruction/cad_builder/service.py`)
- CAD service → DXF exporter: exports DXF (evidence: `src/antenna_reconstruction/cad_builder/service.py`)
- Sentence pipeline → Resolved geometry: passes geometry (evidence: `src/antenna_reconstruction/pipeline.py`)
