A connector is a computationally one-dimensional grid entity, defined in the parameter space of one or more end-connected curve segments.
pw::Object pw::Entity pw::GridEntity
pw:: | A connector is a computationally one-dimensional grid entity, defined in the parameter space of one or more end-connected curve segments. |
Static Actions | |
create | This action creates a new connector object. |
createOnDatabase | This action creates new connector objects on the given database entities. |
createFromPoints | This action, given a list of XYZ vector values or database-constrained points, creates a new connector. |
join (static) | This action joins as many of the given connectors together as possible. |
getBestSegment | This action, given two point-lists, returns a segment type, a start point, an end point, and a ProjectToCommon state that represent the best segment for a connector between the given points. |
getConnectorsFromNode | This action gets a list of all connectors using the specified node. |
getConnectorsFromSpacing | This action gets a list of all connectors using the specified spacing object. |
getAdjacentConnectors | This action finds the connectors adjacent to the given list of connectors. |
getConnectorsInPlane | This action looks for connectors in a plane, with the candidate connectors given explicitly or implicitly from the given entities. |
doConnectorsGetDimension | This action checks if connectors will have a dimension after being created and the calculateDimension method called on them, based on the current settings. |
getInvalidDistributions | This action finds connectors that have invalid distributions. |
setDimensionFromSizeField | This action modifies the distribution and dimension of a list of pw::Connector objects based on the current size field. |
synchronizeSpacings | This action synchronizes spacing constraints at shared connector grid points. |
applyTRex (static) | This action will create (if not specified) and apply T-Rex boundary conditions to the unstructured domains that use the given connectors. |
swapDistribution | This action replaces the distribution function of a list of subconnectors, retaining the previously set spacings. |
Static Defaults | |
DistributionType (Default) | This default is the distribution of a subconnector when it is created. |
BeginSpacing (Default) | This default is the beginning spacing of a subconnector when it is created. |
EndSpacing (Default) | This default is the ending spacing of a subconnector when it is created. |
Static Attributes | |
CalculateDimensionMethod | This attribute is the dimension of a connector when it is created implicitly or when the calculateDimension action is called. |
CalculateDimensionMaximum | This attribute is the maximum dimension calculated for a connector when using the commands calculateDimension, setDimensionFromSpacing, and setDimensionFromDistribution. |
CalculateDimensionSpacing | This attribute is the default average spacing between successive grid points. |
DistributionInfluence | This default is a flag to allow the distribution of a connector to effect the dimension of the connector. |
NormalMaximumDeviation | This default is the maximum turning angle allowed between successive grid points. |
CurveMaximumDeviation | This attribute is the maximum distance allowed between the analytic and discrete shape of a connector. |
SurfaceCurvatureInfluence | This default is a flag that allows the underlying surface of a connector to affect the NormalMaximumDeviation and CurveMaximumDeviation constraints. |
Instance Actions | |
delete | This action delete this connector. |
calculateDimension | This action sets the dimension of this connector using its current solver settings. |
getDimension | This action gets the dimensions of this connector. |
getDimensions | This action gets the dimensions of this connector. |
setDimension | This action sets the dimension of this connector. |
setDimensionFromSpacing | This action sets the dimension of this connector based on equal spacing. |
setDimensionFromDistribution | This action sets the dimension of this connector based on the current distribution. |
setSubConnectorDimensionFromDistribution | This action sets the dimension of a subconnector in this connector based on the current distribution of the subconnector. |
setDimensionFromSubConnectors | This action sets the dimension of this connector by copying the dimension from a list of subconnectors. |
increaseDimension | This action increases the dimension of this connector. |
getSegmentCount | This action gets the number of segments in this connector. |
getSegment | This action gets the segment at the given index. |
getSegments | This action gets the list of segments. |
setSegment | This action sets the segment at the given index. |
addSegment | This action adds the segment to the end of the segments in the connector. |
insertSegment | This action inserts the segment at the given index. |
removeSegment | This action removes a segment from the connector. |
removeAllSegments | This action removes all of the segments from the connector. |
replaceAllSegments | This action replaces all of the segments in the connector. |
getSubConnectorCount | This action gets the number of subconnectors in this connector. |
getSubConnectorDimension | This action gets the dimension of a subconnector in this connector. |
setSubConnectorDimension | This action sets the dimensions of each subconnector in this connector. |
getSubConnectorRange | This action gets the minimum and maximum grid point indices of a subconnector. |
getSubConnectorRanges | This action gets the minimum and maximum grid point indices of all subconnectors. |
getDistribution | This action gets the distribution function of a subconnector. |
setDistribution | This action sets the distribution function of a subconnector. |
replaceDistribution | This action replaces the distribution function of a subconnector, retaining the previously set spacings. |
lockDistribution | This action locks the distribution of a subconnector. |
resetGeneralDistributions | This action switches all of the subconnector distributions that are of type pw::DistributionGeneral to use the current default distribution. |
getBreakPoint | This action gets the parameter of the break point at the end of the subconnector with the given index. |
getBreakPoints | This action gets the parameters of the break points at the end of the subconnectors. |
getBreakPointType | This action gets the type of break point at the end of the subconnector. |
getBreakPointTypes | This action gets the type at each break point at the end of the subconnectors. |
addBreakPoint | This action adds one or more break points to the list of break points. |
removeBreakPoint | This action removes the break point from the connector at the end of the subconnector with the given index. |
removeAllBreakPoints | This action removes all of the break points from the connector. |
checkBreakPoint | This action checks if a break point can be added at a given location. |
setBreakPointSpacing | This action sets the spacing on both sides of a break point. |
spline | This action sets the shape of this connector to a smooth interpolation of the grid points of the given connector. |
fitLSQ | This action sets the shape of this connector to a least squares fit approximation of the grid points of the given connector. |
smoothC1 | This action sets the shape of this connector to a C1 continuous approximation of the shape of the given connector. |
split | This action splits this connector at the given index or point. |
join | This action joins this connector with a given connector. |
project | This action projects this connector onto one or more database entities. |
getDefaultProjectDirection | This action gets the default projection direction for this connector. |
setOrientation | This action sets the orientation of this connector, by specifying the new imin node. |
alignOrientation | This action aligns the I orientation of the given connectors with this connector. |
createPeriodic | This action creates a periodic copy of this connector. |
getPeriodic | This action gets the connector that shares a periodic link with this connector. |
breakPeriodic | This action breaks the periodic link that this connector has with another connector. |
getPoint | This action gets the position of a connector grid point. |
getPoints | This action gets all the connector grid points. |
setPoint | This action sets the position of a connector interior grid point. |
getPosition | This action gets a position on a connector in the defining space of the connector. |
getXYZ | This action gets the model space position on a connector. |
getParameter | This action gets a parameter value on a connector. |
getRadiusOfCurvature | This action returns the radius of curvature at the specified position on the connector. |
getTangent | This action gets the tangency vector on a connector. |
getGeometricProperties | This action calculates the geometric properties at the specified position on the connector. |
getTransverseAngle | This action gets the transverse angle, in degrees, at a position on a connector in the defining space of the connector, and optionally whether the connector is convex or concave at that position. |
getLength | This action gets the connector length from the beginning to a given location. |
getParameters | This action gets the parameters at which the curve intersects the value. |
getTotalLength | This action gets the total length of the connector. |
getAssembleTolerance | This action returns the maximum tolerance used to close the model along the connector. |
getAverageSpacing | This action gets the average spacing between grid points of the connector. |
closestPoint | This action gets the closest point on this connector to the given point. |
closestControlPoint | This action gets the control point on this connector closest to the given point. |
getControlPointCount | This action gets the number of control points on this connector. |
removeInteriorControlPoints | This action removes the interior control points of each segment of this connector. |
getNode | This action gets a node from a connector. |
isClosed | This action checks if the connector is closed. |
isPole | This action checks if the connector is a pole. |
checkDistributionValidity | This action checks if the connector’s distributions on all of its subconnectors could be applied as requested. |
isInteriorIndex | This action checks to see if an index corresponds to a point in the interior of the connector. |
getAdjacentIndices | This action returns the indices that are directly connected to the specified index. |
getCellCount | This action gets the number of 1D cells in this connector. |
getCell | This action gets the indices of the given 1D cell. |
getCells | This action gets the indices of all the 1D cells. |
applyTRex | This action will create (if not specified) and apply a T-Rex boundary condition to the unstructured domains that use this connector. |
pw::Connector create
This action creates a new connector object.
This action has no parameters.
This action returns a new pw::Connector object.
createFromPoints, createOnDatabase, createPeriodic
This example shows how to create a connector with two conic segments that has an average spacing already set. The name and dimension of the connector are outputted to the messages window.
Code
pw::Connector setCalculateDimensionMethod Spacing pw::Connector setCalculateDimensionSpacing 0.3 set conic(1) [pw::SegmentConic create] $conic(1) addPoint {-25 8 0} $conic(1) addPoint {-8 8 0} $conic(1) setIntersectPoint {-20 20 0} set conic(2) [pw::SegmentConic create] $conic(2) addPoint [$conic(1) getPoint [$conic(1) getPointCount]] $conic(2) addPoint {10 16 0} $conic(2) setShoulderPoint {8 8 0} set con(1) [pw::Connector create] $con(1) addSegment $conic(1) $con(1) addSegment $conic(2) $con(1) calculateDimension puts "[$con(1) getName] has dimension of [$con(1) getDimension]."
Output
con-1 has dimension of 159.
pw::Connector createOnDatabase ?-merge tolerance? ?-splitConnectors split_angle? ?-joinConnectors join_angle? ?-parametricConnectors mode? ?-reject rejectVar? ?-type type? entity_or_boundary_list
This action creates new connector objects on the given database entities.
-merge tolerance | This optional parameter is the float tolerance for automatic connector merging in the range [0, infinity). The default is 0 (no merging). |
-splitConnectors split_angle | This optional parameter is the float turning angle to split connectors at in the range [0, 180). The default is 0 (no splitting). |
-joinConnectors join_angle | This optional parameter is the float turning angle to join connectors at in the range [0, 180). The default is 0 (no joining). |
-parametricConnectors mode | This optional parameter is the string mode for how connectors are created on parametric surfaces with options < EndToEnd | Aligned >. The default is EndToEnd. |
-reject rejectVar | This optional parameter is the string name of a variable to receive a list of pw::DatabaseEntity objects that were rejected for placing connectors on. If a name is not given, rejections will be silently ignored. |
-type type | This optional parameter is the string name of the type of grid with options < Structured | Unstructured > to use when creating connectors from database entities. This defaults to structured construction if not explicitly set to Unstructured. |
entity_or_boundary_list | This required parameter is a list of pw::DatabaseEntity objects and/or boundaries. |
This action returns a list of new pw::Connector objects.
This command supports progress updates.
create, createFromPoints, createPeriodic
This example shows how to create connectors from database entities. The -joinConnectors parameter is used to join connectors with a turning angle of less than 60 degrees. The distribution of each connector created is then changed to Tanh.
Code
pw::Connector setDefault Dimension 15 set db [pw::Database getAll] set cons [pw::Connector createOnDatabase -joinConnectors 60 $db] foreach con $cons { $con replaceDistribution 1 [pw::DistributionTanh create] }
pw::Connector createFromPoints points
This action, given a list of XYZ vector values or database-constrained points, creates a new connector.
points | This required parameter is the list of xyz vector values or database-constrained points. |
If the set of points defines an existing connector, no new connector will be created, and the existing connector will be returned instead.
This action returns the newly created pw::Connector (or the pre-existing connector if this would otherwise define a duplicate connector).
create, createOnDatabase, createPeriodic
This example creates a connector from a list of xyz vector values.
Code
package require PWI_Glyph 3.18.3 set idim 7 set origin {10 10 10} set ivec {6 0 0} set p000 $origin set pts [list] for {set i 1} {$i <= $idim} {incr i} { set x [ expr { [lindex $p000 0] + $idim - [ expr {[lindex $ivec 0] * $i / $idim} ] } ] set pt [pwu::Vector3 set $x 10 10] lappend pts $pt } # Create connector using GgVec3 set con(1) [pw::Connector createFromPoints $pts] puts "PointCount [$con(1) getPointCount]
Output
PointCount 7
pw::Connector join ?<-keepDistribution | -resetDistribution>? ?-deleteBreakPoints? ?-reject rejectVar? connectors
This action joins as many of the given connectors together as possible.
-keepDistribution | This optional flag is notification that break points will be inserted into the newly joined connector in order to maintain the grid point distributions of each connector being joined and all existing break points will also be preserved. However, if the deleteBreakPoints flag is also used, just the grid point distributions will be preserved, and all break points will be deleted. This flag cannot be used in conjunction with the -resetDistribution flag. |
-resetDistribution | This optional flag is notification that all break points will be deleted, and the distribution function of the resulting connector will be reset to the current default distribution function. This flag cannot be used in conjunction with the -keepDistribution flag. |
-deleteBreakPoints | This optional flag is notification to delete all break points even if the -keepDistribution flag is present. The grid point distributions of the individual connectors will be maintained unless the -resetDistribution flag is also used. |
-reject rejectVar | This optional parameter is the string name of a variable to receive a list of pw::Connector objects that were not joined. |
connectors | This required parameter is a list of pw::Connector objects to join. |
If none of the above flags is present, all break points will be removed from the connectors and their distribution functions will be set to the default.
This action returns a list of the pw::Connector objects that were joined.
This command supports progress updates.
This example shows how to join multiple connectors at once but keep the distribution settings by adding break points. The reject parameter is used to find which connectors were not joined. $con(1), $con(2) and $con(3) are referencing existing connectors.
Code
pw::Connector join -keepDistribution -reject rj \ [list $con(1) $con(2) $con(3)] foreach var $rj { puts [$var getName] }
Output
con-3
pw::Connector getBestSegment ?-start startVar? ?-end endVar? ?-projectToCommon projectToCommonVar? start_points end_points
This action, given two point-lists, returns a segment type, a start point, an end point, and a ProjectToCommon state that represent the best segment for a connector between the given points.
-start startVar | This optional parameter is the string name of a variable to receive the best start integer index or point. |
-end endVar | This optional parameter is the string name of a variable to receive the best end integer index or point. |
-projectToCommon projectToCommonVar | This optional parameter is the string name of a variable to receive the ProjectToCommon boolean state for the best segment. |
start_points | This required parameter is a list of points for the start of the segment. |
end_points | This required parameter is a list of points for the end of the segment. |
This action returns a segment type string with options < SegmentCircle | SegmentConic | SegmentSpline | SegmentSurfaceSpline | SegmentTrim >.
This example shows how to find the best segment between two end points. $con(1) and $con(2) are referencing existing connectors.
Code
puts [pw::Connector getBestSegment -start st -end en \ [list [[$con(1) getNode End] getXYZ]] \ [list [[$con(2) getNode End] getXYZ]]] puts $st; puts $en
Output
pw::SegmentSpline 0 0
pw::Connector getConnectorsFromNode node
This action gets a list of all connectors using the specified node.
node | This required parameter is a pw::Node object. |
This action returns a list of pw::Connector objects.
This example shows how to get a list of all connectors using the given node. $con(1) is referencing an existing connector.
Code
set node [$con(1) getNode End] foreach cnctr [pw::Connector getConnectorsFromNode $node] { puts [$cnctr getName] }
Output
con-1 con-2 con-4 con-5
pw::Connector getConnectorsFromSpacing ?-details? ?-global? spacing
This action gets a list of all connectors using the specified spacing object.
-details | This optional flag changes the return format. By default, the command returns a list of connectors. When this option is specified, the return value will be a list of connector/sub-connector/side triplets. The first value in each entry will be a pw::Connector. The second entry will be the integer index of sub-connector containing the spacing, and the third entry will be a string with options, < Begin | End > indicating the side of the sub-connector containing the space. Note that in the case, if a connector uses a spacing more than once, it will be listed multiple times since the sub-connector index and side values will be different for each entry. |
-global | This optional flag controls whether connectors from inactive frameworks are included in the result. By default, only connectors in the active framework are included in the return value. When this option is present, all connectors using the specified spacing object are included. |
spacing | This required parameter is a pw::Spacing object or a named spacing value. |
This action returns a list of pw::Connector objects by default. If the -details parameter is present, the return value will be a list of entries with three values each. Each entry will contain the pw::Connector, the sub-connector integer index, and the side (a string value with options < Begin | End >) to indicate exactly where the spacing was used. Regardless of the presence of the -details flag, only connectors in the active framework are returned unless the -global flag is used.
pw::SpacingExplicit.create, pw::Spacing.createNamedValue, pw::Framework
This example shows how to get a list of all connectors using the given spacing. $con(1) is referencing an existing connector.
Code
set spacing [[$con(1) getDistribution 1] getBeginSpacing] set cnctrs [pw::Connector getConnectorsFromSpacing \ -details $spacing] foreach $conSubSide $cnctrs { set cnctr [lindex $conSubSide 0] set sub [lindex $conSubSide 1] set side [lindex $conSubSide 2] puts "[$cnctr getName] sub-connector $sub $side" }
Output
con-1 sub-connector 1 Begin con-1 sub-connector 2 End con-4 sub-connector 1 End con-5 sub-connector 1 Begin
pw::Connector getAdjacentConnectors ?-maximumAngle angle? ?-all? connectors
This action finds the connectors adjacent to the given list of connectors.
-maximumAngle angle | This optional parameter is the maximum float bend angle for considering entities as adjacent in the range [0.0, 180.0]. The default is 180.0. |
-all | This optional flag is notification to repeat search on the adjacent connectors found until there are no more adjacent connectors. |
connectors | This required parameter is a list of pw::Connector objects to be used as the seed. |
This action returns a list of adjacent pw::Connector objects.
The returned list will not include any connectors specified in the original connectors list.
This example shows how to get a list of all adjacent connectors using the given connector. Any connectors returned will have less than a 90 degree bend angle with the given connector. $con(2) is referencing an existing connector.
Code
foreach cnctr [pw::Connector getAdjacentConnectors \ -maximumAngle 90 $con(2)] { puts [$cnctr getName] }
Output
con-3 con-4
pw::Connector getConnectorsInPlane ?-tolerance tol? ?-lamina? ?-loops? ?-secondary plane? plane entities
This action looks for connectors in a plane, with the candidate connectors given explicitly or implicitly from the given entities.
-tolerance tol | This optional parameter is the float tolerance in the range [0, infinity). It is used to check the distance from the connector’s grid points to the given plane. The default is the current value of the pw::Grid.ConnectorTolerance attribute. |
-lamina | This optional flag will restrict the connectors returned to be those that are lamina (single usage), where the determination of a connector being lamina is based only from within the given entities. |
-loops | This optional flag will restrict the connectors returned to be those in complete loops that lie in the given plane. |
-secondary plane | This optional parameter is a second plane to look for connectors in. |
plane | This required parameter is a plane to look for connectors in. |
entities | This required parameter is a list of pw::GridEntity objects (connectors, domains, or blocks) from which to find the connectors in the plane. |
This action returns a list of pw::Connector object.
pw::Connector doConnectorsGetDimension
This action checks if connectors will have a dimension after being created and the calculateDimension method called on them, based on the current settings.
This action has no parameters.
This action returns a boolean.
calculateDimension, <Dimension (Default)>
This example shows how to check to see if newly created connectors will be dimensioned if calculateDimension is called on them. For this example, no defaults had been set, so it returns false.
Code
puts [pw::Connector doConnectorsGetDimension]
Output
0
pw::Connector getInvalidDistributions ?-all?
This action finds connectors that have invalid distributions.
-all | This optional flag is a notification that all connectors with invalid distributions are returned. Otherwise, only the connectors that developed invalid distributions since the last call to this function are returned. |
This action returns a list of pw::Connector with invalid distributions.
Connector distributions are not validated until the connector is queried for data.
This example shows how to check for connectors with invalid distributions. For this example, there were no invalid distributions.
Code
puts [pw::Connector getInvalidDistributions]
Output
(empty string)
pw::Connector setDimensionFromSizeField ?-include ents? ?-exclude ents? ?-ignoreAll? ?-matchDimensions? ?-backgroundSpacing spacing? ?-defaultDecay decay? ?-calculationMethod method? connectors
This action modifies the distribution and dimension of a list of pw::Connector objects based on the current size field.
-include ents | This optional parameter is a list of framework_entity objects to add to the size field. If not specified, no extra entities will be added to the size field, only the source entities whose extents overlap the given connectors. |
-exclude ents | This optional parameter is a list of pw::SourceEntity objects to exclude from the automatically included in the size field. |
-ignoreAll | This optional flag specifies that the size field should ignore all automatically included source entities from the size field. |
-matchDimensions | This optional flag specifies that all connectors should have their dimensions set to the same number. By default, each connector is dimensioned separately from one another. |
-backgroundSpacing spacing | This optional parameter is the float background spacing of the size field in the range (0, infinity). This is the spacing that will be used far away from any the entities in the size field. The default is 0, which specifies that the background spacing should be computed from the extents of the given connectors. |
-defaultDecay decay | This optional parameter is the float decay in the range [0, 1] that will be used for any pw::GridEntity object specified by the -include parameter. If not specified, a decay of 0.5 will be used. |
-calculationMethod method | This optional parameter is the string method that controls how spacing is calculated for size field point primitives with options < MinimumDistance | InverseDistance | BlendDistance | MinimumValue >. If not specified, MinimumDistance will be used. |
-refineOnly | This optional flag specifies that the current dimension and distribution should be used to limit coarsening of the connector spacing. |
connectors | This required parameter is a list of pw::Connector objects to set the dimension and distribution based on the size field. |
This action returns nothing.
setDimension, calculateDimension, increaseDimension, setDimensionFromSpacing, setDimensionFromDistribution, setDimensionFromSubConnectors
pw::Connector synchronizeSpacings ?<-minimum | -maximum | -average>? ?-growthRate rate? ?-undefined domainsVar? ?-useTRexSpacings? ?-keepDimensionAndDistribution? ?-returnDuplicates? connectors
This action synchronizes spacing constraints at shared connector grid points. Optionally, it will redistribute and redimension connectors in order to create a smooth surface mesh.
-minimum | This optional flag specifies that spacing constraints will be synchronized to the minimum spacing constraint. This is the default. |
-maximum | This optional flag specifies that spacing constraints will be synchronized to the maximum spacing constraint. |
-average | This optional flag specifies that spacing constraints will be synchronized to the average spacing constraint. |
-growthRate rate | This optional parameter is a float with the range [0, infinity). If a connector’s distribution function is updated to type growth during synchronization, this value will be used as the beginning and ending rate. The default value is 1.2. |
-undefined domainsVar | This optional parameter is the string name of the variable that receives a list of pw::DomainStructured that were left undefined after synchronization. |
-useTRexSpacings | This optional flag specifies that the T-Rex Spacings will be used in determining the spacing constraint. |
-keepDimensionAndDistribution | This optional flag specifies that the original connector dimension and distribution will be preserved. Only spacing constraints will be modified. |
-returnDuplicates | This optional flag specifies that any connectors that are duplicated as a result of synchronization will be appear in the resulting list of synchronized connectors as copies of the duplicate. Otherwise, only one connector is returned to represent all duplicated connectors. |
This command supports progress updates.
This action returns the list of pw::Connector objects that were synchronized.
pw::Connector applyTRex ?-refine? ?<-wall bc1 | -angle bc1 | -aspectratio bc1 | -maxaspectratio bc1>? ?-adjacent bc2? ?-unused connectorVar? ?-domains domainVar? connectors
This action will create (if not specified) and apply T-Rex boundary conditions to the unstructured domains that use the given connectors. If a connector is shared with a structured domain, the AdjacentGrid bc will be applied to the unstructured domains that use that connector. If a boundary condition is not specified, the default T-Rex boundary condition Type along with the corresponding default value will be applied.
-refine | This optional parameter specifies that the collection of unstructured domains that had the T-Rex bcs applied will be refined. |
-wall bc1 | This optional parameter specifies the Wall pw::TRexCondition to apply. Cannot be used simultaneously with -angle, -aspectratio or -maxaspectratio. |
-angle bc1 | This optional parameter specifies the Angle pw::TRexCondition to apply. Cannot be used simultaneously with -wall, -aspectratio or -maxaspectratio. |
-aspectratio bc1 | This optional parameter specifies the AspectRatio pw::TRexCondition to apply. Cannot be used simultaneously with -wall, -angle or -maxaspectratio. |
-maxaspectratio bc1 | This optional parameter specifies the MaximumAspectRatio pw::TRexCondition to apply. Cannot be used simultaneously with -wall, -angle or -aspectratio. |
-adjacent bc2 | This optional parameter specifies the AdjacentGrid pw::TRexCondition to apply. |
-unused connectorVar | This optional parameter is the string name of the variable that receives a list of pw::Connector objects that were unused. |
-domains domainsVar | This optional parameter is the string name of the variable that receives a list of pw::DomainUnstructured objects that the T-Rex bcs were applied to. |
connectors | This required parameter is the list of pw::Connector objects for which T-Rex boundary conditions will be applied to associated pw::DomainUnstructured objects. |
This command supports progress updates.
List of T-Rex boundary conditions that have been created and assigned.
pw::TRexCondition, pw::TRexCondition.ConditionType, applyTRex
pw::Connector swapDistribution distribution_type subcon_list
This action replaces the distribution function of a list of subconnectors, retaining the previously set spacings.
distribution_type | This required parameter specifies the string type of distribution to use with options < Automatic | General | Geometric | Growth | MRQS | Shape | Tanh >. |
subcon_list | This required parameter is the list of subconnectors to modify. Each element should either be a pw::Connector and integer sub-connector index pair, or a pw::Connector (if the connector only has a single sub-connector). |
This action returns nothing.
getDistribution, setDistribution, replaceDistribution, pw::Distribution
This example shows how to replace the distribution of the second subconnector of one connector and the single subconnector of a second connector with a distribution of type pw::DistributionAutomatic. Any previously set spacings will be retained. $con(1) and $con(3) reference existing connectors.
Code
pw::Connector swapDistribution Automatic \ [list [list $con(1) 2] [list $con(3)]]
pw::Connector get/setDefault DistributionType distribution_type
This default is the distribution of a subconnector when it is created.
This default is a string with options < Tanh | MRQS | Geometric | Shape | Growth | Automatic >.
The default value is Tanh.
This example shows how to set and get the default distribution for subconnectors created within a script.
Code
pw::Connector setDefault DistributionType Geometric puts [pw::Connector getDefault DistributionType]
Output
Geometric
pw::Connector get/setDefault BeginSpacing spacing
This default is the beginning spacing of a subconnector when it is created.
A float in the range [0.0, infinity).
The default value is 0.0.
pw::Distribution.setBeginSpacing
This example shows how to set and get the default beginning spacing for subconnectors created within a script.
Code
pw::Connector setDefault BeginSpacing .01 puts [pw::Connector getDefault BeginSpacing]
Output
0.01
pw::Connector get/setDefault EndSpacing spacing
This default is the ending spacing of a subconnector when it is created.
A float in the range [0.0, infinity).
The default value is 0.0.
pw::Distribution.setEndSpacing
This example shows how to set and get the default ending spacing for subconnectors created within a script.
Code
pw::Connector setDefault EndSpacing .1 puts [pw::Connector getDefault EndSpacing]
Output
0.1
pw::Connector get/setCalculateDimensionMethod method
This attribute is the dimension of a connector when it is created implicitly or when the calculateDimension action is called.
A string with options < Explicit | Spacing >.
The default for this attribute is Explicit.
When a connector is created its dimension is always set to the <Dimension (Default)>. When the calculateDimension action is called, the dimension will be altered using this method.
Explicit means to leave the dimension as is. Spacing means to calculate the dimension using the CalculateDimensionSpacing attribute.
In the case of the createOnDatabase actions, the calculateDimension action is implicitly called after each connector has been created.
create, createFromPoints, createPeriodic, createOnDatabase, CalculateDimensionSpacing
This example shows how to dimension connectors according to a spacing attribute when creating connectors directly from a database. $db is referencing an existing list of database entities.
Code
pw::Connector setCalculateDimensionMethod Spacing pw::Connector setCalculateDimensionSpacing 0.3 pw::Connector createOnDatabase $db
pw::Connector get/setCalculateDimensionMaximum dimension
This attribute is the maximum dimension calculated for a connector when using the commands calculateDimension, setDimensionFromSpacing, and setDimensionFromDistribution.
This attribute is an integer in the range [2, infinity).
The default for this attribute is 1024.
This example shows how to set and get the maximum dimension that can be set when using calculateDimension on a connector.
Code
pw::Connector setCalculateDimensionMaximum 512 puts [pw::Connector getCalculateDimensionMaximum]
Output
512
pw::Connector get/setCalculateDimensionSpacing spacing
This attribute is the default average spacing between successive grid points.
A float in the range [0.0, infinity).
The default for this attribute is 0.0.
This value is used to calculate the dimension of a connector when calculateDimension is called and with CalculateDimensionMethod set to Spacing.
An average spacing of 0.0 will set the dimension of the connector to zero.
CalculateDimensionMethod, setDimension
This example shows how to set and get the average spacing that a connector is created on database entities with.
Code
pw::Connector setCalculateDimensionSpacing 0.8 puts [pw::Connector getCalculateDimensionSpacing]
Output
0.8
pw::Connector get/setDistributionInfluence influence
This default is a flag to allow the distribution of a connector to effect the dimension of the connector.
A boolean where true indicates that a pw::DistributionShape distribution will influence the connector dimension.
The default for this attribute is false.
This value is used to calculate the dimension and distribution of a connector when calculateDimension is called.
Currently the only distribution that can have a meaningful effect on the dimension is the pw::DistributionShape type. It will increase (but never decrease) the dimension in order to meet the maximum deviation constraints set on the distribution.
This example shows how to set and get the flag for distribution to affect the dimension of a connector.
Code
pw::Connector setDistributionInfluence true puts [pw::Connector getDistributionInfluence]
Output
1
pw::Connector get/setNormalMaximumDeviation angle
This default is the maximum turning angle allowed between successive grid points.
A float in the range [0.0, 180.0). 0.0 disables the effect of normal maximum deviation.
The default for this attribute is 0.0.
This value is used to calculate the dimension and distribution of a connector when calculateDimension is called.
This example shows how to set and get the maximum turning angle between grid points on a connector.
Code
pw::Connector setNormalMaximumDeviation 150 puts [pw::Connector getNormalMaximumDeviation]
Output
150.0
pw::Connector get/setCurveMaximumDeviation distance
This attribute is the maximum distance allowed between the analytic and discrete shape of a connector.
This attribute is a float in the range [0, infinity). 0 is disabled
The default for this attribute is 0.
This value is used to calculate the dimension and distribution of a connector when calculateDimension is called.
This example shows how to set and get the maximum distance between analytic and discrete curves of a connector.
Code
pw::Connector setCurveMaximumDeviation .001 puts [pw::Connector getCurveMaximumDeviation]
Output
0.001
pw::Connector get/setSurfaceCurvatureInfluence influence
This default is a flag that allows the underlying surface of a connector to affect the NormalMaximumDeviation and CurveMaximumDeviation constraints.
A boolean where true indicates that the connector dimension will be influenced by a constraining pw::Surface.
The default for this attribute is false.
This value is used to calculate the dimension and distribution of a connector when calculateDimension is called. Maximum turning angle and curve deviation calculations use the underlying database curvature in addition to the connector curvature. This is a factor when the database is highly curved transverse to the connector direction but relatively flat in the tangential direction of the connector.
This example shows how to set and get the flag for the underlying surface to affect normal maximum and curve maximum deviation constraints of a connector.
Code
pw::Connector setSurfaceCurvatureInfluence true puts [pw::Connector getSurfaceCurvatureInfluence]
Output
1
$con delete ?-force?
This action delete this connector.
-force | This optional flag is a notification that the entity will be deleted as well as higher level entities that depend on this entity. |
This action returns nothing.
This example shows how to delete a connector and any other entities it supports.
Code
set con(1) [pw::Grid getByName "con-45"] $con(1) delete -force
$con calculateDimension
This action sets the dimension of this connector using its current solver settings.
This action has no parameters.
This action returns nothing.
The dimension is calculated using the following steps:
1 | If the distribution function is DistributionAutomatic, the dimension is determined automatically. See DistributionAutomatic for details. When this distribution function is used, the remaining steps are skipped. |
2 | If the CalculateDimensionSpacing value is greater than 0, the dimension is set so that the difference between grid points is not greater than this value. |
3 | If the DistributionInfluence flag is true, the dimension is increased based on the constraints of the connectors current distribution object. |
4 | If the NormalMaximumDeviation value is greater than 0, the dimension is increased, and distribution altered, in order to meet this constraint. |
5 | If the CurveMaximumDeviation value is greater than 0, the dimension is increased, and distribution altered, in order to meet this constraint. |
SurfaceCurvatureInfluence affects steps 3 and 4 above if the connector has an underlying surface. If true, the curvature of the underlying surface will be used in addition to the curvature of the connector.
This example shows how to dimension a connector using average spacing. $con(1) is referencing an existing connector.
Code
pw::Connector setCalculateDimensionMethod Spacing pw::Connector setCalculateDimensionSpacing 2 $con(1) calculateDimension
$con getDimension
This action gets the dimensions of this connector.
This action has no parameters.
This action returns the integer number of grid points. A non-dimensioned connector will return 0.
This example shows how to get the dimension of a connector. $con(1) is referencing an existing connector.
Code
$con(1) getDimension
Output
9
$con getDimensions
This action gets the dimensions of this connector.
This action has no parameters.
This action returns the integer number of grid points. A non-dimensioned connector will return 0.
This action is an alias for the getDimension action. This action provides an interface consistent with the block, domain and node getDimensions actions.
This example shows how to get the dimension of a connector. $con(1) is referencing an existing connector.
Code
$con(1) getDimensions # same as $con(1) getDimension
Output
9 9
$con setDimension dim
This action sets the dimension of this connector.
-resetDistribution | This optional flag, if present, will clear a general distribution function if set on this connector. |
dim | This required parameter is the integer number of grid points of this connector in the range [2, infinity) or 0 if non-dimensioned. If the dimension is less than the number of subconnectors plus 1, all interior breakpoints will be removed. |
This action returns the resulting integer dimension.
getDimension, calculateDimension, increaseDimension, setDimensionFromSizeField, setDimensionFromSpacing, setDimensionFromDistribution, setDimensionFromSubConnectors
This example shows how to set the dimension of a connector explicitly. $con(1) is referencing an existing connector.
Code
$con(1) setDimension 40
$con setDimensionFromSpacing spacing
This action sets the dimension of this connector based on equal spacing.
-resetDistribution | This optional flag, if present, will clear a general distribution function if set on this connector. |
spacing | This required parameter is the float average spacing between grid points in the range (0.0, infinity). |
This action returns the computed integer dimension.
The dimension is limited by the CalculateDimensionMaximum attribute.
setDimension, getDimension, calculateDimension, increaseDimension, setDimensionFromSizeField, setDimensionFromDistribution, setDimensionFromSubConnectors
This example shows how to set the dimension of a connector explicitly from spacing. $con(1) is referencing an existing connector.
Code
puts [$con(1) setDimensionFromSpacing .2]
Output
79
$con setDimensionFromDistribution
This action sets the dimension of this connector based on the current distribution.
This action has no parameters.
This action returns the computed integer dimension.
The dimension is limited by the CalculateDimensionMaximum attribute.
This example shows how to set the dimension of a connector explicitly from distribution. $con(1) is referencing an existing connector.
Code
$con(1) replaceDistribution 1 [pw::DistributionShape create] $con(1) setDimensionFromDistribution
$con setSubConnectorDimensionFromDistribution index
This action sets the dimension of a subconnector in this connector based on the current distribution of the subconnector.
index | This required parameter is the integer index of the subconnector to set the dimension of in the range [1, number of subconnectors]. |
This action returns the computed integer dimension of the subconnector.
The dimension is limited by the CalculateDimensionMaximum attribute.
setDimension, calculateDimension, increaseDimension, setDimensionFromSizeField, setDimensionFromSpacing, setDimensionFromSubConnectors
This example shows how to set the dimension of a subconnector explicitly from distribution. $con(1) is referencing an existing connector.
Code
$con(1) replaceDistribution 1 [pw::DistributionGrowth create] $con(1) setSubConnectorDimensionFromDistribution 1
$con setDimensionFromSubConnectors subcon_list
This action sets the dimension of this connector by copying the dimension from a list of subconnectors.
-resetDistribution | This optional flag, if present, will clear a general distribution function if set on this connector. |
subcon_list | This required parameter is a list of subconnectors where each entry is a pw::Connector object and subconnector integer index. If the pw::Connector only has one subconnector, the index can be omitted. The direction of the chain of subconnectors can be specified by prepending the list with a string with options < Forward | Reverse >. This is only necessary when the list of subconnectors is comprised of a single subconnector. Otherwise, the direction can be determined from the order of the subconnectors. |
This action returns the computed integer dimension.
setDimension, calculateDimension, increaseDimension, setDimensionFromSizeField, setDimensionFromSpacing, setDimensionFromDistribution
This example shows how to set the dimension of a connector explicitly from subconnectors. $con(1) and $con(2) are referencing existing connectors.
Code
$con(2) setDimensionFromSubConnectors [list $con(1) 2]
$con increaseDimension ?-maximumLevel value? ?-maximumSpacing value? ?-minimumSpacing value? ?-surface? angle distance
This action increases the dimension of this connector.
-maximumLevel value | This optional parameter allows specification of the integer maximum interval sub-division level allowed. |
-maximumSpacing value | This optional parameter allows specification of the float target maximum spacing. |
-minimumSpacing value | This optional parameter allows specification of the target minimum spacing. |
-surface | This optional flag is notification that the curvature of any underlying surfaces will be taken into account. |
angle | This required parameter is the float maximum normal deviation angle between grid points. If 0.0, this criteria is ignored. |
distance | This required parameter is the float maximum curve deviation distance between the grid and the analytical curve. If 0.0, this criteria is ignored. |
This action returns the new dimension.
In order to meet the connectors curvature criteria, changing the dimension may alter the connector’s distribution.
setDimension, calculateDimension, setDimensionFromSizeField, setDimensionFromSpacing, setDimensionFromDistribution, setDimensionFromSubConnectors
This example shows how to increase the dimension of a connector using the distance parameter. $con(3) is referencing an existing connector.
Code
if {[$con(3) getDimension] < 15} { puts [$con(3) increaseDimension 0 0.01] }
Output
37
$con getSegmentCount
This action gets the number of segments in this connector.
This action has no parameters.
This action returns the integer number of segments.
This example shows how to get the number of segments in a connector. $con(1) is referencing an existing connector.
Code
puts [$con(1) getSegmentCount]
Output
2
$con getSegment ?-copy? index
This action gets the segment at the given index.
-copy | This optional flag is a notification that a copy of the segment is returned. |
index | This required parameter is the integer index of the segment to get in the range [1, number of segments]. |
This action returns a pw::Segment object.
setSegment, getSegmentCount, getSegments, pw::Segment
This example shows how to get the number of control points for a certain segment in a connector. $con(3) is referencing an existing connector.
Code
puts "This segment has [[$con(3) getSegment 2] getPointCount] \ control points."
Output
This segment has 5 control points.
$con getSegments ?-copy?
This action gets the list of segments.
-copy | This optional flag is a notification that a copy of the segments are returned. |
This action returns a pw::Segment object list.
pw::Segment, getSegmentCount, getSegment
This example shows how to get the number of control points for a certain segment in a connector. $con(3) is referencing an existing connector.
Code
puts "This segment has [[lindex [$con(3) getSegments] 1] \ getPointCount] control points."
Output
This segment has 5 control points.
$con setSegment index segment
This action sets the segment at the given index.
index | This required parameter is the integer index of the segment to set in the range [1, number of segments]. |
segment | This required parameter is the pw::Segment object to set. |
This action returns nothing.
addSegment, insertSegment, removeSegment, getSegment, pw::Segment
This example shows how to set a segment at a certain index in a connector. $con(1) is referencing an existing connector.
Code
set seg(1) [pw::SegmentSpline create] $seg(1) addPoint [[$con(1) getSegment 1] getPoint 1] $seg(1) addPoint "0 0 0" $con(1) setSegment 1 $seg(1)
$con addSegment segment
This action adds the segment to the end of the segments in the connector.
segment | This required parameter is the pw::Segment object to add. |
This action returns nothing.
An error will be raised if the segment already belongs to another connector.
setSegment, insertSegment, removeSegment, pw::Segment
This example shows how to add a segment to the end of a connector. $con(1) is referencing an existing connector.
Code
set seg(1) [pw::SegmentSpline create] $seg(1) addPoint [[$con(1) getSegment 2] getPoint 2] $seg(1) addPoint "0 0 0" $con(1) addSegment $seg(1)
$con insertSegment index segment
This action inserts the segment at the given index.
index | This required parameter is the integer index to insert the given segment at in the range [1, number of segments+1]. |
segment | This required parameter is the pw::Segment object to insert. |
This action returns nothing.
An error will be raised if the segment already belongs to another connector.
Inserting at an index of (number-of-segments + 1) will append the segment.
addSegment, setSegment, removeSegment, pw::Segment
This example shows how to insert a segment at the second index of a connector. $con(1) is referencing an existing connector.
Code
set seg(1) [pw::SegmentSpline create] $seg(1) addPoint [[$con(1) getSegment 1] getPoint 2] $seg(1) addPoint "0 0 0" $con(1) insertSegment 2 $seg(1)
$con removeSegment < index | segment >
This action removes a segment from the connector.
index | This optional parameter is the integer index of the segment to remove in the range [1, number of segments]. |
segment | This optional parameter is the pw::Segment object to remove. |
Either index or segment must be specified.
This action returns nothing.
removeAllSegments, getSegment, getSegments, addSegment, setSegment, insertSegment, pw::Segment
This example shows how to remove a segment from a connector according to its index. $con(1) is referencing an existing connector.
Code
$con(1) removeSegment 3
$con removeAllSegments
This action removes all of the segments from the connector.
This action has no parameters.
This action returns nothing.
This example shows how to remove all segments from a connector. $con(1) is referencing an existing connector.
Code
$con(1) removeAllSegments
$con replaceAllSegments segments
This action replaces all of the segments in the connector.
segments | This required parameter is a list of pw::Segment objects that will be the new segments of this connector. |
This action returns nothing.
addSegment, setSegment, insertSegment, removeSegment, removeAllSegments, pw::Segment
This example shows how to replace all the existing segments in a connector with new ones. $con(1) is referencing an existing connector. $seg(1) and $seg(2) are referencing existing segments.
Code
$con(1) replaceAllSegments [list $seg(1) $seg(2)]
$con getSubConnectorCount
This action gets the number of subconnectors in this connector.
This action has no parameters.
This action returns the integer number of subconnectors.
This example shows how to get the subconnector count in order to set a breakpoint spacing at every breakpoint between subconnectors. $con(1) is referencing an existing connector.
Code
for {set x 1} {$x < [$con(1) getSubConnectorCount]} {incr x} { $con(1) setBreakPointSpacing $x 0.001 }
$con getSubConnectorDimension ?index?
This action gets the dimension of a subconnector in this connector.
index | This optional parameter is the integer index of the subconnector to get the dimension of in the range [1, number of subconnectors]. If not specified, all subconnector dimensions will be returned. |
This action returns the integer dimension of the subconnector, or if no index is specified, a list of integer dimensions for each subconnector.
This example shows how to get the dimension of each subconnector in a given connector. $con(1) is referencing an existing connector.
Code
puts [$con(1) getSubConnectorDimension]
Output
96 148 88 71
$con setSubConnectorDimension dims
This action sets the dimensions of each subconnector in this connector.
dims | This required parameter is a list of integer dimensions for each subconnector. These must be compatible with the overall dimension of the connector. |
This action returns nothing.
This example shows how to set the dimension of each of the 4 subconnectors in a given connector with an overall dimension of 210. $con(1) is referencing an existing connector.
Code
$con(1) setSubConnectorDimension [list 50 75 45 40]
$con getSubConnectorRange index
This action gets the minimum and maximum grid point indices of a subconnector.
index | This required parameter is the integer index of the subconnector to get the range of in the range [1, number of subconnectors]. |
This action is a list containing the first and last grid point integer indices in the subconnector.
getSubConnectorRanges, setSubConnectorDimension, getSubConnectorDimension
This example shows how to get range of a subconnector within a given connector. $con(1) is referencing an existing connector.
Code
puts [$con(1) getSubConnectorRange 3]
Output
243 330
$con getSubConnectorRanges
This action gets the minimum and maximum grid point indices of all subconnectors.
This action has no parameters.
This action is a list containing the first and last grid point integer indices for all the subconnectors.
getSubConnectorRange, setSubConnectorDimension, getSubConnectorDimension
This example shows how to get range of a subconnector within a given connector. $con(1) is referencing an existing connector.
Code
puts [lindex [$con(1) getSubConnectorRanges] 2]
Output
243 330
$con getDistribution ?-copy? index
This action gets the distribution function of a subconnector.
-copy | This optional flag is a notification that a copy of the distribution is returned. |
index | This required parameter is the integer index of the subconnector to get the distribution function of with the range [1, number of subconnectors]. |
This action returns a pw::Distribution object.
setDistribution, pw::Distribution
This example shows how to get the distribution of the third subconnector within a given connector. $con(1) is referencing an existing connector.
Code
puts [[$con(1) getDistribution 3] getType]
Output
pw::DistributionTanh
$con setDistribution ?-lockEnds? index distribution
This action sets the distribution function of a subconnector.
-lockEnds | This optional flag will cause any unconstrained end spacings to be explicitly set to the naturally occurring spacing results. This option is only valid if the connector is dimensioned. |
index | This required parameter is the integer index of the subconnector to set the distribution function of with the range [1, number of subconnectors]. |
distribution | This required parameter is the pw::Distribution object to set. |
This action returns nothing.
getDistribution, replaceDistribution, pw::Distribution
This example shows how to set the distribution of the third subconnector within a given connector. Any previously set spacings will not be retained. $con(1) is referencing an existing connector.
Code
$con(1) setDistribution 3 [pw::DistributionMRQS create]
$con replaceDistribution index distribution
This action replaces the distribution function of a subconnector, retaining the previously set spacings.
index | This required parameter is the integer index of the subconnector to set the distribution function of in the range [1, number of subconnectors]. |
distribution | This required parameter is the pw::Distribution object to set. |
This action returns nothing.
setDistribution, getDistribution, pw::Distribution
This example shows how to replace the distribution of the third subconnector within a given connector. Any previously set spacings will be retained. $con(1) is referencing an existing connector.
Code
$con(1) replaceDistribution 3 [pw::DistributionMRQS create]
$con lockDistribution index
This action locks the distribution of a subconnector.
index | This required parameter is the integer index of the subconnector to lock in the range [1, number of subconnectors]. |
This action returns nothing.
Locking is done by converting the current distribution to a pw::DistributionGeneral object using the current dimension and distribution.
setDistribution, getDistribution, pw::DistributionGeneral
This example shows how to lock the distribution of the third subconnector within a given connector. $con(1) is referencing an existing connector.
Code
$con(1) lockDistribution 3
$con resetGeneralDistributions
This action switches all of the subconnector distributions that are of type pw::DistributionGeneral to use the current default distribution.
This action has no parameters.
This action returns nothing.
setDistribution, pw::DistributionGeneral
This example shows how to reset the distributions of all subconnectors within a given connector. $con(1) is referencing an existing connector.
Code
$con(1) resetGeneralDistributions
$con getBreakPoint index
This action gets the parameter of the break point at the end of the subconnector with the given index.
index | This required parameter is the integer index of the break point to get in the range [1, number of subconnectors-1]. |
This action returns the float parameter of the break point in the range [0.0, 1.0].
getBreakPoints, getSubConnectorCount, getSubConnectorDimension, getParameter
This example shows how to get the parameter of the break point at the end of the second subconnector. $con(1) is referencing an existing connector.
Code
puts [$con(1) getBreakPoint 2]
Output
0.3361120722538553
$con getBreakPoints
This action gets the parameters of the break points at the end of the subconnectors.
This action has no parameters.
This action returns the float parameter list of the break points in the range [0.0, 1.0].
getBreakPoint, getBreakPointType, getSubConnectorCount
This example shows how to get the parameter of the break point at the end of the second subconnector. $con(1) is referencing an existing connector.
Code
puts [lindex [$con(1) getBreakPoints] 1]
Output
0.3361120722538553
$con getBreakPointType index
This action gets the type of break point at the end of the subconnector.
index | This required parameter is the integer index of the break point to get in the range [1, number of subconnectors-1]. |
This action returns the string breakpoint type with options < Control | Arc >.
getBreakPointTypes, getSubConnectorCount
This example shows how to get the type of the break point at the end of the second subconnector. $con(1) is referencing an existing connector.
Code
puts [$con(1) getBreakPointType 2]
Output
Arc
$con getBreakPointTypes
This action gets the type at each break point at the end of the subconnectors.
This action has no parameters.
This action returns a string list of breakpoint types with options < Control | Arc >.
getBreakPointType, getSubConnectorCount
This example shows how to get the type of the break point at the end of the second subconnector. $con(1) is referencing an existing connector.
Code
puts [lindex [$con(1) getBreakPointTypes] 1]
Output
Arc
$con addBreakPoint ?< -control | -arc | -X | -Y | -Z | -U | -V >? value
This action adds one or more break points to the list of break points.
-arc | This optional flag causes an Arc type break point to be added at an arc length. The value is the normalized, float arc length from the start of the connector in the range [0.0, 1.0]. This is the default option. |
-control | This optional flag causes a Control type break point to be added at a control point. The value is an integer index with the range (1, number of control points). |
-X | This optional flag causes an Arc type break point to be added at each occurrence of specified X location on the connector. A location will be skipped if another break point is already present in the vicinity. The value is a float X Cartesian coordinate. |
-Y | This optional flag causes an Arc type break point to be added at each occurrence of specified Y location on the connector. A location will be skipped if another break point is already present in the vicinity. The value is a float Y Cartesian coordinate. |
-Z | This optional flag causes an Arc type break point to be added at each occurrence of specified Z location on the connector. A location will be skipped if another break point is already present in the vicinity. The value is a float Z Cartesian coordinate. |
-U | This optional flag causes an Arc type break point to be added at each occurrence of specified U location on the connector. A location will be skipped if another break point is already present in the vicinity. The value is a float in the range (0.0, 1.0). |
-V | This optional flag causes an Arc type break point to be added at each occurrence of specified V location on the connector. A location will be skipped if another break point is already present in the vicinity. The value is a float in the range (0.0, 1.0). |
value | This required parameter is the float or integer value to position the break point. |
Only one of -arc, -control, -X, -Y, -Z, -U or -V flags is allowed.
This action returns the integer index of the break point added. In the case of the -X, -Y, -Z, -U, or -V options, the return value is a list of the integer break point indices added.
removeBreakPoint, removeAllBreakPoints
This example shows how to add a break point at three different X locations on a connector. $con(1) is referencing an existing connector.
Code
foreach bp [list -15 0 10] { puts [$con(1) addBreakPoint -X $bp] }
Output
1 2 3
$con removeBreakPoint index
This action removes the break point from the connector at the end of the subconnector with the given index.
index | This required parameter is the integer index of the break point to remove with the [1, number of subconnectors-1]. |
This action returns nothing.
addBreakPoint, removeAllBreakPoints
This example shows how to remove a break point at the end of the second subconnector. $con(1) is referencing an existing connector.
Code
$con(1) removeBreakPoint 2
$con removeAllBreakPoints
This action removes all of the break points from the connector.
This action has no parameters.
This action returns nothing.
addBreakPoint, removeBreakPoint, getSubConnectorCount
This example shows how to remove all the break points from a connector. $con(1) is referencing an existing connector.
Code
$con(1) removeAllBreakPoints
$con checkBreakPoint ?< -control | -arc >? value
This action checks if a break point can be added at a given location.
-control | This optional flag is notification to check the break point at a control point. The value is an integer index in the range (1, number of control points). |
-arc | This optional flag is notification to check the break point at an arc length. The value is the normalized, float arc length from the start of the connector in the range [0.0, 1.0]. This is the default option. |
value | This required parameter is the integer or float value to check the break point. |
This action returns a boolean, true if the break point can be added, false if it is too close to an existing break point or if there are not enough grid points.
This example shows how to check to see if a break point can be added at a certain arc length of a connector. $con(1) is referencing an existing connector.
Code
puts [$con(1) checkBreakPoint -arc .6]
Output
1
$con setBreakPointSpacing index < spacing | value | name >
This action sets the spacing on both sides of a break point.
index | This required parameter is the integer index of the break point to set the spacing of in the range [1, number of subconnectors). |
spacing | This optional parameter is the pw::Spacing object. |
value | This optional parameter is the float value to set for a pw::SpacingExplicit object which will be created for both sides of the given break point in the range [0.0, infinity). |
name | This optional parameter is the name of a spacing object created with pw::Spacing.createNamedValue. |
This action returns nothing.
addBreakPoint, pw::Spacing, pw::SpacingExplicit
One of spacing, value or name must be specified.
This function replaces the affected distribution functions with duplicate distribution functions before changing the spacing to avoid changing the spacing on any other connectors sharing the modified distribution functions. If you want the spacing to be used for all connectors sharing the distribution functions, you should get the distribution functions and change the spacing on them directly.
This example shows how to set the break point spacing for every break point on a connector. $con(1) is referencing an existing connector.
Code
for {set x 1} {$x < [$con(1) getSubConnectorCount]} {incr x} { $con(1) setBreakPointSpacing $x 0.05 }
$con spline ?connector?
This action sets the shape of this connector to a smooth interpolation of the grid points of the given connector.
connector | This optional parameter is a pw::Connector object whose grid points will be interpolated. If not given the spline action will interpolate this connector’s own grid points. |
This action returns nothing.
If the given connector’s grid points are database constrained to a single parameter space, this action will set this connector’s shape to a smooth interpolation in that parameter space, otherwise the connector will be unconstrained.
The connector’s new shape will be a single pw::SegmentSpline or pw::SegmentSurfaceSpline.
This example shows how to set the shape of $con(1) to a smooth interpolation of the grid points on $con(2). $con(1) and $con(2) are referencing existing connectors.
Code
$con(1) spline $con(2)
$con fitLSQ ?-tolerance tol? ?connector?
This action sets the shape of this connector to a least squares fit approximation of the grid points of the given connector.
-tolerance tol | This optional parameter is the float approximation tolerance in the range [0, infinity). The default is the current tolerance returned from pw::Database.getFitTolerance. |
connector | This optional parameter is a pw::Connector object whose grid points will be fitted. If not given the spline action will fit this connector’s own grid points. |
This action returns nothing.
If the given connector’s grid points are database constrained to a single parameter space, this action will set this connector’s shape to a smooth interpolation in that parameter space, otherwise the connector will be unconstrained.
The connector’s new shape will be a single pw::SegmentSpline or pw::SegmentSurfaceSpline.
This example shows how to set the shape of $con(1) to a least squares fit approximation with a tolerance other than the default. $con(1) is referencing an existing connector.
Code
$con(1) fitLSQ -tolerance 0.0001
$con smoothC1 ?-tolerance tol? ?connector?
This action sets the shape of this connector to a C1 continuous approximation of the shape of the given connector.
-tolerance tol | This optional parameter is the float approximation tolerance in the range [0.0, infinity). The default is the current tolerance returned from pw::Database.getFitTolerance. |
connector | This optional parameter is a pw::Connector object whose shape will be approximated. If not given the smoothC1 action will approximate this connector’s own shape. |
This action returns nothing.
If the given connector is database constrained to a single parameter space, this action will set the shape of this connector to a smooth interpolation in that parameter space, otherwise the shape will be unconstrained.
The connector’s new shape will be a single pw::SegmentSpline or pw::SegmentSurfaceSpline.
This example shows how to set the shape of $con(1) to a C1 continuous approximation of the shape of $con(2). $con(1) and $con(2) are referencing existing connectors.
Code
$con(1) smoothC1 $con(2)
$con split < -I index_list | param_list >
This action splits this connector at the given index or point.
-I index_list | This optional parameter is the list of integer grid point indices to split at in the range [1, number of grid points]. |
param_list | This optional parameter is the list of float parameters to split at in the range [0.0, 1.0]. Note that parameter values do not represent the normalized arclength. |
This action returns a list of pw::Connector objects.
One of -I index_list or param_list must be specified.
Duplicate indices or parameters will be ignored.
Indices and parameters at the limits of the connector will be ignored.
Parameter values can be obtained from the getParameter command.
This example shows how to split a connector into four pieces. Depending on how the connector is parameterized, this may or may not split the connector into quarters. $con(1) is referencing an existing connector.
Code
foreach split [$con(1) split [list 0.25 0.5 0.75]] { puts [$split getName] }
Output
con-1-split-1 con-1-split-2 con-1-split-3 con-1-split-4
$con join ?<-keepDistribution | -resetDistribution>? ?-deleteBreakPoints? connector ?side?
This action joins this connector with a given connector.
-keepDistribution | This optional flag is notification that break points will be inserted into the newly joined connector in order to maintain the grid point distributions of each connector being joined and all existing break points will also be preserved. However, if the deleteBreakPoints flag is also used, just the grid point distributions will be preserved, and all break points will be deleted. This flag cannot be used in conjunction with the -resetDistribution flag. |
-resetDistribution | This optional flag is notification that all break points will be deleted, and the distribution function of the resulting connector will be reset to the current default distribution function. This flag cannot be used in conjunction with the -keepDistribution flag. |
-deleteBreakPoints | This optional flag is notification to delete all break points even if the -keepDistribution flag is present. The grid point distributions of the individual connectors will be maintained unless the -resetDistribution flag is also used. |
connector | This required parameter is the pw::Connector object to join. |
side | This optional parameter is the side of this connector to join with options < Any | Begin | End >. |
If neither of the above flags is present, all break points will be removed from the given connector and its distribution function will be set to the default.
This action returns nothing.
This example shows how to join two connectors but keep the distribution settings by adding a break point. $con(1) is referencing an existing connector.
Code
$con(1) join -keepDistribution $con(2)
$con project ?-type proj_type? ?-direction direction? ?-center center? ?-axis point normal? ?-fit tolerance? ?<-interior | -shape>? ?dbentities?
This action projects this connector onto one or more database entities.
-type proj_type | This optional parameter is the string projection type to perform with options < ClosestPoint | Linear | SphericalIn | SphericalOut | CylindricalIn | CylindricalOut >. |
-direction direction | This optional parameter is the projection vector for linear projection. The default is determined by the entity and can be queried using getDefaultProjectDirection. |
-center center | This optional parameter is the center point vector for spherical projection. The default is (0, 0, 0). |
-axis point normal | This optional parameter is the axis defined by a point vector and normal vector used by cylindrical projection; The default point is (0, 0, 0) and the default normal is (1, 0, 0). |
-fit tolerance | This is an optional parameter is the float tolerance used to fit any curve-like entities. The default for this is 0 which means there is no fitting applied onto the projected curve. The valid range for this parameter is [0.0,infinity) |
-interior | If this optional flag is present, only the interior of the entities are projected. If this is specified, -shape cannot be specified. |
-shape | If this optional flag is present, the shape of the underlying curve will be projected to the database and the original distribution will be reapplied after the projection. If this is specified, -interior cannot be specified. |
dbentities | This optional parameter is a list of curve and surface-like pw::DatabaseEntity to project onto. If none are given, project to any currently enabled, visible database surface-like entities. |
This action returns nothing.
This example shows how to project a connector linearly along the -Y axis onto the first database entity it encounters in that path. $con(1) is referencing an existing connector.
Code
$con(1) project -type Linear -direction "0 -1 0"
$con getDefaultProjectDirection
This action gets the default projection direction for this connector.
This action has no parameters.
This action returns a direction vector.
This example shows how to find the default projection direction for a connector. $con(1) is referencing an existing connector.
Code
puts [$con(1) getDefaultProjectDirection]
Output
0.0 0.0 1.0
$con setOrientation imin_node
This action sets the orientation of this connector, by specifying the new imin node.
imin_node | This required parameter is the integer index or string end with options < IMinimum | IMaximum > to be used as the Imin Node. The following end keywords or the associated index may be used: IMinimum = 1, IMaximum = 2. |
This action returns nothing.
Since the parameter specifies the new Imin node, if IMinimum or 1 is given as the imin_node parameter, the connector will not be changed. Use an imin_node parameter of IMaximum or 2 to reverse the connector.
This example shows how to set the connector orientation. $con(1) is referencing an existing connector.
Code
$con(1) setOrientation 2
$con alignOrientation connectors
This action aligns the I orientation of the given connectors with this connector.
connectors | This required parameter is a list of topologically connected pw::Connector objects to align. |
This action returns nothing.
Any connectors in the given list that are not topologically connected to this connector will be ignored.
This example shows how to align multiple connector orientations with the given connector’s orientation. $con(1) is referencing an existing connector.
Code
$con(1) alignOrientation [list $con(2) $con(3)]
$con createPeriodic < -translate vector | -rotate point normal angle >
This action creates a periodic copy of this connector. This action will fail if the connector is already part of a periodic pair.
-translate vector | This optional parameter indicates that the periodic copy will be offset by the amount specified by the vector parameter. The length of the vector must be greater than zero. |
-rotate point normal angle | This optional parameter indicates that the periodic copy will be rotated from the original about the origin specified by the vector point parameter and around the axis specified by the vector normal parameter by float angle degrees. The normal vector must be non-zero. The angle must be non-zero and not a multiple of 360.0. |
One of -translate or -rotate must be specified.
This action returns a new pw::Connector object. Under certain circumstances (such as the pw::Connector belonging to a periodic pw::Domain), the copy will be created but the periodic link will be broken. Call getPeriodic to verify the periodicity.
getPeriodic, breakPeriodic, create, createFromPoints, createOnDatabase
This example shows how to create a periodic copy of a connector via rotation. $con(1) is referencing an existing connector.
Code
puts [[$con(1) createPeriodic \ -rotate [[$con(1) getNode End] getXYZ] "0 0 1" 120] getName]
Output
con-2
$con getPeriodic ?-transform matrixVar?
This action gets the connector that shares a periodic link with this connector.
-transform matrixVar | This optional parameter is the string name of the variable that receives a transform matrix for the periodic connector. |
This action returns a pw::Connector object if there is a periodic link, or an empty string if there is no periodic link.
createPeriodic, breakPeriodic, pwu::Transform
This example shows how to return the periodic connector linked to a given connector. $con(2) is referencing an existing connector.
Code
puts [[$con(2) getPeriodic] getName]
Output
con-1
$con breakPeriodic
This action breaks the periodic link that this connector has with another connector. This action has no effect if the connector was not part of a periodic pair.
This action has no parameters.
This action returns nothing.
This example shows how to break the periodic link that a given connector has. $con(1) is referencing an existing connector.
Code
$con(1) breakPeriodic
$con getPoint ?-constrained constrainedVar? index
This action gets the position of a connector grid point.
index | This required parameter is the integer index of the grid point to get in the range [1, dimension]. |
-constrained constrainedVar | This optional parameter is the string name of a variable. If the grid point is database constrained, this variable is set to true. If not constrained, it is set to false. |
This action returns a point giving the grid point position and this may be in the form “u v dbentity”.
This example shows how to get the point of a connector grid point. $con(1) is referencing an existing connector.
Code
puts [$con(1) getPoint 5] puts [$con(1) getPoint -constrained isDb 5] puts "isDb=$isDb"
Output
-7.709635714285716 4.160740000000001 0.0 -7.709635714285716 4.160740000000001 0.0 isDb=0
$con getPoints
This action gets all the connector grid points.
This action has no parameters.
This action returns a point list giving the grid point position and this may be in the form “u v dbentity”.
This example shows how to get the point of a connector grid point. $con(1) is referencing an existing connector.
Code
set points [$con getPoints] puts [lindex $points 4]
Output
-7.709635714285716 4.160740000000001 0.0
$con setPoint index point
This action sets the position of a connector interior grid point.
index | This required parameter is the integer index of the target grid point to set in the range (1, dimension). The index must be for an interior grid point. |
point | This required parameter is the new point value of the grid point. |
This action returns nothing.
If the new point is on the underlying segments and between the adjacent grid point, the segment is unchanged. If the moved index is on a break point, the break point is removed. If the new point is moved off of the underlying segments or is on the segments but is not between adjacent grid points, the underlying segments are replaced by one defined by the grid points (including the new value) and all break points are removed. In all cases, the distribution of the final subconnector containing the point is changed to a general distribution function.
This example shows how to set the point of an interior connector grid point. The original connector is a line on the X-axis, so setting this point changes the shape of the connector. $con(1) is referencing an existing connector.
Code
$con(1) setPoint 3 "2.5 1 0"
$con getPosition ?< -grid | -control | -parameter | -arc | -X | -Y | -Z | -closest >? value
This action gets a position on a connector in the defining space of the connector.
-grid | This optional flag is the notification to get the position at a grid point. value is an integer index [1, number of grid points]. This is the default option. |
-control | This optional flag is the notification to get the position at a control point. The value is an integer index with the range [1, number of control points]. |
-parameter | This optional flag is the notification to get the position at a parameter. The value is a float in the range [0.0, 1.0] or a uv vector with v ignored. |
-arc | This optional flag is the notification to get the position at an arc length. The value is a normalized float arc length from the start of the connector in the range [0.0, 1.0]. |
-X | This optional flag is the notification to get the position at a constant X. The value is a float constant X coordinate value. |
-Y | This optional flag is the notification to get the position at a constant Y. The value is a float constant Y coordinate value. |
-Z | This optional flag is the notification to get the position at a constant Z. The value is a float constant Z coordinate value. |
-closest | This optional flag is the notification to get the closest position. The value is a point, or grid coord. |
value | This required parameter is the float or integer value to get the position. |
This action returns a point giving the position on the connector which may be in the form “u v dbentity”.
If the connector is defined in model space, an xyz vector will be returned. If the connector is defined by a database, the position will be returned in database parameter space.
This example shows how to get the position at a constant X value on a connector. This connector was created on a database entity. $con(1) is referencing an existing connector.
Code
puts [pw::Application getDescription [$con(1) getPosition -X 3]]
Output
curve-1 (0.6,0)
$con getXYZ ?< -grid | -control | -parameter | -arc | -X | -Y | -Z | -closest >? value
This action gets the model space position on a connector.
-grid | This optional flag is the notification to get the position at a grid point. value is an integer index [1, number of grid points]. This is the default option. |
-control | This optional flag is the notification to get the position at a control point. The value is an integer index with the range [1, number of control points]. |
-parameter | This optional flag is the notification to get the position at a parameter. The value is a float in the range [0.0, 1.0] or a uv vector with v ignored. |
-arc | This optional flag is the notification to get the position at an arc length. The value is a normalized float arc length from the start of the connector in the range [0.0, 1.0]. |
-X | This optional flag is the notification to get the position at a constant X. The value is a float constant X coordinate value. |
-Y | This optional flag is the notification to get the position at a constant Y. The value is a float constant Y coordinate value. |
-Z | This optional flag is the notification to get the position at a constant Z. The value is a float constant Z coordinate value. |
-closest | This optional flag is the notification to get the closest position. The value is a point or grid coord. |
value | This required parameter is the value to get the coordinate. |
This action returns an XYZ vector.
This example shows how to get the model space position at 3/4 the the length of a connector. $con(1) is referencing an existing connector.
Code
puts [$con(1) getXYZ -arc [list 0.75]]
Output
3.75 2.0 0.0
$con getParameter ?< -grid | -control | -parameter | -arc | -X | -Y | -Z | -closest >? value
This action gets a parameter value on a connector.
-grid | This optional flag is the notification to get the position at a grid point. value is an integer index [1, number of grid points]. This is the default option. |
-control | This optional flag is the notification to get the position at a control point. The value is an integer index with the range [1, number of control points]. |
-parameter | This optional flag is the notification to get the position at a parameter. The value is a float in the range [0.0, 1.0] or a uv vector with v ignored. |
-arc | This optional flag is the notification to get the position at an arc length. The value is a normalized float arc length from the start of the connector in the range [0.0, 1.0]. |
-X | This optional flag is the notification to get the position at a constant X. The value is a float constant X coordinate value. |
-Y | This optional flag is the notification to get the position at a constant Y. The value is a float constant Y coordinate value. |
-Z | This optional flag is the notification to get the position at a constant Z. The value is a float constant Z coordinate value. |
-closest | This optional flag is the notification to get the closest position. The value is a point or grid coord. |
value | This required parameter is the integer or float value to get the parameter. |
This action returns the float parameter of the connector.
The -parameter value option only returns the given value clamped to [0.0, 1.0]. It is included for consistency with other commands.
This example shows how to get the parameter value of a grid point on a connector. $con(1) is referencing an existing connector.
Code
puts [$con(1) getParameter -grid 2]
Output
0.25
$con getRadiusOfCurvature ?-surface? ?< -grid | -control | -parameter | -arc | -X | -Y | -Z | -closest >? value
This action returns the radius of curvature at the specified position on the connector.
-surface | This optional flag is the notification to return the surface curvature, rather than the curve curvature, if the specified position lies on a curve that is constrained to a surface. |
-grid | This optional flag is the notification to get the radius of curvature at a grid point. value is an integer index [1, number of grid points]. This is the default option. |
-control | This optional flag is the notification to get the radius of curvature at a control point. The value is an integer index in the range [1, number of control points]. |
-parameter | This optional flag is the notification to get the radius of curvature at a parameter. The value is a float with the range [0.0, 1.0] or a uv vector with v ignored. |
-arc | This optional flag is the notification to get the radius of curvature at an arc length. The value is a normalized float arc length from the start of the connector in the range [0.0, 1.0]. |
-X | This optional flag is the notification to get the radius of curvature at a constant X. The value is a float constant X coordinate value. |
-Y | This optional flag is the notification to get the radius of curvature at a constant Y. The value is a float constant Y coordinate value. |
-Z | This optional flag is the notification to get the radius of curvature at a constant Z. The value is a float constant Z coordinate value. |
-closest | This optional flag is the notification to get radius of curvature at the closest position; the value is a point or grid coord. |
value | This required parameter is the integer or float position value. |
This action returns a float radius of curvature.
If there is no curvature, a radius of zero will be returned.
$con getTangent ?< -grid | -control | -parameter | -arc | -X | -Y | -Z | -closest >? value
This action gets the tangency vector on a connector.
-grid | This optional flag is the notification to get the tangency vector at a grid point. value is an integer index [1, number of grid points]. This is the default option. |
-control | This optional flag is the notification to get the tangency vector at a control point. The value is an integer index in the range [1, number of control points]. |
-parameter | This optional flag is the notification to get the tangency vector at a parameter. The value is a float with the range [0.0, 1.0] or a uv vector with v ignored. |
-arc | This optional flag is the notification to get the tangency vector at an arc length. The value is a normalized float arc length from the start of the connector in the range [0.0, 1.0]. |
-X | This optional flag causes the routine to calculate the tangent vector at the singular point on the connector at X = value. An error is returned if there is not a unique point. |
-Y | This optional flag causes the routine to calculate the tangent vector at the singular point on the connector at Y = value. An error is returned if there is not a unique point. |
-Z | This optional flag causes the routine to calculate the tangent vector at the singular point on the connector at Z = value. An error is returned if there is not a unique point. |
-closest | This optional flag is the notification to get the tangency vector at the closest position on the connector. The value is a point or grid coord. |
value | This required parameter is the integer or float value at which to get the tangency vector. |
This action returns a normalized XYZ vector representing the tangency vector. The vector will be aligned with the parametric direction of the connector. The value is undefined for a pole connector and will trigger an error.
pw::Curve.getGeometricProperties, pw::Curve.getTangent, getRadiusOfCurvature, getTransverseAngle
$con getGeometricProperties ?-curve curveVar? ?-surface surfaceVar? ?-directional directionalVar? ?-orthogonal orthogonalVar? ?< -grid | -control | -parameter | -arc | -X | -Y | -Z | -closest >? value
This action calculates the geometric properties at the specified position on the connector.
-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 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 connector, if the specified position 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 connector, if the specified position is constrained to a surface. The array indices and the values are listed below. |
-grid | This optional flag is the notification to get the geometric properties at a grid point. value is an integer index [1, number of grid points]. This is the default option. |
-control | This optional flag is the notification to get the geometric properties at a control point. The value is an integer index in the range [1, number of control points]. |
-parameter | This optional flag is the notification to get the geometric properties at a parameter. The value is a float in the range [0.0, 1.0] or a uv vector with v ignored. |
-arc | This optional flag is the notification to get the geometric properties at an arc length. The value is a normalized float arc length from the start of the connector in the range [0.0, 1.0]. |
-X | This optional flag is the notification to get the geometric properties at a constant X. The value is a float constant X Cartesian coordinate value. |
-Y | This optional flag is the notification to get the geometric properties at a constant Y. The value is a float constant Y Cartesian coordinate value. |
-Z | This optional flag is the notification to get the geometric properties at a constant Z. The value is a float constant Z Cartesian coordinate value. |
-closest | This optional flag is the notification to get geometric properties at the closest position. The value is a point or grid coord. |
value | This required parameter is the integer or float position value. |
This action returns nothing.
This array is divided into the following elements.
Point | This element is the vector location of the connector that these geometric properties are for. |
UV | This is the vector non-normalized UV parameter of the underlying connector shape. |
LimitsU | This is the vector non-normalized parameter limits in U of the underlying connector shape. |
LimitsV | This is the vector non-normalized parameter limits in V of the underlying connector shape. |
RadiusOfCurvature | This element is the float radius of curvature of the connector. |
Normal | This element is the vector normal of the connector. |
Tangent | This element is the vector tangent of the connector. |
This array is divided into the following elements. If the connector is not constrained to a surface, the elements will be set to 0. If the connector 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 the connector is constrained to and these surface geometric properties are for. |
UV | This is the vector non-normalized UV parameter of the surface that the connector is constrained to. |
LimitsU | This is the vector non-normalized parameter limits in U of the surface that the connector is constrained to. |
LimitsV | This is the vector non-normalized parameter limits in V of the surface that the connector is constrained to. |
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 connector is not constrained to a surface, the elements will be set to 0. If the connector 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 connector. |
Direction | This element is the vector derivative of (or orthogonal to) the connector. |
DirectionUV | This element is the vector derivative of (or orthogonal to) the connector 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. |
$con getTransverseAngle < ?-tolerance tol? | ?-toleranceMultiplier multiplier? | ?-sampleDistance distance? > ?-type typeVar? ? < -grid | -control | -parameter | -arc | -X | -Y | -Z | -closest > ? value
This action gets the transverse angle, in degrees, at a position on a connector in the defining space of the connector, and optionally whether the connector is convex or concave at that position.
-tolerance tolerance | This optional parameter is the float value of the tolerance. If not specified the maximum assemble tolerance for the connector returned by pw::Connector.getAssembleTolerance is used. |
-toleranceMultiplier multiplier | This optional parameter is the float value to apply to the assembly tolerance (whether provided in the -tolerance or the default). The default value of this parameter is 2.0. |
-sampleDistance distance | This optional parameter is the float explicit distance to use in lieu of using the tolerance multiplier and assembly tolerance. |
-type typeVar | This optional parameter is the string name of a variable to hold the string value of CONVEX or CONCAVE, depending on whether the connector is convex or concave at the requested position. |
-grid | This optional flag is the notification to get the position at a grid point. The value is an integer index [1, number of grid points]. This is the default option. |
-control | This optional flag is the notification to get the position at a control point. The value is an integer index with the range [1, number of control points]. |
-parameter | This optional flag is the notification to get the position at a parameter. The value is a float in the range [0.0, 1.0] or a uv vector with v ignored. |
-arc | This optional flag is the notification to get the position at an arc length. The value is a normalized float arc length from the start of the connector in the range [0.0, 1.0]. |
-X | This optional flag is the notification to get the position at a constant X. The value is a float constant X Cartesian coordinate value. |
-Y | This optional flag is the notification to get the position at a constant Y. The value is a float constant Y Cartesian coordinate value. |
-Z | This optional flag is the notification to get the position at a constant Z. The value is a float constant Z Cartesian coordinate value. |
-closest | This optional flag is the notification to get the closest position. The value is a point or grid coord. |
value | This required parameter is the float or integer value to get the position at from which the transverse angle is determined. |
This action returns the transverse angle of the connector at the requested position in degrees.
This command only works for a connector that is shared by two domains and has more than 2 grid points. The transverse angle is determined from the surface normals by snapping the position to the database surfaces (for each domain). If the optional typeVar parameter is supplied, whether the position lies on a convex or concave shared boundary between two databases surfaces (one from each domain) is determined. Also note that the assembly tolerance and tolerance multiplier can both or separately be specified, but neither can be if sample distance is specified, and vice versa.
getTangent, getRadiusOfCurvature
This example shows how to get the transverse angle and concavity at a grid position on a connector. This connector was created on a database entity. $con(1) is referencing an existing connector.
Code
puts "$con(1) transverse angle: [$con(1) getTransverseAngle -type\ typeVar -grid 3], concavity: $typeVar"
Output
curve-1 transverse angle: 90, concavity: CONVEX
$con getLength ?< -grid | -control | -parameter | -arc | -X | -Y | -Z | -closest >? value
This action gets the connector length from the beginning to a given location.
-grid | This optional flag is the notification to get the length at a grid point. The value is an integer index [1, number of grid points]. This is the default option. |
-control | This optional flag is the notification to get the length at a control point. The value is an integer index with the range [1, number of control points]. |
-parameter | This optional flag is the notification to get the length at a parameter. The value is a float in the range [0.0, 1.0] or a uv vector with v ignored. |
-arc | This optional flag is the notification to get the length at an arc length. The value is a normalized float arc length from the start of the connector in the range [0.0, 1.0]. |
-X | This optional flag is the notification to get the length at a constant X. The value is a float constant X Cartesian coordinate value. |
-Y | This optional flag is the notification to get the length at a constant Y. The value is a float constant Y Cartesian coordinate value. |
-Z | This optional flag is the notification to get the length at a constant Z. The value is a float constant Z Cartesian coordinate value. |
-closest | This optional flag is the notification to get the closest position. The value is a point or grid coord. |
value | This required parameter is the integer or float value to get the length. |
This action returns the float curve length.
The -arc value option converts value from a normalized to a non-normalized length. It is included for consistency with other commands.
getPosition, getXYZ, getTotalLength
This example shows how to get the length along a connector from the point on the connector closest to the given point. $con(1) is referencing an existing connector.
Code
puts [$con(1) getLength -closest "4.5 1 0"]
Output
6.985033540042618
$con getParameters ?< -X | -Y | -Z >? value
This action gets the parameters at which the curve intersects the value.
-X | This optional flag is the notification to get the position at a constant X. The value is a float constant X Cartesian coordinate value. |
-Y | This optional flag is the notification to get the position at a constant Y. The value is a float constant Y Cartesian coordinate value. |
-Z | This optional flag is the notification to get the position at a constant Z. The value is a float constant Z Cartesian coordinate value. |
value | This required parameter is the float value to get the parameters. |
This action returns an array of parameters.
This example shows how to get parameters where this connector crosses Y-axis at 0.5. $con(1) is referencing an existing connector.
Code
puts [$con(1) getParameters -Y .5]
Output
0.17637560670204108 0.2778605205775764 0.692205316990254
$con getTotalLength ?-constrained constrainedVar?
This action gets the total length of the connector.
-constrained constrainedVar | This optional parameter is the string name of a variable to receive the length of the this entity, that is constrained to database entities. |
This action returns float length in the range [0.0, infinity).
This example shows how to get the total length of a connector, plus the length of the part constrained to a database entity. $con(1) is referencing an existing connector.
Code
puts [$con(1) getTotalLength -constrained onDB] puts $onDB
Output
10.012756135615804 5.0
$con getAssembleTolerance
This action returns the maximum tolerance used to close the model along the connector.
This action has no parameters.
This action returns the float maximum tolerance required to close the model along the connector’s underlying support curves. If the connector’s support curves are not used to close a model, the return value is zero.
$con getAverageSpacing
This action gets the average spacing between grid points of the connector.
This action has no parameters.
This action returns the float average spacing in the range [0.0, infinity).
getDistribution, pw::Distribution.getBeginSpacing, pw::Distribution.getEndSpacing
This example shows how to get the average spacing of grid points on this connector. $con(1) is referencing an existing connector.
Code
puts [$con(1) getAverageSpacing]
Output
0.1353075153461595
$con closestPoint ?-from fromVar? ?-distance distVar? ?-parameter paramVar? point ?dir?
This action gets the closest point on this connector to the given point.
-from fromVar | This optional parameter is the string name of a variable to receive the xyz vector of the given point or the point along the ray that is closest to this connector. |
-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 returned. |
-parameter paramVar | This optional parameter is the string name of a variable to receive the float parameter of the connector where the closest point occurs in the range [0.0, 1.0]. |
point | This required parameter is the point to project onto this connector. |
dir | This optional parameter is a direction vector for finding the closest point from a ray. |
This action returns a point giving the closest point position and this may be in the form “u v dbentity”. If there is no closest point, the origin (0, 0, 0) will be returned.
If the connector is defined in model space, an xyz vector will be returned. If the connector is defined by a database, the position will be returned in database parameter space.
This example shows how to get the point on the connector closest to the given point. The connector is not database constrained. $con(1) is referencing an existing connector.
Code
puts [$con(1) closestPoint -parameter param "4 3 0"] puts $param
Output
4.230944469613184 0.7742033915483331 0.0 0.748219646260448
$con closestControlPoint ?-from fromVar? ?-distance distVar? ?-parameter paramVar? ?-index indexVar? point ?dir?
This action gets the control point on this connector closest to the given point.
-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 connector. |
-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 returned. |
-parameter paramVar | This optional parameter is the string name of a variable to receive the float parameter of the connector where the closest point occurs in the range [0.0, 1.0]. |
-index indexVar | This optional parameter is the string name of a variable to receive the control point index of the closest control point. |
point | This required parameter is the point to project onto this connector. |
dir | This optional parameter is a direction vector for finding the closest point from a ray. |
This action returns a point in model space or the origin (0, 0, 0) if there is no closest point.
This example shows how to return the point of the nearest control point to a given point. A break point is then added at that control point if it is not one of the end control points. $con(1) is referencing an existing connector.
Code
puts [$con(1) closestControlPoint -index cp ".5 .5 0"] if {$cp > 1 && $cp < [$con(1) getControlPointCount]} { $con(1) addBreakPoint -control $cp }
Output
0.36029 -0.170198 0.0
$con getControlPointCount
This action gets the number of control points on this connector.
This action has no parameters.
This action returns the integer number of connector control points.
This example shows how to get the number of controls points on a connector. $con(1) is referencing an existing connector.
Code
puts [$con(1) getControlPointCount]
Output
4
$con removeInteriorControlPoints
This action removes the interior control points of each segment of this connector.
This action has no parameters.
This action returns a boolean which is true if there were any control points removed and false otherwise.
$con getNode < Begin | End | index >
This action gets a node from a connector.
position | This required parameter is a string with options < Begin | End > or an integer index in the range [1, 2] where 1 is the begin node and 2 is the end node. |
This action returns a pw::Node object.
Begin and 1 are the same. End and 2 are the same.
This example shows how to get the end node of a connector and then find the XYZ position of that node. $con(1) is referencing an existing connector.
Code
set node [$con(1) getNode End] puts [$node getXYZ]
Output
20.5703 -2.17697 0.0
$con isClosed
This action checks if the connector is closed.
This action has no parameters.
This action returns a boolean, true if the connector is closed.
This example checks to see whether a circle connector is closed. $con(1) is referencing an existing connector.
Code
puts [$con(1) isClosed]
Output
1
$con isPole
This action checks if the connector is a pole.
This action has no parameters.
This action returns a boolean, true if the connector is a pole.
This example checks to see whether a connector is a pole. $con(1) is referencing an existing connector.
Code
puts [$con(1) isPole]
Output
0
$con checkDistributionValidity
This action checks if the connector’s distributions on all of its subconnectors could be applied as requested.
This action has no parameters.
This action returns a boolean, true if the distributions on all of the connector’s subconnectors were applied successfully.
This will check to see if spacing constraints that are applied to the ends of a subconnector can be enforced.
getDistribution, pw::Distribution
This example shows how to check if a distribution was correctly applied to a subconnector. $con(1) is referencing an existing connector.
Code
[$con(1) getDistribution 1] setEndSpacing .5 puts [$con(1) checkDistributionValidity]
Output
1
$con isInteriorIndex index
This action checks to see if an index corresponds to a point in the interior of the connector.
index | This required parameter is the integer index of the grid point to check in the range [1, dimension]. |
This action returns true if the index is an interior point.
This example shows how to check to see if a certain index is in the interior of a connector. $con(1) is referencing an existing connector that has a dimension of 10.
Code
puts [$con(1) isInteriorIndex 1] puts [$con(1) isInteriorIndex 4] puts [$con(1) isInteriorIndex 10]
Output
0 1 0
$con getAdjacentIndices ?-linear? index
This action returns the indices that are directly connected to the specified index.
-linear | If this optional flag is specified, the results will be a list of linear integer indices regardless of the input form (present only to retain consistency with the syntax of the same command for pw::Domain and pw::Block objects). |
index | This required parameter is the integer linear index of the target grid point in the range [1, number of points]. |
This action returns a list of integer indices representing the adjacent coordinates.
This example shows how to return a list of integer indices that are adjacent to the given integer index on a connector. $con(1) is referencing an existing connector.
Code
puts [$con(1) getAdjacentIndices 5]
Output
4 6
$con getCellCount
This action gets the number of 1D cells in this connector.
This action has no parameters.
This action returns the integer number of cells.
This action provides an interface consistent with the block, domain getCellCount actions.
A 1D cell is a line segment between two consecutive connector grid points.
The number of connector cells is equal to [$con getPointCount] - 1.
pw::Domain.getCellCount, pw::Block.getCellCount, getCell
This example shows how to get the number of cells in a connector. $con is referencing an existing connector.
Code
$con setDimension 5 puts "getPointCount: [$con getPointCount]" puts "getCellCount: [$con getCellCount]"
Output
getPointCount: 5 getCellCount: 4
$con getCell index
This action gets the indices of the given 1D cell.
index | This required parameter is the integer index of the cell to get in the range [1, number of cells]. |
This action returns a list of two integer point indices.
This action provides an interface consistent with the block, domain getCell actions.
A 1D cell is a line segment between two consecutive connector grid points.
A connector’s cell is equal to [list $index [expr {$index + 1}]].
getCells, pw::Domain.getCell, pw::Block.getCell, getCellCount
This example shows how to get the indices for a cell. $con is referencing an existing connector.
Code
$con setDimension 5 puts "getPointCount: [$con getPointCount]" puts "getCellCount: [set cnt [$con getCellCount]]" for {set i 1} { $i <= $cnt } {incr i} { puts "getCell $i: \{ [$con getCell $i] \}" }
Output
getPointCount: 5 getCellCount: 4 getCell 1: { 1 2 } getCell 2: { 2 3 } getCell 3: { 3 4 } getCell 4: { 4 5 }
$con getCells
This action gets the indices of all the 1D cells.
This action has no parameters.
This action returns a list of integer pairs of point indices.
A 1D cell is a line segment between two consecutive connector grid points.
A connector’s cell is equal to [list $index [expr {$index + 1}]].
This example shows how to get the indices for a cell. $con is referencing an existing connector.
Code
$con setDimension 5 puts "getPointCount: [$con getPointCount]" puts "getCellCount: [set cnt [$con getCellCount]]" set cells [$con getCells] for {set i 0} { $i < $cnt } {incr i} { puts "cell [expr $i + 1]: \{ [lindex $cells $i] \}" }
Output
getPointCount: 5 getCellCount: 4 cell 1: { 1 2 } cell 2: { 2 3 } cell 3: { 3 4 } cell 4: { 4 5 }
$con applyTRex ?<-wall bc1 | -angle bc1 | -aspectratio bc1 | -maxaspectratio bc1>? ?-adjacent bc2? ?-domains domainVar?
This action will create (if not specified) and apply a T-Rex boundary condition to the unstructured domains that use this connector. If the connector is shared with a structured domain, AdjacentGrid boundary condition will be applied. If a boundary condition is not specified, the default T-Rex boundary condition Type along with the corresponding default value will be applied.
-wall bc1 | This optional parameter specifies the Wall pw::TRexCondition to apply. Cannot be used simultaneously with -angle, -aspectratio or -maxaspectratio. |
-angle bc1 | This optional parameter specifies the Angle pw::TRexCondition to apply. Cannot be used simultaneously with -angle, -aspectratio or -maxaspectratio. |
-aspectratio bc1 | This optional parameter specifies the AspectRatio pw::TRexCondition to apply. Cannot be used simultaneously with -wall, -angle or -maxaspectratio. |
-maxaspectratio bc1 | This optional parameter specifies the MaxAspectRatio pw::TRexCondition to apply. Cannot be used simultaneously with -wall, -angle or -aspectratio. |
-adjacent bc2 | This optional parameter specifies the AdjacentGrid pw::TRexCondition to apply. |
-domains domainsVar | This optional parameter is the string name of the variable that receives a list of pw::DomainUnstructured that the T-Rex boundary conditions were applied. |
The T-Rex boundary condition that has been assigned.
pw::TRexCondition, pw::TRexCondition.ConditionType, applyTRex (static)
This action creates a new connector object.
pw::Connector create
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, given a list of XYZ vector values or database-constrained points, creates a new connector.
pw::Connector createFromPoints points
This action joins as many of the given connectors together as possible.
pw::Connector join ?<-keepDistribution | -resetDistribution>? ?-deleteBreakPoints? ?-reject rejectVar? connectors
This action, given two point-lists, returns a segment type, a start point, an end point, and a ProjectToCommon state that represent the best segment for a connector between the given points.
pw::Connector getBestSegment ?-start startVar? ?-end endVar? ?-projectToCommon projectToCommonVar? start_points end_points
This action gets a list of all connectors using the specified node.
pw::Connector getConnectorsFromNode node
This action gets a list of all connectors using the specified spacing object.
pw::Connector getConnectorsFromSpacing ?-details? ?-global? spacing
This action finds the connectors adjacent to the given list of connectors.
pw::Connector getAdjacentConnectors ?-maximumAngle angle? ?-all? connectors
This action looks for connectors in a plane, with the candidate connectors given explicitly or implicitly from the given entities.
pw::Connector getConnectorsInPlane ?-tolerance tol? ?-lamina? ?-loops? ?-secondary plane? plane entities
This action checks if connectors will have a dimension after being created and the calculateDimension method called on them, based on the current settings.
pw::Connector doConnectorsGetDimension
This action sets the dimension of this connector using its current solver settings.
$con calculateDimension
This action finds connectors that have invalid distributions.
pw::Connector getInvalidDistributions ?-all?
This action modifies the distribution and dimension of a list of pw::Connector objects based on the current size field.
pw::Connector setDimensionFromSizeField ?-include ents? ?-exclude ents? ?-ignoreAll? ?-matchDimensions? ?-backgroundSpacing spacing? ?-defaultDecay decay? ?-calculationMethod method? connectors
This action synchronizes spacing constraints at shared connector grid points.
pw::Connector synchronizeSpacings ?<-minimum | -maximum | -average>? ?-growthRate rate? ?-undefined domainsVar? ?-useTRexSpacings? ?-keepDimensionAndDistribution? ?-returnDuplicates? connectors
This action will create (if not specified) and apply T-Rex boundary conditions to the unstructured domains that use the given connectors.
pw::Connector applyTRex ?-refine? ?<-wall bc1 | -angle bc1 | -aspectratio bc1 | -maxaspectratio bc1>? ?-adjacent bc2? ?-unused connectorVar? ?-domains domainVar? connectors
This action replaces the distribution function of a list of subconnectors, retaining the previously set spacings.
pw::Connector swapDistribution distribution_type subcon_list
This default is the distribution of a subconnector when it is created.
pw::Connector get/setDefault DistributionType distribution_type
This default is the beginning spacing of a subconnector when it is created.
pw::Connector get/setDefault BeginSpacing spacing
This default is the ending spacing of a subconnector when it is created.
pw::Connector get/setDefault EndSpacing spacing
This attribute is the dimension of a connector when it is created implicitly or when the calculateDimension action is called.
pw::Connector get/setCalculateDimensionMethod method
This attribute is the maximum dimension calculated for a connector when using the commands calculateDimension, setDimensionFromSpacing, and setDimensionFromDistribution.
pw::Connector get/setCalculateDimensionMaximum dimension
This action sets the dimension of this connector based on equal spacing.
$con setDimensionFromSpacing spacing
This action sets the dimension of this connector based on the current distribution.
$con setDimensionFromDistribution
This attribute is the default average spacing between successive grid points.
pw::Connector get/setCalculateDimensionSpacing spacing
This default is a flag to allow the distribution of a connector to effect the dimension of the connector.
pw::Connector get/setDistributionInfluence influence
This default is the maximum turning angle allowed between successive grid points.
pw::Connector get/setNormalMaximumDeviation angle
This attribute is the maximum distance allowed between the analytic and discrete shape of a connector.
pw::Connector get/setCurveMaximumDeviation distance
This default is a flag that allows the underlying surface of a connector to affect the NormalMaximumDeviation and CurveMaximumDeviation constraints.
pw::Connector get/setSurfaceCurvatureInfluence influence
This action delete this connector.
$con delete ?-force?
This action gets the dimensions of this connector.
$con getDimension
This action gets the dimensions of this connector.
$con getDimensions
This action sets the dimension of this connector.
$con setDimension dim
This action sets the dimension of a subconnector in this connector based on the current distribution of the subconnector.
$con setSubConnectorDimensionFromDistribution index
This action sets the dimension of this connector by copying the dimension from a list of subconnectors.
$con setDimensionFromSubConnectors subcon_list
This action increases the dimension of this connector.
$con increaseDimension ?-maximumLevel value? ?-maximumSpacing value? ?-minimumSpacing value? ?-surface? angle distance
This action gets the number of segments in this connector.
$con getSegmentCount
This action gets the segment at the given index.
$con getSegment ?-copy? index
This action gets the list of segments.
$con getSegments ?-copy?
This action sets the segment at the given index.
$con setSegment index segment
This action adds the segment to the end of the segments in the connector.
$con addSegment segment
This action inserts the segment at the given index.
$con insertSegment index segment
This action removes a segment from the connector.
$con removeSegment < index | segment >
This action removes all of the segments from the connector.
$con removeAllSegments
This action replaces all of the segments in the connector.
$con replaceAllSegments segments
This action gets the number of subconnectors in this connector.
$con getSubConnectorCount
This action gets the dimension of a subconnector in this connector.
$con getSubConnectorDimension ?index?
This action sets the dimensions of each subconnector in this connector.
$con setSubConnectorDimension dims
This action gets the minimum and maximum grid point indices of a subconnector.
$con getSubConnectorRange index
This action gets the minimum and maximum grid point indices of all subconnectors.
$con getSubConnectorRanges
This action gets the distribution function of a subconnector.
$con getDistribution ?-copy? index
This action sets the distribution function of a subconnector.
$con setDistribution ?-lockEnds? index distribution
This action replaces the distribution function of a subconnector, retaining the previously set spacings.
$con replaceDistribution index distribution
This action locks the distribution of a subconnector.
$con lockDistribution index
This action switches all of the subconnector distributions that are of type pw::DistributionGeneral to use the current default distribution.
$con resetGeneralDistributions
This action gets the parameter of the break point at the end of the subconnector with the given index.
$con getBreakPoint index
This action gets the parameters of the break points at the end of the subconnectors.
$con getBreakPoints
This action gets the type of break point at the end of the subconnector.
$con getBreakPointType index
This action gets the type at each break point at the end of the subconnectors.
$con getBreakPointTypes
This action adds one or more break points to the list of break points.
$con addBreakPoint ?< -control | -arc | -X | -Y | -Z | -U | -V >? value
This action removes the break point from the connector at the end of the subconnector with the given index.
$con removeBreakPoint index
This action removes all of the break points from the connector.
$con removeAllBreakPoints
This action checks if a break point can be added at a given location.
$con checkBreakPoint ?< -control | -arc >? value
This action sets the spacing on both sides of a break point.
$con setBreakPointSpacing index < spacing | value | name >
This action sets the shape of this connector to a smooth interpolation of the grid points of the given connector.
$con spline ?connector?
This action sets the shape of this connector to a least squares fit approximation of the grid points of the given connector.
$con fitLSQ ?-tolerance tol? ?connector?
This action sets the shape of this connector to a C1 continuous approximation of the shape of the given connector.
$con smoothC1 ?-tolerance tol? ?connector?
This action splits this connector at the given index or point.
$con split < -I index_list | param_list >
This action joins this connector with a given connector.
$con join ?<-keepDistribution | -resetDistribution>? ?-deleteBreakPoints? connector ?side?
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?
This action gets the default projection direction for this connector.
$con getDefaultProjectDirection
This action sets the orientation of this connector, by specifying the new imin node.
$con setOrientation imin_node
This action aligns the I orientation of the given connectors with this connector.
$con alignOrientation connectors
This action creates a periodic copy of this connector.
$con createPeriodic < -translate vector | -rotate point normal angle >
This action gets the connector that shares a periodic link with this connector.
$con getPeriodic ?-transform matrixVar?
This action breaks the periodic link that this connector has with another connector.
$con breakPeriodic
This action gets the position of a connector grid point.
$con getPoint ?-constrained constrainedVar? index
This action gets all the connector grid points.
$con getPoints
This action sets the position of a connector interior grid point.
$con setPoint index point
This action gets a position on a connector in the defining space of the connector.
$con getPosition ?< -grid | -control | -parameter | -arc | -X | -Y | -Z | -closest >? value
This action gets the model space position on a connector.
$con getXYZ ?< -grid | -control | -parameter | -arc | -X | -Y | -Z | -closest >? value
This action gets a parameter value on a connector.
$con getParameter ?< -grid | -control | -parameter | -arc | -X | -Y | -Z | -closest >? value
This action returns the radius of curvature at the specified position on the connector.
$con getRadiusOfCurvature ?-surface? ?< -grid | -control | -parameter | -arc | -X | -Y | -Z | -closest >? value
This action gets the tangency vector on a connector.
$con getTangent ?< -grid | -control | -parameter | -arc | -X | -Y | -Z | -closest >? value
This action calculates the geometric properties at the specified position on the connector.
$con getGeometricProperties ?-curve curveVar? ?-surface surfaceVar? ?-directional directionalVar? ?-orthogonal orthogonalVar? ?< -grid | -control | -parameter | -arc | -X | -Y | -Z | -closest >? value
This action gets the transverse angle, in degrees, at a position on a connector in the defining space of the connector, and optionally whether the connector is convex or concave at that position.
$con getTransverseAngle < ?-tolerance tol? | ?-toleranceMultiplier multiplier? | ?-sampleDistance distance? > ?-type typeVar? ? < -grid | -control | -parameter | -arc | -X | -Y | -Z | -closest > ? value
This action gets the connector length from the beginning to a given location.
$con getLength ?< -grid | -control | -parameter | -arc | -X | -Y | -Z | -closest >? value
This action gets the parameters at which the curve intersects the value.
$con getParameters ?< -X | -Y | -Z >? value
This action gets the total length of the connector.
$con getTotalLength ?-constrained constrainedVar?
This action returns the maximum tolerance used to close the model along the connector.
$con getAssembleTolerance
This action gets the average spacing between grid points of the connector.
$con getAverageSpacing
This action gets the closest point on this connector to the given point.
$con closestPoint ?-from fromVar? ?-distance distVar? ?-parameter paramVar? point ?dir?
This action gets the control point on this connector closest to the given point.
$con closestControlPoint ?-from fromVar? ?-distance distVar? ?-parameter paramVar? ?-index indexVar? point ?dir?
This action gets the number of control points on this connector.
$con getControlPointCount
This action removes the interior control points of each segment of this connector.
$con removeInteriorControlPoints
This action gets a node from a connector.
$con getNode < Begin | End | index >
This action checks if the connector is closed.
$con isClosed
This action checks if the connector is a pole.
$con isPole
This action checks if the connector’s distributions on all of its subconnectors could be applied as requested.
$con checkDistributionValidity
This action checks to see if an index corresponds to a point in the interior of the connector.
$con isInteriorIndex index
This action returns the indices that are directly connected to the specified index.
$con getAdjacentIndices ?-linear? index
This action gets the number of 1D cells in this connector.
$con getCellCount
This action gets the indices of the given 1D cell.
$con getCell index
This action gets the indices of all the 1D cells.
$con getCells
This action will create (if not specified) and apply a T-Rex boundary condition to the unstructured domains that use this connector.
$con applyTRex ?<-wall bc1 | -angle bc1 | -aspectratio bc1 | -maxaspectratio bc1>? ?-adjacent bc2? ?-domains domainVar?
This action creates a new explicit spacing object.
pw::SpacingExplicit create
This action defines a named spacing value.
pw::Spacing createNamedValue ?name ?value??
This attribute is the connector tolerance of grid entities and operations.
pw::Grid get/setConnectorTolerance tolerance
This attribute is the condition type of the T-Rex condition.
$tc get/setConditionType type
This action sets the requested grid point spacing at the beginning of the distribution.
$dist setBeginSpacing < -clearname | spacing | value | name >
This action sets the requested grid point spacing at the end of the distribution.
$dist setEndSpacing < -clearname | spacing | value | name >
This action deletes the given entities.
pw::Entity delete entities
This action gets the fit tolerance for database operations.
pw::Database getFitTolerance
This action calculates the geometric properties at the specified position on the curve.
$curve getGeometricProperties ?-curve curveVar? ?-surface surfaceVar? ?-directional directionalVar? ?-orthogonal orthogonalVar? ?< -grid | -control | -parameter | -arc | -X | -Y | -Z | -closest >? value
This action gets the tangency vector on the curve at a location.
$curve getTangent ?< -parameter | -control | -arc | -X | -Y | -Z | -closest >? value
This action gets the requested grid point spacing at the beginning of the distribution.
$dist getBeginSpacing
This action gets the requested grid point spacing at the end of the distribution.
$dist getEndSpacing
This action gets the number of cells in this domain.
$dom getCellCount
This action gets the number of cells in this block.
$block getCellCount
This action gets the indices of the given cell.
$dom getCell index
This action gets the indices of the given cell.
$block getCell index