pw::Database

Global actions for database entities

Derives From

pw::Object

Summary
pw::DatabaseGlobal actions for database entities
Static Actions
getExportFileTypesThis action gets a list of file types that can export all of the given entities.
exportThis action exports the list of entities to the given file.
importImport the given file into the database.
saveThis action saves the entire database in the native file format.
intersectThis action intersects database entities.
createSurfacesFromCurvesThis action automatically creates new surfaces using the given curves as boundaries for Coons patches and trimmed planes.
getXYZThis action gets the 3D position of the given point.
getEntityThis action gets the database entity of the given point.
offsetUVThis action offsets the uv coordinates of the given parametric database point.
offsetNormalThis action calculates the offset from the given database point in the direction of the normal at the point.
getNormalThis action returns the normal at the specified database point.
getRadiusOfCurvatureThis action returns the radius of curvature at the specified database point.
getGeometricPropertiesThis action calculates the geometric properties at the specified database point.
getTotalLengthThis action gets the total length of a pw::Curve or boundary.
getCurveThis action gets the corresponding pw::Curve for a boundary, if any.
mapBoundaryThis action maps a database boundary to a different topology level.
closestPointThis action gets the closest point on a database entity from a given point.
intersectRayThis action gets the ray intersection on a database entity from a given ray.
isBaseForProjectThis action checks if this database contains entities that can be projected onto using the project command.
getAllThis action gets a list of all database entities.
getCountThis action gets the number of entities in the database.
getByNameThis action gets a database entity using the name.
getExtentsThis action gets the extents of the database.
getSamePointToleranceThis action gets the same point tolerance for database operations.
getFitToleranceThis action gets the fit tolerance for database operations.
getAttributeDictionaryNamesThis action gets a list of string names for the available attribute dictionaries attached to the given database entities or the database entities at the given point.
getAttributeDictionaryThis action gets a dictionary of key-value pairs of attributes that have been attached to the given database entities or the database entities at the given point with the given dictionary name.
Static Attributes
ModelSizeThis attribute is the model size of the database used to determine tolerances.
ImportVisibilityThis attribute is the visibility mode of database import.
ImportShellCompressModeThis attribute notifies if shell should be compressed on import.
ImportShellSplitAngleThis attribute is the bending angle that shell database entities are split at on import.
ImportShellCellModeThis attribute notifies how shell cells should be handled on import.
ImportAutoSplitSurfacesThis attribute notifies if the auto split should happen on import.

Static Actions

getExportFileTypes

pw::Database getExportFileTypes dbentity_list

This action gets a list of file types that can export all of the given entities.

Parameters

dbentity_listThis parameter is a list of pw::DatabaseEntity objects, or a single pw::DatabaseEntity object.

Returns

This action returns a list containing file type name strings that can be used in the export command.

export

pw::Database export ?-type file_type? ?-format file_format? ?-precision fp_precision? ?-noOverwrite? dbentity_list filename

This action exports the list of entities to the given file.

Parameters

-type file_typeThis optional parameter is the string file type of the file with options < Automatic | Gridgen | IGES | STL | VRML | PLOT3D | Segment | Patran | Nastran | UCD | Xpatch | NMB >.
-format file_formatThis optional parameter is the string file format of the exported file with options < ASCII | Binary | Unformatted >.
-precision fp_precisionThis optional parameter is the floating point precision string of the exported file with options < Double | Single >.  The default is Double.
-noOverwriteThis optional flag is the notification to not overwrite existing export files.
dbentity_listThis parameter is a list of pw::DatabaseEntity objects, or a single pw::DatabaseEntity object.
filenameThis parameter is the string full path and name of the file to export.

Returns

This action returns nothing.

Information

This command supports progress updates.

File Types

Automaticdetermine the file type based on the filename extension
GridgenGridgen database file format
IGESInitial Graphics Exchange Specification v5.3
STLStereo Lithography file format
VRMLVRML 1.0 format
VRML97VRML 2.0/97 format
PLOT3D3D, multi-grid format with kmax=1 and no i-blanking
SegmentGridgen connector and line file format
PatranPatran version 2.5 Neutral file format
NastranNastran version 69 format, Double precision refers to “large” format real numbers (16 characters)
UCDAdvanced Visual Systems’ unstructured cell data file format
XpatchXpatch unstructured data file format
NMBGE data file format
For file_format A = ASCII, B = Binary, U = Unformatted

