Base type for all database entities
pw:: | Base type for all database entities |
Static Actions | |
closestApproach | This action returns the smallest distance or closest approach between the given database entities. |
getAdjacentEntities | This action returns a list of db entities adjacent to the given entities. |
getByName | This action gets a database entity using the name. |
getBySequence | This action gets a database entity using the sequence number. |
delete | This action deletes this entity. |
transform | This action transforms this entity by the given matrix. |
closestPoint | This action gets the closest point on this entity to the given point or ray. |
isDefined | This action checks if this entity is defined. |
isParametric | This action checks if this entity is parametric. |
isCurve | This action checks if this entity is curve-like. |
isSurface | This action checks if this entity is surface-like. |
isBaseForProject | This action checks if this entity can be projected onto using a project command. |
isBaseForConnector | This action checks if connectors can be built on the entity using the pw::Connector.createOnDatabase command. |
isBaseForDomainStructured | This action checks if domains can be built on the entity using the pw::DomainStructured.createOnDatabase command. |
isBaseForDomainUnstructured | This action checks if domains can be built on the entity using the pw::DomainUnstructured.createOnDatabase command. |
getDescription | This action gets the description of how this entity was defined. |
getPartCount | This action gets the number of parts of the entity of a given type. |
getPart | This action gets a string representing a part of the entity that can be used to reference the part in other actions. |
getParts | This action gets a list of strings representing parts of the entity that can be used to reference the part in other actions. |
getPartOwner | This action gets the DatabaseEntity object that owns the given part of this entity and the part name within that 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. |
getPartXYZ | This action gets the xyz vector for the given part of this entity. |
getPartXYZs | This action gets a list of xyz vectors for the given parts of this entity. |
getPartBoundary | This action gets the entity boundary for the given part of this entity. |
getAttributeDictionaryNames | This action gets a list of string names for the available attribute dictionaries set on this entity. |
getAttributeDictionary | This action gets a dictionary of key-value pairs of attributes that have been set on this entity with the given dictionary name. |
setAttributeDictionary | This action sets a dictionary of key-value pairs on this entity with the given dictionary name. |
updateAttributeDictionary | This action updates the attribute dictionary that has been set on this entity with the given name for the given key-value pair. |
renameAttributeDictionary | This action renames an attribute dictionary that has been set on this entity. |
renameAttributeDictionaryKey | This action renames an attribute dictionary key that has been set on this entity. |
getAttachedAttributeDictionaries | This action returns a list of pw::AttributeDictionary objects that are attached to this entity. |
getAttachedAttributeParts | This action returns a list of string part names that are attached to the given <pw::AttributeDicitionary> object. |
attachAttributeDictionary | This action attaches a pw::AttributeDictionary object to this entity. |
detachAttributeDictionary | This action detaches a pw::AttributeDictionary object from this entity. |
getImportedAttribute | This action gets the type and value of an entity attribute. |
getImportedAttributeNames | This action gets the entity’s available attribute names. |
getSupportEntities | This action gets the entities that this entity requires. |
getDependentEntities | This action gets the entities that require this entity to exist. |
getReferencingEntities | This action gets the entities that reference this entity, but not necessarily depend on it to support. |
getGridEntities | This action gets the grid entities that this entity supports. |
pw::DatabaseEntity closestApproach ?-seed seedPt? -result1Var pt1? ?-result2Var pt2? entities1 entities2
This action returns the smallest distance or closest approach between the given database entities.
-seed seedPt | This optional parameter is a point that is used as a seed point for the algorithm. The default is NULL. |
-result1Var pt1 | This optional parameter is the string name of a variable to receive the point on entities1 that is nearest entities2. |
-result2Var pt2 | This optional parameter is the string name of a variable to receive the point on entities2 that is nearest entities1. |
entities1 | list of pw::DatabaseEntity objects to be used as one side of the closest approach search. |
entities2 | list of pw::DatabaseEntity objects to be used as one side of the closest approach search. |
This action returns the distance between the given pw::DatabaseEntity objects. An error is returned if the distance could not be determined.
The -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.
This 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"] set sphere(2) [pw::Database getByName "sphere-2"] set distance \ [pw::DatabaseEntity closestApproach -result1Var pt1 \ -result2Var pt2 $sphere(1) $sphere(2)] puts "Distance is $distance" puts "result1Var XYZ: [pw::Database getXYZ $pt1]" puts "result2Var XYZ: [pw::Database getXYZ $pt2]"
Output
Distance is 1.0 result1Var XYZ: -0.5 0.0 0.0 result2Var XYZ: 0.5 0.0 0.0
pw::DatabaseEntity getAdjacentEntities ?-tolerance tol? ?-maximumAngle angle? ?-all? ents
This action returns a list of db entities adjacent to the given entities.
-tolerance tol | This optional parameter is the float tolerance used to find adjacent entities. The default is fit tolerance. |
-maximumAngle angle | This parameter is the float maximum bend angle for considering entities as adjacent with the range [0, 180]. The default is 180. |
-all | This optional flag is the notification to continue looking for adjacent entities as new ones are added. |
ents | list of pw::DatabaseEntity objects to be used as the seed |
This action returns a list of adjacent pw::DatabaseEntity objects.
If 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;
This 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"] set adjQuilts \ [pw::DatabaseEntity getAdjacentEntities -all $quilt(1)] lappend adjQuilts $quilt(1) foreach db $adjQuilts { puts [$db getName] } pw::Quilt assemble $adjQuilts
Output
quilt-2 quilt-3 quilt-4 quilt-1
pw::DatabaseEntity getByName ?-path path? name
This action gets a database entity using the name.
name | This parameter is a name string. |
This 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.
This 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"] puts "[$mdl(1) getName] has [$mdl(1) getQuiltCount] quilts."
Output
model-1 has 188 quilts.
pw::DatabaseEntity getBySequence number
This action gets a database entity using the sequence number.
number | This parameter is the integer sequence number with the range [1, entity count]. |
This action returns a pw::DatabaseEntity object.
This 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.
Code
set db [pw::DatabaseEntity getBySequence 11] puts "[$db getName] is of the type [$db getType]."
Output
BSurf-425 is of the type pw::Surface.
$entity delete ?-force? ?-dependents?
This action deletes this entity.
-force | This optional flag is the notification that the entity will be deleted, even if grid entities reference it. |
-dependents | This optional flag is the notification that the entity will be deleted along with any dependent database entities. |
This action returns nothing.
This 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
$entity transform matrix
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.
matrix | This parameter is the 4x4 transform matrix. |
This action returns nothing.
This 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 \ [pw::Application getXYZ [list 0 0 $crv(1)]] {5 5 0}]
$entity closestPoint ?-from fromVar? ?-distance distVar? point ?dir?
This action gets the closest point on this entity to the given point or ray.
-from fromVar | This optional parameter is the string name of a variable to receive the xyz of the given point or the point along the ray that is closest to this entity. |
-distance distVar | This optional parameter is the string name of a variable to receive the float distance between the given point or ray and the point entity. |
point | This parameter is the point that is projected onto this database entity. |
dir | This parameter is a direction vector for finding the closest point from a ray. |
This action returns a point, in the parameter space of this database entity, if there is no closest point this action will return the origin.
This 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]] puts [pw::Application getDescription $pt] puts "The UV point is $dist units from the given point."
Output
quilt-1 (0.00596421,0) The UV point is 16.379883785930257 units from the given point.
$entity isDefined
This action checks if this entity is defined.
This action has no parameters.
This action returns a boolean, true if the entity is defined.
This example checks to see if $mdl(1) is defined. $mdl(1) is referencing an existing model.
Code
puts [$mdl(1) isDefined]
Output
1
$entity isParametric
This action checks if this entity is parametric.
This action has no parameters.
This action returns a boolean, true if the entity is parametric.
This example checks to see if $mdl(1) is parametric. $mdl(1) is referencing an existing model.
Code
puts [$mdl(1) isParametric]
Output
0
$entity isCurve
This action checks if this entity is curve-like.
THis action has no parameters.
This action returns a boolean, true if the entity is a curve.
This 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
$entity isSurface
This action checks if this entity is surface-like.
This action has no parameters.
This action returns a boolean, true if the entity is a surface.
This 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
$entity isBaseForProject
This action checks if this entity can be projected onto using a project command.
This action has no parameters.
This action returns a boolean, true if the entity is a target for projection.
This 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
pw::Entity.project pw::GridEntity.project pw::Curve.project pw::Connector.project <pw::Domain.project>
$entity isBaseForConnector
This action checks if connectors can be built on the entity using the pw::Connector.createOnDatabase command.
This action has no parameters.
This action returns a boolean, true if the entity is a base for connectors.
This 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
$entity isBaseForDomainStructured
This action checks if domains can be built on the entity using the pw::DomainStructured.createOnDatabase command.
This action has no parameters.
This action returns a boolean, true if the entity is a base for strcutured domains.
This 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
$entity isBaseForDomainUnstructured
This action checks if domains can be built on the entity using the pw::DomainUnstructured.createOnDatabase command.
This action has no parameters.
This action returns a boolean, true if the entity is a base for unstrcutured domains.
This 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
$entity getDescription
This action gets the description of how this entity was defined.
This action has no parameters.
This action returns a string description.
All 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.
This 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
$entity getPartCount part_type
This action gets the number of parts of the entity of a given type.
part_type | This parameter is the string type of the part to get. Valid values are < Region | Shell | Sheet | Face | Loop | Costring | Coedge | String | Edge | Vertex >. |
This action returns the integer number of parts of the entity
Some 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.
$entity getPart part_type < index | point | boundary >
This action gets a string representing a part of the entity that can be used to reference the part in other actions.
part_type | This parameter is the string type of the part to get. Valid values are < Region | Shell | Sheet | Face | Loop | Costring | Coedge | String | Edge | Vertex >. |
index | This parameter is the integer index of the part to get with range [1, count of part type]. |
point | This parameter is a point that is constrained to or geometrically near the part to get. |
boundary | This parameter is a boundary that is constrained to the part to get. |
Some 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.
This action returns a string representing the part for use by other acitions.
$entity getParts ?-filter filter? part_type
This action gets a list of strings representing parts of the entity that can be used to reference the part in other actions.
-filter filter | This optional parameter is a string to limit the parts returned by this action. If not given, this action returns all of the entity’s parts. See below for valid filters. |
part_type | This parameter is the string type of the part to get. Valid values are < Region | Shell | Sheet | Face | Loop | Costring | Coedge | String | Edge | Vertex >. |
This action returns a list of strings representing the parts for use by other acitions.
Valid filters and what they do: Corners - Only return the Vertices that are at the ends of strings
$entity getPartOwner part_name
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.
part_name | This parameter is the string part name within the entity to get the owner of. Only strings returned by getPart should be used for this parameter. |
This 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.
$entity getPartOwners part_names
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.
part_names | This parameter is the list of string part names within this entity to get the owner of. Only strings returned by getPart or getParts should be used for this parameter. |
This 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.
$entity getPartXYZs part_names
This action gets a list of xyz vectors for the given parts of this entity. This is only valid for Vertex parts.
part_names | This parameter is a list of string part names within the entity to get the xyzs of. |
This action returns the 3D positions of the parts as a list of xyz vectors.
$entity getPartBoundary part_name
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.
part_name | This parameter is the string part name within the entity to get the associated boundary of. |
This action returns a boundary.
$entity getAttributeDictionaryNames ?-part part? ?-children? ?-attached? ?-class cls?
This action gets a list of string names for the available attribute dictionaries set on this entity.
-part part | This optional flag is the string part name within the entity to look for dictionaries. Only strings returned by getPart should be used for this parameter. |
-children | This optional flag is the notification to include names of attribute dictionaries set to children of this entity 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. |
This action returns a list of strings.
$entity getAttributeDictionary ?-part part? ?-children? ?-attached? ?-class cls? ?-modified? ?-traversed? dict_name ?attr_keys?
This action gets a dictionary of key-value pairs of attributes that have been set on this entity with the given dictionary name.
-part part | This optional flag is the string part name within the entity to look for dictionaries. Only strings returned by getPart should be used for this parameter. |
-children | This optional flag is the notification to include the attribute dictionary set on children of this entity 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. |
dict_name | This parameter is the string name of the dictionary. |
attr_keys | This optional parameter is a string key 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.
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.
$entity setAttributeDictionary ?-part part? dict_name ?dict?
This action sets a dictionary of key-value pairs on this entity with the given dictionary name.
-part part | This optional flag is the string part name within the entity to set the dictionary. Only strings returned by getPart should be used for this parameter. |
dict_name | This parameter is the string name of the dictionary. |
dict | This optional parameter is a list of string values of alternating key-value pairs. If the parameter is not given, the dictionary will be cleared from the entity. If the list is an empty list, all key-value pairs of the dictionary will be removed. |
This action returns nothing.
$entity updateAttributeDictionary ?-part part? ?-force? dict_name key ?value?
This action updates the attribute dictionary that has been set on this entity with the given name for the given key-value pair.
-part part | This optional flag is the string part name within the entity to update the dictionary for. Only strings returned by getPart should be used for this parameter. |
-force | This optional flag will cause the dictionary and key-value pair to be added if it doesn’t already exist. The default behavior is to only update the dictionary if the key exists. |
dict_name | This parameter is the string name of the dictionary. |
key | This parameter is a string name of the key to update. |
value | This optional parameter is a string value of a key-value pair to set for the dictionary. If this parameter is not given, the key will be removed from the dictionary if it exists. If an empty string is given, it will be assigned to the key. |
This action returns nothing.
$entity renameAttributeDictionary ?-part part? dict_name new_dict_name
This action renames an attribute dictionary that has been set on this entity.
-part part | This optional flag is the string part name within the entity to rename the dictionary for. Only strings returned by getPart should be used for this parameter. |
dict_name | This parameter is the string current name of the dictionary to rename. |
new_dict_name | This parameter is the string new name of the dictionary. |
This action returns nothing.
$entity renameAttributeDictionaryKey ?-part part? dict_name key new_key
This action renames an attribute dictionary key that has been set on this entity.
-part part | This optional flag is the string part name within the entity to update the dictionary key for. Only strings returned by getPart should be used for this parameter. |
dict_name | This parameter is the string name of the dictionary. |
key | This parameter is a string name of the key to rename. |
new_key | This parameter is a string new key name. |
This action returns nothing.
$entity getAttachedAttributeDictionaries ?-part part?
This action returns a list of pw::AttributeDictionary objects that are attached to this entity.
-part part | This optional flag is the string part name within the entity to attach the dictionary to. Only strings returned by getPart should be used for this parameter. |
This action returns a list of pw::AttributeDictionary objects.
$entity getAttachedAttributeParts attr_dict
This action returns a list of string part names that are attached to the given <pw::AttributeDicitionary> object.
attr_dict | This parameter is the pw::AttributeDictionary object to list the parts that it is attached to. |
This action returns a list of string part names.
$entity attachAttributeDictionary ?-part part? ?-exclusiveClass? attr_dict
This action attaches a pw::AttributeDictionary object to this entity.
-part part | This optional flag is the string part name within the entity to attach the dictionary to. Only strings returned by getPart should be used for this parameter. |
-exclusive | This optional flag signals that all other dictionaries that match the class of the given pw::AttributeDictionary will be detached from this entity. |
attr_dict | This parameter is the pw::AttributeDictionary object to attach to this entity. |
This action returns nothing.
$entity detachAttributeDictionary ?-part part? attr_dict
This action detaches a pw::AttributeDictionary object from this entity.
-part part | This optional flag is the string part name within the entity to detach the dictionary from. Only strings returned by getPart should be used for this parameter. |
attr_dict | This parameter is the pw::AttributeDictionary object to detach from this entity. |
This action returns nothing.
$entity getImportedAttribute attribute_name
This action gets the type and value of an entity attribute.
attribute_name | This parameter is the attribute name string. |
This action returns the list {type value}. The type can be one of Int, String, or Real.
This example shows how to get a named attribute from the existing database entity $db.
Code
set attrName "OUTLET" if { ![catch {$db getImportedAttribute $attrName} result] } { lassign $result attrType attrVal puts "$attrType $attrName = '$attrVal'" } else { puts "Attribute not found." }
Output
"String OUTLET = 'PRESSURE'"
$entity getImportedAttributeNames ?-regex? ?pattern?
This action gets the entity’s available attribute names.
-regex | This optional flag signifies that the given pattern should be considered a regular expression pattern rather than a glob pattern. |
pattern | This optional parameter is the string pattern used to filter the returned attribute names. If a pattern is not given, all attribute names are returned. |
A string list of the attribute names.
This example shows how to get attribute names from the existing database entity $db.
Code
# get all attribute names puts "all : [$db getImportedAttributeNames]" # get attribute names matching glob pattern puts "glob : [$db getImportedAttributeNames "EX.*"]" # get attribute names matching the regex pattern "EX.Word.postfix" # where "Word" must start with a capital letter. puts "regex: [$db getImportedAttributeNames -regex {EX\.[A-Z]{1}\w+\..+}]"
Output
all : Attrib1 Attrib2 EX.Mach EX.Node.attr1 EX.Con9.attr EX.1234.attr glob : EX.Mach EX.Node.attr1 EX.Con9.attr EX.1234.attr regex: EX.Node.attr1 EX.Con9.attr
$entity getSupportEntities
This action gets the entities that this entity requires.
This action has no parameters.
This action returns a list of pw::DatabaseEntity objects.
This example shows how to get the support entities for $qlt(1). $qlt(1) is referencing an existing quilt.
Code
foreach ent [$qlt(1) getSupportEntities] { puts [$ent getName] }
Output
TrimSurf-39
$entity 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.
This action has no parameters.
This action returns a list of pw::DatabaseEntity objects.
This example shows how to get the dependent entities for $qlt(1). $qlt(1) is referencing an existing quilt.
Code
foreach ent [$qlt(1) getDependentEntities] { puts [$ent getName] }
Output
TrimSurf-39 model-1
$entity getReferencingEntities
This action gets the entities that reference this entity, but not necessarily depend on it to support.
This action has no parameters.
This action returns a list of pw::DatabaseEntity objects.
This example shows how to get the referencing entities for $curve. $curve is referencing an existing intersection curve.
Code
foreach ent [$curve getReferencingEntities] { puts [$ent getName] }
Output
surface-1 plane-1
$entity getGridEntities
This action gets the grid entities that this entity supports.
This action has no parameters.
This action returns a list of pw::GridEntity objects.
This example shows how to get the grid entities for $qlt(1). $qlt(1) is referencing an existing quilt.
Code
foreach ent [$qlt(1) getGridEntities] { puts [$ent getName] }
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?