The surface fitter mode type
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]
pw:: | The surface fitter mode type |
Instance Attributes | |
BoundaryTolerance | This attribute is the tolerance to use when splitting and joining the curves specified as the boundaries, for detecting end to end connections of the boundaries, and for creating the surface from the boundaries. |
UseBoundaryTangency | This attribute controls whether tangency at boundaries should be used to build a surface. |
TangencyEntities | This attribute is a list of database entities to limit which can provide tangency information when calling createSurfacesFromCurves or createPatch. |
FitTolerance | This attribute is the tolerance to use when fitting surfaces to a cloud of points. |
FitInteriorOnly | This attribute controls whether only the interior of a surface will be fitted. |
FitEntitiesThreshold | This attribute specifies the percentage of length of the boundary curves of a created surface that must be database constrained to automatically set the fitting entities. |
Instance Actions | |
createSurfacesFromCurves | This action automatically creates new surfaces using the given curves as boundaries for Coons patches and trimmed planes. |
createPatch | This action creates a single surface patch between the given rails. |
classifySurface | This action classifies how a surface was created during the last call to createSurfacesFromCurves or createPatch. |
getCurveGapXYZs | This action gets a list of vectors that represents the locations of any gaps discovered during the last call to createSurfacesFromCurves or createPatch. |
getCurveGapSizes | This action gets a list of floats that represents the size of any gaps discovered during the last call to createSurfacesFromCurves or createPatch. |
getFitEntities | This action gets the list of pw::DatabaseEntity objects that a surface created in this mode will be fitted to when the fitter runs. |
setFitEntities | This action sets the list of pw::DatabaseEntity objects that a surface created in this mode will be fitted to when the fitter runs. |
run | This action runs the surface fitter. |
getCompletedSteps | This action returns the number of steps completed by the last call to run. |
getIterationCount | This action gets the number of iterations of fitting for a particular surface created in this mode. |
getRMSDistance | This action gets the RMS distance of the fit and point cloud for a particular surface created in this mode. |
getDimensions | This action gets the dimension of the control points of the particular surface created in this mode. |
getCloudSize | This action gets the size of the point cloud used in the fit of the particular surface created in this mode. |
getStatus | This action gets the status of the fit for a particular surface created in this mode. |
$fitter get/setBoundaryTolerance tol
This attribute is the tolerance to use when splitting and joining the curves specified as the boundaries, for detecting end to end connections of the boundaries, and for creating the surface from the boundaries.
This attribute is a float with the range (0, infinity).
The default for this attribute is the current fit tolerance based on the model size as returned by pw::Database.getFitTolerance.
$fitter get/setUseBoundaryTangency useTangency
This attribute controls whether tangency at boundaries should be used to build a surface.
This attribute is a boolean.
The default for this attribute is false.
$fitter get/setTangencyEntities db_list
This attribute is a list of database entities to limit which can provide tangency information when calling createSurfacesFromCurves or createPatch.
This attribute is a list of pw::DatabaseEntity objects
The default for this attribute is an empty list, which means the tangency information will be used from any database entities that are associated with the curves and boundaries used to create surfaces.
$fitter get/setFitTolerance tol
This attribute is the tolerance to use when fitting surfaces to a cloud of points.
This attribute is a float with the range (0, infinity).
The default for this attribute is the current fit tolerance based on the model size as returned by pw::Database.getFitTolerance.
$fitter get/setFitInteriorOnly interiorOnly
This attribute controls whether only the interior of a surface will be fitted.
This attribute is a boolean.
The default for this attribute is false.
$fitter get/setFitEntitiesThreshold tol
This attribute specifies the percentage of length of the boundary curves of a created surface that must be database constrained to automatically set the fitting entities.
This attribute is a float with the range [0, 1].
The default for this attribute is 0 which means that no fit entities will be set when a surface is created.
$fitter createSurfacesFromCurves 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. If the curves boundaries have a single tangent pspace entity, a tangent quilt will be untrimmmed using the curve boundaries.
curves | This parameter is a list of pw::Curve objects and/or boundaries. |
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.
Code
# Automatic selection of database entities set fitter [pw::Application begin SurfaceFit] $fitter setFitEntitiesThreshold .5 set surfs [$fitter createSurfacesFromCurves [list $curve1 $curve2 $curve3 $curve4 $curve5 $curve6]] $fitter run 10 $fitter end
pw::Database.createSurfacesFromCurves, which works similar to this action except that it does not allow as much control over the fitting process.
$fitter createPatch ?-tolerance tol? ?-surfaceTolerance tol? ?-fitThreshhold threshold? ?-interior? rail1 rail2 rail3 rail4
This action creates a single surface patch between the given rails. Each rail can be one or more curves and/or boundaries and do not necessarily need to match exactly end to end, but should come within the given tolerance of each other or intersect. If an empty list is passed in for a rail, it will be marked as a pole while creating the Coons patch.
rail1 | This parameter is a list of pw::Curve objects and/or boundaries for the first rail. |
rail2 | This parameter is a list of pw::Curve objects and/or boundaries for the second rail. |
rail3 | This parameter is a list of pw::Curve objects and/or boundaries for the third rail. |
rail4 | This parameter is a list of pw::Curve objects and/or boundaries for the fourth rail. |
This action returns a pw::Surface object.
Code
# Automatic selection of database entities set fitter [pw::Application begin SurfaceFit] $fitter setFitEntitiesThreshold .5 set surf [$fitter createPatch [list $curve1] [list $curve2 $curve3] [list $curve4] [list $curve5 $curve6]] $fitter run 10 $fitter end
$fitter classifySurface surf
This action classifies how a surface was created during the last call to createSurfacesFromCurves or createPatch.
surf | The pw::DatabaseEntity object to classify. It is an error to provide an object that is not part of this mode. |
This action returns a string with possible values TangencyPatch, CoonsPatch, TrimmedPatch and TrimmedPlane
$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.
This action has no parameters.
This action returns a list of vectors.
$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.
This action has no parameters.
This action returns a list of floats.
$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.
surf | The 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. |
This action returns a list of pw::DatabaseEntity objects.
$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.
surf | The 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. |
entities | A 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. |
This action returns nothing.
Code
set fitter [pw::Application begin SurfaceFit] set surfs [$fitter createSurfacesFromCurves -fitThreshold .5 [list $curve1 $curve2 $curve3 $curve4 $curve5 $curve6]] $fitter setFitEntities [lindex $surfs 0] [list $shell1 $shell2] $fitter setFitEntities [lindex $surfs 1] [list $shell2 $shell3] $fitter run 10 $fitter end
$fitter run ?steps?
This action runs the surface fitter.
steps | This 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 like surface tolerance. |
This action returns nothing.
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.
$solver getCompletedSteps
This action returns the number of steps completed by the last call to run.
This action has no parameters.
This action returns the integer number of steps completed.
$fitter getIterationCount surf
This action gets the number of iterations of fitting for a particular surface created in this mode.
surf | The 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. |
This action returns an integer.
$fitter getRMSDistance surf
This action gets the RMS distance of the fit and point cloud for a particular surface created in this mode.
surf | The 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. |
This action returns a <real>.
$fitter getDimensions surf
This action gets the dimension of the control points of the particular surface created in this mode.
surf | The 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. |
This action returns the domain dimensions as a two element integer list.
$fitter getCloudSize surf
This action gets the size of the point cloud used in the fit of the particular surface created in this mode.
surf | The 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. |
This action returns an integer.
$fitter getStatus surf
This action gets the status of the fit for a particular surface created in this mode.
surf | The 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. |
This action returns a string.
This attribute is the tolerance to use when splitting and joining the curves specified as the boundaries, for detecting end to end connections of the boundaries, and for creating the surface from the boundaries.
$fitter get/setBoundaryTolerance tol
This attribute controls whether tangency at boundaries should be used to build a surface.
$fitter get/setUseBoundaryTangency useTangency
This attribute is a list of database entities to limit which can provide tangency information when calling createSurfacesFromCurves or createPatch.
$fitter get/setTangencyEntities db_list
This action automatically creates new surfaces using the given curves as boundaries for Coons patches and trimmed planes.
$fitter createSurfacesFromCurves curves
This action creates a single surface patch between the given rails.
$fitter createPatch ?-tolerance tol? ?-surfaceTolerance tol? ?-fitThreshhold threshold? ?-interior? rail1 rail2 rail3 rail4
This attribute is the tolerance to use when fitting surfaces to a cloud of points.
$fitter get/setFitTolerance tol
This attribute controls whether only the interior of a surface will be fitted.
$fitter get/setFitInteriorOnly interiorOnly
This attribute specifies the percentage of length of the boundary curves of a created surface that must be database constrained to automatically set the fitting entities.
$fitter get/setFitEntitiesThreshold tol
This action classifies how a surface was created during the last call to createSurfacesFromCurves or createPatch.
$fitter classifySurface surf
This action gets a list of vectors that represents the locations of any gaps discovered during the last call to createSurfacesFromCurves or createPatch.
$fitter getCurveGapXYZs
This action gets a list of floats that represents the size of any gaps discovered during the last call to createSurfacesFromCurves or createPatch.
$fitter getCurveGapSizes
This action gets the list of pw::DatabaseEntity objects that a surface created in this mode will be fitted to when the fitter runs.
$fitter getFitEntities surf
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 setFitEntities surf entities
This action runs the surface fitter.
$fitter run ?steps?
This action returns the number of steps completed by the last call to run.
$solver getCompletedSteps
This action gets the number of iterations of fitting for a particular surface created in this mode.
$fitter getIterationCount surf
This action gets the RMS distance of the fit and point cloud for a particular surface created in this mode.
$fitter getRMSDistance surf
This action gets the dimension of the control points of the particular surface created in this mode.
$fitter getDimensions surf
This action gets the size of the point cloud used in the fit of the particular surface created in this mode.
$fitter getCloudSize surf
This action gets the status of the fit for a particular surface created in this mode.
$fitter getStatus surf
This action begins a mode in the application.
pw::Application begin ?-mode_specific_flags? mode ?entities?
This action gets the fit tolerance for database operations.
pw::Database getFitTolerance
This action automatically creates new surfaces using the given curves as boundaries for Coons patches and trimmed planes.
pw::Database createSurfacesFromCurves ?-tolerance tol? ?-surfaceTolerance tol? ?-fitTolerance tol? ?-fitInterior threshold? ?-fitEntities entities? ?-fittedSurfaces fittedVar? curves