Fit Region
Fit a plane, cylinder, sphere, cone or smooth patch to the region picked with Edit Region, and read its size and axis.
- Ribbon: Mesh › Convert
- Guide: Scan, mesh and reverse engineering

In the app
Uses the selected triangles: pick them in Face mode (double-click a triangle to take its whole smooth patch) or with Edit Region. Exact shapes (plane, cylinder, sphere, cone) suit mechanical faces and report their size, axis and position; the smooth patch follows organic regions and is trimmed to the outline you picked.
How to use
- Choose Fit Region. Its panel opens on the right with numbered steps; anything you selected first fills matching inputs.
- Pick Mesh (the selected region is used) (mesh).
- Adjust the settings and check the preview in the viewport.
- Use the panel buttons as needed: Preview result.
- Confirm in the panel to apply, or cancel to leave the model unchanged. Applied changes are one undo step.
Settings
| Setting | Default | Values |
|---|---|---|
| Fit | Automatic: exact shape if it fits, else smooth patch | Automatic: exact shape if it fits, else smooth patch, Plane, Cylinder, Sphere, Cone, Smooth NURBS patch inside the outline, Rectangular NURBS grid |
| Fit tolerance | 0.2 mm | 0.001 to 50 mm |
| Outline detail | 0.3 mm | 0.01 to 50 mm |
| Corner angle | 35 ° | 5 to 120 ° |
| Points the surface must follow | 100 | Whole number, 0 to 1000 |
| Grid size (points per side) | 10 | Whole number, 4 to 60 |
| Create | Surface trimmed to the region | Surface trimmed to the region, Closed solid, Reference geometry only |
| Add reference geometry (plane or axis) | On |
Script it
Command name mesh_fit_surface. See Python scripting and the command reference.
python
import cadkit as cad
cad.run("mesh_fit_surface", slots={"Mesh (the selected region is used)": ...}, fit="Automatic: exact shape if it fits, else smooth patch", fit_tolerance=0.2)