The Problem
Engineers and designers frequently need a lightweight tool to inspect, measure, and convert CAD data without committing to heavyweight commercial packages. Existing viewers often lack batch conversion, cross‑platform stability, or the ability to handle modern formats such as glTF and STEP‑AP242.
What This Does
Mayo is a Qt‑based desktop application that wraps the OpenCascade kernel to provide interactive 3‑D visualization and format translation. Core functionality lives in the src/ hierarchy—e.g., src/app/appcontext.cpp creates the main window, while the conversion pipeline is implemented in src/app/mayoconv.cpp (referenced from the GUI and the CLI). UI resources, icons, and theme SVGs are stored under images/themes/, and internationalisation files are in i18n/. The build is driven by a single CMakeLists.txt that pulls in third‑party headers from src/3rdparty/ (fmt, gsl, magicenum, etc.) and links against the OpenCascade libraries via cmake/OpenCascadeWin.cmake.
How To Use It
Setup
Prerequisites (documented in README): Qt ≥ 5.12 (or Qt6) OpenCascade ≥ 7.5 CMake ≥ 3.21 git clone https://github.com/fougue/mayo.git cd mayo cmake -B build -S . -DCMAKEBUILDTYPE=Release cmake --build build --target mayo # builds the GUI cmake --build build --target mayoconv # builds the CLI converter
The repository supplies CI workflows for Linux, macOS, and Windows (.github/workflows/.yml), confirming that the above commands succeed on supported platforms.
Configuration
No runtime configuration files are required for basic operation. Locale files (i18n/mayo.qm) are automatically loaded by Qt based on the system language. Custom OpenCascade paths can be overridden by setting OpenCASCADEROOT before invoking CMake.
Running
GUI ./build/mayo/mayo # launches the viewer
CLI conversion (example from README)
./build/mayo/mayoconv input.stp output.glb
The CLI respects the same format matrix shown in the README table and reports success/failure via standard exit codes.
Real‑World Use
A CI pipeline for a mechanical‑parts repository can validate incoming STEP files and produce lightweight glTF previews: name: Generate preview run: | ./build/mayo/mayoconv part.step part.glb git add part.glb git commit -m "Add preview"
The generated *.glb can be served directly to a web‑based viewer, enabling rapid design reviews without installing a full CAD suite.
Code Health & Issues
Med – No unit or integration tests – the repo contains no test/ directory; CI only builds the binaries. Untested conversion paths could hide edge‑case failures. Low – Limited documentation for build on macOS – while CI runs, the README lacks explicit macOS OpenCascade setup steps; users must infer from ci_macos.yml. Low – Hard‑coded resource paths – icons and theme files are referenced via Qt resource files (mayo.qrc); relocating the binary without the images/ directory may cause missing assets. None – License present – LICENSE.txt (MIT) is included, satisfying legal distribution. None – CI coverage – multiple GitHub Actions validate builds across OS/arch combinations, indicating good build hygiene.
The Bottom Line
Mayo delivers a functional, cross‑platform CAD viewer and batch converter with a straightforward CMake build and solid OpenCascade integration. The absence of automated tests is the primary risk; otherwise, the codebase is well‑structured and ready for integration into engineering workflows that need quick visual checks or format conversion without heavy dependencies. Suitable for teams that can manage the external Qt/OpenCascade prerequisites.