Build instructions and improved automation macros for running the Surface Cutting ParaView plugin on Apple Silicon Macs (M-series, M1–M4).
This repository does not replace the plugin — it is a companion that (1) documents how to build ParaView 5.10.1 and the plugin natively on modern macOS, and (2) provides updated Python macros for the tracking-and-cutting workflow on ParaView 5.10.
Upstream / original project: the Surface Cutting plugin itself is by Connie He — https://github.com/conniejhe/Surface-Cutting (BSD-3-Clause). All credit for the plugin and its algorithms belongs to the original author. This repository builds on that work and retains its license and attribution (see
LICENSE).
The original setup instructions target Intel Macs with ParaView 5.8.0. On Apple Silicon they fail, mainly because the pinned Qt 5.14.2 is Intel-only (it predates M-series chips), plus several incompatibilities between the 2021-era ParaView 5.10 codebase and today's macOS toolchain (clang, CMake 4, Python 3.11, NumPy 2). This repo modernizes the toolchain (native Homebrew, Qt 5.15, Python 3.11) and records every fix so the build is reproducible.
The plugin's C++ algorithms are unchanged — only the build environment and the convenience macros differ — so analysis results stay consistent with the original tool.
.
├── README.md – this file
├── LICENSE – BSD-3-Clause (retains original copyright + adds this work)
├── docs/
│ └── BUILD_GUIDE.md – full step-by-step setup, with a troubleshooting table
└── macros/
├── SurfaceTrackerLoop.py – select points (any order) → one closed boundary loop
├── SurfaceCut.py – original upstream cut script (one region per run)
└── 2_SurfaceCutBoth.py – cut top + bottom surfaces in one click
- Build the environment and plugin by following
docs/BUILD_GUIDE.mdfrom top to bottom. It covers Homebrew, Qt, Python, building ParaView 5.10.1 from source, compiling the plugin, and loading it. - Install the macros: in ParaView,
Macros → Import new macro…and import the three files inmacros/. Edit thePLUGIN = …path near the top ofSurfaceTrackerLoop.pyand2_SurfaceCutBoth.pyto match your machine. - Use it:
- Select boundary points around the edge (any order) → run SurfaceTrackerLoop → a closed loop is built automatically (Gyrus / edge-hugging by default).
- Select one interior point → run SurfaceCut to extract that region, or select one point on each side → run 2_SurfaceCutBoth to get top and bottom in one click.
| Macro | What it does |
|---|---|
SurfaceTrackerLoop.py |
Reads the 3D position of every selected point, reconstructs the contour by nearest-neighbour ordering (so click order doesn't matter), connects them, and auto-closes the loop. Defaults to Gyrus mode; names segments uniquely. |
SurfaceCut.py |
Upstream script: appends the tracker segments and cuts the region containing one selected interior point. |
2_SurfaceCutBoth.py |
Cuts both sides of the loop from two selected points in a single run; labels outputs SurfaceCutTop / SurfaceCutBottom by geometry. |
Line type for new tracker segments is set near the top of the tracker macro
(DEFAULT_LINE_TYPE: 0 = Geodesic, 1 = Sulcus, 2 = Gyrus).
- OS: macOS on Apple Silicon (M1–M4). The build also works on Intel Macs.
- ParaView: built from source at tag
v5.10.1(Qt + Python enabled). - Toolchain: native arm64 Homebrew (
/opt/homebrew), Qt 5.15 (qt@5), Python 3.11,numpy<2.
- Original Surface Cutting plugin and algorithms: Connie He, https://github.com/conniejhe/Surface-Cutting.
- This repository (build guide + updated/new macros): see
LICENSE. - Distributed under the BSD-3-Clause license, the same as the upstream project, with the original copyright notice retained.