Skip to content

Gallery Utility

Keith Sloan edited this page Sep 8, 2026 · 2 revisions

Gallery utility — make_3dm_gallery

A reusable FreeCAD macro that batch-imports every .3dm under a chosen folder (recursively) and builds a self-contained HTML gallery of the imported results, so you can eyeball a whole directory of Rhino files for obvious import problems.

Macro: macros/make_3dm_gallery.FCMacro in the repo.

Run it

  1. FreeCAD → Macro → Macros…, add the repo's macros/ folder if needed, select make_3dm_gallery.FCMacro, Execute.
  2. Pick the folder of .3dm files when prompted.
  3. It renders each file (isometric, white background) and writes <folder>/import_gallery/gallery.html, then opens it in your browser.

What it does / notes

  • Imports through this addon's import3DM importer, one file per fresh document.
  • Pins the gallery preferences (ImportRespectLayerVisibility on, ImportSewFaceLimit 8) so thumbnails are reproducible and no file can hang the macro.
  • Hides App::Part origins/datum planes before fitAll so real geometry is framed.
  • Objects on invisible Rhino layers are hidden, so construction clutter is not shown (that is the importer's layer-visibility behaviour, not the macro).
  • FreeCAD culls a Points::Feature whose points are all coincident (empty bounding box), so a single-point file would look blank — the macro adds a small temporary cube anchor at such locations so the point shows in the thumbnail.
  • A blank thumbnail is expected for files with no geometry (empty files, light/viewport-only files); the Report View explains why.

The Import Gallery page was produced with this utility over the openNURBS V1–V6 sample set.

Clone this wiki locally