file_type     extension   file_format fp_precision     valid entity types
============= =========== =========== ================ =========================
Gridgen       dba         A           Double           any
IGES          igs,iges    A           Double           any except shells
STL           stl         A|B         Single           shells
VRML          wrl,vrml    A           Single           shells, bilinear surfaces
VRML97        wrl,vrml    A           Single           shells, bilinear surfaces
PLOT3D        x,xyz,p3d   A|B|U       Double|Single    bilinear surfaces
Segment       dat         A           Double|Single    linear curves
Patran        pat         A           Single*          shells, curves, surfaces
Nastran       nas         A           Double|Single**  shells, bilinear surfaces
UCD           ucd         A           Double|Single    shells
Xpatch        facet       A           Double|Single    shells
NMB           nmb         A|B         Double           any

*  The Patran format uses a fixed width field giving 10 digits of
   precision (single = 7 digits, double = 16 digits).
** The Nastran format uses a fixed width field giving 10 digits of
   precision (single = 7 digits, double = 16 digits), however the
   precision field is used to specify the style of Nastran export,
   where Single will generate the small NASTRAN format and Double
   will generate the large field NASTRAN-L format.

import

pw::Database import ?-type file_type? ?-format file_format? ?-precision fp_precision? ?-duplicates dup_mode? ?-report report_var? filename

Import the given file into the database.

Parameters

-type file_typeThis optional parameter is the string file type of the file with options < Automatic | DEM | Gridgen | IGES | STL | VRML | PLOT3D | Network |Segment | Patran | Nastran | UCD | Xpatch | UGRID | NMB | NMBDirect | CAD >.  The default is Automatic.
-format file_formatThis optional parameter is the string file format of the exported file with options < ASCII | Binary | Unformatted >.  The default is ASCII.
-precision fp_precisionThis optional parameter is the floating point precision string of the imported file with options < Double | Single >.  The default is Double.
-duplicates dup_modeThis optional parameter is the duplication mode for importing entities with existing names with options < Abort | Skip | Rename >.  The default is Abort.
-report report_varThis optional parameter is a variable name to receive a string reporting the low-level details of the import.
filenameThis parameter is the string full path and name of the file to import.

Returns

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

Information

This command supports progress updates.

File Types

Automaticdetermine the file type based on the filename extension
DEMDigital Elevation Model file format
GridgenGridgen database file format
IGESInitial Graphics Exchange Specification v5.3
STLStereo Lithography file format
VRMLVRML 1.0 or 97 format
PLOT3D3D, multi-grid format with kmax=1 and no i-blanking
SegmentGridgen connector and line file format
NetworkGridgen structured grid and network surface file format
PatranPatran version 2.5 Neutral file format
NastranNastran version 69 format, Double precision refers to “large” format real numbers (16 characters)
UCDAdvanced Visual Systems’ unstructured cell data file format
XpatchXpatch unstructured data file format
UGRID2D/3D unstructured grid format
NMBGE data file format
CADOne of the supported Native CAD Reader file formats

Supported CAD Formats

ACIS SatDassault Systems, Spatial ACIS SAT file format
CATIAV4Dassault Systems CATIA V4 file format
CATIAV5Dassault Systems CATIA V5 file format
CATIAV6Dassault Systems CATIA V6 3DXML file format
CreoPTC Creo file format (formally Pro/ENGINEER)
ParasolidsSiemens, Parasolid format
ProENGINEERPTC Pro/ENGINEER format (now called Creo)
SOLIDWORKSDassault Systems, SOLIDWORKS file format
STEPStandard for the Exchange of Product Model Data file format
NXSiemens NX file format (formally Unigraphics)
For file_format A = ASCII, B = Binary, U = Unformatted

file_type     extension   file_format fp_precision     valid types
============= =========== =========== ================ ======================
DEM           dem         A           Double           bilinear surfaces
Gridgen       dba         A           Double           any
IGES          igs,iges    A           Double           any
STL           stl         A|B         Single           shells
VRML          wrl,vrml    A           Single           shells
PLOT3D        x,xyz,p3d   A|B|U       Double|Single    bilinear surfaces
Network       grd,net     A|B|U       Double|Single    bilinear surfaces
Segment       dat         A           Double|Single    linear curves
Patran        pat         A           Single*          curves, surfaces
Nastran       nas         A           Double|Single**  shells
UCD           ucd         A           Double|Single    shells
Xpatch        facet       A           Double|Single    shells
UGRID         ugrid       A|B|U       Double|Single    shells
NMB           nmb         A|B         Double           any except notes
CAD           see CAD formats below...

