Glyph Version 7.22.2 |
pw:: DatabaseEntityBase type for all database entities Derives FromSummary
closestApproach
This action returns the smallest distance or closest approach between the given database entities. Parameters
ReturnsThis action returns the distance between the given pw::DatabaseEntity objects. An error is returned if the distance could not be determined. InformationThe -seed parameter is optional, but may be used to help the algorithm find the desired nearest distance in the event there are local minimum/maximum that might make it difficult or impossible for the algorithm to locate the desired distance. If either of the -result1Var or -result2Var flags are specified, they will contain point objects that indicate the locations on the given entities where they are nearest one another. ExampleThis example shows how to get the distance between two pw::DatabaseEntity objects as well as the corresponding point entities. It also demonstrates how to obtain the XYZ locations from the point objects. Code set sphere(1) [pw::Database getByName "sphere-1"] Output Distance is 1.0 getAdjacentEntities
This action returns a list of db entities adjacent to the given entities. Parameters
ReturnsThis action returns a list of adjacent pw::DatabaseEntity objects. InformationIf the -all flag is specified, the process is repeated until no more adjacent entities are found. The return list will not include any entities specified in the argument list. Database entities are only considered adjacent for certain types;
ExampleThis example shows how to get quilts adjacent to a given quilt in order to assemble them. The -all option is used to continue finding adjacent quilts to the ones already added. The original quilt must then be added to the list before assembly. Code set quilt(1) [pw::Database getByName "quilt-1"] Output quilt-2 See AlsogetByName
This action gets a database entity using the name. Parameters
ReturnsThis action returns a pw::DatabaseEntity object. -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. ExampleThis example shows how to get a database entity named model-1 in order to find out how many quilts are in that model. Code set mdl(1) [pw::DatabaseEntity getByName "model-1"] Output model-1 has 188 quilts. See AlsogetBySequence
This action gets a database entity using the sequence number. Parameters
ReturnsThis action returns a pw::DatabaseEntity object. NotesThis function is extremely inefficient for querying the entire database system. It is much more efficient to call pw::Database.getAll and simply index into the returned list. ExampleCode set db [pw::DatabaseEntity getBySequence 11] Output BSurf-425 is of the type pw::Surface. delete
This action deletes this entity. Parameters
ReturnsThis action returns nothing. ExampleThis example shows how to delete $mdl(1), which is referencing an existing model. The -dependents parameter causes all quilts and other hidden database entities that depend on the model to be deleted also. Code $mdl(1) delete -dependents transform
This action transforms this entity by the given matrix. The matrix is a list of 16 values, but in practice, the utility functions for transform matrices are generally used instead. Parameters
ReturnsThis action returns nothing. ExampleThis example shows how to scale database entities using a transform utility command that sets an anchor point from the uv vector “0 0” on $crv(1) and a scaling vector of “5 5 0” to form the matrix. $crv(1) is referencing an existing database curve. Code $crv(1) transform [pwu::Transform scaling -anchor \ See AlsoclosestPoint
This action gets the closest point on this entity to the given point or ray. Parameters
ReturnsThis action returns a point, in the parameter space of this database entity, if there is no closest point this action will return the origin. ExampleThis example finds the closest point in parameter space on $mdl(1) from the given point “0 0 10”. The -distance parameter is used to find the distance between the points. $mdl(1) is referencing an existing model. Code set pt [$mdl(1) closestPoint -distance dist [list 0 0 10]] Output quilt-1 (0.00596421,0) isDefined
This action checks if this entity is defined. ParametersThis action has no parameters. ReturnsThis action returns a boolean, true if the entity is defined. ExampleThis example checks to see if $mdl(1) is defined. $mdl(1) is referencing an existing model. Code puts [$mdl(1) isDefined] Output 1 isParametric
This action checks if this entity is parametric. ParametersThis action has no parameters. ReturnsThis action returns a boolean, true if the entity is parametric. ExampleThis example checks to see if $mdl(1) is parametric. $mdl(1) is referencing an existing model. Code puts [$mdl(1) isParametric] Output 0 isCurve
This action checks if this entity is curve-like. ParametersTHis action has no parameters. ReturnsThis action returns a boolean, true if the entity is a curve. ExampleThis example checks to see if $crv(1) is curve-like. $crv(1) is referencing an existing database curve. Code puts [$crv(1) isCurve] Output 1 isSurface
This action checks if this entity is surface-like. ParametersThis action has no parameters. ReturnsThis action returns a boolean, true if the entity is a surface. ExampleThis example checks to see if $crv(1) is surface-like. $crv(1) is referencing an existing database curve. Code puts [$crv(1) isSurface] Output 0 isBaseForProject
This action checks if this entity can be projected onto using a project command. ParametersThis action has no parameters. ReturnsThis action returns a boolean, true if the entity is a target for projection. ExampleThis example checks to see if $mdl(1) can be projected onto. $mdl(1) is referencing an existing model. Code puts [$mdl(1) isBaseForProject] Output 0 See Alsopw::Entity.project pw::GridEntity.project pw::Curve.project pw::Connector.project <pw::Domain.project> isBaseForConnector
This action checks if connectors can be built on the entity using the pw::Connector.createOnDatabase command. ParametersThis action has no parameters. ReturnsThis action returns a boolean, true if the entity is a base for connectors. ExampleThis example checks to see if $qlt(1) can have connectors built on it. $qlt(1) is referencing an existing quilt. Code puts [$qlt(1) isBaseForConnector] Output 1 isBaseForDomainStructured
This action checks if domains can be built on the entity using the pw::DomainStructured.createOnDatabase command. ParametersThis action has no parameters. ReturnsThis action returns a boolean, true if the entity is a base for strcutured domains. ExampleThis example checks to see if $qlt(1) can have structured domains built on it. $qlt(1) is referencing an existing quilt. Code puts [$qlt(1) isBaseForDomainStructured] Output 1 isBaseForDomainUnstructured
This action checks if domains can be built on the entity using the pw::DomainUnstructured.createOnDatabase command. ParametersThis action has no parameters. ReturnsThis action returns a boolean, true if the entity is a base for unstrcutured domains. ExampleThis example checks to see if $qlt(1) can have unstructured domains built on it. $qlt(1) is referencing an existing quilt. Code puts [$qlt(1) isBaseForDomainUnstructured] Output 1 getDescription
This action gets the description of how this entity was defined. ParametersThis action has no parameters. ReturnsThis action returns a string description. InformationAll possible string returns: AkimaSpline, AveragePoint, BezierSpline, BSplineCurve, BSplineSurface, Boundary, BoundedSurface, CatmullRomSpline, Circle, CompositeCurve, CompositeSurface, ConeSurface, ConicCurve, CoonsSurface, Copious, CurveOnSurface, CylinderSurface, Edge, Face, FilletSurface, Group, IntersectionCurve, IntersectionPoint, Line, LinearSpline, LinearSweep, Loop, Model, Note, OffsetCurve, OffsetSurface, OpenModel, ParametricCurve, ParametricSurface, Plane, PlaneSurface, Point, ProjectedCurve, Quilt, RuledSurface, Shell, SolidModel, SphereSurface, SubfigureDefinition, SubfigureInstance, Revolution, TabulatedCylinder, ToroidalSurface, TrimmedCurve, TrimmedSurface, Unknown, Vertex. ExampleThis example shows how to get the description for $crv(1). $crv(1) is referencing an existing database curve. Code puts [$crv(1) getDescription] Output LinearSpline getPartCount
This action gets the number of parts of the entity of a given type. Parameters
ReturnsThis action returns the integer number of parts of the entity InformationSome database entities are constructed from several internal parts which may need to be addressed by different actions, but the parts themselves are not considered entities. This action is used in combination with getPart to build a string that can be used to reference these internal parts. getPart
This action gets a string representing a part of the entity that can be used to reference the part in other actions. Parameters
InformationSome database entities are constructed from several internal parts which may need to be addressed by different actions, but the parts themselves are not considered entities. This action is used in combination with getPartCount to build a string that can be used to reference these internal parts. ReturnsThis action returns a string representing the part for use by other acitions. getParts
This action gets a list of strings representing parts of the entity that can be used to reference the part in other actions. Parameters
ReturnsThis action returns a list of strings representing the parts for use by other acitions. InformationValid filters and what they do: Corners - Only return the Vertices that are at the ends of strings getPartOwner
This action gets the DatabaseEntity object that owns the given part of this entity and the part name within that entity. This is only meaningful in the context of Model, Quilt and SurfaceTrim entities that share parts. In all other cases, this action will return itself and the given part name. Parameters
ReturnsThis action returns a list of the DatabaseEntity object representing the entity that owns the given part of this entity, and the part name of the part with respect to the owning entity. getPartOwners
This action gets a list of the DatabaseEntity object that owns the given parts of this entity and the part name within that entity. This is only meaningful in the context of Model, Quilt and SurfaceTrim entities that share parts. In all other cases, this action will return itself and the given part name. Parameters
ReturnsThis action returns a list of lists, where each entry is a list of the DatabaseEntity object representing the entity that owns the given part of this entity, and the part name of the part with respect to the owning entity. getPartXYZs
This action gets a list of xyz vectors for the given parts of this entity. This is only valid for Vertex parts. Parameters
ReturnsThis action returns the 3D positions of the parts as a list of xyz vectors. getPartBoundary
This action gets the entity boundary for the given part of this entity. This is only valid for String, Costring, Edge, and Coedge parts with entities that have boundaries. Parameters
ReturnsThis action returns a boundary. getAttributeDictionaryNames
This action gets a list of string names for the available attribute dictionaries set on this entity. Parameters
ReturnsThis action returns a list of strings. getAttributeDictionary
This action gets a dictionary of key-value pairs of attributes that have been set on this entity 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). 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. InformationWhen 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. setAttributeDictionary
This action sets a dictionary of key-value pairs on this entity with the given dictionary name. Parameters
ReturnsThis action returns nothing. updateAttributeDictionary
This action updates the attribute dictionary that has been set on this entity with the given name for the given key-value pair. Parameters
ReturnsThis action returns nothing. renameAttributeDictionary
This action renames an attribute dictionary that has been set on this entity. Parameters
ReturnsThis action returns nothing. renameAttributeDictionaryKey
This action renames an attribute dictionary key that has been set on this entity. Parameters
ReturnsThis action returns nothing. getAttachedAttributeDictionaries
This action returns a list of pw::AttributeDictionary objects that are attached to this entity. Parameters
ReturnsThis action returns a list of pw::AttributeDictionary objects. getAttachedAttributeParts
This action returns a list of string part names that are attached to the given <pw::AttributeDicitionary> object. Parameters
ReturnsThis action returns a list of string part names. attachAttributeDictionary
This action attaches a pw::AttributeDictionary object to this entity. Parameters
ReturnsThis action returns nothing. detachAttributeDictionary
This action detaches a pw::AttributeDictionary object from this entity. Parameters
ReturnsThis action returns nothing. getImportedAttribute
This action gets the type and value of an entity attribute. Parameters
ReturnsThis action returns the list {type value}. The type can be one of Int, String, or Real. ExampleThis example shows how to get a named attribute from the existing database entity $db. Code set attrName "OUTLET" Output "String OUTLET = 'PRESSURE'" getImportedAttributeNames
This action gets the entity’s available attribute names. Parameters
ReturnsA string list of the attribute names. ExampleThis example shows how to get attribute names from the existing database entity $db. Code # get all attribute names Output all : Attrib1 Attrib2 EX.Mach EX.Node.attr1 EX.Con9.attr EX.1234.attr getSupportEntities
This action gets the entities that this entity requires. ParametersThis action has no parameters. ReturnsThis action returns a list of pw::DatabaseEntity objects. ExampleThis example shows how to get the support entities for $qlt(1). $qlt(1) is referencing an existing quilt. Code foreach ent [$qlt(1) getSupportEntities] { Output TrimSurf-39 getDependentEntities
This action gets the entities that require this entity to exist. Effectively, this returns the list of entities that would be deleted if this entity is deleted. It is not necessarily the complete set of entities defined in the parameter space if this entity. Use getReferencingEntities to get all supported entities. ParametersThis action has no parameters. ReturnsThis action returns a list of pw::DatabaseEntity objects. ExampleThis example shows how to get the dependent entities for $qlt(1). $qlt(1) is referencing an existing quilt. Code foreach ent [$qlt(1) getDependentEntities] { Output TrimSurf-39 getReferencingEntities
This action gets the entities that reference this entity, but not necessarily depend on it to support. ParametersThis action has no parameters. ReturnsThis action returns a list of pw::DatabaseEntity objects. ExampleThis example shows how to get the referencing entities for $curve. $curve is referencing an existing intersection curve. Code foreach ent [$curve getReferencingEntities] { Output surface-1 getGridEntities
This action gets the grid entities that this entity supports. ParametersThis action has no parameters. ReturnsThis action returns a list of pw::GridEntity objects. ExampleThis example shows how to get the grid entities for $qlt(1). $qlt(1) is referencing an existing quilt. Code foreach ent [$qlt(1) getGridEntities] { Output dom-2 |
This action returns the smallest distance or closest approach between the given database entities.
pw::DatabaseEntity closestApproach ?-seed seedPt? -result1Var pt1? ?-result2Var pt2? entities1 entities2
This action returns a list of db entities adjacent to the given entities.
pw::DatabaseEntity getAdjacentEntities ?-tolerance tol? ?-maximumAngle angle? ?-all? ents
This action gets a database entity using the name.
pw::DatabaseEntity getByName ?-path path? name
This action gets a database entity using the sequence number.
pw::DatabaseEntity getBySequence number
This action deletes this entity.
$entity delete ?-force? ?-dependents?
This action transforms this entity by the given matrix.
$entity transform matrix
This action gets the closest point on this entity to the given point or ray.
$entity closestPoint ?-from fromVar? ?-distance distVar? point ?dir?
This action checks if this entity is defined.
$entity isDefined
This action checks if this entity is parametric.
$entity isParametric
This action checks if this entity is curve-like.
$entity isCurve
This action checks if this entity is surface-like.
$entity isSurface
This action checks if this entity can be projected onto using a project command.
$entity isBaseForProject
This action checks if connectors can be built on the entity using the pw::Connector.createOnDatabase command.
$entity isBaseForConnector
This action creates new connector objects on the given database entities.
pw::Connector createOnDatabase ?-merge tolerance? ?-splitConnectors split_angle? ?-joinConnectors join_angle? ?-parametricConnectors mode? ?-reject rejectVar? ?-type type? entity_or_boundary_list
This action checks if domains can be built on the entity using the pw::DomainStructured.createOnDatabase command.
$entity isBaseForDomainStructured
This action creates new structured domain objects on the given database entities.
pw::DomainStructured createOnDatabase ?-merge tolerance? ?-splitConnectors split_angle? ?-joinConnectors join_angle? ?-parametricConnectors mode? ?-reject rejectVar? entities
This action checks if domains can be built on the entity using the pw::DomainUnstructured.createOnDatabase command.
$entity isBaseForDomainUnstructured
This creates new unstructured domain objects on the given database entities.
pw::DomainUnstructured createOnDatabase ?-merge tolerance? ?-splitConnectors split_angle? ?-joinConnectors join_con_angle? ?-joinDomains join_dom_angle? ?-parametricConnectors mode? ?-reject rejectVar? entities
This action gets the description of how this entity was defined.
$entity getDescription
This action gets the number of parts of the entity of a given type.
$entity getPartCount part_type
This action gets a string representing a part of the entity that can be used to reference the part in other actions.
$entity getPart part_type < index | point | boundary >
This action gets a list of strings representing parts of the entity that can be used to reference the part in other actions.
$entity getParts ?-filter filter? part_type
This action gets the DatabaseEntity object that owns the given part of this entity and the part name within that entity.
$entity getPartOwner part_name
This action gets a list of the DatabaseEntity object that owns the given parts of this entity and the part name within that entity.
$entity getPartOwners part_names
This action gets the xyz vector for the given part of this entity.
$entity getPartXYZ part_name
This action gets a list of xyz vectors for the given parts of this entity.
$entity getPartXYZs part_names
This action gets the entity boundary for the given part of this entity.
$entity getPartBoundary part_name
This action gets a list of string names for the available attribute dictionaries set on this entity.
$entity getAttributeDictionaryNames ?-part part? ?-children? ?-attached? ?-class cls?
This action gets a dictionary of key-value pairs of attributes that have been set on this entity with the given dictionary name.
$entity getAttributeDictionary ?-part part? ?-children? ?-attached? ?-class cls? ?-modified? ?-traversed? dict_name ?attr_keys?
This action sets a dictionary of key-value pairs on this entity with the given dictionary name.
$entity setAttributeDictionary ?-part part? dict_name ?dict?
This action updates the attribute dictionary that has been set on this entity with the given name for the given key-value pair.
$entity updateAttributeDictionary ?-part part? ?-force? dict_name key ?value?
This action renames an attribute dictionary that has been set on this entity.
$entity renameAttributeDictionary ?-part part? dict_name new_dict_name
This action renames an attribute dictionary key that has been set on this entity.
$entity renameAttributeDictionaryKey ?-part part? dict_name key new_key
This action returns a list of pw::AttributeDictionary objects that are attached to this entity.
$entity getAttachedAttributeDictionaries ?-part part?
This action returns a list of string part names that are attached to the given pw::AttributeDicitionary object.
$entity getAttachedAttributeParts attr_dict
This action attaches a pw::AttributeDictionary object to this entity.
$entity attachAttributeDictionary ?-part part? ?-exclusiveClass? attr_dict
This action detaches a pw::AttributeDictionary object from this entity.
$entity detachAttributeDictionary ?-part part? attr_dict
This action gets the type and value of an entity attribute.
$entity getImportedAttribute attribute_name
This action gets the entity’s available attribute names.
$entity getImportedAttributeNames ?-regex? ?pattern?
This action gets the entities that this entity requires.
$entity getSupportEntities
This action gets the entities that require this entity to exist.
$entity getDependentEntities
This action gets the entities that reference this entity, but not necessarily depend on it to support.
$entity getReferencingEntities
This action gets the grid entities that this entity supports.
$entity getGridEntities
This action gets a list of all database entities.
pw::Database getAll ?-framework framework? ?-type type_string? ?-enabledOnly? ?-visibleOnly?
This action projects the given entities onto database entities.
pw::Entity project ?-type proj_type? ?-direction direction? ?-center center? ?-axis point normal? ?-fit tolerance? ?<-interior | -shape>? entities ?dbentities?
This action projects grid entities onto database entities.
pw::GridEntity project ?-type proj_type? ?-direction direction? ?-center center? ?-axis point normal? ?-fit tolerance? ?<-interior | -shape>? entities ?dbentities?
This action projects this curve onto one or more database entities.
$curve project ?-type proj_type? ?-direction direction? ?-center center? ?-axis point normal? ?-fit tolerance? ?-interior? ?dbentities?
This action projects this connector onto one or more database entities.
$con project ?-type proj_type? ?-direction direction? ?-center center? ?-axis point normal? ?-fit tolerance? ?<-interior | -shape>? ?dbentities?