pw::Model

Database model type

Derives From

pw::Object pw::Entity pw::DatabaseEntity

Summary
pw::ModelDatabase model type
Static Actions
assembleThis action assembles adjacent models when the edges are within the given tolerance.
isSameEdgeThis action checks if two boundaries represent the same edge in a model.
getBoundariesFromCurveThis action gets all model boundaries that are supported by the given pw::Curve object.
Instance Actions
getQuiltCountThis action gets the number of quilts in this model.
getQuiltThis action gets the quilt at the given index.
getQuiltsThis action gets the quilts of this model
getSurfaceTrimsThis action gets the trimmed surfaces of this model
getInteriorCurvesThis action gets all the curves that are at least partially on the interior of the trim surfaces of the quilts of this model.
splitThis action splits the model by putting the given quilts into new models and all other quilts in this model are put into other new models.
explodeThis action splits the model so that each quilt in the model is in it’s own model.
flipOrientationThis action flips the orientation of this model.
alignOrientationThis action aligns the normal orientation of the given models with this model.
orientRelativeThis action orients a model with respect to a point, by doing a closest point projection and reversing the orientation of the model so that the normal matches the inside or outside mode given.
trimByCurvesThis action modifies the model by imprinting the given curves.
trimByProjectionsThis action projects a list of curves onto the model, and modifies the model by imprinting the curves and optionally trimming the model.
trimBySurfacesThis action intersects a list of entities with the model, and modifies the model by imprinting the intersection curves and optionally trimming the model.
getBoundaryCountThis action gets the number of boundaries of the model.
getBoundaryThis action gets a lamina model boundary.
getBoundariesThis action gets the model boundary list.
getBoundaryCurveThis action gets a list of pw::Curve objects that serves as the model boundary.
getBoundaryCurvesThis action gets the pw::Curve objects that serve as the model boundaries.

Static Actions

assemble

pw::Model assemble ?-tolerance tol? ?-quiltMaximumAngle angle? ?-quiltboundaryMaximumAngle angle? ?-allowEmbeddedRegions? ?-reject rejectVar? ?-rejectReason rejectReasonVar? ?-rejectLocation rejectLocationVar? entities

This action assembles adjacent models when the edges are within the given tolerance.

Parameters

-tolerance tolThis optional parameter is the join tolerance, with the default value being the current fit tolerance.
-quiltMaximumAngle angleThis optional parameter is the float maximum bend angle for assembling adjacent quilts after assembling models with the range [0, 180].  The default is 0, which means that no quilts should be assembled.
-quiltBoundaryMaximumAngle angleThis optional parameter is the float maximum boundary bend angle for assembling adjacent quilt boundaries after assembling models with the range [0, 180].  The default is 0, which means that no quilts boundaries should be combined.
-allowEmbeddedRegionsIf this optional parameter is present, models enclosed within other models will be assembled into a single model.
-reject rejectVarThis optional parameter is the name string of the variable that receives a list of pw::Model and pw::Surface objects that were not used in assemble because of problems like overlapping entities.
-rejectReason rejectReasonVarThis optional parameter is the name string of the variable that receives a list of string reasons for reject the objects reported by the reject parameter.
-rejectLocation rejectLocationVarThis optional parameter is the name string of the variable that receives a list of vector locations associated with the reject and rejectReason parameters.
entitiesThis parameter is a list of pw::Model and pw::Surface objects to assemble.

Returns

This action returns a list of the pw::Model objects that are the result of the assemble operation.

isSameEdge

pw::Model isSameEdge boundaries

This action checks if two boundaries represent the same edge in a model.

Parameters

boundariesThis parameter is a list of quilt or trim surface style boundaries that will all be compared to see if they represent the same edge in a single model.

Returns

This action returns true if the given boundaries are all on the same edge of a model, or if a boundary is contained within another boundary.

getBoundariesFromCurve

pw::Model getBoundariesFromCurve <curve>

This action gets all model boundaries that are supported by the given pw::Curve object.

Parameters

curveThis parameter is a pw::Curve object

Returns

This action returns a list of boundaries.

Instance Actions

getQuiltCount

$model getQuiltCount

This action gets the number of quilts in this model.

Parameters

This action has no parameters.

Returns

This action returns the integer number of quilts.

getQuilt

$model getQuilt index

This action gets the quilt at the given index.

Parameters

indexThis parameter is the integer index of the quilt to get with the range [1, number of quilts].

Returns

This action returns a pw::Quilt object.

Note

Performance of this action may be slow if the model has many quilts.  The preferred method to iterate over the quilts of this model is to get them all with a single call using the getQuilts method.

