Glyph2 Version 2.18.0 |
pw:: DatabaseGlobal actions for database entities Derives FromSummary
getExportFileTypes
This action gets a list of file types that can export all of the given entities. Parameters
ReturnsThis action returns a list containing file type name strings that can be used in the export command. export
This action exports the list of entities to the given file. Parameters
ReturnsThis action returns nothing. InformationThis command supports progress updates. File Types
For file_format A = ASCII, B = Binary, U = Unformatted import
Import the given file into the database. Parameters
ReturnsThis action returns a list of the imported pw::DatabaseEntity objects. InformationThis command supports progress updates. File Types
Supported CAD Formats
For file_format A = ASCII, B = Binary, U = Unformatted Compatibility with DatabaseImporter modeFor backward compatability, 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 To make shell import behavior the same, you can use <pw::Database setImportShellCellMode MergeCoplanar>. However, due to the limited settings available for <pw::Database setImportVisibility>, 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 save
This action saves the entire database in the native file format. Parameters
ReturnsThis action returns nothing. InformationThis command supports progress updates. For “-compress level”, 0 = no compression, 1 = minimum, and 9 = maximum. Higher levels of compression take longer to save. intersect
This action intersects database entities. Parameters
ReturnsThis action returns a list of the newly created pw::DatabaseEntity objects. InformationIf 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
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
ReturnsThis 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 Alsopw::Surface.createFromCurves, which works similar to this action except that it only makes Coons patches. getEntity
This action gets the database entity of the given point. Parameters
ReturnsThis action returns a pw::DatabaseEntity object. InformationIf the given point is not database constrained, an error will occur. offsetUV
This action offsets the uv coordinates of the given parametric database point. Parameters
ReturnsThis action returns a point in the form “u v dbentity”. InformationIf the given point is not parametric database constrained, an error will occur. offsetNormal
This action calculates the offset from the given database point in the direction of the normal at the point. Parameters
ReturnsThis action returns an xyz vector. InformationIf the given point is not database constrained, or the normal is not defined for the database entity, an error will occur. getNormal
This action returns the normal at the specified database point. Parameters
ReturnsThis action returns an xyz vector. InformationIf the given point is not database constrained, or the normal is not defined for the database entity, an error will occur. getTotalLength
This action gets the total length of a pw::Curve or boundary. Parameters
ReturnsThis action returns the float length which has the range [0.0, infinity). getCurve
This action gets the corresponding pw::Curve for a boundary, if any. Parameters
ReturnsThe pw::Curve corresponding to a boundary. If no pw::Curve exists, an error will be raised. closestPoint
This action gets the closest point on a database entity from a given point. Parameters
ReturnsThis action returns a point, 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. intersectRay
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
ReturnsThis 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
This action checks if this database contains entities that can be projected onto using the project command. ParametersThis action has no parameters. ReturnsThis action returns boolean, true if the database contains entities that can be projected onto. getAll
This action gets a list of all database entities. Parameters
ReturnsThis action returns a list of pw::DatabaseEntity objects. getCount
This action gets the number of entities in the database. Parameters
ReturnsThis action returns an integer value. getByName
This action gets a database entity using the name. Parameters
ReturnsThis action returns a pw::DatabaseEntity object. getExtents
This action gets the extents of the database. Parameters
ReturnsThis action returns a list of two vectors representing the min and max xyz points of the extents. getSamePointTolerance
This action gets the same point tolerance for database operations. ParametersThis action has no parameters. ReturnsThis action returns the float tolerance. getFitTolerance
This action gets the fit tolerance for database operations. ParametersThis action has no parameters. ReturnsThis action returns the float tolerance. 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. Parameters
ReturnsThis action returns a list of strings. InformationIf the given point is not database constrained, an error will occur. getAttributeDictionary
This action gets a dictionary of key-value pairs of attributes that have been attached to the given database entites or the database entities at the given point with the given dictionary name. Parameters
ReturnsThis action returns a list of strings that can be converted into a tcl dictionary (list of alternating keys and values). InformationIf the given point is not database constrained, an error will occur. When using the -children flag, 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. ModelSize
This attribute is the model size of the database used to determine tolerances. TypeThis attribute is a float with the range (0, infinity). DefaultThe default for this attribute is 1000.0. ImportVisibility
This attribute is the visiblity mode of database import. TypeThis attribute is a boolean. DefaultThe default for this attribute is true. InformationIf this attribute is true, entity visibility data is imported from database files. If this attribute is false, entity visibility is determined automatically. ImportShellSplitAngle
This attribute is the bending angle that shell database entities are split at on import. TypeThis attribute is a float with the range [0, 180]. DefaultThe default for this attribute is 0. ImportShellCellMode
This attribute notifies how shell cells should be handled on import. TypeThis attribute is of type string; < AsTriangles | AsTrianglesAndQuadrilaterals | AsIs | MergeCoplanar ). DefaultThe default for this attribute is AsTriangles. ImportAutoSplitSurfaces
This attribute notifies if the auto split should happen on import. TypeThis attribute is a boolean. DefaultThe default for this attribute is false. InformationIf 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? 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 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 gets the closest point on a database entity from a given point.
pw::Database closestPoint ?-parametric? ?-projection? ?-explicit ents? ?-state stateVar? point ?dir?
This action gets the ray intersection on a database entity from a given ray.
pw::Database intersectRay ?-parametric? ?-projection? ?-explicit ents? ?-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?
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? < dbentity_list | point >
This action gets a dictionary of key-value pairs of attributes that have been attached to the given database entites or the database entities at the given point with the given dictionary name.
pw::Database getAttributeDictionary ?-children? < dbentity_list | point > dict_name ?attr_names?
This attribute is the model size of the database used to determine tolerances.
pw::Database get/setModelSize size
This attribute is the visiblity 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