Skip to content

Overview

Welcome to the Snaptrude Plugin API and Data Format documentation. This resource is designed to help developers build plugins that extend the Snaptrude platform.

Documentation Structure

1. Plugin API

Technical documentation for the Snaptrude Plugin API (snaptrude), organized by namespace.

  • Core: Infrastructure — math (vec3, quat), the geometry kernel (core.geom), history (undo/redo), unit conversion, zoom, comments, and project organization (Buildings, Groups, Layers, Tags).
  • Design: Author, query & edit BIM geometry — create, query, selection, doors, windows, furniture, materials, boolean, erase, delete, transform, and edit.
  • Entity: Create, query, update, and delete building elements (Story, ReferenceLine, BuildableEnvelope). Spaces moved to design.* (create/update/query/delete).
  • Program: Space programming — areas, departments, site context, cores, classification, metrics, adjacency, and spreadsheet reports.
  • Presentation: Saved views, layout sheets, diagrams, and reference imports.

Every structured value in the API (vectors, curves, profiles, scene entities) crosses the plugin ↔ host boundary as an opaque handle — start with the Handles concept page.

Every failed call rejects with a typed PluginError carrying a stable code, structured details, and a fix hint — see the Error Handling concept page.

2. Structure Collection

Details the JSON schema used for the Snaptrude structure collection — how building data is serialized and organized.

  • Structures: Building definitions, storeys, layers, sketches, and floorplans.
  • Materials & Rendering: Material, light, and camera specifications.
  • Metadata & Settings: Project metadata, user settings, and versioning.

Use the sidebar or the links above to navigate through the different sections.