CAD formats:
format        extension          file_format fp_precision     valid types
============= ================== =========== ================ ===============
ACIS Sat      sat                B           Double           any
CATIAV4       model              B           Double           any
CATIAV5       CATProduct,CATPart B           Double           any
CATIAV6       3dxml              B           Double           any
Creo          asm,prt            B           Double           any
Parasolids    x_t,x_b            B           Double           any
ProENGINEER   asm,prt            B           Double           any
SOLIDWORKS    sldasm,sldprt      B           Double           any
STEP          stp,step           A           Double           any
NX            prt                B           Double           any

*  The Patran format uses a fixed width field giving 10 digits of
   precision (single = 7 digits, double = 16 digits)

** The Nastran format uses a fixed width field giving 10 digits of
   precision (single = 7 digits, double = 16 digits), however the
   precision field is used to specify the style of Nastran import,
   where Single will generate the small NASTRAN format and Double
   will generate the large field NASTRAN-L format.

Compatibility with DatabaseImporter mode

For backward compatibility, the import defaults for this action are not the same as the defaults when using a DatabaseImporter mode.  As you can see in the defaults listed below.  All values are the same except for EntityVisibility and ShellCellMode.

DatabaseImporter attr      Default value          | Default value      pw::Database attr/param
-------------------------  ---------------------- | -----------------  -----------------------
EntityIgnoreIfNameUsed     false                  | false              -duplicates
EntityVisibility           ImportAndHideSupports  | Import             ImportVisibility
FileModelSizeFromFile      true                   | true               n/a
FileUnits                  FromFile               | FromFile           n/a
ModelFromFreeSurface       false                  | false              n/a
ModelAssembleTolerance     0                      | 0                  n/a
QuiltAssembleAngle         0                      | 0                  n/a
QuiltBoundaryAssembleAngle 0                      | 0                  n/a
ShellCompressMode          false                  | false              ImportShellCompressMode
ShellCellMode              MergeCoplanar          | AsTriangles        ImportShellCellMode
ShellSplitAngle            0.0                    | 0.0                ImportShellSplitAngle
SurfaceSplitDiscontinuous  false                  | false              ImportAutoSplitSurfaces

To make shell import behavior the same, you can use pw::Database.ImportShellCellMode MergeCoplanar.

However, due to the limited settings available for pw::Database.ImportVisibility, you cannot make their behaviors match exactly.  The value mapping is shown below.  To set visibility behavior to ImportAndHideSupports or to gain access to the other mode attributes not available (n/a) using pw::Database, you must use a DatabaseImporter mode.

pw::Database       DatabaseImporter
ImportVisibility   EntityVisibility
----------------   ----------------------
true               Import
false              ShowAllAndHideSupports

save

pw::Database save ?-compress level? ?-noOverwrite? filename

This action saves the entire database in the native file format.

Parameters

-compress levelThis optional parameter sets the integer file compression level with the range [0, 9].  The default is 0.
-noOverwriteThis optional flag is notification to not save if filename already exists.
filenameThis parameter is the full path and name string of the file to save.

Returns

This action returns nothing.

Information

This command supports progress updates.

For “-compress level”, 0 = no compression, 1 = minimum, and 9 = maximum.  Higher levels of compression take longer to save.

intersect

pw::Database intersect ?-tolerance tol? ?-actual do_actual? ?-apparent line_of_sight? ?-closest max_dist? dbentity_list1 ?dbentity_list2?

This action intersects database entities.

Parameters

-tolerance tolThis optional flag is the float same point tolerance used during intersection calculation with the range [0, infinity).  The default is same point tolerance.
-actual do_actualThis optional flag is the boolean parameter for whether actual intersection should be done.  The default is true.
-apparent line_of_sightThis optional parameter is the line of sight vector for apparent intersections of curves, which will only be included if this argument is present.
-closest max_distThis optional parameter is the float maximum distance for closest point “intersections” of curves, which will only be included if this argument is present with the range [0, infinity), where 0 is no limit.
dbentity_list1This parameter is a list of pw::DatabaseEntity objects, or a single pw::DatabaseEntity object.
dbentity_list2This parameter is a list of pw::DatabaseEntity objects, or a single pw::DatabaseEntity object.

Returns

This action returns a list of the newly created pw::DatabaseEntity objects.

Information

If only dbentity_list1 is specified, the entities in this list are intersected with themselves.

If both dbentity_list1 and dbentity_list2 are specified, the entities in dbentity_list1 are intersected with the entities in dbentity_list2.

This command supports progress updates.

