Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

mesh2cad

Latest version: v0.33.0

Overview

Last scanned
29 Nov 2026
Published
29 Nov 2026
PyPI package Publisher: Mrki364
160 Stars
4 Forks
34 Versions
3.8K Downloads
Python Repo language

Scan summary

mesh2cad was last scanned on 29 Nov 2026 at version 0.33.0. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 34 versions; the latest was published on 29 Nov 2026.
  • Findings: No rules fired in version 0.33.0.
  • Downloads: 3,835 downloads.

Versions

34 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.33.0 LATEST 29 Nov 2026 No rules fired
0.32.0 20 Nov 2026 No rules fired
0.31.0 18 Nov 2026 No rules fired
0.30.0 17 Nov 2026 Not shown
0.29.0 15 Nov 2026 Not shown

No rules fired in 0.33.0

Findings

Findings for v0.33.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 0.33.0; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

mesh2cad

mesh2cad converts an STL mesh of a simple mechanical part into editable parametric CAD: STEP, CadQuery, OpenSCAD, and FreeCAD scripts. It is also an MCP server.

ci PyPI

OBJ and PLY meshes work the same way. The fit runs on your machine. Nothing is uploaded.

A STEP file is the solid. When the fit is exact, a hole is one cylindrical face, not a ring of triangles. A script is for changing a dimension and rebuilding. CadQuery is Python. OpenSCAD is the text the Customizer on Thingiverse and Printables edits. The FreeCAD file is a macro. All three use the same names, so hole_1_d is the same hole in each of them.

before/after

Left: a 21k-triangle mesh with 0.1 mm noise. Right: the STEP file mesh2cad writes, 10 planes and 2 cylinders, max deviation 0.05 mm from the true part.

demo

Four printer parts, with the STEP files and the generated scripts, are in the example gallery.

Hackaday wrote about it: Mesh2Cad Automates Re-Modelling. More in Press.

Install

pip install mesh2cad

Python 3.10 or newer. That install is the command line tool and STEP export. OpenCascade comes in with the package (cadquery-ocp).

pip install "mesh2cad[mcp]" adds the server. pip install "mesh2cad[cadquery]" lets mesh2cad run a generated .py and check it before the file is written. OpenSCAD and FreeCAD are separate programs, not pip packages. Without openscad on PATH, a .scad file is still written and the command says it was not verified. A .FCMacro is written only when a check passes. What happens when freecadcmd is missing is in Install.

Quick start

mesh2cad convert plate.stl --cadquery plate.py
mesh2cad edit plate.py --set hole_grid_1_d=8 --in-place -o plate.step

The first command writes plate.py. Diameters, thicknesses, and positions are names at the top of the file. A four-hole grid is hole_grid_1_d. The second sets that diameter to 8 mm, rewrites the script, and writes plate.step. Every other byte of the file stays as it was.

mesh2cad edit bracket.py --set base_x=+2 adds 2 mm to the current length. A leading + or - is a change from the current number, not how you set a negative value. mesh2cad params bracket.py prints each name, its value, and the unit when there is one.

A STEP file on its own is mesh2cad convert part.stl -o part.step. Add --report report.md for the numbers: Hausdorff and RMS deviation, volume error, face types, and the method (exact, faceted-hybrid, or faceted). Open that STEP file in FreeCAD, Fusion, Onshape, or another CAD tool and select a face.

If the part is outside what a script can express, or the rebuilt solid misses the check, the script is not written and the command exits with code 2. The reason is printed. The same convert can write .scad and .FCMacro. Flags are in the CLI reference. What the scripts contain is in CadQuery, OpenSCAD, and FreeCAD. The edit rules are in Parameters.

What it handles

It is meant for simple mechanical parts: plates, brackets, and boxes with holes, bolt circles, slots, bosses (including on an extruded outline), countersunk and counterbored holes on that outline, and fillets. A Z extrusion can also carry one radius on every vertical corner of the outline. It fits planes, cylinders, spheres, cones, and constant-radius rounds, and writes those as faces you can select.

It does not recover organic or sculpted shapes, scans, or free-form surfaces. When a fit is poor it does not invent a surface. STEP output falls back to a faceted solid that is still valid, and the report names that fallback. A script is held to a tighter check: deviation at most max(4 times the tolerance, 0.1 mm), and volume error at most 1%. Miss that, and the script is refused.

Six Original Prusa i3 MK3S printed parts in the test set come back as exact STEP, and all six also as a script. The measurements, including the small belt-profile patches that stay faceted, are in Real parts. Synthetic noise tests are in Benchmarks. The fitted-surface list, the parameter names, and the refusals are in Limits (v0.31.0). The pipeline is in How it works.

MCP

pip install "mesh2cad[mcp]"
mesh2cad mcp

That starts the server on stdio. Point a client at it like this:

{ "mcpServers": { "mesh2cad": { "command": "mesh2cad", "args": ["mcp"] } } }

The tools are convert, analyze, report, to_cadquery, to_openscad, to_freecad, list_params, and edit_params. Arguments, return values, and the directory listings are in MCP.

Docs

Getting started

  • Install
  • CLI reference
  • MCP server

Scripts

  • CadQuery scripts
  • OpenSCAD scripts
  • FreeCAD macros
  • Editing a parameter

How it works

  • How it works
  • Limits
  • Benchmarks
  • Real parts

Project

A mesh that converts badly can go in a GitHub issue. There is a template for an STL that fails.

License

MIT. See LICENSE.

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • pypi-releases mesh2cad

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Critical Apache HTTP Server Flaw Exposes Web Servers to RCE (1)
CVE

CVE-2026-119618: Critical Apache HTTP Server Flaw Exposes Web Servers to Remote Code Execution

Copy of Template Design OX Blog (1)
Research

Thousands Of GitHub Accounts Hijacked With wfx-loot CI Secret Stealing Malware Via GitHub Actions & npm

Microsoft's Official agent framework Hijacked
AI & VibeSec

BREAKING: Hijacked Releases of Microsoft’s Official agent-framework Steals Azure and CI Credentials

Frame 2085668439 (1)
Group 1261154229