Overview
SNAM operates one of Europe’s largest natural gas transmission networks, with pipelines running across the entire Italian territory. The project required creating a complete BIM model of the existing pipeline infrastructure — not from drawings, but from raw survey data: sequences of XYZ coordinates, estimated segment lengths, and component type designations.
The Problem: Data Is Not a Model
Survey data for pipeline infrastructure is rarely clean. Coordinate sets require interpretation: which points define a straight segment and which mark a bend? What type of elbow was used at a given turn — a standard curve or a barrier fitting? Where do human data-entry errors produce coordinates that break the pipeline geometry?
Manual modeling at this scale was not feasible. The solution had to be algorithmic.
The Algorithm: Elbow Type Logic
The core challenge was teaching the script to identify elbow types from the angular relationships between consecutive pipeline segments. Each junction could be one of several fitting types — CURV (curved elbow) or BARR (barrier fitting) — and the correct identification mattered for both geometry and specifications.
Real survey data produces situations that fall outside the clean scenarios: multiple BARR points clustered at a junction, CURV markers without a clear apex, ambiguous configurations flagged with !? for manual review. The algorithm was designed to handle the predictable cases automatically and surface the uncertain ones rather than making silent errors.
Result
The Grasshopper scripts processed coordinate datasets and produced fully connected pipeline geometry in Revit — with component types placed at each junction, segment lengths calculated, and all data linked to the BIM element parameters. Sections of the national network that would have taken weeks of manual modeling were reconstructed in a fraction of the time.
The more significant outcome was methodological: a reusable workflow that could be applied to additional network sections as the project expanded, with the algorithm’s behavior documented and the edge-case handling transparent.