pw:: SurfaceFitter

The surface fitter mode type

Derives From

pw::Object pw::Mode

Notes

This mode is used to create and fit database surface entities.

To create a mode of this type, use the pw::Application.begin command with the mode SurfaceFit specified, like this:

set fitter [pw::Application begin SurfaceFit]
Summary
The surface fitter mode type
This attribute is the tolerance to use when fitting surfaces.
This action automatically creates new surfaces using the given curves as boundaries for Coons patches and trimmed planes.
This action sets the surface by creating a patch between the given rails.
This action gets a list of vectors that represents the locations of any gaps discovered during the last call to createSurfacesFromCurves or createPatch.
This action gets a list of floats that represents the size of any gaps discovered during the last call to createSurfacesFromCurves or createPatch.
This action gets the list of pw::DatabaseEntity objects that a surface created in this mode will be fitted to when the fitter runs.
This action sets the list of pw::DatabaseEntity objects that a surface created in this mode will be fitted to when the fitter runs.
This action runs the surface fitter.
This action returns the number of steps completed by the last call to run.
This action gets the number of iterations of fitting for a particular surface created in this mode.
This action gets the RMS distance of the fit and point cloud for a particular surface created in this mode.
This action gets the dimension of the control points of the particular surface created in this mode.
This action gets the size of the point cloud used in the fit of the particular surface created in this mode.
This action gets the status of the fit for a particular surface created in this mode.

Instance Attributes

FitTolerance

$fitter get/setFitTolerance tol

This attribute is the tolerance to use when fitting surfaces.

Type

This attribute is a float with the range (0, infinity).

Default

The default for this attribute is the current fit tolerance based on the model size as returned by pw::Database.getFitTolerance.

Instance Actions

createSurfacesFromCurves

$fitter createSurfacesFromCurves ?-tolerance tol? ?-surfaceTolerance tol? ?-fitThreshold threshold? ?-interior? curves

This action automatically creates new surfaces using the given curves as boundaries for Coons patches and trimmed planes.  If the curve boundaries selected for a patch are coplanar, a trimmed plane will be constructed instead of a Coons patch.

Parameters

-tolerance tolThis optional parameter is the tolerance used for splitting and joining the curves and for creating the surface from the boundaries.  If not given, the current fit tolerance is used.
-surfaceTolerance tolThis optional parameter is the tolerance used creating the surface from the boundaries.  If not given, the value of the -tolerance parameter is used.
-fitThreshold thresholdThis optional parameter is a float value with the range [0, 1] specifying the percentage of the boundary curves of a created surface that must be database constrained to automatically set the fitting entities.  If this parameter is not given, no fitting entities will be selected automatically.
-interiorThis optional parameter will enable only allow the interior be fitted.  It is ignored if fitThreshold is not specified.
curvesThis parameter is a list of pw::Curve objects and/or boundaries.

Returns

This action returns a list of new pw::DatabaseEntity objects, which may include pw::Surface and pw::Quilt objects.  Note that when creating a trimmed plane, several new entities will be created, but only the quilt will be returned.

See Also

pw::Database.createSurfacesFromCurves, which works similar to this action except that it does not allow as much control over the fitting process.

createPatch

$fitter createPatch ?-tolerance tol? ?-surfaceTolerance tol? ?-fitThreshhold threshold? ?-interior? rail1 rail2 rail3 rail4

This action sets the surface by creating a patch between the given rails.  The rails can be one or more curves and borders and do not necessarily need to match exactly end to end, but should come within the given tolerance of each other or intersect.

Parameters

-tolerance tolThis optional parameter is the tolerance used for splitting and joining the curves and for creating the surface from the boundaries.  If not given, the current fit tolerance is used.
-surfaceTolerance tolThis optional parameter is the tolerance used creating the surface from the boundaries.  If not given, the value of the -tolerance parameter is used.
-fitThreshold thresholdThis optional parameter is a float value with the range [0, 1] specifying the percentage of the boundary curves of a created surface that must be database constrained to automatically set the fitting entities.  If this parameter is not given, no fitting entities will be selected automatically.
-interiorThis optional parameter will enable only allow the interior be fitted.  It is ignored if fitThreshold is not specified.
rail1This parameter is a list of pw::Curve objects and/or boundaries for the first rail.
rail2This parameter is a list of pw::Curve objects and/or boundaries for the second rail.
rail3This parameter is a list of pw::Curve objects and/or boundaries for the third rail.
rail4This parameter is a list of pw::Curve objects and/or boundaries for the fourth rail.

Returns

This action returns a pw::Surface object.

getCurveGapXYZs

$fitter getCurveGapXYZs

This action gets a list of vectors that represents the locations of any gaps discovered during the last call to createSurfacesFromCurves or createPatch.

Parameters

This action has no parameters.

Returns

This action returns a list of vectors.

getCurveGapSizes

$fitter getCurveGapSizes

This action gets a list of floats that represents the size of any gaps discovered during the last call to createSurfacesFromCurves or createPatch.

Parameters

This action has no parameters.

Returns

This action returns a list of floats.

getFitEntities

$fitter getFitEntities surf

This action gets the list of pw::DatabaseEntity objects that a surface created in this mode will be fitted to when the fitter runs.

Parameters

