Global actions for database entities
pw:: | Global actions for database entities |
Static Actions | |
getExportFileTypes | This action gets a list of file types that can export all of the given entities. |
export | This action exports the list of entities to the given file. |
import | Import the given file into the database. |
save | This action saves the entire database in the native file format. |
intersect | This action intersects database entities. |
createSurfacesFromCurves | This action automatically creates new surfaces using the given curves as boundaries for Coons patches and trimmed planes. |
getXYZ | This action gets the 3D position of the given point. |
getEntity | This action gets the database entity of the given point. |
offsetUV | This action offsets the uv coordinates of the given parametric database point. |
offsetNormal | This action calculates the offset from the given database point in the direction of the normal at the point. |
getNormal | This action returns the normal at the specified database point. |
getRadiusOfCurvature | This action returns the radius of curvature at the specified database point. |
getGeometricProperties | This action calculates the geometric properties at the specified database point. |
getTotalLength | This action gets the total length of a pw::Curve or boundary. |
getCurve | This action gets the corresponding pw::Curve for a boundary, if any. |
mapBoundary | This action maps a database boundary to a different topology level. |
closestPoint | This action gets the closest point on a database entity from a given point. |
intersectRay | This action gets the ray intersection on a database entity from a given ray. |
isBaseForProject | This action checks if this database contains entities that can be projected onto using the project command. |
getAll | This action gets a list of all database entities. |
getCount | This action gets the number of entities in the database. |
getByName | This action gets a database entity using the name. |
getExtents | This action gets the extents of the database. |
getSamePointTolerance | This action gets the same point tolerance for database operations. |
getFitTolerance | This action gets the fit tolerance for database operations. |
getAttributeDictionaryNames | 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. |
getAttributeDictionary | 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. |
Static Attributes | |
ModelSize | This attribute is the model size of the database used to determine tolerances. |
ImportVisibility | This attribute is the visibility mode of database import. |
ImportShellSplitAngle | This attribute is the bending angle that shell database entities are split at on import. |
ImportShellCellMode | This attribute notifies how shell cells should be handled on import. |
ImportAutoSplitSurfaces | This attribute notifies if the auto split should happen on import. |
pw::Database getExportFileTypes dbentity_list
This action gets a list of file types that can export all of the given entities.
dbentity_list | This parameter is a list of pw::DatabaseEntity objects, or a single pw::DatabaseEntity object. |
This action returns a list containing file type name strings that can be used in the export command.
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.
-type file_type | This 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_format | This optional parameter is the string file format of the exported file with options < ASCII | Binary | Unformatted >. |
-precision fp_precision | This optional parameter is the floating point precision string of the exported file with options < Double | Single >. The default is Double. |
-noOverwrite | This optional flag is the notification to not overwrite existing export files. |
dbentity_list | This parameter is a list of pw::DatabaseEntity objects, or a single pw::DatabaseEntity object. |
filename | This parameter is the string full path and name of the file to export. |
This action returns nothing.
This command supports progress updates.
Automatic | determine the file type based on the filename extension |
Gridgen | Gridgen database file format |
IGES | Initial Graphics Exchange Specification v5.3 |
STL | Stereo Lithography file format |
VRML | VRML 1.0 format |
VRML97 | VRML 2.0/97 format |
PLOT3D | 3D, multi-grid format with kmax=1 and no i-blanking |
Segment | Gridgen connector and line file format |
Patran | Patran version 2.5 Neutral file format |
Nastran | Nastran version 69 format, Double precision refers to “large” format real numbers (16 characters) |
UCD | Advanced Visual Systems’ unstructured cell data file format |
Xpatch | Xpatch unstructured data file format |
NMB | GE 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.
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.
-type file_type | This 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_format | This optional parameter is the string file format of the exported file with options < ASCII | Binary | Unformatted >. The default is ASCII. |
-precision fp_precision | This optional parameter is the floating point precision string of the imported file with options < Double | Single >. The default is Double. |
-duplicates dup_mode | This optional parameter is the duplication mode for importing entities with existing names with options < Abort | Skip | Rename >. The default is Abort. |
-report report_var | This optional parameter is a variable name to receive a string reporting the low-level details of the import. |
filename | This parameter is the string full path and name of the file to import. |
This action returns a list of the imported pw::DatabaseEntity objects.
This command supports progress updates.
Automatic | determine the file type based on the filename extension |
DEM | Digital Elevation Model file format |
Gridgen | Gridgen database file format |
IGES | Initial Graphics Exchange Specification v5.3 |
STL | Stereo Lithography file format |
VRML | VRML 1.0 or 97 format |
PLOT3D | 3D, multi-grid format with kmax=1 and no i-blanking |
Segment | Gridgen connector and line file format |
Network | Gridgen structured grid and network surface file format |
Patran | Patran version 2.5 Neutral file format |
Nastran | Nastran version 69 format, Double precision refers to “large” format real numbers (16 characters) |
UCD | Advanced Visual Systems’ unstructured cell data file format |
Xpatch | Xpatch unstructured data file format |
UGRID | 2D/3D unstructured grid format |
NMB | GE data file format |
CAD | One of the supported Native CAD Reader file formats |
ACIS Sat | Dassault Systems, Spatial ACIS SAT file format |
CATIAV4 | Dassault Systems CATIA V4 file format |
CATIAV5 | Dassault Systems CATIA V5 file format |
CATIAV6 | Dassault Systems CATIA V6 3DXML file format |
Creo | PTC Creo file format (formally Pro/ENGINEER) |
Parasolids | Siemens, Parasolid format |
ProENGINEER | PTC Pro/ENGINEER format (now called Creo) |
SOLIDWORKS | Dassault Systems, SOLIDWORKS file format |
STEP | Standard for the Exchange of Product Model Data file format |
NX | Siemens 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.
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 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
pw::Database save ?-compress level? ?-noOverwrite? filename
This action saves the entire database in the native file format.
-compress level | This optional parameter sets the integer file compression level with the range [0, 9]. The default is 0. |
-noOverwrite | This optional flag is notification to not save if filename already exists. |
filename | This parameter is the full path and name string of the file to save. |
This action returns nothing.
This command supports progress updates.
For “-compress level”, 0 = no compression, 1 = minimum, and 9 = maximum. Higher levels of compression take longer to save.
pw::Database intersect ?-tolerance tol? ?-actual do_actual? ?-apparent line_of_sight? ?-closest max_dist? dbentity_list1 ?dbentity_list2?
This action intersects database entities.
-tolerance tol | This 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_actual | This optional flag is the boolean parameter for whether actual intersection should be done. The default is true. |
-apparent line_of_sight | This 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_dist | This 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_list1 | This parameter is a list of pw::DatabaseEntity objects, or a single pw::DatabaseEntity object. |
dbentity_list2 | This parameter is a list of pw::DatabaseEntity objects, or a single pw::DatabaseEntity object. |
This action returns a list of the newly created pw::DatabaseEntity objects.
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.
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.
-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 boundary curves lie on. |
-fittedSurfaces fittedVar | This 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. |
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.
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.
pw::Database getEntity point
This action gets the database entity of the given point.
point | This parameter is a point. |
This action returns a pw::DatabaseEntity object.
If the given point is not database constrained, an error will occur.
pw::Database offsetUV point < u | uv >
This action offsets the uv coordinates of the given parametric database point.
point | This parameter is a point in the form “u v dbentity”. |
u | This parameter is the float u amount to offset. |
uv | This parameter is the vector uv amount to offset. |
This action returns a point in the form “u v dbentity”.
If the given point is not parametric database constrained, an error will occur.
pw::Database offsetNormal point distance
This action calculates the offset from the given database point in the direction of the normal at the point.
point | This parameter is a point. |
distance | This parameter is the float distance to offset. |
This action returns an xyz vector.
If the given point is not database constrained, or the normal is not defined for the database entity, an error will occur.
pw::Database getNormal point
This action returns the normal at the specified database point.
point | This parameter is a point. |
This action returns an xyz vector.
If the given point is not database constrained, or the normal is not defined for the database entity, an error will occur.
pw::Database getRadiusOfCurvature ?-surface? point
This action returns the radius of curvature at the specified database point.
-surface | This 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. |
point | This parameter is a point. |
This action returns a float radius of curvature.
If the given point is not database constrained, an error will occur. If there is no curvature, a radius of zero will be returned.
pw::Database getGeometricProperties ?-curve curveVar? ?-surface surfaceVar? ?-directional directionalVar? ?-orthogonal orthogonalVar? point
This action calculates the geometric properties at the specified database point.
-curve curveVar | This 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 surfaceVar | This 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 directionalVar | This 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 orthogonalVar | This 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. |
point | This parameter is a point. |
This action returns nothing.
This array is divided into the following elements. If the point is not constrained to a curve, the elements will be set to 0.
Point | This element is the vector location of the curve that these geometric properties are for. |
UV | This is the vector non-normalized UV parameter of the curve. |
LimitsU | This is the vector non-normalized parameter limits in U of the curve. |
LimitsV | This is the vector non-normalized parameter limits in V of the curve. |
RadiusOfCurvature | This element is the float radius of curvature of the curve. |
Normal | This element is the vector normal of the curve. |
Tangent | This element is the vector tangent of the curve. |
AssembleTolerance | This element is the assembly tolerance if the curve is an edge curve. |
CurveTolerance | This element is the tolerance of the surface curve if the curve is an edge curve. |
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.
Point | This element is the point on the surface that these surface geometric properties are for. |
UV | This is the vector non-normalized UV parameter of the surface. |
LimitsU | This is the vector non-normalized parameter limits in U of the surface. |
LimitsV | This is the vector non-normalized parameter limits in V of the surface. |
RadiusOfCurvature | This element is the float minimum radius of curvature. |
GaussianCurvature | This element is the float gaussian curvature in radians per unit length. |
AverageCurvature | This element is the float average curvature in radians per unit length. |
MinimumCurvature | This element is the float minimum curvature in radians per unit length. |
MaximumCurvature | This element is the float maximum curvature in radians per unit length. |
Normal | This element is the vector normal of the surface. |
Principal | This element is the vector principal tangent of the surface, which points in the direction of minimum curvature. |
dPdU | This element is the vector first partial derivative in U. |
dPdV | This element is the vector first partial derivative in V. |
d2PdU2 | This element is the vector second partial derivative in U. |
d2PdUdV | This element is the vector second partial derivative in UV. |
d2PdV2 | This element is the vector second partial derivative in V. |
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.
RadiusOfCurvature | This element is the float radius of curvature in the direction of (or orthogonal to) the curve. |
Direction | This element is the vector derivative of (or orthogonal to) the curve. |
DirectionUV | This element is the vector derivative of (or orthogonal to) the curve in the UV parameter space of the surface. |
dPdD | This element is the vector first derivative of the surface in the direction given by the DirectionUV element. |
d2PdD2 | This element is the vector second derivative of the surface in the direction given by the DirectionUV element. |
pw::Database getTotalLength < curve | boundary >
This action gets the total length of a pw::Curve or boundary.
curve | This parameter is the pw::Curve object to get the total length of. |
boundary | This parameter is the boundary to get the total length of. |
This action returns the float length which has the range [0.0, infinity).
pw::Database getCurve boundary
This action gets the corresponding pw::Curve for a boundary, if any.
boundary | This parameter is the boundary for which the corresponding pw::Curve will be returned, if one exists. |
The pw::Curve corresponding to a boundary. If no pw::Curve exists, an error will be raised.
pw::Database mapBoundary < Model | Quilt | SurfaceTrim | Curve > boundary
This action maps a database boundary to a different topology level.
level | This parameter is the string level with options < Model | Quilt | SurfaceTrim | Curve > to map the boundary to. |
boundary | This parameter is the boundary to map from. |
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.
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.
-parametric | This 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. |
-projection | This 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_list | This 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 mode | This 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 stateVar | This 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. |
-xyz | If 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. |
points | This parameter is either a point or a list of point objects that are projected onto the current or specified database entities. |
dir | This parameter is a direction vector for finding the closest point from a ray. |
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.
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.
-parametric | This 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. |
-projection | This 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_list | This 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 mode | This 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 stateVar | This optional parameter will indicate on return if a surface was found (true) or not (false). |
point | This parameter is the point that is the start of the ray. |
dir | This parameter is a direction vector for the ray. |
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.
pw::Database isBaseForProject
This action checks if this database contains entities that can be projected onto using the project command.
This action has no parameters.
This action returns boolean, true if the database contains entities that can be projected onto.
pw::Database getAll ?-framework framework? ?-type type_string? ?-enabledOnly? ?-visibleOnly?
This action gets a list of all database entities.
-framework | If 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. |
-enabledOnly | This flag, if present, filters the result to include only enabled entities. |
-visibleOnly | This flag, if present, filters the result to include only visible entities. |
This action returns a list of pw::DatabaseEntity objects.
pw::Database getCount ?-framework framework? ?-type type_string?
This action gets the number of entities in the database.
-framework | If 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. |
This action returns an integer value.
pw::Database getByName ?-path path? name
This action gets a database entity using the name.
name | This parameter is a name string. |
-path path | This 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. |
This action returns a pw::DatabaseEntity object.
pw::Database getExtents ?-enabledOnly? ?-visibleOnly?
This action gets the extents of the database.
-enabledOnly | This flag, if present, restricts the calculations to only enabled entities, regardless of their visibility. Enabled entities in off layers are included, for example. |
-visibleOnly | This flag, if present, restricts the calculations to only visible entities. |
This action returns a list of two vectors representing the min and max xyz points of the extents.
pw::Database getSamePointTolerance
This action gets the same point tolerance for database operations.
This action has no parameters.
This action returns the float tolerance.
pw::Database getFitTolerance
This action gets the fit tolerance for database operations.
This action has no parameters.
This action returns the float tolerance.
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.
-children | This optional flag is the notification to include names of attribute dictionaries set to children of the database entities as well. |
-attached | This optional flag is the notification to include names of the attached attribute dictionaries as well. |
-class cls | This optional flag is the notification to only include the names of attached attribute dictionaries that have the given class. |
dbentity_list | This parameter is a list of pw::DatabaseEntity objects, or a single pw::DatabaseEntity object. |
point | This 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. |
This action returns a list of strings.
If the given point is not database constrained, an error will occur.
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.
-children | This optional flag is the notification to include the attribute dictionary set on children of the database entities as well. |
-attached | This optional flag is the notification to include the attached attribute dictionaries as well. |
-class cls | This 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. |
-modified | This 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. |
-traversed | This 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_list | This parameter is a list of pw::DatabaseEntity objects, or a single pw::DatabaseEntity object. |
point | This 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_name | This parameter is the string name of the dictionary. |
attr_keys | This 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. |
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.
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.
pw::Database get/setModelSize size
This attribute is the model size of the database used to determine tolerances.
This attribute is a float with the range (0, infinity).
The default for this attribute is 1000.0.
pw::Database get/setImportVisibility import
This attribute is the visibility mode of database import.
This attribute is a boolean.
The default for this attribute is true.
If this attribute is true, entity visibility data is imported from database files. If this attribute is false, entity visibility is determined automatically.
pw::Database get/setImportShellSplitAngle angle
This attribute is the bending angle that shell database entities are split at on import.
This attribute is a float with the range [0, 180].
The default for this attribute is 0.
pw::Database get/setImportShellCellMode mode
This attribute notifies how shell cells should be handled on import.
This attribute is of type string; < AsTriangles | AsTrianglesAndQuadrilaterals | AsIs | MergeCoplanar ).
The default for this attribute is AsTriangles.
pw::Database get/setImportAutoSplitSurfaces split
This attribute notifies if the auto split should happen on import.
This attribute is a boolean.
The default for this attribute is false.
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.
This action gets a list of file types that can export all of the given entities.
pw::Database getExportFileTypes dbentity_list
This action exports the list of entities to the given file.
pw::Database export ?-type file_type? ?-format file_format? ?-precision fp_precision? ?-noOverwrite? dbentity_list filename
Import the given file into the database.
pw::Database import ?-type file_type? ?-format file_format? ?-precision fp_precision? ?-duplicates dup_mode? ?-report report_var? filename
This action saves the entire database in the native file format.
pw::Database save ?-compress level? ?-noOverwrite? filename
This action intersects database entities.
pw::Database intersect ?-tolerance tol? ?-actual do_actual? ?-apparent line_of_sight? ?-closest max_dist? dbentity_list1 ?dbentity_list2?
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
This action gets the 3D position of the given point.
pw::Database getXYZ point
This action gets the database entity of the given point.
pw::Database getEntity point
This action offsets the uv coordinates of the given parametric database point.
pw::Database offsetUV point < u | uv >
This action calculates the offset from the given database point in the direction of the normal at the point.
pw::Database offsetNormal point distance
This action returns the normal at the specified database point.
pw::Database getNormal point
This action returns the radius of curvature at the specified database point.
pw::Database getRadiusOfCurvature ?-surface? point
This action calculates the geometric properties at the specified database point.
pw::Database getGeometricProperties ?-curve curveVar? ?-surface surfaceVar? ?-directional directionalVar? ?-orthogonal orthogonalVar? point
This action gets the total length of a pw::Curve or boundary.
pw::Database getTotalLength < curve | boundary >
This action gets the corresponding pw::Curve for a boundary, if any.
pw::Database getCurve boundary
This action maps a database boundary to a different topology level.
pw::Database mapBoundary < Model | Quilt | SurfaceTrim | Curve > boundary
This action gets the closest point on a database entity from a given point.
pw::Database closestPoint ?-parametric? ?-projection? ?-explicit entity_or_boundary_list | -mode mode? ?-state stateVar? ?-xyz? points ?dir?
This action gets the ray intersection on a database entity from a given ray.
pw::Database intersectRay ?-parametric? ?-projection? ?-explicit entity_or_boundary_list | -mode mode? ?-state stateVar? point dir
This action checks if this database contains entities that can be projected onto using the project command.
pw::Database isBaseForProject
This action gets a list of all database entities.
pw::Database getAll ?-framework framework? ?-type type_string? ?-enabledOnly? ?-visibleOnly?
This action gets the number of entities in the database.
pw::Database getCount ?-framework framework? ?-type type_string?
This action gets a database entity using the name.
pw::Database getByName ?-path path? name
This action gets the extents of the database.
pw::Database getExtents ?-enabledOnly? ?-visibleOnly?
This action gets the same point tolerance for database operations.
pw::Database getSamePointTolerance
This action gets the fit tolerance for database operations.
pw::Database getFitTolerance
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.
pw::Database getAttributeDictionaryNames ?-children? ?-attached? ?-class cls? < dbentity_list | point >
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 getAttributeDictionary ?-children? ?-attached? ?-class cls? ?-traversed? < dbentity_list | point > dict_name ?attr_keys?
This attribute is the model size of the database used to determine tolerances.
pw::Database get/setModelSize size
This attribute is the visibility mode of database import.
pw::Database get/setImportVisibility import
This attribute is the bending angle that shell database entities are split at on import.
pw::Database get/setImportShellSplitAngle angle
This attribute notifies how shell cells should be handled on import.
pw::Database get/setImportShellCellMode mode
This attribute notifies if the auto split should happen on import.
pw::Database get/setImportAutoSplitSurfaces split
This action automatically creates new surfaces using the given curves as boundaries for Coons patches.
pw::Surface createFromCurves ?-tolerance tol? curves
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