createSurfacesFromCurves

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.  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.
-fitTolerance tolThis optional parameter is the tolerance used for fitting the surface to the database entities.  If not given, the current fit tolerance is used.
-fitInterior 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 trigger the interior to be fit to those database entities.  If this parameter is not given, no fitting will be done.
-fitEntities entitiesThis 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 boundary curves lie on.
-fittedSurfaces fittedVarThis optional parameter is a variable name to receive a list of pw::DatabaseEntity objects, which will be the surfaces that were fitted.  The objects will also be returned from the action whether this parameter is used or not.
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::Surface.createFromCurves, which works similar to this action except that it only makes Coons patches.  pw::Surface.interpolate and pw::Surface.patch also create Coons patches with more explicit control over the boundary curves.

getXYZ

pw::Database getXYZ point

This action gets the 3D position of the given point.

Parameters

pointThis parameter is a point.

Returns

This action returns an xyz vector.

getEntity

pw::Database getEntity point

This action gets the database entity of the given point.

Parameters

pointThis parameter is a point.

Returns

This action returns a pw::DatabaseEntity object.

Information

If the given point is not database constrained, an error will occur.

offsetUV

pw::Database offsetUV point < u | uv >

This action offsets the uv coordinates of the given parametric database point.

Parameters

pointThis parameter is a point in the form “u v dbentity”.
uThis parameter is the float u amount to offset.
uvThis parameter is the vector uv amount to offset.

Returns

This action returns a point in the form “u v dbentity”.

Information

If the given point is not parametric database constrained, an error will occur.

offsetNormal

pw::Database offsetNormal point distance

This action calculates the offset from the given database point in the direction of the normal at the point.

Parameters

pointThis parameter is a point.
distanceThis parameter is the float distance to offset.

Returns

This action returns an xyz vector.

Information

If the given point is not database constrained, or the normal is not defined for the database entity, an error will occur.

getNormal

pw::Database getNormal point

This action returns the normal at the specified database point.

Parameters

pointThis parameter is a point.

Returns

This action returns an xyz vector.

Information

If the given point is not database constrained, or the normal is not defined for the database entity, an error will occur.

getRadiusOfCurvature

pw::Database getRadiusOfCurvature ?-surface? point

This action returns the radius of curvature at the specified database point.

Parameters

-surfaceThis optional flag is the notification to return the surface curvature, rather than the curve curvature, if the specified point lies on a curve that is constrained to a surface.
pointThis parameter is a point.

Returns

This action returns a float radius of curvature.

Information

If the given point is not database constrained, an error will occur.  If there is no curvature, a radius of zero will be returned.

getGeometricProperties

pw::Database getGeometricProperties ?-curve curveVar? ?-surface surfaceVar? ?-directional directionalVar? ?-orthogonal orthogonalVar? point

This action calculates the geometric properties at the specified database point.

Parameters

-curve curveVarThis optional parameter is the string name of a variable to receive an array of curve-based geometric properties.  The array indices and the values are listed below.
-surface surfaceVarThis optional parameter is the string name of a variable to receive an array of surface-based geometric properties, if the specified position lies on a curve that is constrained to a surface.  The array indices and the values are listed below.
-directional directionalVarThis optional parameter is the string name of a variable to receive an array of surface-based geometric properties in the direction of the curve, if the specified position lies on a curve that is constrained to a surface.  The array indices and the values are listed below.
-orthogonal orthogonalVarThis optional parameter is the string name of a variable to receive an array of surface-based geometric properties in the direction orthogonal to the curve, if the specified position lies on a curve that is constrained to a surface.  The array indices and the values are listed below.
pointThis parameter is a point.

Returns

This action returns nothing.

Curve-based Geometry Properties Array

This array is divided into the following elements.  If the point is not constrained to a curve, the elements will be set to 0.

PointThis element is the vector location of the curve that these geometric properties are for.
UVThis is the vector non-normalized UV parameter of the curve.
LimitsUThis is the vector non-normalized parameter limits in U of the curve.
LimitsVThis is the vector non-normalized parameter limits in V of the curve.
RadiusOfCurvatureThis element is the float radius of curvature of the curve.
NormalThis element is the vector normal of the curve.
TangentThis element is the vector tangent of the curve.
AssembleToleranceThis element is the assembly tolerance if the curve is an edge curve.
CurveToleranceThis element is the tolerance of the surface curve if the curve is an edge curve.

Surface-based Geometry Properties Array

This array is divided into the following elements.  If the point is not directly or indirectly constrained to a surface, the elements will be set to 0.  If the point is constrained to a curve that is constrained to multiple surfaces, the surface with the smallest minimum radius of curvature will be used for all properties.

