# Fitting a Surface to a Cloud of Points

 This command is only available with the FreeStyle Optimizer. This task explains how to fit a datum surface to a cloud of points. A non datum feature cannot be fitted: you must have previously created it using the datum mode or converted it using the Converter Wizard capability. Open the FreeStyle_Part_35.CATPart document. Click the Fit to Geometry icon . The Fit To Geometry dialog box is displayed. Select the surface, or set of surfaces, you wish to deform by fitting them to the cloud of points. Right-click the Free text on which you want to impose edge constraints. You can choose from four constraint types: Free: no constraint is imposed on this boundary Point: the resulting surface will still pass through the boundary of the initial surface Tangent: the edge of the resulting surface will be tangent to the initial surface at the selected boundary Curvature: the resulting surface will be continuous in curvature with the initial surface at the selected boundary. Define the deformation parameters from the Fit to Geometry dialog box: Tension: indicates which tension coefficient is applied Smoothing: defines the smoothing coefficient to be applied. Click Targets and select the target element in the geometry. Click Fit, the surface is projected onto the target geometry. You can repeat the operation and deform the surface step-by-step. When the results are satisfying, click OK in the Fit to Geometry dialog box. The new surface fits the pre-existing cloud of points. Using this item you can fit a surface to a cloud of points just as well as you can fit it to any other type of pre-existing geometry. You can also choose to impose a direction when fitting the surface to the cloud of points meaning that the surface will be projected according to cloud of points, as shown to the left below, and no longer according to the normals to the initial surface, as shown to the right. You can iterate and click Fit several times. This lets you fine-tune the fit. Use the Automatic trap option to reduce the number of points to be taken into account when the target element is a Cloud of Points containing many points. Available capabilities from the dashboard are: temporary analysis, continuities and U, V Orders.