getQuilts

$model getQuilts

This action gets the quilts of this model

Parameters

This action has no parameters.

Returns

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

getSurfaceTrims

$model getSurfaceTrims

This action gets the trimmed surfaces of this model

Parameters

This action has no parameters.

Returns

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

getInteriorCurves

$model getInteriorCurves

This action gets all the curves that are at least partially on the interior of the trim surfaces of the quilts of this model.

Parameters

This action has no parameters.

Returns

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

split

$model split ?-reassemble? quilts

This action splits the model by putting the given quilts into new models and all other quilts in this model are put into other new models.  The given trim surfaces will each be in their own models, unless the -reassemble parameter is specified.

Parameters

-reassembleIf this optional parameter is present, the given quilts are assembled into as few models as possible.
quiltsThis parameter is a list of pw::Quilt objects.

Returns

This action returns a list of the new pw::Model objects.

explode

$model explode

This action splits the model so that each quilt in the model is in it’s own model.

Parameters

none

Returns

This action returns a list of the new pw::Model objects.

flipOrientation

$model flipOrientation

This action flips the orientation of this model.

Parameters

none

Returns

This action returns nothing.

alignOrientation

$model alignOrientation ?-tolerance tol? models

This action aligns the normal orientation of the given models with this model.  If this model is open, any models in the given list that are connected within the given tolerance to this model, will have their orientation aligned.  If this model is closed, any closed models in the given list that are contained within this model, or that this model is fully contained within, will have their orientation aligned.  Any other models that don’t fit the criteria will be ignored.

Parameters

-tolerance tolThis parameter is the tolerance used to consider models adjacent; It defaults to the fit tolerance.
modelsThis parameter is a list of pw::Model objects to align.

Returns

This action returns nothing.

orientRelative

$model orientRelative ?<-outside | -inside>? point

This action orients a model with respect to a point, by doing a closest point projection and reversing the orientation of the model so that the normal matches the inside or outside mode given.

Parameters

-outsideThis optional parameter specifies that the given point should be outside the model.
-insideThis optional parameter specifies that the given point should be inside the model.
pointThis is a point to be classified as inside or outside the model.  The default mode is outside if none given

Returns

This action returns nothing.

trimByCurves

$model trimByCurves curves

This action modifies the model by imprinting the given curves.

Parameters

curvesThis is a list of curves and/or boundaries to imprint onto the model.

Returns

This action returns a list of the pw::Model objects after the action.

trimByProjections

$model trimByProjections ?-tolerance tol? ?-type proj_type? ?-direction direction? ?-keep side? curves

This action projects a list of curves onto the model, and modifies the model by imprinting the curves and optionally trimming the model.

Parameters

-tolerance tolThis optional parameter is the projection tolerance, with the default value being the current fit tolerance.
-type proj_typeThis optional parameter is the string projection type to perform with options < ClosestPoint | Linear >.
-direction directionThis optional parameter is the projection vector for linear projection.  The default is the positive z-axis.
-keep sideThis optional parameter is a string which specifies what side (based on the normal of the entities) of the imprinted entities is kept with options < Both | Inside | Outside >.
curvesThis is a list of curves and/or boundaries to project onto the model.

Returns

This action returns a list of the pw::Model objects after the action.

trimBySurfaces

$model trimBySurfaces ?-tolerance tol? ?-mode imprint_mode? ?-keep side? entities

This action intersects a list of entities with the model, and modifies the model by imprinting the intersection curves and optionally trimming the model.

Parameters

-tolerance tolThis optional parameter is the intersection tolerance, with the default value being the current fit tolerance.
-mode imprint_modeThis optional parameter is a string which specifies which set of entities are imprinted on with options < Both | First >.
-keep sideThis optional parameter is a string which specifies what side (based on the normal of the entities) of the imprinted entities is kept with options < Both | Inside | Outside >.
entitiesThis is a list of pw::Surface, pw::Plane and pw::Model objects to intersect with the model.

Returns

This action returns a list of the pw::Model objects after the action.

getBoundaryCount

$model getBoundaryCount

This action gets the number of boundaries of the model.

Parameters

none

Information