PointThis element is the point on the surface that these surface geometric properties are for.
UVThis is the vector non-normalized UV parameter of the surface.
LimitsUThis is the vector non-normalized parameter limits in U of the surface.
LimitsVThis is the vector non-normalized parameter limits in V of the surface.
RadiusOfCurvatureThis element is the float minimum radius of curvature.
GaussianCurvatureThis element is the float gaussian curvature in radians per unit length.
AverageCurvatureThis element is the float average curvature in radians per unit length.
MinimumCurvatureThis element is the float minimum curvature in radians per unit length.
MaximumCurvatureThis element is the float maximum curvature in radians per unit length.
NormalThis element is the vector normal of the surface.
PrincipalThis element is the vector principal tangent of the surface, which points in the direction of minimum curvature.
dPdUThis element is the vector first partial derivative in U.
dPdVThis element is the vector first partial derivative in V.
d2PdU2This element is the vector second partial derivative in U.
d2PdUdVThis element is the vector second partial derivative in UV.
d2PdV2This element is the vector second partial derivative in V.

Directional and Orthogonal Surface-based Geometry Properties Array

This array is divided into the following elements.  If the curve is not constrained to a surface, the elements will be set to 0.  If the curve is constrained to multiple surfaces, the surface with the smallest minimum radius of curvature will be used for all properties.

RadiusOfCurvatureThis element is the float radius of curvature in the direction of (or orthogonal to) the curve.
DirectionThis element is the vector derivative of (or orthogonal to) the curve.
DirectionUVThis element is the vector derivative of (or orthogonal to) the curve in the UV parameter space of the surface.
dPdDThis element is the vector first derivative of the surface in the direction given by the DirectionUV element.
d2PdD2This element is the vector second derivative of the surface in the direction given by the DirectionUV element.

getTotalLength

pw::Database getTotalLength < curve | boundary >

This action gets the total length of a pw::Curve or boundary.

Parameters

curveThis parameter is the pw::Curve object to get the total length of.
boundaryThis parameter is the boundary to get the total length of.

Returns

This action returns the float length which has the range [0.0, infinity).

getCurve

pw::Database getCurve boundary

This action gets the corresponding pw::Curve for a boundary, if any.

Parameters

boundaryThis parameter is the boundary for which the corresponding pw::Curve will be returned, if one exists.

Returns

The pw::Curve corresponding to a boundary.  If no pw::Curve exists, an error will be raised.

mapBoundary

pw::Database mapBoundary < Model | Quilt | SurfaceTrim | Curve > boundary

This action maps a database boundary to a different topology level.

Parameters

levelThis parameter is the string level with options < Model | Quilt | SurfaceTrim | Curve > to map the boundary to.
boundaryThis parameter is the boundary to map from.

Returns

A list of boundaries that represent the same boundary as the given boundary (either fully or partially) at the given level.  It is possible that the result will be an empty list, which is the case for certain boundaries such as a quilt boundary on the interior of a model.

closestPoint

pw::Database closestPoint ?-parametric? ?-projection? ?-explicit entity_or_boundary_list | -mode mode? ?-state stateVar? ?-xyz? points ?dir?

This action gets the closest point on a database entity from a given point.

Parameters

-parametricThis optional flag is the notification to restrict the closest point found to be on a curve, surface, trimmed surface, or quilt.  This option can be combined with -projection.
-projectionThis optional flag is the notification to restrict the closest point found to be on an entity that other entities can be projected onto, such as a surface, trimmed surface, quilt or shell.  This option can be combined with -parametric.
-explicit entity_or_boundary_listThis optional parameter restricts the closest point found to be on the given list of pw::DatabaseEntity objects and/or boundaries.  If given, the -parametric and -projection flags will be ignored.  Only one of -explicit and -mode should be present.
-mode modeThis optional parameter restricts the closest point found to be on the entities of the given pw::Mode object.  In some cases, this will be faster than using -explicit because data can be cached in the mode.  If given, the -parametric and -projection flags will be ignored.  Only one of -explicit and -mode should be present.
-state stateVarThis optional parameter will indicate on return if a surface was found (true) or not (false).  If multiple points are specified, this will be a list of boolean values, which each entry indicating the result for each corresponding point specified.
-xyzIf this optional parameter is specified, each result will be returned as an XYZ vector.  If the parameter is not specified, each result will be a point.
pointsThis parameter is either a point or a list of point objects that are projected onto the current or specified database entities.
dirThis parameter is a direction vector for finding the closest point from a ray.

Returns

