threecrate-mcp

v0.2.2
io.github.rajgandhi1/threecrate-mcp Checked 3 hours ago Published 25 days ago

Clean, align, measure and repair 3D scans and meshes; make scans printable as STL.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

inspect_point_cloud

Summarize a point cloud file: point count, bounds, centroid, median point spacing, and suggested voxel sizes and radii for the other tools. Call this first on any new cloud.

ParameterTypeDescription
path *stringFile path, relative to the workspace folder

inspect_mesh

Check a mesh's health and measure it: holes, separate pieces, non-manifold or flipped faces, watertight, size, surface area, volume, and whether it can be 3D printed as is (with the reasons if not).

ParameterTypeDescription
path *stringFile path, relative to the workspace folder

convert

Convert a point cloud (PLY, PCD, XYZ, CSV) or mesh (PLY, OBJ) to another format.

ParameterTypeDescription
output *stringOutput path; its extension picks the format
path *stringFile path, relative to the workspace folder
kindstringWhat the file holds
overwritebooleanReplace the output file if it already exists

downsample

Reduce point density with a voxel grid. Good before registration or reconstruction. 2x the median spacing is a light pass, 5x a strong one.

ParameterTypeDescription
path *stringFile path, relative to the workspace folder
voxel_size *numberVoxel edge length in the cloud's units; each voxel keeps the centroid of its points
outputWhere to write the result. Default: a new file next to the input
overwritebooleanReplace the output file if it already exists

remove_outliers

Remove stray points (sensor noise, reflections) from a point cloud.

ParameterTypeDescription
path *stringFile path, relative to the workspace folder
k_neighborsintegerNeighbours checked (statistical)
methodstringstatistical: far from neighbours on average; radius: too few neighbours nearby
min_neighborsintegerMinimum neighbours within radius (radius method)
outputWhere to write the result. Default: a new file next to the input
overwritebooleanReplace the output file if it already exists
radiusSearch radius (radius method, required)
std_rationumberLower removes more (statistical)

estimate_normals

Estimate a surface normal for every point and save them in a PLY file. Not needed before register or reconstruct; those estimate normals themselves.

ParameterTypeDescription
path *stringFile path, relative to the workspace folder
k_neighborsintegerNeighbours used for each normal
normal_orientationstringconsistent: normals agree all around, outward on closed objects (default). viewpoint: face a point above the cloud; better for one-sided scans of walls or facades
outputOutput .ply path (stores normals as nx ny nz)
overwritebooleanReplace the output file if it already exists

register

Align a source point cloud to a target. Returns the 4x4 rigid transform (source to target), fit error (mse, rmse) and convergence.

ParameterTypeDescription
source *stringCloud to move
target *stringCloud to align to
aligned_outputAlso save the source cloud moved into the target's frame here
initial_transformStarting 4x4 transform (not for method='global')
max_correspondence_distancenumberIgnore matches farther than this (gicp only)
max_iterationsinteger
methodstringicp: fast, needs a rough initial alignment. point_to_plane: better on smooth surfaces. gicp: most robust local method. global: no initial alignment needed (feature matching + ICP), slower
overwritebooleanReplace the output file if it already exists
voxel_sizeDownsample both clouds first for speed; the result still applies to the full clouds

transform

Apply a 4x4 rigid transform to every point of a cloud.

ParameterTypeDescription
path *stringFile path, relative to the workspace folder
transform *array4x4 rigid transform, e.g. from register
outputWhere to write the result. Default: a new file next to the input
overwritebooleanReplace the output file if it already exists

segment_plane

Find the dominant plane (floor, wall, table) with RANSAC. Returns its equation and how many points lie on it; can split the cloud in two.

ParameterTypeDescription
path *stringFile path, relative to the workspace folder
distance_thresholdnumberMax distance from the plane for a point to count
inliers_outputSave the plane's points here
max_iterationsintegerRANSAC iterations
outliers_outputSave everything else here (e.g. objects on a floor)
overwritebooleanReplace the output file if it already exists

extract_clusters

Split a cloud into separate objects by distance (Euclidean clustering). Often run after segment_plane removes the floor.

ParameterTypeDescription
path *stringFile path, relative to the workspace folder
tolerance *numberMax gap between points of one cluster
max_cluster_sizeinteger
max_filesintegerSave at most this many clusters, largest first
min_cluster_sizeinteger
output_dirFolder to save each cluster as its own PLY
overwritebooleanReplace the output file if it already exists

reconstruct

Build a triangle mesh from a point cloud. Clean and downsample first for better results. Poisson always closes the surface; set trim_distance for scans that only see one side.

ParameterTypeDescription
path *stringFile path, relative to the workspace folder
alphaAlpha (alpha_shape)
depthintegerPoisson detail: grid of 2^depth cells per side. 7 takes about 1 s; 8 is finer but 10-20 s
methodstringauto: picks a method. poisson: smooth watertight surfaces. ball_pivoting: keeps detail, may leave holes. alpha_shape: rough hulls. delaunay: near-flat clouds
normal_orientationstringconsistent: normals agree all around, outward on closed objects (default). viewpoint: face a point above the cloud; better for one-sided scans of walls or facades
normals_kintegerNeighbours for the normals Poisson needs
outputOutput mesh path (.ply or .obj)
overwritebooleanReplace the output file if it already exists
radiusBall radius (ball_pivoting; default 2x spacing)
trim_distancePoisson: drop surface farther than this from any point. Use on open scans (e.g. 2x spacing)

simplify_mesh

Reduce a mesh's triangle count while keeping its shape (quadric decimation).

ParameterTypeDescription
path *stringFile path, relative to the workspace folder
outputWhere to write the result. Default: a new file next to the input
overwritebooleanReplace the output file if it already exists
preserve_boundarybooleanKeep holes and open borders fixed. Set false if the call fails because the mesh is mostly holes
reduction_rationumberShare of faces to remove (0.5 removes about half)

smooth_mesh

Smooth a noisy or bumpy mesh, for example after reconstruct. Taubin keeps the overall size; Laplacian smooths harder but shrinks the mesh.

ParameterTypeDescription
path *stringFile path, relative to the workspace folder
iterationsinteger
methodstringtaubin keeps volume best; laplacian is strongest but shrinks the mesh
outputWhere to write the result. Default: a new file next to the input
overwritebooleanReplace the output file if it already exists

render

Draw point clouds or meshes and return the picture, so you can check a result yourself: holes or flipped faces show as orange, a missing base shows in the bottom view. Pass two files to compare before and after.

ParameterTypeDescription
paths *arrayFiles to draw, one row each (point clouds or meshes); e.g. [before, after]
outputAlso save the PNG here
overwritebooleanReplace the output file if it already exists
sizeintegerPixels per view
upstringWhich axis points up in the data (phone scans are often y)
viewsColumns of the image. Default: angled, front, right, top, bottom

repair_for_print

Make a scan or mesh 3D-printable: removes stray points and loose bits, optionally the floor, closes holes (including a missing base), fixes face direction, reduces the size and converts to millimetres. Writes an STL and returns what it did, the health before and after, and a before/after picture to check.

ParameterTypeDescription
path *stringFile path, relative to the workspace folder
depthintegerDetail when the surface is rebuilt; 7 takes about a second
outputOutput mesh (.stl by default, or .ply/.obj)
overwritebooleanReplace the output file if it already exists
remove_floorbooleanRemove a floor or turntable under the object (point clouds only). Check render first
target_facesReduce to about this many triangles (default: keep up to 250,000)
unitsstringUnits of the input; the result is always in mm. auto reads under 2 units long as metres
upstringWhich axis points up, for the picture