Skip to content

KensoBI/spc-cad

Repository files navigation

SPC CAD Panel

License Grafana

A Grafana panel plugin for visualizing 3D CAD models, point clouds, and metrology data within Grafana dashboards. Designed for quality control, manufacturing inspection, and metrology data visualization workflows.

SPC CAD Panel

Features

  • Import CAD Models - Load STL, 3MF, and PLY files directly into dashboards
  • Feature Annotations - Add labels, tables, and time-series charts to geometric features
  • Template System - 13 built-in templates for different feature types (point, circle, cylinder, etc.)
  • Color Coding - Apply conditional colors to features based on measurement data
  • Forecasting - Display forecast trends with confidence bands on feature charts (via KensoBI SPC Feature datasource)
  • Interactive 3D View - Rotate, pan, and zoom with trackball camera controls

Documentation

For complete documentation see SPC CAD docs.

Prerequisites

  • Grafana version 11 or higher

Quick Start

Start the demo environment with Docker Compose:

docker-compose up -d

This automatically provisions:

  • PostgreSQL database with complete schema and sample data
  • Grafana with the SPC CAD plugin
  • PostgreSQL datasource configuration
  • Four pre-configured test dashboards

Access the demo:

  • URL: http://localhost:3000
  • Default credentials: admin / admin

Supported File Formats

Format Extension Description
STL .stl Stereolithography (binary/ASCII)
3MF .3mf 3D Manufacturing Format
PLY .ply Polygon File Format
ASC .asc ASCII Point Cloud

ASC Deviation File Format

The application requires deviation data in ASC format, where each line represents a single measurement point with space-separated values. The format for each line is: Name X Y Z Nx Ny Nz DevX DevY DevZ DevTotal, where Name is a string identifier for the surface comparison, X Y Z are the coordinates of the measurement point, Nx Ny Nz are the components of the surface normal vector at that point, DevX DevY DevZ are the deviation components along each axis, and DevTotal is the absolute magnitude of the total deviation. All numeric values should be floating-point numbers with six decimal places. The file should contain no header row - each line contains point data only.

Surface_comparison_cube 5.000000 5.000000 0.000000 0.000000 0.000000 -1.000000 -0.000000 -0.000000 0.080942 0.080942

Development

Prerequisites

  • Node.js (LTS version recommended)
  • npm or yarn
  • Grafana 11.0 or higher

Setup

  1. Clone the repository:
git clone https://github.com/KensoBI/spc-cad.git
cd spc-cad
  1. Install dependencies:
yarn install

Development Workflow

  1. Start the development server with watch mode:
yarn run dev
  1. In another terminal, start the development environment with Docker Compose:
docker compose up

This will start:

  • Grafana on http://localhost:3000 with the plugin pre-loaded
  • PostgreSQL database on port 5444 with sample data
  1. Access Grafana at http://localhost:3000 and the panel will be automatically provisioned with dashboards and datasources

To stop the environment:

docker compose down

Building

Build the plugin for production:

yarn build

Getting Help

License

This software is distributed under the GNU Affero General Public License v3.0.

Copyright

Copyright (c) 2026 Kenso Software