This action returns a point if a single point was specified, or a list of point objects if more than one point was specified.  Each returned point will be in the parameter space of the closest database entity.  If there is no closest point this action will return the given point.  Also, if -state stateVar is used, stateVar indicates whether a surface was found or not.  In the case of a list of point objects being specified, both the return value and the value of the stateVar will be a list of values, with a one-to-one correspondence with the specified points.

intersectRay

pw::Database intersectRay ?-parametric? ?-projection? ?-explicit entity_or_boundary_list | -mode mode? ?-state stateVar? point dir

This action gets the ray intersection on a database entity from a given ray.  This function ignores all non-surface entities like curves or points.

Parameters

-parametricThis optional flag is the notification to restrict the closest point found to be on a surface, trimmed surface, or quilt.  This option can be combined with -projection.
-projectionThis optional flag is the notification to restrict the closest point found to be on an entity that other entities can be projected onto, such as a surface, trimmed surface, quilt or shell.  This option can be combined with -parametric.
-explicit entity_or_boundary_listThis optional parameter restricts the intersection found to be on the given list of pw::DatabaseEntity objects and/or boundaries.  If given, the -parametric and -projection flags will be ignored.  Only one of -explicit and -mode should be present.
-mode modeThis optional parameter restricts the intersection found to be on the entities of the given pw::Mode object.  In some cases, this will be faster than using -explicit because data can be cached in the mode.  If given, the -parametric and -projection flags will be ignored.  Only one of -explicit and -mode should be present.
-state stateVarThis optional parameter will indicate on return if a surface was found (true) or not (false).
pointThis parameter is the point that is the start of the ray.
dirThis parameter is a direction vector for the ray.

Returns

This action returns a point, in the parameter space of the intersected database entity, if there is no intersection point this action will return the given point.  Also, if -state stateVar is used, stateVar indicates whether a surface was found or not.

isBaseForProject

pw::Database isBaseForProject

This action checks if this database contains entities that can be projected onto using the project command.

Parameters

This action has no parameters.

Returns

This action returns boolean, true if the database contains entities that can be projected onto.

getAll

pw::Database getAll ?-framework framework? ?-type type_string? ?-enabledOnly? ?-visibleOnly?

This action gets a list of all database entities.

Parameters

-frameworkIf specified, this argument specifies which pw::Framework to query.  If not specified, the active pw::Framework is used as the target.
-type type_stringIf specified, this option filters the result to include only entities of the specified type.  Only types derived from pw::DatabaseEntity are valid.
-enabledOnlyThis flag, if present, filters the result to include only enabled entities.
-visibleOnlyThis flag, if present, filters the result to include only visible entities.

Returns

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

getCount

pw::Database getCount ?-framework framework? ?-type type_string?

This action gets the number of entities in the database.

Parameters

-frameworkIf specified, this argument specifies which pw::Framework to query.  If not specified, the active pw::Framework is used as the target.  -type type_string If specified, this option filters the result to include only entities of the specified type.  Only types derived from pw::DatabaseEntity are valid.

Returns

This action returns an integer value.

getByName

pw::Database getByName ?-path path? name

This action gets a database entity using the name.

Parameters

nameThis parameter is a name string.
-path pathThis parameter and its argument specify the path to the framework in which the database entity resides.  The path argument must be a list of either pw::Framework objects or framework names.  The path must start at the root framework, start at the active framework, or start at a child of the active framework.  The active framework is used as the default if this parameter is not specified.

Returns

This action returns a pw::DatabaseEntity object.

getExtents

pw::Database getExtents ?-enabledOnly? ?-visibleOnly?

This action gets the extents of the database.

Parameters

-enabledOnlyThis flag, if present, restricts the calculations to only enabled entities, regardless of their visibility.  Enabled entities in off layers are included, for example.
-visibleOnlyThis flag, if present, restricts the calculations to only visible entities.

Returns

This action returns a list of two vectors representing the min and max xyz points of the extents.

getSamePointTolerance

pw::Database getSamePointTolerance

This action gets the same point tolerance for database operations.

Parameters

This action has no parameters.

Returns

This action returns the float tolerance.

getFitTolerance

pw::Database getFitTolerance

This action gets the fit tolerance for database operations.

Parameters

This action has no parameters.

Returns

This action returns the float tolerance.

getAttributeDictionaryNames

pw::Database getAttributeDictionaryNames ?-children? ?-attached? ?-class cls? < dbentity_list | point >

This action gets a list of string names for the available attribute dictionaries attached to the given database entities or the database entities at the given point.

Parameters

