AlphaPrism is in active development: features may change and you may run into bugs. Keep backups of your work.Known issuesReport a bug
Skip to content

Fit Region ​

Fit a plane, cylinder, sphere, cone or smooth patch to the region picked with Edit Region, and read its size and axis.

Fit Region: A selected region compared with A surface fitted to it.
Prism help example. Turn the selected region into a plane, cylinder, sphere, cone or smooth NURBS patch. View full size

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 ​

  1. Choose Fit Region. Its panel opens on the right with numbered steps; anything you selected first fills matching inputs.
  2. Pick Mesh (the selected region is used) (mesh).
  3. Adjust the settings and check the preview in the viewport.
  4. Use the panel buttons as needed: Preview result.
  5. Confirm in the panel to apply, or cancel to leave the model unchanged. Applied changes are one undo step.

Settings ​

SettingDefaultValues
FitAutomatic: exact shape if it fits, else smooth patchAutomatic: exact shape if it fits, else smooth patch, Plane, Cylinder, Sphere, Cone, Smooth NURBS patch inside the outline, Rectangular NURBS grid
Fit tolerance0.2 mm0.001 to 50 mm
Outline detail0.3 mm0.01 to 50 mm
Corner angle35 °5 to 120 °
Points the surface must follow100Whole number, 0 to 1000
Grid size (points per side)10Whole number, 4 to 60
CreateSurface trimmed to the regionSurface 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)