# Sample Files — Pietro Sardi, *Corno Dogale*, 1638

This folder contains a complete, worked example of the INFORTREAT pipeline applied to the treatise by **Pietro Sardi** (1638): *Corno Dogale dell'Architettura Militare*.

Sardi's treatise describes a system of bastioned fortification with precise dimensional rules. The model represents one of his standard fortress designs reconstructed from the geometric prescriptions in the text.

---

## Source

**Pietro Sardi**, *Corno Dogale dell'Architettura Militare* (1638)
- Digitized edition: available via Google Books and the Biblioteca Nazionale Centrale di Firenze

---

## Folder contents

### `input/` — starting materials

| File | Description |
|------|-------------|
| `sardi_test.gltf` | 3D model exported from Rhinoceros 3D. Layer names correspond to architectural elements as named in the treatise. |
| `Sardi_input.xlsx` | Excel metadata sheet with one row per element. Properties include dimensions, materials, construction technique, references to specific pages of the treatise. |

### `output/` — generated files

| File | Description |
|------|-------------|
| `sardi_test.ifc` | IFC4 file generated by the enrichment tool. Can be opened in any IFC-compatible software (BIM Vision, Revit, ArchiCAD). |
| `sardi_test.xkt` | XKT file for the INFORTREAT web viewer. Upload to WordPress alongside the metadata JSON. |
| `sardi_test_metadata.json` | JSON property file for the viewer. Contains all property sets with references to the treatise text. |

---

## How to test in the viewer

1. Upload `sardi_test.xkt` and `sardi_test_metadata.json` to your WordPress media folder
2. Add this shortcode to a WordPress page:
   ```
   [bim_viewer url="https://yoursite.com/path/to/sardi_test.xkt" name="Corno Dogale, Pietro Sardi, 1638"]
   ```
3. Click on any element to inspect its properties

---

## How to reproduce the output from scratch (optional)

If you want to verify or rebuild the outputs using the enrichment tool:

1. Open `02_data_enrichment/run_enrichment.bat`
2. Select `input/sardi_test.gltf` as the model
3. Select `input/Sardi_input.xlsx` as the Excel file
4. Set the output name to `sardi_test`
5. Run — the outputs will match the files in `output/`

---

## Property description

Each architectural element has the following properties in `Pset_Infortreat Properties`:

| Property | Example value |
|----------|--------------|
| Parent_1 | Bastion |
| Parent_2 | Flank |
| Type | Wall |
| General_dimensions | W=8; H=40 |
| Unit | Piede geometrico = 0.348 m |
| Treatise | Corno Dogale dell'Architettura Militare; Pietro Sardi; 1638 |
| Category | Internal Works |
| Materials | Bricks |
| Construction | Masonry wall |
| Definition | Libro Secondo, Capo Quarto, pag. 57 |
| Detailed_dimensions | Libro Secondo, Capo Quarto, pag. 57 |
| Figures | Figura Terza |
| Notes | Main wall |
