Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

STL to BREP: A FreeCAD Tool for AI Agents

Description and use

The convert_mesh_to_brep tool in FreeCAD MCP converts STL meshes into valid BREP solids with analytic surfaces, reducing flat faces from 808 to 31 and keeping volume change under 0.04 %.

Problem

Automatic stitching of STL into BREP solids is missing for AI agents working with CAD.

Outcome

The tool converts STL meshes to valid BREP solids with analytic planes and cylinders, reducing faceting from 808 to 31 faces and maintaining volume within 0.04%.

Workflow

  • Load STL into FreeCAD MCP
  • Run convert_mesh_to_brep with repair=true and default tolerances
  • Obtain BREP solid and JSON report
  • Verify closed solid, volume change, and residual faceting

Evidence

Automatic stitching of STL into BREP solids.

Source

808 faces, every one of them a plane. The solid is valid, but the holes and the lug are made of narrow flat strips, not cylindrical surfaces.

Source

31 faces: 21 Plane and 10 Cylinder. The surface types are read from the BREP itself; the orange color is applied for the figure only.

Source

All six results are closed, valid solids, and they survived a save-and-reopen test.

Source

The volume change on every part is under 0.04%.

Source

I would like to find STL files that break this tool: cylinders left faceted, wrongly recognized surfaces, distorted holes, extra geometry, or a mesh it cannot process at all.

Source

  • Record date: 2026-11-02T05:59:14.913Z