This action returns the number of lamina boundaries of a pw.Model.  All model boundaries are the lamina boundaries of the pw.Quilts of which the model is composed.  Here, “lamina” means that the boundary is used only once by all of the quilts of the model.  Manifold boundaries (used by exactly two pw.Quilts, or used twice within the same pw.Quilt, are not returned.  pw.Model does not support non-manifold boundary topology.

See Also

getBoundary, getBoundaries, pw.Quilt.getBoundaryCount, pw.SurfaceTrim.getBoundaryCount

Returns

This action returns the number of boundaries of the model.

getBoundary

$model getBoundary index

This action gets a lamina model boundary.

Parameters

-quiltIf specified, this option indicates that the boundary should be expressed as a quilt boundary.
indexThis parameter is the index of the boundary to get.

Information

See getBoundaryCount for a description of what constitutes a “lamina” model boundary.  pw.Model does not support non-manifold boundary topology.

See Also

getBoundaryCount, getBoundaries, pw.Quilt.getBoundary, pw.SurfaceTrim.getBoundary

Returns

This action returns a boundary.

getBoundaries

$model getBoundaries

This action gets the model boundary list.

Parameters

-quiltIf specified, this option indicates that each boundary should be expressed as a quilt boundary.

Information

See getBoundaryCount for a description of what constitutes a “lamina” model boundary.  To discover pw.Quilt boundaries, see pw.Quilt.getBoundaries.

See Also

getBoundaryCount, getBoundary, pw.Quilt.getBoundaries, pw.SurfaceTrim.getBoundaries

Returns

This action returns a boundary list.

getBoundaryCurve

$model getBoundaryCurve index

This action gets a list of pw::Curve objects that serves as the model boundary.

Parameters

indexThis parameter is the index of the boundary to get the curve of.

Returns

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

getBoundaryCurves

$model getBoundaryCurves

This action gets the pw::Curve objects that serve as the model boundaries.

Parameters

This action has no parameters.

Returns

This action returns a list of lists of pw::Curve objects.

pw::Model assemble ?-tolerance tol? ?-quiltMaximumAngle angle? ?-quiltboundaryMaximumAngle angle? ?-allowEmbeddedRegions? ?-reject rejectVar? ?-rejectReason rejectReasonVar? ?-rejectLocation rejectLocationVar? entities
This action assembles adjacent models when the edges are within the given tolerance.
pw::Model isSameEdge boundaries
This action checks if two boundaries represent the same edge in a model.
pw::Model getBoundariesFromCurve <curve>
This action gets all model boundaries that are supported by the given pw::Curve object.
Database curve type
$model getQuiltCount
This action gets the number of quilts in this model.
$model getQuilt index
This action gets the quilt at the given index.
$model getQuilts
This action gets the quilts of this model
$model getSurfaceTrims
This action gets the trimmed surfaces of this model
$model getInteriorCurves
This action gets all the curves that are at least partially on the interior of the trim surfaces of the quilts of this model.
$model split ?-reassemble? quilts
This action splits the model by putting the given quilts into new models and all other quilts in this model are put into other new models.
$model explode
This action splits the model so that each quilt in the model is in it’s own model.
$model flipOrientation
This action flips the orientation of this model.
$model alignOrientation ?-tolerance tol? models
This action aligns the normal orientation of the given models with this model.
$model orientRelative ?<-outside | -inside>? point
This action orients a model with respect to a point, by doing a closest point projection and reversing the orientation of the model so that the normal matches the inside or outside mode given.
$model trimByCurves curves
This action modifies the model by imprinting the given curves.
$model trimByProjections ?-tolerance tol? ?-type proj_type? ?-direction direction? ?-keep side? curves
This action projects a list of curves onto the model, and modifies the model by imprinting the curves and optionally trimming the model.
$model trimBySurfaces ?-tolerance tol? ?-mode imprint_mode? ?-keep side? entities
This action intersects a list of entities with the model, and modifies the model by imprinting the intersection curves and optionally trimming the model.
$model getBoundaryCount
This action gets the number of boundaries of the model.
$model getBoundary index
This action gets a lamina model boundary.
A boundary is reference to either a database curve or the edge of a database surface.
$model getBoundaries
This action gets the model boundary list.
$model getBoundaryCurve index
This action gets a list of pw::Curve objects that serves as the model boundary.
$model getBoundaryCurves
This action gets the pw::Curve objects that serve as the model boundaries.
Base type for all glyph types
Entity type
Base type for all database entities
A float is a fractional number.
A string is an array of characters.
Database model type
Database surface type
A vector is a list of float values.
An integer is a whole number.
Database quilt type
Database trim surface type
A point is a position either in model space or database parameter space.
Database plane type
$quilt getBoundaryCount
This action gets the number of boundaries of the quilt.
$tsurf getBoundaryCount
This action gets the number of boundary curves of the trim surface.
$quilt getBoundary index
This action gets a quilt boundary.
$tsurf getBoundary index
This action gets a trim surface boundary.
$quilt getBoundaries
This action gets a quilt boundary list.
$tsurf getBoundaries
This action gets a trim surface boundary list.
Close