-childrenThis optional flag is the notification to include names of attribute dictionaries set to children of the database entities as well.
-attachedThis optional flag is the notification to include names of the attached attribute dictionaries as well.
-class clsThis optional flag is the notification to only include the names of attached attribute dictionaries that have the given class.
dbentity_listThis parameter is a list of pw::DatabaseEntity objects, or a single pw::DatabaseEntity object.
pointThis parameter is a point.  The point should be database constrained and will be converted to the most specific topological entity to determine the database entity or part.

Returns

This action returns a list of strings.

Information

If the given point is not database constrained, an error will occur.

getAttributeDictionary

pw::Database getAttributeDictionary ?-children? ?-attached? ?-class cls? ?-traversed? < dbentity_list | point > dict_name ?attr_keys?

This action gets a dictionary of key-value pairs of attributes that have been attached to the given database entities or the database entities at the given point with the given dictionary name.

Parameters

-childrenThis optional flag is the notification to include the attribute dictionary set on children of the database entities as well.
-attachedThis optional flag is the notification to include the attached attribute dictionaries as well.
-class clsThis optional flag is the notification to include the first attached attribute dictionary with the given class, rather than it needing to match the dict_name parameter.
-modifiedThis optional flag is the notification to include the modifed state of each key-value pair in the result.  When included, the result will contain an additional list of boolean values that represent the modified state of each pair.
-traversedThis optional flag is the notification to include the DatabaseEntity or AttributeDictionary object where a key value pair was first found in the result.  When included, the result will contain an additional list of the object where the key value pairs were found.
dbentity_listThis parameter is a list of pw::DatabaseEntity objects, or a single pw::DatabaseEntity object.
pointThis parameter is a point.  The point should be database constrained and will be converted to the most specific topological entity to determine the database entity or part.
dict_nameThis parameter is the string name of the dictionary.
attr_keysThis optional parameter is a string name or a list of string keys to limit the attributes which should be returned by this action.  If not specified, all existing attributes will be returned by this action.

Returns

This action returns a list of strings that can be converted into a tcl dictionary (list of alternating keys and values).  If the -modified flag was used, an additional list is returned with the modified state of the key value pairs.  If the -traversed flag was used, an additional list is returned with the objects where the key value pairs were found.  The entries of the traversed list will be an AttributeDictionary object, a DatabaseEntity object or a list of DatabaseEntity object string part name.

Information

If the given point is not database constrained, an error will occur.  When using the -children or -attached flags, the dictionary will be a combination of values from multiple dictionaries from different entities, but only the first value found while traversing the children is retained.  The entity or attached dictionary where the value was retained will be returned in the traversedVar variable if given.

Static Attributes

ModelSize

pw::Database get/setModelSize size

This attribute is the model size of the database used to determine tolerances.

Type

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

Default

The default for this attribute is 1000.0.

ImportVisibility

pw::Database get/setImportVisibility import

This attribute is the visibility mode of database import.

Type

This attribute is a boolean.

Default

The default for this attribute is true.

Information

If this attribute is true, entity visibility data is imported from database files.  If this attribute is false, entity visibility is determined automatically.

ImportShellCompressMode

pw::Database get/setImportShellCompressMode compress

This attribute notifies if shell should be compressed on import.

Type

This attribute is a boolean.

Default

The default for this attribute is false.

Information

If this attribute is true, database shells will be compressed on import.  Also, forces cells to be either quads or tris and hence overrides the ImportShellCellMode if set to CellsAsIs or MergeCoplanar.  If this attribute is false, database shells will be imported as is.

ImportShellSplitAngle

pw::Database get/setImportShellSplitAngle angle

This attribute is the bending angle that shell database entities are split at on import.

Type

This attribute is a float with the range [0, 180].

Default

The default for this attribute is 0.

ImportShellCellMode

pw::Database get/setImportShellCellMode mode

This attribute notifies how shell cells should be handled on import.

Type

This attribute is of type string; < AsTriangles | AsTrianglesAndQuadrilaterals | AsIs | MergeCoplanar ).

Default

The default for this attribute is AsTriangles.

ImportAutoSplitSurfaces

pw::Database get/setImportAutoSplitSurfaces split

This attribute notifies if the auto split should happen on import.

Type

This attribute is a boolean.

Default

The default for this attribute is false.

Information

If this attribute is true, Db surfaces will be split on import.  If this attribute is false, Db surfaces will not be split on import.