surfThe pw::DatabaseEntity object to get the fit entities that are associated with it.  It is an error to provide an object that is not part of this mode.

Returns

This action returns a list of pw::DatabaseEntity objects.

setFitEntities

$fitter setFitEntities surf entities

This action sets the list of pw::DatabaseEntity objects that a surface created in this mode will be fitted to when the fitter runs.

Parameters

surfThe pw::DatabaseEntity object to set the fit entities that are associated with it.  It is an error to provide an object that is not part of this mode.
entitiesA list of pw::DatabaseEntity objects that should be fitted to.  It is valid to set this to an empty list, which means that the surface will not be fitted.

Returns

This action returns nothing.

run

#fitter run ?steps?

This action runs the surface fitter.

Parameters

stepsThis optional parameter is the integer number of steps to run; the default is 1, and 0 is a special value that means the solver should run until stopped by the user or some other stop condition.

Returns

This action returns nothing.

Information

This command supports progress updates.  Unlike most commands that support progress updates, if the user aborts this command, instead of reverting to the previous state the entities being solved will be left as is.

getCompletedSteps

$solver getCompletedSteps

This action returns the number of steps completed by the last call to run.

Parameters

This action has no parameters.

Returns

This action returns the integer number of steps completed.

getIterationCount

$fitter getIterationCount surf

This action gets the number of iterations of fitting for a particular surface created in this mode.

Parameters

surfThe pw::DatabaseEntity object to get the fit entities that are associated with it.  It is an error to provide an object that is not part of this mode.

Returns

This action returns an integer.

getRMSDistance

$fitter getRMSDistance surf

This action gets the RMS distance of the fit and point cloud for a particular surface created in this mode.

Parameters

surfThe pw::DatabaseEntity object to get the fit entities that are associated with it.  It is an error to provide an object that is not part of this mode.

Returns

This action returns a <real>.

getDimensions

$fitter getDimensions surf

This action gets the dimension of the control points of the particular surface created in this mode.

Parameters

surfThe pw::DatabaseEntity object to get the fit entities that are associated with it.  It is an error to provide an object that is not part of this mode.

Returns

This action returns the domain dimensions as a two element integer list.

getCloudSize

$fitter getCloudSize surf

This action gets the size of the point cloud used in the fit of the particular surface created in this mode.

Parameters

surfThe pw::DatabaseEntity object to get the fit entities that are associated with it.  It is an error to provide an object that is not part of this mode.

Returns

This action returns an integer.

getStatus

$fitter getStatus surf

This action gets the status of the fit for a particular surface created in this mode.

Parameters

surfThe pw::DatabaseEntity object to get the fit entities that are associated with it.  It is an error to provide an object that is not part of this mode.

Returns

This action returns a string.

$fitter get/setFitTolerance tol
This attribute is the tolerance to use when fitting surfaces.
$fitter createSurfacesFromCurves ?-tolerance tol? ?-surfaceTolerance tol? ?-fitThreshold threshold? ?-interior? curves
This action automatically creates new surfaces using the given curves as boundaries for Coons patches and trimmed planes.
$fitter createPatch ?-tolerance tol? ?-surfaceTolerance tol? ?-fitThreshhold threshold? ?-interior? rail1 rail2 rail3 rail4
This action sets the surface by creating a patch between the given rails.
$fitter getCurveGapXYZs
This action gets a list of vectors that represents the locations of any gaps discovered during the last call to createSurfacesFromCurves or createPatch.
A vector is a list of float values.
$fitter getCurveGapSizes
This action gets a list of floats that represents the size of any gaps discovered during the last call to createSurfacesFromCurves or createPatch.
A float is a fractional number.
$fitter getFitEntities surf
This action gets the list of pw::DatabaseEntity objects that a surface created in this mode will be fitted to when the fitter runs.
Base type for all database entities
$fitter setFitEntities surf entities
This action sets the list of pw::DatabaseEntity objects that a surface created in this mode will be fitted to when the fitter runs.
#fitter run ?steps?
This action runs the surface fitter.
$solver getCompletedSteps
This action returns the number of steps completed by the last call to run.
$fitter getIterationCount surf
This action gets the number of iterations of fitting for a particular surface created in this mode.
$fitter getRMSDistance surf
This action gets the RMS distance of the fit and point cloud for a particular surface created in this mode.
$fitter getDimensions surf
This action gets the dimension of the control points of the particular surface created in this mode.
$fitter getCloudSize surf
This action gets the size of the point cloud used in the fit of the particular surface created in this mode.
$fitter getStatus surf
This action gets the status of the fit for a particular surface created in this mode.
Base type for all glyph types
The mode base type
pw::Application begin ?-mode_specific_flags? mode ?entities?
This action begins a mode in the application.
pw::Database getFitTolerance
This action gets the fit tolerance for database operations.
Database curve type
Database surface type
Database quilt type
pw::Database createSurfacesFromCurves ?-tolerance tol? ?-surfaceTolerance tol? ?-fitTolerance tol? ?-fitInterior threshold? ?-fitEntities entities? ?-fittedSurfaces fittedVar? curves
This action automatically creates new surfaces using the given curves as boundaries for Coons patches and trimmed planes.
A boundary is reference to either a database curve or the edge of a database surface.
An integer is a whole number.
A string is an array of characters.