Database surface type
pw::Object pw::Entity pw::DatabaseEntity
pw:: | Database surface type |
Static Actions | |
create | This action creates a new surface object. |
createFromCurves | This action automatically creates new surfaces using the given curves as boundaries for Coons patches. |
join | This action joins as many of the given surfaces together as possible. |
Instance Actions | |
getPosition | This action gets the position in the defining space of the surface at the given parameter. |
getXYZ | This action gets the position of the surface in model space at the given parameter. |
getBoundaryCount | This action gets the number of boundaries of the surface. |
getBoundary | This action gets a surface boundary. |
getBoundaries | This action gets a surface boundary list. |
getInteriorCurves | This action gets all the curves that are at least partially on the surface. |
clear | This action sets the surface to the initial cleared state. |
sweep | This action sets the surface by sweeping a curve by a vector. |
interpolate | This action sets the surface by interpolating between the given curves. |
patch | This action sets the surface by creating a patch between the given rails. |
fillet | This action sets the surface by connecting two curves using a polyconic. |
revolve | This action sets the surface by revolving a curve around another curve or axis. |
spline | This action sets this surface to a smooth interpolation of the control points of the given surface. |
fitLSQ | This action sets this surface to a least squares fit approximation of the given entities. |
split | This action splits the surface in the given direction at a given parameter value. |
setOrientation | This action sets the orientation of this surface by specifying the umin and vmin edges of the surface. |
alignOrientation | This action aligns the UV orientation of the given surfaces with this surface. |
isClosed | This action checks if the surface is closed in the given direction. |
isPole | This action checks if the surface Edge is a pole. |
getDiscontinuities | This action returns a list of parameters in the given direction at discontinuites with a bend angle greater than the given angle. |
getXYZsAtParameter | This action gets a list of points along a constant parameter of a surface suitable for rendering. |
getXYZsAtIntervals | This action gets a list of points along the U- and V-intervals. |
getIntervalParameters | This action gets the list of interval parameters in the U or V direction on a surface. |
pw::Surface create
This action creates a new surface object.
none
This action returns a new pw::Surface object.
pw::Surface createFromCurves ?-tolerance tol? curves
This action automatically creates new surfaces using the given curves as boundaries for Coons patches.
-tolerance tol | This 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. |
curves | This parameter is a list of pw::Curve objects and/or boundaries. |
This action returns a list of new pw::Surface objects.
pw::Database.createSurfacesFromCurves, which works similar to this action except that it makes trimmed planes instead of Coons patches when the input curves are planar. pw::Surface.interpolate and pw::Surface.patch also create Coons patches with more explicit control over the boundary curves.
pw::Surface join ?-reject rejectVar? ?-tolerance tol? surfs
This action joins as many of the given surfaces together as possible.
-reject rejectVar | This optional parameter is a variable name to receive a list of pw::Surface objects that were not used in joining. |
-tolerance tol | This optional parameter is the fit tolerance. |
surfs | This parameter is a list of pw::Surface objects to join. |
This action returns a list of the pw::Surface objects that were joined.
This command supports progress updates.
$surface getPosition ?-parameter? value
This action gets the position in the defining space of the surface at the given parameter.
-parameter | This optional parameter indicates to get the position at a parameter; the value is a uv parameter in the range [0.0, 1.0]; this is the default option. |
value | This parameter is the value at which to get the position. |
This action returns a point giving the position on the surface (may be in the form “u v dbentity”).
$surface getXYZ ?-parameter? value
This action gets the position of the surface in model space at the given parameter.
-parameter | This optional parameter indicates to get the xyz at a parameter; the value is a uv parameter [(0,0),(1,1)]; this is the default option. |
value | This parameter is the value at which to get the position. |
This action returns an XYZ vector.
$surface getBoundary < index | boundary >
This action gets a surface boundary.
index | This parameter is the index of the boundary to get with the range [1, number of boundaries]. |
boundary | This parameter is the parametric boundary with options < UMinimum | UMaximum | VMinimum | VMaximum >. |
This action returns a boundary.
The boundary index 1 corresponds to VMinimum, 2 corresponds to UMaximum, 3 corresponds to VMaximum and 4 corresponds to UMinimum.
$surface getInteriorCurves
This action gets all the curves that are at least partially on the surface. Curves along the boundary of the surface will be returned as well, but this function uses the name “interior” to differentiate from the boundary curves that are returned by getBoundary
This action has no parameters.
This action returns a list of pw::Curve objects.
$surface sweep ?-reverse? generatrix vector
This action sets the surface by sweeping a curve by a vector.
-reverse | This optional paramter indicates to reverse the rail vector. |
generatrix | This parameter is a pw::Curve object or boundary for the generatrix. |
vector | This parameter is the rail vector. |
This action returns nothing.
$surface interpolate ?-orient < Same | Opposite | Best >? ?-tolerance tol? rail1 rail2 ?rail3 rail4?
This action sets the surface by interpolating between the given curves. If two curves are given a ruled surface is created. If four curves are given a Coons patch is created with rail1 specifying the minimum u border and the rest of the rails arranged based on their ends being within the given tolerance, and the -orient flag is ignored.
-orient < Same | Opposite | Best > | This optional parameter specifies the orientation of the curves when interpolating two curves. Same is the default, Best will choose the orientation that leads to the flatest surface. |
-tolerance tol | This parameter is the fit tolerance; if it is not present the current fit tolerance is used. |
rail1 | This parameter is a pw::Curve object or boundary for the first rail curve. |
rail2 | This parameter is a pw::Curve object or boundary for the second rail curve. |
rail3 | This parameter is a pw::Curve object or boundary for the third rail curve. |
rail4 | This parameter is a pw::Curve object or boundary for the fourth rail curve. |
This action returns nothing.
$surface patch ?-tolerance tol? ?-surfaceTolerance tol? ?-fitTolerance tol? ?-fitInterior threshold? ?-fitEntities entities? ?-fitted fittedVar? 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.
-tolerance tol | This 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 tol | This optional parameter is the tolerance used creating the surface from the boundaries. If not given, the value of the -tolerance parameter is used. |
-fitTolerance tol | This optional parameter is the tolerance used for fitting the surface to the database entities. If not given, the current fit tolerance is used. |
-fitInterior threshold | This 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 trigger the interior to be fit to those database entities. If this parameter is not given, no fitting will be done. |
-fitEntities entities | This optional parameter is a list of pw::DatabaseEntity objects to limit fitting to. If this parameter is not given, fitting will be done to the database entities that the rail curves lie on. |
-fitted fittedVar | This optional parameter is a variable name to receive a boolean value if fitting was done to the 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 nothing.
Code
# Simple coons surface w/ 4 curves surf(patch1) [pw::Surface create] $surf(patch1) patch [list $curve(1)] [list $curve(2)] \ [list $curve(3)] [list $curve(4)] # Coons surface with sharp angle along side set ccrv(p1) [create2PtCurve {10 10 30} {11 15 30}] set ccrv(p2) [create2PtCurve {11 15 30} {19 15 30}] set ccrv(p3) [create2PtCurve {19 15 30} {20 10 30}] set ccrv(p4) [create2PtCurve {10 0 30} {10 10 30}] set ccrv(p5) [create2PtCurve {10 0 30} {20 0 30}] set ccrv(p6) [create2PtCurve {20 0 30} {20 10 30}] $surf(patch1) patch [list $ccrv(p1) $ccrv(p2) $ccrv(p3)] \ [list $ccrv(p4)] [list $ccrv(p5)] [list $ccrv(p6)]
$surface fillet ?-rho rho? ?-tolerance tol? rail1 rail2 intersection ?spine?
This action sets the surface by connecting two curves using a polyconic.
-rho rho | This optional paramter is the rho of the polyconic; [0, .5) = ellipse, .5 = parabola, (.5, 1] = hyperbola, defaults to .5. |
-tolerance tol | This optional parameter is the fit tolerance; if it is not present the current fit tolerance is used |
rail1 | This parameter is a pw::Curve object or boundary for the first rail curve. |
rail2 | This parameter is a pw::Curve object or boundary for the second rail curve. |
intersection | This parameter is a pw::Curve object or boundary for the intersection curve. |
spine | This optional parameter is a pw::Curve object or boundary for the spine curve; defaults to the intersection curve. |
This action returns nothing.
$surface revolve ?-angle revolve? ?-tolerance tol? generatrix < axis | point normal >
This action sets the surface by revolving a curve around another curve or axis.
-angle revolve | This optional parameter is the number of degree to revolve the generatrix around the axis; [-360, 0), (0, 360], default is 360. |
-tolerance tol | This optional parameter is the fit tolerance; if it is not present the current fit tolerance is used. |
generatrix | This parameter is a pw::Curve object or boundary for the generatrix. |
axis | This parameter is a pw::Curve object or boundary for the axis. |
point | This parameter is the axis point. |
normal | This parameter is a normalised vector along the axis of revolution. |
This action returns nothing.
$surface spline ?surface?
This action sets this surface to a smooth interpolation of the control points of the given surface.
surface | This optional parameter is a pw::Surface object whose control points will be interpolated. If not given the spline action will interpolate this surface’s own control points. |
This action returns nothing.
$surface fitLSQ ?-tolerance tol? ?-interior? ?entities?
This action sets this surface to a least squares fit approximation of the given entities.
-tolerance tol | This optional parameter is the float approximation tolerance with the range [0, infinity). The default is the current tolerance returned from <getFitTolerance>. |
-interior | If this optional flag is present, only the interior of the surface is fitted. |
dbentities | This parameter is the optional list of database surface-like entities to fit to. If none are given, fit to any currently enabled, visible database surface-like entities, not including itself. |
This action returns nothing.
As a first step to fitting, the surface’s control points will be projected in the direction of the surface normal at that location in both directions on to the given dbentities. This will inform the fitting routine what will be fitted to. Because of this, even if an entity is given in the dbentities list
Code
set b1 [create2PtCurve {70 0 0} {75 0 5}] set b2 [create2PtCurve {75 0 5} {75 10 5}] set b3 [create2PtCurve {75 10 5} {70 10 0}] set b4 [create2PtCurve {70 10 0} {70 0 0}] set surf(fit) [pw::Surface createFromCurves [list $b1 $b2 $b3 $b4]] $surf(fit) fitLSQ -interior
$surface split ?< -U | -V >? parameters
This action splits the surface in the given direction at a given parameter value.
-U | This indicates to split at a constant u parameter; the default. |
-V | This indicates to split at a constant v parameter. |
parameters | These are the parameters at which to split; (0.0, 1.0) |
This action returns a list of the new pw::Surface objects.
Any duplicate parameters will be ignored, as will parameters at the limits of the surface.
$surf setOrientation u_edge v_edge
This action sets the orientation of this surface by specifying the umin and vmin edges of the surface.
u_edge | This parameter is the index or boundary to be used as the Umin Edge. |
v_edge | This parameter is the index or boundary to be used as the Vmin Edge. |
This action returns nothing.
For both the u_egde and v_edge the following boundary keywords or the associated index may be used: VMinimum = 1, UMaximum = 2, VMaximum = 3, UMinimum = 4.
$surf alignOrientation ?-tolerance tol? surfaces
This action aligns the UV orientation of the given surfaces with this surface. If any surfaces in the given list are not connected within the given tolerance to this surface, they will be ignored.
-tolerance tol | This is the tolerance used to consider surfaces adjacent; it defaults to the fit tolerance. |
surfaces | This parameter is a list of pw::Surface objects to align. |
This action returns nothing.
$surface isClosed ?< -U | -V >?
This action checks if the surface is closed in the given direction.
-U | This indicates to check in the u direction; It is the default. |
-V | This indicates to check in the v direction. |
This action returns a boolean, which is true if the surface is closed in the given direction.
$surface isPole ?< -UMin | -UMax | -VMin | -Vmax >?
This action checks if the surface Edge is a pole.
-UMin | This indicates to check the u minimum Edge; it is the default. |
-UMax | This indicates to check the u maximum Edge. |
-VMin | This indicates to check the v minimum Edge. |
-VMax | This indicates to check the v maximum Edge. |
This action returns a boolean, which is true if the given surface Edge is a pole.
$surface getDiscontinuities ?< -U | -V >? ?angle?
This action returns a list of parameters in the given direction at discontinuites with a bend angle greater than the given angle.
-U | Return parameters at discontinuities in the u direction; it is the default. |
-V | Return parameters at discontinuities in the v direction. |
angle | All discontinuies with a bend angle greater than this given angle will be returned; the default is 0.0 which will return all discontinuities. |
This action returns a list of parameters at discontinuities.
$surface getXYZsAtParameter ?< -U | -V >? parameter
This action gets a list of points along a constant parameter of a surface suitable for rendering.
-U | Extract points on a constant u parameter; it is the default. |
-V | Extract points on a constant v parameter. |
parameter | This is the parameter to render at; (0.0, 1.0). |
This action returns a list of the xyz points.
$surface getXYZsAtIntervals ?dimensionVar?
This action gets a list of points along the U- and V-intervals.
dimensionVar | a string that signifies the variable to receive the number of U intervals and V intervals (specified as a list of 2 integer values) |
This action returns xyz points representing constant U- and V-parameter lines at the surface’s intervals. The result will be a list of lines, with each line specified as a list of XYZ vector values. The number of lines will be equal to the number of U- and V-intervals (ie, the sum of the values returned in dimensionVar). The U-interval lines will be listed first, followed by the V-interval lines.
$surface getIntervalParameters ?< -U | -V >
This action gets the list of interval parameters in the U or V direction on a surface.
-U | Interval parameters in the U direction; it is the default. |
-V | Interval parameters in the V direction. |
This action returns a list of parameters for the specified direction.
This action creates a new surface object.
pw::Surface create
This action automatically creates new surfaces using the given curves as boundaries for Coons patches.
pw::Surface createFromCurves ?-tolerance tol? curves
This action joins as many of the given surfaces together as possible.
pw::Surface join ?-reject rejectVar? ?-tolerance tol? surfs
This action gets the position in the defining space of the surface at the given parameter.
$surface getPosition ?-parameter? value
This action gets the position of the surface in model space at the given parameter.
$surface getXYZ ?-parameter? value
This action gets the number of boundaries of the surface.
$surface getBoundaryCount
This action gets a surface boundary.
$surface getBoundary < index | boundary >
This action gets a surface boundary list.
$surface getBoundaries
This action gets all the curves that are at least partially on the surface.
$surface getInteriorCurves
This action sets the surface to the initial cleared state.
$surface clear
This action sets the surface by sweeping a curve by a vector.
$surface sweep ?-reverse? generatrix vector
This action sets the surface by interpolating between the given curves.
$surface interpolate ?-orient < Same | Opposite | Best >? ?-tolerance tol? rail1 rail2 ?rail3 rail4?
This action sets the surface by creating a patch between the given rails.
$surface patch ?-tolerance tol? ?-surfaceTolerance tol? ?-fitTolerance tol? ?-fitInterior threshold? ?-fitEntities entities? ?-fitted fittedVar? rail1 rail2 rail3 rail4
This action sets the surface by connecting two curves using a polyconic.
$surface fillet ?-rho rho? ?-tolerance tol? rail1 rail2 intersection ?spine?
This action sets the surface by revolving a curve around another curve or axis.
$surface revolve ?-angle revolve? ?-tolerance tol? generatrix < axis | point normal >
This action sets this surface to a smooth interpolation of the control points of the given surface.
$surface spline ?surface?
This action sets this surface to a least squares fit approximation of the given entities.
$surface fitLSQ ?-tolerance tol? ?-interior? ?entities?
This action splits the surface in the given direction at a given parameter value.
$surface split ?< -U | -V >? parameters
This action sets the orientation of this surface by specifying the umin and vmin edges of the surface.
$surf setOrientation u_edge v_edge
This action aligns the UV orientation of the given surfaces with this surface.
$surf alignOrientation ?-tolerance tol? surfaces
This action checks if the surface is closed in the given direction.
$surface isClosed ?< -U | -V >?
This action checks if the surface Edge is a pole.
$surface isPole ?< -UMin | -UMax | -VMin | -Vmax >?
This action returns a list of parameters in the given direction at discontinuites with a bend angle greater than the given angle.
$surface getDiscontinuities ?< -U | -V >? ?angle?
This action gets a list of points along a constant parameter of a surface suitable for rendering.
$surface getXYZsAtParameter ?< -U | -V >? parameter
This action gets a list of points along the U- and V-intervals.
$surface getXYZsAtIntervals ?dimensionVar?
This action gets the list of interval parameters in the U or V direction on a surface.
$surface getIntervalParameters ?< -U | -V >
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