pw::Database getExportFileTypes dbentity_list
This action gets a list of file types that can export all of the given entities.
pw::Database export ?-type file_type? ?-format file_format? ?-precision fp_precision? ?-noOverwrite? dbentity_list filename
This action exports the list of entities to the given file.
pw::Database import ?-type file_type? ?-format file_format? ?-precision fp_precision? ?-duplicates dup_mode? ?-report report_var? filename
Import the given file into the database.
pw::Database save ?-compress level? ?-noOverwrite? filename
This action saves the entire database in the native file format.
pw::Database intersect ?-tolerance tol? ?-actual do_actual? ?-apparent line_of_sight? ?-closest max_dist? dbentity_list1 ?dbentity_list2?
This action intersects database entities.
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.
pw::Database getXYZ point
This action gets the 3D position of the given point.
pw::Database getEntity point
This action gets the database entity of the given point.
pw::Database offsetUV point < u | uv >
This action offsets the uv coordinates of the given parametric database point.
pw::Database offsetNormal point distance
This action calculates the offset from the given database point in the direction of the normal at the point.
pw::Database getNormal point
This action returns the normal at the specified database point.
pw::Database getRadiusOfCurvature ?-surface? point
This action returns the radius of curvature at the specified database point.
pw::Database getGeometricProperties ?-curve curveVar? ?-surface surfaceVar? ?-directional directionalVar? ?-orthogonal orthogonalVar? point
This action calculates the geometric properties at the specified database point.
pw::Database getTotalLength < curve | boundary >
This action gets the total length of a pw::Curve or boundary.
Database curve type
A boundary is reference to either a database curve or the edge of a database surface.
pw::Database getCurve boundary
This action gets the corresponding pw::Curve for a boundary, if any.
pw::Database mapBoundary < Model | Quilt | SurfaceTrim | Curve > boundary
This action maps a database boundary to a different topology level.
pw::Database closestPoint ?-parametric? ?-projection? ?-explicit entity_or_boundary_list | -mode mode? ?-state stateVar? ?-xyz? points ?dir?
This action gets the closest point on a database entity from a given point.
pw::Database intersectRay ?-parametric? ?-projection? ?-explicit entity_or_boundary_list | -mode mode? ?-state stateVar? point dir
This action gets the ray intersection on a database entity from a given ray.
pw::Database isBaseForProject
This action checks if this database contains entities that can be projected onto using the project command.
pw::Database getAll ?-framework framework? ?-type type_string? ?-enabledOnly? ?-visibleOnly?
This action gets a list of all database entities.
pw::Database getCount ?-framework framework? ?-type type_string?
This action gets the number of entities in the database.
pw::Database getByName ?-path path? name
This action gets a database entity using the name.
pw::Database getExtents ?-enabledOnly? ?-visibleOnly?
This action gets the extents of the database.
pw::Database getSamePointTolerance
This action gets the same point tolerance for database operations.
pw::Database getFitTolerance
This action gets the fit tolerance for database operations.
pw::Database getAttributeDictionaryNames ?-children? ?-attached? ?-class cls? < dbentity_list | point >
This action gets a list of string names for the available attribute dictionaries attached to the given database entities or the database entities at the given point.
A string is an array of characters.
pw::Database getAttributeDictionary ?-children? ?-attached? ?-class cls? ?-traversed? < dbentity_list | point > dict_name ?attr_keys?
This action gets a dictionary of key-value pairs of attributes that have been attached to the given database entities or the database entities at the given point with the given dictionary name.
pw::Database get/setModelSize size
This attribute is the model size of the database used to determine tolerances.
pw::Database get/setImportVisibility import
This attribute is the visibility mode of database import.
pw::Database get/setImportShellCompressMode compress
This attribute notifies if shell should be compressed on import.
pw::Database get/setImportShellSplitAngle angle
This attribute is the bending angle that shell database entities are split at on import.
pw::Database get/setImportShellCellMode mode
This attribute notifies how shell cells should be handled on import.
pw::Database get/setImportAutoSplitSurfaces split
This attribute notifies if the auto split should happen on import.
Base type for all glyph types
Base type for all database entities
The DatabaseImporter IO mode type
Global actions for database entities
An integer is a whole number.
A float is a fractional number.
A boolean is represented as a 0 or 1, with 0 being false and 1 being true.
A vector is a list of float values.
Database surface type
Database quilt type
pw::Surface createFromCurves ?-tolerance tol? curves
This action automatically creates new surfaces using the given curves as boundaries for Coons patches.
$surface interpolate ?-orient < Same | Opposite | Best >? ?-tolerance tol? rail1 rail2 ?rail3 rail4?
This action sets the surface by interpolating between the given curves.
$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.
A point is a position either in model space or database parameter space.
The mode base type
Framework type
A type is the class name of a Glyph object.
Type for storing a group of key-value pairs that can be attached to entities
Close