pw::Connector

A connector is a computationally one-dimensional grid entity, defined in the parameter space of one or more end-connected curve segments.

Derives From

pw::Object pw::Entity pw::GridEntity

Summary
pw::ConnectorA connector is a computationally one-dimensional grid entity, defined in the parameter space of one or more end-connected curve segments.
Static Actions
createThis action creates a new connector object.
createOnDatabaseThis action creates new connector objects on the given database entities.
createFromPointsThis 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.
getBestSegmentThis 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.
getConnectorsFromNodeThis action gets a list of all connectors using the specified node.
getConnectorsFromSpacingThis action gets a list of all connectors using the specified spacing object.
getAdjacentConnectorsThis action finds the connectors adjacent to the given list of connectors.
getConnectorsInPlaneThis action looks for connectors in a plane, with the candidate connectors given explicitly or implicitly from the given entities.
doConnectorsGetDimensionThis action checks if connectors will have a dimension after being created and the calculateDimension method called on them, based on the current settings.
getInvalidDistributionsThis action finds connectors that have invalid distributions.
setDimensionFromSizeFieldThis action modifies the distribution and dimension of a list of pw::Connector objects based on the current size field.
synchronizeSpacingsThis 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.
swapDistributionThis action replaces the distribution function of a list of subconnectors, retaining the previously set spacings.
Static Defaults
Dimension (Default)This default is the dimension of a connector when it is created.
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
CalculateDimensionMethodThis attribute is the dimension of a connector when it is created implicitly or when the calculateDimension action is called.
CalculateDimensionMaximumThis attribute is the maximum dimension calculated for a connector when using the commands calculateDimension, setDimensionFromSpacing, and setDimensionFromDistribution.
CalculateDimensionSpacingThis attribute is the default average spacing between successive grid points.
DistributionInfluenceThis default is a flag to allow the distribution of a connector to effect the dimension of the connector.
NormalMaximumDeviationThis default is the maximum turning angle allowed between successive grid points.
CurveMaximumDeviationThis attribute is the maximum distance allowed between the analytic and discrete shape of a connector.
SurfaceCurvatureInfluenceThis default is a flag that allows the underlying surface of a connector to affect the NormalMaximumDeviation and CurveMaximumDeviation constraints.
Instance Actions
deleteThis action delete this connector.
calculateDimensionThis action sets the dimension of this connector using its current solver settings.
getDimensionThis action gets the dimensions of this connector.
getDimensionsThis action gets the dimensions of this connector.
setDimensionThis action sets the dimension of this connector.
setDimensionFromSpacingThis action sets the dimension of this connector based on equal spacing.
setDimensionFromDistributionThis action sets the dimension of this connector based on the current distribution.
setSubConnectorDimensionFromDistributionThis action sets the dimension of a subconnector in this connector based on the current distribution of the subconnector.
setDimensionFromSubConnectorsThis action sets the dimension of this connector by copying the dimension from a list of subconnectors.
increaseDimensionThis action increases the dimension of this connector.
getSegmentCountThis action gets the number of segments in this connector.
getSegmentThis action gets the segment at the given index.
getSegmentsThis action gets the list of segments.
setSegmentThis action sets the segment at the given index.
addSegmentThis action adds the segment to the end of the segments in the connector.
insertSegmentThis action inserts the segment at the given index.
removeSegmentThis action removes a segment from the connector.
removeAllSegmentsThis action removes all of the segments from the connector.
replaceAllSegmentsThis action replaces all of the segments in the connector.
getSubConnectorCountThis action gets the number of subconnectors in this connector.
getSubConnectorDimensionThis action gets the dimension of a subconnector in this connector.
setSubConnectorDimensionThis action sets the dimensions of each subconnector in this connector.
getSubConnectorRangeThis action gets the minimum and maximum grid point indices of a subconnector.
getSubConnectorRangesThis action gets the minimum and maximum grid point indices of all subconnectors.
getDistributionThis action gets the distribution function of a subconnector.
setDistributionThis action sets the distribution function of a subconnector.
replaceDistributionThis action replaces the distribution function of a subconnector, retaining the previously set spacings.
lockDistributionThis action locks the distribution of a subconnector.
resetGeneralDistributionsThis action switches all of the subconnector distributions that are of type pw::DistributionGeneral to use the current default distribution.
getBreakPointThis action gets the parameter of the break point at the end of the subconnector with the given index.
getBreakPointsThis action gets the parameters of the break points at the end of the subconnectors.
getBreakPointTypeThis action gets the type of break point at the end of the subconnector.
getBreakPointTypesThis action gets the type at each break point at the end of the subconnectors.
addBreakPointThis action adds one or more break points to the list of break points.
removeBreakPointThis action removes the break point from the connector at the end of the subconnector with the given index.
removeAllBreakPointsThis action removes all of the break points from the connector.
checkBreakPointThis action checks if a break point can be added at a given location.
setBreakPointSpacingThis action sets the spacing on both sides of a break point.
splineThis action sets the shape of this connector to a smooth interpolation of the grid points of the given connector.
fitLSQThis action sets the shape of this connector to a least squares fit approximation of the grid points of the given connector.
smoothC1This action sets the shape of this connector to a C1 continuous approximation of the shape of the given connector.
splitThis action splits this connector at the given index or point.
joinThis action joins this connector with a given connector.
projectThis action projects this connector onto one or more database entities.
getDefaultProjectDirectionThis action gets the default projection direction for this connector.
setOrientationThis action sets the orientation of this connector, by specifying the new imin node.
alignOrientationThis action aligns the I orientation of the given connectors with this connector.
createPeriodicThis action creates a periodic copy of this connector.
getPeriodicThis action gets the connector that shares a periodic link with this connector.
breakPeriodicThis action breaks the periodic link that this connector has with another connector.
getPointThis action gets the position of a connector grid point.
getPointsThis action gets all the connector grid points.
setPointThis action sets the position of a connector interior grid point.
getPositionThis action gets a position on a connector in the defining space of the connector.
getXYZThis action gets the model space position on a connector.
getParameterThis action gets a parameter value on a connector.
getRadiusOfCurvatureThis action returns the radius of curvature at the specified position on the connector.
getTangentThis action gets the tangency vector on a connector.
getGeometricPropertiesThis action calculates the geometric properties at the specified position on the connector.
getTransverseAngleThis 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.
getLengthThis action gets the connector length from the beginning to a given location.
getParametersThis action gets the parameters at which the curve intersects the value.
getTotalLengthThis action gets the total length of the connector.
getAssembleToleranceThis action returns the maximum tolerance used to close the model along the connector.
getAverageSpacingThis action gets the average spacing between grid points of the connector.
closestPointThis action gets the closest point on this connector to the given point.
closestControlPointThis action gets the control point on this connector closest to the given point.
getControlPointCountThis action gets the number of control points on this connector.
removeInteriorControlPointsThis action removes the interior control points of each segment of this connector.
getNodeThis action gets a node from a connector.
isClosedThis action checks if the connector is closed.
isPoleThis action checks if the connector is a pole.
checkDistributionValidityThis action checks if the connector’s distributions on all of its subconnectors could be applied as requested.
isInteriorIndexThis action checks to see if an index corresponds to a point in the interior of the connector.
getAdjacentIndicesThis action returns the indices that are directly connected to the specified index.
getCellCountThis action gets the number of 1D cells in this connector.
getCellThis action gets the indices of the given 1D cell.
getCellsThis action gets the indices of all the 1D cells.
applyTRexThis action will create (if not specified) and apply a T-Rex boundary condition to the unstructured domains that use this connector.

Static Actions

create

pw::Connector create

This action creates a new connector object.

Parameters

This action has no parameters.

Returns

This action returns a new pw::Connector object.

See Also

createFromPoints, createOnDatabase, createPeriodic

Example

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.

createOnDatabase

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.

Parameters

-merge toleranceThis optional parameter is the float tolerance for automatic connector merging in the range [0, infinity).  The default is 0 (no merging).
-splitConnectors split_angleThis optional parameter is the float turning angle to split connectors at in the range [0, 180).  The default is 0 (no splitting).
-joinConnectors join_angleThis optional parameter is the float turning angle to join connectors at in the range [0, 180).  The default is 0 (no joining).
-parametricConnectors modeThis optional parameter is the string mode for how connectors are created on parametric surfaces with options < EndToEnd | Aligned >.  The default is EndToEnd.
-reject rejectVarThis 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 typeThis 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_listThis required parameter is a list of pw::DatabaseEntity objects and/or boundaries.

Returns

This action returns a list of new pw::Connector objects.

Information

This command supports progress updates.

See Also

create, createFromPoints, createPeriodic

Example

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]
}

createFromPoints

pw::Connector createFromPoints points

This action, given a list of XYZ vector values or database-constrained points, creates a new connector.

Parameters

pointsThis required parameter is the list of xyz vector values or database-constrained points.

Note

If the set of points defines an existing connector, no new connector will be created, and the existing connector will be returned instead.

Returns

This action returns the newly created pw::Connector (or the pre-existing connector if this would otherwise define a duplicate connector).

See Also

create, createOnDatabase, createPeriodic

Example

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

join (static)

pw::Connector join ?<-keepDistribution | -resetDistribution>? ?-deleteBreakPoints? ?-reject rejectVar? connectors

This action joins as many of the given connectors together as possible.

Parameters

-keepDistributionThis 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.
-resetDistributionThis 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.
-deleteBreakPointsThis 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 rejectVarThis optional parameter is the string name of a variable to receive a list of pw::Connector objects that were not joined.
connectorsThis required parameter is a list of pw::Connector objects to join.

Note

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.

Returns

This action returns a list of the pw::Connector objects that were joined.

Information

This command supports progress updates.

See Also

join

Example

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

getBestSegment

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.

Parameters

-start startVarThis optional parameter is the string name of a variable to receive the best start integer index or point.
-end endVarThis optional parameter is the string name of a variable to receive the best end integer index or point.
-projectToCommon projectToCommonVarThis optional parameter is the string name of a variable to receive the ProjectToCommon boolean state for the best segment.
start_pointsThis required parameter is a list of points for the start of the segment.
end_pointsThis required parameter is a list of points for the end of the segment.

Returns

This action returns a segment type string with options < SegmentCircle | SegmentConic | SegmentSpline | SegmentSurfaceSpline | SegmentTrim >.

Example

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

getConnectorsFromNode

pw::Connector getConnectorsFromNode node

This action gets a list of all connectors using the specified node.

Parameters

nodeThis required parameter is a pw::Node object.

Returns

This action returns a list of pw::Connector objects.

Example

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

getConnectorsFromSpacing

pw::Connector getConnectorsFromSpacing ?-details? ?-global? spacing

This action gets a list of all connectors using the specified spacing object.

Parameters

-detailsThis 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.
-globalThis 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.
spacingThis required parameter is a pw::Spacing object or a named spacing value.

Returns

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.

See Also

pw::SpacingExplicit.create, pw::Spacing.createNamedValue, pw::Framework

Example

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

getAdjacentConnectors

pw::Connector getAdjacentConnectors ?-maximumAngle angle? ?-all? connectors

This action finds the connectors adjacent to the given list of connectors.

Parameters

-maximumAngle angleThis 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.
-allThis optional flag is notification to repeat search on the adjacent connectors found until there are no more adjacent connectors.
connectorsThis required parameter is a list of pw::Connector objects to be used as the seed.

Returns

This action returns a list of adjacent pw::Connector objects.

Information

The returned list will not include any connectors specified in the original connectors list.

Example

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

getConnectorsInPlane

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.

Parameters

-tolerance tolThis 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.
-laminaThis 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.
-loopsThis optional flag will restrict the connectors returned to be those in complete loops that lie in the given plane.
-secondary planeThis optional parameter is a second plane to look for connectors in.
planeThis required parameter is a plane to look for connectors in.
entitiesThis required parameter is a list of pw::GridEntity objects (connectors, domains, or blocks) from which to find the connectors in the plane.

Returns

This action returns a list of pw::Connector object.

doConnectorsGetDimension

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.

Parameters

This action has no parameters.

Returns

This action returns a boolean.

See Also

calculateDimension, Dimension (Default)

Example

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

getInvalidDistributions

pw::Connector getInvalidDistributions ?-all?

This action finds connectors that have invalid distributions.

Parameters

-allThis 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.

Returns

This action returns a list of pw::Connector with invalid distributions.

Information

Connector distributions are not validated until the connector is queried for data.

Example

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)

setDimensionFromSizeField

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.

Parameters

-include entsThis 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 entsThis optional parameter is a list of pw::SourceEntity objects to exclude from the automatically included in the size field.
-ignoreAllThis optional flag specifies that the size field should ignore all automatically included source entities from the size field.
-matchDimensionsThis 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 spacingThis 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 decayThis 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 methodThis 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.
-refineOnlyThis optional flag specifies that the current dimension and distribution should be used to limit coarsening of the connector spacing.
connectorsThis required parameter is a list of pw::Connector objects to set the dimension and distribution based on the size field.

Returns

This action returns nothing.

See Also

setDimension, calculateDimension, increaseDimension, setDimensionFromSpacing, setDimensionFromDistribution, setDimensionFromSubConnectors

synchronizeSpacings

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.

Parameters

-minimumThis optional flag specifies that spacing constraints will be synchronized to the minimum spacing constraint.  This is the default.
-maximumThis optional flag specifies that spacing constraints will be synchronized to the maximum spacing constraint.
-averageThis optional flag specifies that spacing constraints will be synchronized to the average spacing constraint.
-growthRate rateThis 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 domainsVarThis optional parameter is the string name of the variable that receives a list of pw::DomainStructured that were left undefined after synchronization.
-useTRexSpacingsThis optional flag specifies that the T-Rex Spacings will be used in determining the spacing constraint.
-keepDimensionAndDistributionThis optional flag specifies that the original connector dimension and distribution will be preserved.  Only spacing constraints will be modified.
-returnDuplicatesThis 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.

Information

This command supports progress updates.

Returns

This action returns the list of pw::Connector objects that were synchronized.

applyTRex (static)

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.

Parameters

-refineThis optional parameter specifies that the collection of unstructured domains that had the T-Rex bcs applied will be refined.
-wall bc1This optional parameter specifies the Wall pw::TRexCondition to apply.  Cannot be used simultaneously with -angle, -aspectratio or -maxaspectratio.
-angle bc1This optional parameter specifies the Angle pw::TRexCondition to apply.  Cannot be used simultaneously with -wall, -aspectratio or -maxaspectratio.
-aspectratio bc1This optional parameter specifies the AspectRatio pw::TRexCondition to apply.  Cannot be used simultaneously with -wall, -angle or -maxaspectratio.
-maxaspectratio bc1This optional parameter specifies the MaximumAspectRatio pw::TRexCondition to apply.  Cannot be used simultaneously with -wall, -angle or -aspectratio.
-adjacent bc2This optional parameter specifies the AdjacentGrid pw::TRexCondition to apply.
-unused connectorVarThis optional parameter is the string name of the variable that receives a list of pw::Connector objects that were unused.
-domains domainsVarThis 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.
connectorsThis required parameter is the list of pw::Connector objects for which T-Rex boundary conditions will be applied to associated pw::DomainUnstructured objects.

Information

This command supports progress updates.

Returns

List of T-Rex boundary conditions that have been created and assigned.

See Also

pw::TRexCondition, pw::TRexCondition.ConditionType, applyTRex

swapDistribution

pw::Connector swapDistribution distribution_type subcon_list

This action replaces the distribution function of a list of subconnectors, retaining the previously set spacings.

Parameters

distribution_typeThis required parameter specifies the string type of distribution to use with options < Automatic | General | Geometric | Growth | MRQS | Shape | Tanh >.
subcon_listThis 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).

Returns

This action returns nothing.

See Also

getDistribution, setDistribution, replaceDistribution, pw::Distribution

Example

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)]]

Static Defaults

Dimension (Default)

pw::Connector get/setDefault Dimension dim

This default is the dimension of a connector when it is created.

Type

An integer with the value zero or in the range [2, infinity).  Zero is no dimension.

Default

The default value is 0.

Example

This example shows how to set and get the default dimension for connectors created within a script.

Code

pw::Connector setDefault Dimension 20
puts [pw::Connector getDefault Dimension]

Output

20

DistributionType (Default)

pw::Connector get/setDefault DistributionType distribution_type

This default is the distribution of a subconnector when it is created.

Type

This default is a string with options < Tanh | MRQS | Geometric | Shape | Growth | Automatic >.

Default

The default value is Tanh.

Example

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

BeginSpacing (Default)

pw::Connector get/setDefault BeginSpacing spacing

This default is the beginning spacing of a subconnector when it is created.

Type

A float in the range [0.0, infinity).

Default

The default value is 0.0.

See Also

pw::Distribution.setBeginSpacing

Example

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

EndSpacing (Default)

pw::Connector get/setDefault EndSpacing spacing

This default is the ending spacing of a subconnector when it is created.

Type

A float in the range [0.0, infinity).

Default

The default value is 0.0.

See Also

pw::Distribution.setEndSpacing

Example

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

Static Attributes

CalculateDimensionMethod

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.

Type

A string with options < Explicit | Spacing >.

Default

The default for this attribute is Explicit.

Information

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.

See Also

create, createFromPoints, createPeriodic, createOnDatabase, CalculateDimensionSpacing

Example

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

CalculateDimensionMaximum

pw::Connector get/setCalculateDimensionMaximum dimension

This attribute is the maximum dimension calculated for a connector when using the commands calculateDimension, setDimensionFromSpacing, and setDimensionFromDistribution.

Type

This attribute is an integer in the range [2, infinity).

Default

The default for this attribute is 1024.

Example

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

CalculateDimensionSpacing

pw::Connector get/setCalculateDimensionSpacing spacing

This attribute is the default average spacing between successive grid points.

Type

A float in the range [0.0, infinity).

Default

The default for this attribute is 0.0.

Information

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.

See Also

CalculateDimensionMethod, setDimension

Example

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

See Also

calculateDimension

DistributionInfluence

pw::Connector get/setDistributionInfluence influence

This default is a flag to allow the distribution of a connector to effect the dimension of the connector.

Type

A boolean where true indicates that a pw::DistributionShape distribution will influence the connector dimension.

Default

The default for this attribute is false.

Information

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.

Example

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

See Also

calculateDimension, pw::DistributionShape

NormalMaximumDeviation

pw::Connector get/setNormalMaximumDeviation angle

This default is the maximum turning angle allowed between successive grid points.

Type

A float in the range [0.0, 180.0).  0.0 disables the effect of normal maximum deviation.

Default

The default for this attribute is 0.0.

Information

This value is used to calculate the dimension and distribution of a connector when calculateDimension is called.

Example

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

See Also

calculateDimension

CurveMaximumDeviation

pw::Connector get/setCurveMaximumDeviation distance

This attribute is the maximum distance allowed between the analytic and discrete shape of a connector.

Type

This attribute is a float in the range [0, infinity).  0 is disabled

Default

The default for this attribute is 0.

Information

This value is used to calculate the dimension and distribution of a connector when calculateDimension is called.

Example

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

See Also

calculateDimension

SurfaceCurvatureInfluence

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.

Type

A boolean where true indicates that the connector dimension will be influenced by a constraining pw::Surface.

Default

The default for this attribute is false.

Information

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.

Example

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

See Also

calculateDimension

Instance Actions

delete

$con delete ?-force?

This action delete this connector.

Parameters

-forceThis optional flag is a notification that the entity will be deleted as well as higher level entities that depend on this entity.

Returns

This action returns nothing.

See Also

pw::Entity.delete

Example

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

calculateDimension

$con calculateDimension

This action sets the dimension of this connector using its current solver settings.

Parameters

This action has no parameters.

Returns

This action returns nothing.

Information

The dimension is calculated using the following steps:

1If 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.
2If the CalculateDimensionSpacing value is greater than 0, the dimension is set so that the difference between grid points is not greater than this value.
3If the DistributionInfluence flag is true, the dimension is increased based on the constraints of the connectors current distribution object.
4If the NormalMaximumDeviation value is greater than 0, the dimension is increased, and distribution altered, in order to meet this constraint.
5If 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.

Example

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

getDimension

$con getDimension

This action gets the dimensions of this connector.

Parameters

This action has no parameters.

Returns

This action returns the integer number of grid points.  A non-dimensioned connector will return 0.

See Also

getDimensions

Example

This example shows how to get the dimension of a connector.  $con(1) is referencing an existing connector.

Code

$con(1) getDimension

Output

9

getDimensions

$con getDimensions

This action gets the dimensions of this connector.

Parameters

This action has no parameters.

Returns

This action returns the integer number of grid points.  A non-dimensioned connector will return 0.

Information

This action is an alias for the getDimension action.  This action provides an interface consistent with the block, domain and node getDimensions actions.

See Also

getDimension, setDimension

Example

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

setDimension

$con setDimension dim

This action sets the dimension of this connector.

Parameters

-resetDistributionThis optional flag, if present, will clear a general distribution function if set on this connector.
dimThis 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.

Returns

This action returns the resulting integer dimension.

See Also

getDimension, calculateDimension, increaseDimension, setDimensionFromSizeField, setDimensionFromSpacing, setDimensionFromDistribution, setDimensionFromSubConnectors

Example

This example shows how to set the dimension of a connector explicitly.  $con(1) is referencing an existing connector.

Code

$con(1) setDimension 40

setDimensionFromSpacing

$con setDimensionFromSpacing spacing

This action sets the dimension of this connector based on equal spacing.

Parameters

-resetDistributionThis optional flag, if present, will clear a general distribution function if set on this connector.
spacingThis required parameter is the float average spacing between grid points in the range (0.0, infinity).

Returns

This action returns the computed integer dimension.

Information

The dimension is limited by the CalculateDimensionMaximum attribute.

See Also

setDimension, getDimension, calculateDimension, increaseDimension, setDimensionFromSizeField, setDimensionFromDistribution, setDimensionFromSubConnectors

Example

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

setDimensionFromDistribution

$con setDimensionFromDistribution

This action sets the dimension of this connector based on the current distribution.

Parameters

This action has no parameters.

Returns

This action returns the computed integer dimension.

Information

The dimension is limited by the CalculateDimensionMaximum attribute.

Example

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

setSubConnectorDimensionFromDistribution

$con setSubConnectorDimensionFromDistribution index

This action sets the dimension of a subconnector in this connector based on the current distribution of the subconnector.

Parameters

indexThis required parameter is the integer index of the subconnector to set the dimension of in the range [1, number of subconnectors].

Returns

This action returns the computed integer dimension of the subconnector.

Information

The dimension is limited by the CalculateDimensionMaximum attribute.

See Also

setDimension, calculateDimension, increaseDimension, setDimensionFromSizeField, setDimensionFromSpacing, setDimensionFromSubConnectors

Example

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

setDimensionFromSubConnectors

$con setDimensionFromSubConnectors subcon_list

This action sets the dimension of this connector by copying the dimension from a list of subconnectors.

Parameters

-resetDistributionThis optional flag, if present, will clear a general distribution function if set on this connector.
subcon_listThis 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.

Returns

This action returns the computed integer dimension.

See Also

setDimension, calculateDimension, increaseDimension, setDimensionFromSizeField, setDimensionFromSpacing, setDimensionFromDistribution

Example

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]

increaseDimension

$con increaseDimension ?-maximumLevel value? ?-maximumSpacing value? ?-minimumSpacing value? ?-surface? angle distance

This action increases the dimension of this connector.

Parameters

-maximumLevel valueThis optional parameter allows specification of the integer maximum interval sub-division level allowed.
-maximumSpacing valueThis optional parameter allows specification of the float target maximum spacing.
-minimumSpacing valueThis optional parameter allows specification of the target minimum spacing.
-surfaceThis optional flag is notification that the curvature of any underlying surfaces will be taken into account.
angleThis required parameter is the float maximum normal deviation angle between grid points.  If 0.0, this criteria is ignored.
distanceThis required parameter is the float maximum curve deviation distance between the grid and the analytical curve.  If 0.0, this criteria is ignored.

Returns

This action returns the new dimension.

Information

In order to meet the connectors curvature criteria, changing the dimension may alter the connector’s distribution.

See Also

setDimension, calculateDimension, setDimensionFromSizeField, setDimensionFromSpacing, setDimensionFromDistribution, setDimensionFromSubConnectors

Example

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

getSegmentCount

$con getSegmentCount

This action gets the number of segments in this connector.

Parameters

This action has no parameters.

Returns

This action returns the integer number of segments.

Example

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

getSegment

$con getSegment ?-copy? index

This action gets the segment at the given index.

Parameters

-copyThis optional flag is a notification that a copy of the segment is returned.
indexThis required parameter is the integer index of the segment to get in the range [1, number of segments].

Returns

This action returns a pw::Segment object.

See Also

setSegment, getSegmentCount, getSegments, pw::Segment

Example

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.

getSegments

$con getSegments ?-copy?

This action gets the list of segments.

Parameters

-copyThis optional flag is a notification that a copy of the segments are returned.

Returns

This action returns a pw::Segment object list.

See Also

pw::Segment, getSegmentCount, getSegment

Example

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.

setSegment

$con setSegment index segment

This action sets the segment at the given index.

Parameters

indexThis required parameter is the integer index of the segment to set in the range [1, number of segments].
segmentThis required parameter is the pw::Segment object to set.

Returns

This action returns nothing.

See Also

addSegment, insertSegment, removeSegment, getSegment, pw::Segment

Example

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)

addSegment

$con addSegment segment

This action adds the segment to the end of the segments in the connector.

Parameters

segmentThis required parameter is the pw::Segment object to add.

Returns

This action returns nothing.

Information

An error will be raised if the segment already belongs to another connector.

See Also

setSegment, insertSegment, removeSegment, pw::Segment

Example

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)

insertSegment

$con insertSegment index segment

This action inserts the segment at the given index.

Parameters

indexThis required parameter is the integer index to insert the given segment at in the range [1, number of segments+1].
segmentThis required parameter is the pw::Segment object to insert.

Returns

This action returns nothing.

Information

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.

See Also

addSegment, setSegment, removeSegment, pw::Segment

Example

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)

removeSegment

$con removeSegment < index | segment >

This action removes a segment from the connector.

Parameters

indexThis optional parameter is the integer index of the segment to remove in the range [1, number of segments].
segmentThis optional parameter is the pw::Segment object to remove.

Information

Either index or segment must be specified.

Returns

This action returns nothing.

See Also

removeAllSegments, getSegment, getSegments, addSegment, setSegment, insertSegment, pw::Segment

Example

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

removeAllSegments

$con removeAllSegments

This action removes all of the segments from the connector.

Parameters

This action has no parameters.

Returns

This action returns nothing.

See Also

removeSegment

Example

This example shows how to remove all segments from a connector.  $con(1) is referencing an existing connector.

Code

$con(1) removeAllSegments

replaceAllSegments

$con replaceAllSegments segments

This action replaces all of the segments in the connector.

Parameters

segmentsThis required parameter is a list of pw::Segment objects that will be the new segments of this connector.

Returns

This action returns nothing.

See Also

addSegment, setSegment, insertSegment, removeSegment, removeAllSegments, pw::Segment

Example

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)]

getSubConnectorCount

$con getSubConnectorCount

This action gets the number of subconnectors in this connector.

Parameters

This action has no parameters.

Returns

This action returns the integer number of subconnectors.

Example

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
}

getSubConnectorDimension

$con getSubConnectorDimension ?index?

This action gets the dimension of a subconnector in this connector.

Parameters

indexThis 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.

Returns

This action returns the integer dimension of the subconnector, or if no index is specified, a list of integer dimensions for each subconnector.

See Also

setSubConnectorDimension

Example

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

setSubConnectorDimension

$con setSubConnectorDimension dims

This action sets the dimensions of each subconnector in this connector.

Parameters

dimsThis required parameter is a list of integer dimensions for each subconnector.  These must be compatible with the overall dimension of the connector.

Returns

This action returns nothing.

See Also

getSubConnectorDimension

Example

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]

getSubConnectorRange

$con getSubConnectorRange index

This action gets the minimum and maximum grid point indices of a subconnector.

Parameters

indexThis required parameter is the integer index of the subconnector to get the range of in the range [1, number of subconnectors].

Returns

This action is a list containing the first and last grid point integer indices in the subconnector.

See Also

getSubConnectorRanges, setSubConnectorDimension, getSubConnectorDimension

Example

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

getSubConnectorRanges

$con getSubConnectorRanges

This action gets the minimum and maximum grid point indices of all subconnectors.

Parameters

This action has no parameters.

Returns

This action is a list containing the first and last grid point integer indices for all the subconnectors.

See Also

getSubConnectorRange, setSubConnectorDimension, getSubConnectorDimension

Example

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

getDistribution

$con getDistribution ?-copy? index

This action gets the distribution function of a subconnector.

Parameters

-copyThis optional flag is a notification that a copy of the distribution is returned.
indexThis required parameter is the integer index of the subconnector to get the distribution function of with the range [1, number of subconnectors].

Returns

This action returns a pw::Distribution object.

See Also

setDistribution, pw::Distribution

Example

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

setDistribution

$con setDistribution ?-lockEnds? index distribution

This action sets the distribution function of a subconnector.

Parameters

-lockEndsThis 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.
indexThis required parameter is the integer index of the subconnector to set the distribution function of with the range [1, number of subconnectors].
distributionThis required parameter is the pw::Distribution object to set.

Returns

This action returns nothing.

See Also

getDistribution, replaceDistribution, pw::Distribution

Example

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]

replaceDistribution

$con replaceDistribution index distribution

This action replaces the distribution function of a subconnector, retaining the previously set spacings.

Parameters

indexThis required parameter is the integer index of the subconnector to set the distribution function of in the range [1, number of subconnectors].
distributionThis required parameter is the pw::Distribution object to set.

Returns

This action returns nothing.

See Also

setDistribution, getDistribution, pw::Distribution

Example

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]

lockDistribution

$con lockDistribution index

This action locks the distribution of a subconnector.

Parameters

indexThis required parameter is the integer index of the subconnector to lock in the range [1, number of subconnectors].

Returns

This action returns nothing.

Information

Locking is done by converting the current distribution to a pw::DistributionGeneral object using the current dimension and distribution.

See Also

setDistribution, getDistribution, pw::DistributionGeneral

Example

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

resetGeneralDistributions

$con resetGeneralDistributions

This action switches all of the subconnector distributions that are of type pw::DistributionGeneral to use the current default distribution.

Parameters

This action has no parameters.

Returns

This action returns nothing.

See Also

setDistribution, pw::DistributionGeneral

Example

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

getBreakPoint

$con getBreakPoint index

This action gets the parameter of the break point at the end of the subconnector with the given index.

Parameters

indexThis required parameter is the integer index of the break point to get in the range [1, number of subconnectors-1].

Returns

This action returns the float parameter of the break point in the range [0.0, 1.0].

See Also

getBreakPoints, getSubConnectorCount, getSubConnectorDimension, getParameter

Example

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

getBreakPoints

$con getBreakPoints

This action gets the parameters of the break points at the end of the subconnectors.

Parameters

This action has no parameters.

Returns

This action returns the float parameter list of the break points in the range [0.0, 1.0].

See Also

getBreakPoint, getBreakPointType, getSubConnectorCount

Example

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

getBreakPointType

$con getBreakPointType index

This action gets the type of break point at the end of the subconnector.

Parameters

indexThis required parameter is the integer index of the break point to get in the range [1, number of subconnectors-1].

Returns

This action returns the string breakpoint type with options < Control | Arc >.

See Also

getBreakPointTypes, getSubConnectorCount

Example

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

getBreakPointTypes

$con getBreakPointTypes

This action gets the type at each break point at the end of the subconnectors.

Parameters

This action has no parameters.

Returns

This action returns a string list of breakpoint types with options < Control | Arc >.

See Also

getBreakPointType, getSubConnectorCount

Example

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

addBreakPoint

$con addBreakPoint ?< -control | -arc | -X | -Y | -Z | -U | -V >? value

This action adds one or more break points to the list of break points.

Parameters

-arcThis 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.
-controlThis 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).
-XThis 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.
-YThis 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.
-ZThis 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.
-UThis 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).
-VThis 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).
valueThis required parameter is the float or integer value to position the break point.

Information

Only one of -arc, -control, -X, -Y, -Z, -U or -V flags is allowed.

Returns

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.

See Also

removeBreakPoint, removeAllBreakPoints

Example

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

removeBreakPoint

$con removeBreakPoint index

This action removes the break point from the connector at the end of the subconnector with the given index.

Parameters

indexThis required parameter is the integer index of the break point to remove with the [1, number of subconnectors-1].

Returns

This action returns nothing.

See Also

addBreakPoint, removeAllBreakPoints

Example

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

removeAllBreakPoints

$con removeAllBreakPoints

This action removes all of the break points from the connector.

Parameters

This action has no parameters.

Returns

This action returns nothing.

See Also

addBreakPoint, removeBreakPoint, getSubConnectorCount

Example

This example shows how to remove all the break points from a connector.  $con(1) is referencing an existing connector.

Code

$con(1) removeAllBreakPoints

checkBreakPoint

$con checkBreakPoint ?< -control | -arc >? value

This action checks if a break point can be added at a given location.

Parameters

-controlThis 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).
-arcThis 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.
valueThis required parameter is the integer or float value to check the break point.

Returns

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.

See Also

addBreakPoint

Example

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

setBreakPointSpacing

$con setBreakPointSpacing index < spacing | value | name >

This action sets the spacing on both sides of a break point.

Parameters

indexThis required parameter is the integer index of the break point to set the spacing of in the range [1, number of subconnectors).
spacingThis optional parameter is the pw::Spacing object.
valueThis 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).
nameThis optional parameter is the name of a spacing object created with pw::Spacing.createNamedValue.

Returns

This action returns nothing.

See Also

addBreakPoint, pw::Spacing, pw::SpacingExplicit

Information

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.

Example

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
}

spline

$con spline ?connector?

This action sets the shape of this connector to a smooth interpolation of the grid points of the given connector.

Parameters

connectorThis 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.

Returns

This action returns nothing.

Information

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.

See Also

fitLSQ, smoothC1

Example

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)

fitLSQ

$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.

Parameters

-tolerance tolThis optional parameter is the float approximation tolerance in the range [0, infinity).  The default is the current tolerance returned from pw::Database.getFitTolerance.
connectorThis 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.

Returns

This action returns nothing.

Information

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.

See Also

spline, smoothC1

Example

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

smoothC1

$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.

Parameters

-tolerance tolThis optional parameter is the float approximation tolerance in the range [0.0, infinity).  The default is the current tolerance returned from pw::Database.getFitTolerance.
connectorThis 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.

Returns

This action returns nothing.

Information

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.

See Also

spline, fitLSQ

Example

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)

split

$con split < -I index_list | param_list >

This action splits this connector at the given index or point.

Parameters

-I index_listThis optional parameter is the list of integer grid point indices to split at in the range [1, number of grid points].
param_listThis 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.

Returns

This action returns a list of pw::Connector objects.

Information

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.

Example

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

join

$con join ?<-keepDistribution | -resetDistribution>? ?-deleteBreakPoints? connector ?side?

This action joins this connector with a given connector.

Parameters

-keepDistributionThis 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.
-resetDistributionThis 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.
-deleteBreakPointsThis 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.
connectorThis required parameter is the pw::Connector object to join.
sideThis optional parameter is the side of this connector to join with options < Any | Begin | End >.

Note

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.

Returns

This action returns nothing.

See Also

join (static)

Example

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)

project

$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.

Parameters

-type proj_typeThis optional parameter is the string projection type to perform with options < ClosestPoint | Linear | SphericalIn | SphericalOut | CylindricalIn | CylindricalOut >.
-direction directionThis optional parameter is the projection vector for linear projection.  The default is determined by the entity and can be queried using getDefaultProjectDirection.
-center centerThis optional parameter is the center point vector for spherical projection.  The default is (0, 0, 0).
-axis point normalThis 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 toleranceThis 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)
-interiorIf this optional flag is present, only the interior of the entities are projected.  If this is specified, -shape cannot be specified.
-shapeIf 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.
dbentitiesThis 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.

Returns

This action returns nothing.

Example

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"

getDefaultProjectDirection

$con getDefaultProjectDirection

This action gets the default projection direction for this connector.

Parameters

This action has no parameters.

Returns

This action returns a direction vector.

Example

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

setOrientation

$con setOrientation imin_node

This action sets the orientation of this connector, by specifying the new imin node.

Parameters

imin_nodeThis 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.

Returns

This action returns nothing.

Information

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.

Example

This example shows how to set the connector orientation.  $con(1) is referencing an existing connector.

Code

$con(1) setOrientation 2

alignOrientation

$con alignOrientation connectors

This action aligns the I orientation of the given connectors with this connector.

Parameters

connectorsThis required parameter is a list of topologically connected pw::Connector objects to align.

Returns

This action returns nothing.

Information

Any connectors in the given list that are not topologically connected to this connector will be ignored.

Example

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)]

createPeriodic

$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.

Parameters

-translate vectorThis 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 angleThis 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.

Information

One of -translate or -rotate must be specified.

Returns

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.

See Also

getPeriodic, breakPeriodic, create, createFromPoints, createOnDatabase

Example

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

getPeriodic

$con getPeriodic ?-transform matrixVar?

This action gets the connector that shares a periodic link with this connector.

Parameters

-transform matrixVarThis optional parameter is the string name of the variable that receives a transform matrix for the periodic connector.

Returns

This action returns a pw::Connector object if there is a periodic link, or an empty string if there is no periodic link.

See Also

createPeriodic, breakPeriodic, pwu::Transform

Example

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

breakPeriodic

$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.

Parameters

This action has no parameters.

Returns

This action returns nothing.

See Also

createPeriodic, getPeriodic

Example

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

getPoint

$con getPoint ?-constrained constrainedVar? index

This action gets the position of a connector grid point.

Parameters

indexThis required parameter is the integer index of the grid point to get in the range [1, dimension].
-constrained constrainedVarThis 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.

Returns

This action returns a point giving the grid point position and this may be in the form “u v dbentity”.

See Also

setPoint, getPoints

Example

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

getPoints

$con getPoints

This action gets all the connector grid points.

Parameters

This action has no parameters.

Returns

This action returns a point list giving the grid point position and this may be in the form “u v dbentity”.

See Also

getPoint

Example

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

setPoint

$con setPoint index point

This action sets the position of a connector interior grid point.

Parameters

indexThis 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.
pointThis required parameter is the new point value of the grid point.

Returns

This action returns nothing.

See Also

getPoint

Information

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.

Example

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"

getPosition

$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.

Parameters

-gridThis 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.
-controlThis 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].
-parameterThis 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.
-arcThis 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].
-XThis optional flag is the notification to get the position at a constant X.  The value is a float constant X coordinate value.
-YThis optional flag is the notification to get the position at a constant Y.  The value is a float constant Y coordinate value.
-ZThis optional flag is the notification to get the position at a constant Z.  The value is a float constant Z coordinate value.
-closestThis optional flag is the notification to get the closest position.  The value is a point, or grid coord.
valueThis required parameter is the float or integer value to get the position.

Returns

This action returns a point giving the position on the connector which may be in the form “u v dbentity”.

Information

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.

See Also

getParameter, getXYZ

Example

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)

getXYZ

$con getXYZ ?< -grid | -control | -parameter | -arc | -X | -Y | -Z | -closest >? value

This action gets the model space position on a connector.

Parameters

-gridThis 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.
-controlThis 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].
-parameterThis 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.
-arcThis 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].
-XThis optional flag is the notification to get the position at a constant X.  The value is a float constant X coordinate value.
-YThis optional flag is the notification to get the position at a constant Y.  The value is a float constant Y coordinate value.
-ZThis optional flag is the notification to get the position at a constant Z.  The value is a float constant Z coordinate value.
-closestThis optional flag is the notification to get the closest position.  The value is a point or grid coord.
valueThis required parameter is the value to get the coordinate.

Returns

This action returns an XYZ vector.

See Also

getParameter, getPosition

Example

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

getParameter

$con getParameter ?< -grid | -control | -parameter | -arc | -X | -Y | -Z | -closest >? value

This action gets a parameter value on a connector.

Parameters

-gridThis 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.
-controlThis 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].
-parameterThis 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.
-arcThis 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].
-XThis optional flag is the notification to get the position at a constant X.  The value is a float constant X coordinate value.
-YThis optional flag is the notification to get the position at a constant Y.  The value is a float constant Y coordinate value.
-ZThis optional flag is the notification to get the position at a constant Z.  The value is a float constant Z coordinate value.
-closestThis optional flag is the notification to get the closest position.  The value is a point or grid coord.
valueThis required parameter is the integer or float value to get the parameter.

Returns

This action returns the float parameter of the connector.

Information

The -parameter value option only returns the given value clamped to [0.0, 1.0].  It is included for consistency with other commands.

See Also

getParameter, getXYZ

Example

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

getRadiusOfCurvature

$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.

Parameters

-surfaceThis 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.
-gridThis 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.
-controlThis 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].
-parameterThis 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.
-arcThis 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].
-XThis optional flag is the notification to get the radius of curvature at a constant X.  The value is a float constant X coordinate value.
-YThis optional flag is the notification to get the radius of curvature at a constant Y.  The value is a float constant Y coordinate value.
-ZThis optional flag is the notification to get the radius of curvature at a constant Z.  The value is a float constant Z coordinate value.
-closestThis optional flag is the notification to get radius of curvature at the closest position; the value is a point or grid coord.
valueThis required parameter is the integer or float position value.

Returns

This action returns a float radius of curvature.

Information

If there is no curvature, a radius of zero will be returned.

See Also

getTangent, getTransverseAngle

getTangent

$con getTangent ?< -grid | -control | -parameter | -arc | -X | -Y | -Z | -closest >? value

This action gets the tangency vector on a connector.

Parameters

-gridThis 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.
-controlThis 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].
-parameterThis 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.
-arcThis 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].
-XThis 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.
-YThis 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.
-ZThis 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.
-closestThis 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.
valueThis required parameter is the integer or float value at which to get the tangency vector.

Returns

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.

See Also

pw::Curve.getGeometricProperties, pw::Curve.getTangent, getRadiusOfCurvature, getTransverseAngle

getGeometricProperties

$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.

Parameters

-curve curveVarThis 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 surfaceVarThis 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 directionalVarThis 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 orthogonalVarThis 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.
-gridThis 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.
-controlThis 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].
-parameterThis 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.
-arcThis 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].
-XThis optional flag is the notification to get the geometric properties at a constant X.  The value is a float constant X Cartesian coordinate value.
-YThis optional flag is the notification to get the geometric properties at a constant Y.  The value is a float constant Y Cartesian coordinate value.
-ZThis optional flag is the notification to get the geometric properties at a constant Z.  The value is a float constant Z Cartesian coordinate value.
-closestThis optional flag is the notification to get geometric properties at the closest position.  The value is a point or grid coord.
valueThis required parameter is the integer or float position value.

Returns

This action returns nothing.

Curve-based Geometry Properties Array

This array is divided into the following elements.

PointThis element is the vector location of the connector that these geometric properties are for.
UVThis is the vector non-normalized UV parameter of the underlying connector shape.
LimitsUThis is the vector non-normalized parameter limits in U of the underlying connector shape.
LimitsVThis is the vector non-normalized parameter limits in V of the underlying connector shape.
RadiusOfCurvatureThis element is the float radius of curvature of the connector.
NormalThis element is the vector normal of the connector.
TangentThis element is the vector tangent of the connector.
AssembleToleranceThis element is the assembly tolerance if the connector’s shape curve is an edge curve.
CurveToleranceThis element is the tolerance of the surface curve if the connector’s shape curve is an edge curve.

Surface-based Geometry Properties Array

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.

PointThis element is the point on the surface that the connector is constrained to and these surface geometric properties are for.
UVThis is the vector non-normalized UV parameter of the surface that the connector is constrained to.
LimitsUThis is the vector non-normalized parameter limits in U of the surface that the connector is constrained to.
LimitsVThis is the vector non-normalized parameter limits in V of the surface that the connector is constrained to.
RadiusOfCurvatureThis element is the float minimum radius of curvature.
GaussianCurvatureThis element is the float gaussian curvature in radians per unit length.
AverageCurvatureThis element is the float average curvature in radians per unit length.
MinimumCurvatureThis element is the float minimum curvature in radians per unit length.
MaximumCurvatureThis element is the float maximum curvature in radians per unit length.
NormalThis element is the vector normal of the surface.
PrincipalThis element is the vector principal tangent of the surface, which points in the direction of minimum curvature.
dPdUThis element is the vector first partial derivative in U.
dPdVThis element is the vector first partial derivative in V.
d2PdU2This element is the vector second partial derivative in U.
d2PdUdVThis element is the vector second partial derivative in UV.
d2PdV2This element is the vector second partial derivative in V.

Directional and Orthogonal Surface-based Geometry Properties Array

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.

RadiusOfCurvatureThis element is the float radius of curvature in the direction of (or orthogonal to) the connector.
DirectionThis element is the vector derivative of (or orthogonal to) the connector.
DirectionUVThis element is the vector derivative of (or orthogonal to) the connector in the UV parameter space of the surface.
dPdDThis element is the vector first derivative of the surface in the direction given by the DirectionUV element.
d2PdD2This element is the vector second derivative of the surface in the direction given by the DirectionUV element.

getTransverseAngle

$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.

Parameters

-tolerance toleranceThis 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 multiplierThis 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 distanceThis optional parameter is the float explicit distance to use in lieu of using the tolerance multiplier and assembly tolerance.
-type typeVarThis 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.
-gridThis 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.
-controlThis 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].
-parameterThis 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.
-arcThis 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].
-XThis optional flag is the notification to get the position at a constant X.  The value is a float constant X Cartesian coordinate value.
-YThis optional flag is the notification to get the position at a constant Y.  The value is a float constant Y Cartesian coordinate value.
-ZThis optional flag is the notification to get the position at a constant Z.  The value is a float constant Z Cartesian coordinate value.
-closestThis optional flag is the notification to get the closest position.  The value is a point or grid coord.
valueThis required parameter is the float or integer value to get the position at from which the transverse angle is determined.

Returns

This action returns the transverse angle of the connector at the requested position in degrees.

Information

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.

See Also

getTangent, getRadiusOfCurvature

Example

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

getLength

$con getLength ?< -grid | -control | -parameter | -arc | -X | -Y | -Z | -closest >? value

This action gets the connector length from the beginning to a given location.

Parameters

-gridThis 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.
-controlThis 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].
-parameterThis 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.
-arcThis 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].
-XThis optional flag is the notification to get the length at a constant X.  The value is a float constant X Cartesian coordinate value.
-YThis optional flag is the notification to get the length at a constant Y.  The value is a float constant Y Cartesian coordinate value.
-ZThis optional flag is the notification to get the length at a constant Z.  The value is a float constant Z Cartesian coordinate value.
-closestThis optional flag is the notification to get the closest position.  The value is a point or grid coord.
valueThis required parameter is the integer or float value to get the length.

Returns

This action returns the float curve length.

Information

The -arc value option converts value from a normalized to a non-normalized length.  It is included for consistency with other commands.

See Also

getPosition, getXYZ, getTotalLength

Example

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

getParameters

$con getParameters ?< -X | -Y | -Z >? value

This action gets the parameters at which the curve intersects the value.

Parameters

-XThis optional flag is the notification to get the position at a constant X.  The value is a float constant X Cartesian coordinate value.
-YThis optional flag is the notification to get the position at a constant Y.  The value is a float constant Y Cartesian coordinate value.
-ZThis optional flag is the notification to get the position at a constant Z.  The value is a float constant Z Cartesian coordinate value.
valueThis required parameter is the float value to get the parameters.

Returns

This action returns an array of parameters.

Example

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

getTotalLength

$con getTotalLength ?-constrained constrainedVar?

This action gets the total length of the connector.

Parameters

-constrained constrainedVarThis optional parameter is the string name of a variable to receive the length of the this entity, that is constrained to database entities.

Returns

This action returns float length in the range [0.0, infinity).

See Also

getLength

Example

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

getAssembleTolerance

$con getAssembleTolerance

This action returns the maximum tolerance used to close the model along the connector.

Parameters

This action has no parameters.

Returns

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.

getAverageSpacing

$con getAverageSpacing

This action gets the average spacing between grid points of the connector.

Parameters

This action has no parameters.

Returns

This action returns the float average spacing in the range [0.0, infinity).

See Also

getDistribution, pw::Distribution.getBeginSpacing, pw::Distribution.getEndSpacing

Example

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

closestPoint

$con closestPoint ?-from fromVar? ?-distance distVar? ?-parameter paramVar? point ?dir?

This action gets the closest point on this connector to the given point.

Parameters

-from fromVarThis 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 distVarThis 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 paramVarThis 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].
pointThis required parameter is the point to project onto this connector.
dirThis optional parameter is a direction vector for finding the closest point from a ray.

Returns

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.

Information

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.

See Also

closestControlPoint

Example

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

closestControlPoint

$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.

Parameters

-from fromVarThis 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 distVarThis 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 paramVarThis 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 indexVarThis optional parameter is the string name of a variable to receive the control point index of the closest control point.
pointThis required parameter is the point to project onto this connector.
dirThis optional parameter is a direction vector for finding the closest point from a ray.

Returns

This action returns a point in model space or the origin (0, 0, 0) if there is no closest point.

See Also

closestPoint

Example

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

getControlPointCount

$con getControlPointCount

This action gets the number of control points on this connector.

Parameters

This action has no parameters.

Returns

This action returns the integer number of connector control points.

Example

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

removeInteriorControlPoints

$con removeInteriorControlPoints

This action removes the interior control points of each segment of this connector.

Parameters

This action has no parameters.

Returns

This action returns a boolean which is true if there were any control points removed and false otherwise.

getNode

$con getNode < Begin | End | index >

This action gets a node from a connector.

Parameters

positionThis 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.

Returns

This action returns a pw::Node object.

Information

Begin and 1 are the same.  End and 2 are the same.

Example

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

isClosed

$con isClosed

This action checks if the connector is closed.

Parameters

This action has no parameters.

Returns

This action returns a boolean, true if the connector is closed.

Example

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

isPole

$con isPole

This action checks if the connector is a pole.

Parameters

This action has no parameters.

Returns

This action returns a boolean, true if the connector is a pole.

Example

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

checkDistributionValidity

$con checkDistributionValidity

This action checks if the connector’s distributions on all of its subconnectors could be applied as requested.

Parameters

This action has no parameters.

Returns

This action returns a boolean, true if the distributions on all of the connector’s subconnectors were applied successfully.

Information

This will check to see if spacing constraints that are applied to the ends of a subconnector can be enforced.

See Also

getDistribution, pw::Distribution

Example

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

isInteriorIndex

$con isInteriorIndex index

This action checks to see if an index corresponds to a point in the interior of the connector.

Parameters

indexThis required parameter is the integer index of the grid point to check in the range [1, dimension].

Returns

This action returns true if the index is an interior point.

Example

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

getAdjacentIndices

$con getAdjacentIndices ?-linear? index

This action returns the indices that are directly connected to the specified index.

Parameters

-linearIf 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).
indexThis required parameter is the integer linear index of the target grid point in the range [1, number of points].

Returns

This action returns a list of integer indices representing the adjacent coordinates.

Example

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

getCellCount

$con getCellCount

This action gets the number of 1D cells in this connector.

Parameters

This action has no parameters.

Returns

This action returns the integer number of cells.

Information

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.

See Also

pw::Domain.getCellCount, pw::Block.getCellCount, getCell

Example

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

getCell

$con getCell index

This action gets the indices of the given 1D cell.

Parameters

indexThis required parameter is the integer index of the cell to get in the range [1, number of cells].

Returns

This action returns a list of two integer point indices.

Information

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}]].

See Also

getCells, pw::Domain.getCell, pw::Block.getCell, getCellCount

Example

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 }

getCells

$con getCells

This action gets the indices of all the 1D cells.

Parameters

This action has no parameters.

Returns

This action returns a list of integer pairs of point indices.

Information

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}]].

See Also

getCell, getCellCount

Example

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 }

applyTRex

$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.

Parameters

-wall bc1This optional parameter specifies the Wall pw::TRexCondition to apply.  Cannot be used simultaneously with -angle, -aspectratio or -maxaspectratio.
-angle bc1This optional parameter specifies the Angle pw::TRexCondition to apply.  Cannot be used simultaneously with -angle, -aspectratio or -maxaspectratio.
-aspectratio bc1This optional parameter specifies the AspectRatio pw::TRexCondition to apply.  Cannot be used simultaneously with -wall, -angle or -maxaspectratio.
-maxaspectratio bc1This optional parameter specifies the MaxAspectRatio pw::TRexCondition to apply.  Cannot be used simultaneously with -wall, -angle or -aspectratio.
-adjacent bc2This optional parameter specifies the AdjacentGrid pw::TRexCondition to apply.
-domains domainsVarThis optional parameter is the string name of the variable that receives a list of pw::DomainUnstructured that the T-Rex boundary conditions were applied.

Returns

The T-Rex boundary condition that has been assigned.

See Also

pw::TRexCondition, pw::TRexCondition.ConditionType, applyTRex (static)

pw::Connector create
This action creates a new connector object.
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.
pw::Connector createFromPoints points
This action, given a list of XYZ vector values or database-constrained points, creates a new connector.
A vector is a list of float values.
A point is a position either in model space or database parameter space.
pw::Connector join ?<-keepDistribution | -resetDistribution>? ?-deleteBreakPoints? ?-reject rejectVar? connectors
This action joins as many of the given connectors together as possible.
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.
pw::Connector getConnectorsFromNode node
This action gets a list of all connectors using the specified node.
pw::Connector getConnectorsFromSpacing ?-details? ?-global? spacing
This action gets a list of all connectors using the specified spacing object.
pw::Connector getAdjacentConnectors ?-maximumAngle angle? ?-all? connectors
This action finds the connectors adjacent to the given list of connectors.
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.
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.
$con calculateDimension
This action sets the dimension of this connector using its current solver settings.
pw::Connector getInvalidDistributions ?-all?
This action finds connectors that have invalid distributions.
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.
A connector is a computationally one-dimensional grid entity, defined in the parameter space of one or more end-connected curve segments.
pw::Connector synchronizeSpacings ?<-minimum | -maximum | -average>? ?-growthRate rate? ?-undefined domainsVar? ?-useTRexSpacings? ?-keepDimensionAndDistribution? ?-returnDuplicates? connectors
This action synchronizes spacing constraints at shared connector grid points.
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.
pw::Connector swapDistribution distribution_type subcon_list
This action replaces the distribution function of a list of subconnectors, retaining the previously set spacings.
pw::Connector get/setDefault Dimension dim
This default is the dimension of a connector when it is created.
pw::Connector get/setDefault DistributionType distribution_type
This default is the distribution of a subconnector when it is created.
pw::Connector get/setDefault BeginSpacing spacing
This default is the beginning spacing of a subconnector when it is created.
pw::Connector get/setDefault EndSpacing spacing
This default is the ending spacing of a subconnector when it is created.
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.
pw::Connector get/setCalculateDimensionMaximum dimension
This attribute is the maximum dimension calculated for a connector when using the commands calculateDimension, setDimensionFromSpacing, and setDimensionFromDistribution.
$con setDimensionFromSpacing spacing
This action sets the dimension of this connector based on equal spacing.
$con setDimensionFromDistribution
This action sets the dimension of this connector based on the current distribution.
pw::Connector get/setCalculateDimensionSpacing spacing
This attribute is the default average spacing between successive grid points.
pw::Connector get/setDistributionInfluence influence
This default is a flag to allow the distribution of a connector to effect the dimension of the connector.
pw::Connector get/setNormalMaximumDeviation angle
This default is the maximum turning angle allowed between successive grid points.
pw::Connector get/setCurveMaximumDeviation distance
This attribute is the maximum distance allowed between the analytic and discrete shape of a connector.
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.
$con delete ?-force?
This action delete this connector.
$con getDimension
This action gets the dimensions of this connector.
$con getDimensions
This action gets the dimensions of this connector.
$con setDimension dim
This action sets the dimension of this connector.
$con setSubConnectorDimensionFromDistribution index
This action sets the dimension of a subconnector in this connector based on the current distribution of the subconnector.
$con setDimensionFromSubConnectors subcon_list
This action sets the dimension of this connector by copying the dimension from a list of subconnectors.
$con increaseDimension ?-maximumLevel value? ?-maximumSpacing value? ?-minimumSpacing value? ?-surface? angle distance
This action increases the dimension of this connector.
$con getSegmentCount
This action gets the number of segments in this connector.
$con getSegment ?-copy? index
This action gets the segment at the given index.
$con getSegments ?-copy?
This action gets the list of segments.
$con setSegment index segment
This action sets the segment at the given index.
$con addSegment segment
This action adds the segment to the end of the segments in the connector.
$con insertSegment index segment
This action inserts the segment at the given index.
$con removeSegment < index | segment >
This action removes a segment from the connector.
$con removeAllSegments
This action removes all of the segments from the connector.
$con replaceAllSegments segments
This action replaces all of the segments in the connector.
$con getSubConnectorCount
This action gets the number of subconnectors in this connector.
$con getSubConnectorDimension ?index?
This action gets the dimension of a subconnector in this connector.
$con setSubConnectorDimension dims
This action sets the dimensions of each subconnector in this connector.
$con getSubConnectorRange index
This action gets the minimum and maximum grid point indices of a subconnector.
$con getSubConnectorRanges
This action gets the minimum and maximum grid point indices of all subconnectors.
$con getDistribution ?-copy? index
This action gets the distribution function of a subconnector.
$con setDistribution ?-lockEnds? index distribution
This action sets the distribution function of a subconnector.
$con replaceDistribution index distribution
This action replaces the distribution function of a subconnector, retaining the previously set spacings.
$con lockDistribution index
This action locks the distribution of a subconnector.
$con resetGeneralDistributions
This action switches all of the subconnector distributions that are of type pw::DistributionGeneral to use the current default distribution.
General distribution function type
$con getBreakPoint index
This action gets the parameter of the break point at the end of the subconnector with the given index.
$con getBreakPoints
This action gets the parameters of the break points at the end of the subconnectors.
$con getBreakPointType index
This action gets the type of break point at the end of the subconnector.
$con getBreakPointTypes
This action gets the type at each break point at the end of the subconnectors.
$con addBreakPoint ?< -control | -arc | -X | -Y | -Z | -U | -V >? value
This action adds one or more break points to the list of break points.
$con removeBreakPoint index
This action removes the break point from the connector at the end of the subconnector with the given index.
$con removeAllBreakPoints
This action removes all of the break points from the connector.
$con checkBreakPoint ?< -control | -arc >? value
This action checks if a break point can be added at a given location.
$con setBreakPointSpacing index < spacing | value | name >
This action sets the spacing on both sides of a break point.
$con spline ?connector?
This action sets the shape of this connector to a smooth interpolation of the grid points of the given connector.
$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.
$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.
$con split < -I index_list | param_list >
This action splits this connector at the given index or point.
$con join ?<-keepDistribution | -resetDistribution>? ?-deleteBreakPoints? connector ?side?
This action joins this connector with a given connector.
$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.
$con getDefaultProjectDirection
This action gets the default projection direction for this connector.
$con setOrientation imin_node
This action sets the orientation of this connector, by specifying the new imin node.
$con alignOrientation connectors
This action aligns the I orientation of the given connectors with this connector.
$con createPeriodic < -translate vector | -rotate point normal angle >
This action creates a periodic copy of this connector.
$con getPeriodic ?-transform matrixVar?
This action gets the connector that shares a periodic link with this connector.
$con breakPeriodic
This action breaks the periodic link that this connector has with another connector.
$con getPoint ?-constrained constrainedVar? index
This action gets the position of a connector grid point.
$con getPoints
This action gets all the connector grid points.
$con setPoint index point
This action sets the position of a connector interior grid point.
$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.
$con getXYZ ?< -grid | -control | -parameter | -arc | -X | -Y | -Z | -closest >? value
This action gets the model space position on a connector.
$con getParameter ?< -grid | -control | -parameter | -arc | -X | -Y | -Z | -closest >? value
This action gets a parameter value on a connector.
$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.
$con getTangent ?< -grid | -control | -parameter | -arc | -X | -Y | -Z | -closest >? value
This action gets the tangency vector on a connector.
$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.
$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.
$con getLength ?< -grid | -control | -parameter | -arc | -X | -Y | -Z | -closest >? value
This action gets the connector length from the beginning to a given location.
$con getParameters ?< -X | -Y | -Z >? value
This action gets the parameters at which the curve intersects the value.
$con getTotalLength ?-constrained constrainedVar?
This action gets the total length of the connector.
$con getAssembleTolerance
This action returns the maximum tolerance used to close the model along the connector.
$con getAverageSpacing
This action gets the average spacing between grid points of the connector.
$con closestPoint ?-from fromVar? ?-distance distVar? ?-parameter paramVar? point ?dir?
This action gets the closest point on this connector to the given point.
$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.
$con getControlPointCount
This action gets the number of control points on this connector.
$con removeInteriorControlPoints
This action removes the interior control points of each segment of this connector.
$con getNode < Begin | End | index >
This action gets a node from a connector.
$con isClosed
This action checks if the connector is closed.
$con isPole
This action checks if the connector is a pole.
$con checkDistributionValidity
This action checks if the connector’s distributions on all of its subconnectors could be applied as requested.
$con isInteriorIndex index
This action checks to see if an index corresponds to a point in the interior of the connector.
$con getAdjacentIndices ?-linear? index
This action returns the indices that are directly connected to the specified index.
$con getCellCount
This action gets the number of 1D cells in this connector.
$con getCell index
This action gets the indices of the given 1D cell.
$con getCells
This action gets the indices of all the 1D cells.
$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.
Base type for all glyph types
Entity type
Base type for all grid entities.
A float is a fractional number.
A string is an array of characters.
Base type for all database entities
A boundary is reference to either a database curve or the edge of a database surface.
An integer is a whole number.
A boolean is represented as a 0 or 1, with 0 being false and 1 being true.
A node is the zero-dimensional boundary of a one-dimensional pw::Connector.
Base class for spacing types
pw::SpacingExplicit create
This action creates a new explicit spacing object.
pw::Spacing createNamedValue ?name ?value??
This action defines a named spacing value.
Framework type
A plane is a list of four float values representing the geometric plane coefficients A, B, C and D.
pw::Grid get/setConnectorTolerance tolerance
This attribute is the connector tolerance of grid entities and operations.
A framework_entity is a reference to an entity in a pw::Framework.
Base type for all source entities
A structured domain is a computationally orthogonal surface grid bounded by exactly four edges, any of which can be degenerate in the zero dimension (pole).
T-Rex condition type
An unstructured domain is a watertight collection of edge-connected surface elements (triangle, quadrilateral, etc.)
$tc get/setConditionType type
This attribute is the condition type of the T-Rex condition.
Base class for distribution types
Automatic distribution function type
$dist setBeginSpacing < -clearname | spacing | value | name >
This action sets the requested grid point spacing at the beginning of the distribution.
$dist setEndSpacing < -clearname | spacing | value | name >
This action sets the requested grid point spacing at the end of the distribution.
Shape distribution function type
Database surface type
pw::Entity delete entities
This action deletes the given entities.
Connector and Curve segment type
Explicit spacing type
Point interpolating spline connector segment type
Database constrained point interpolating segment type
pw::Database getFitTolerance
This action gets the fit tolerance for database operations.
A domain is a computationally two-dimensional grid entity, bounded by one or more pw::Edges.
Utility functions for transform matrices, which are represented as a list of sixteen real values.
A coord is a position in grid space.
$curve 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 curve.
$curve getTangent ?< -parameter | -control | -arc | -X | -Y | -Z | -closest >? value
This action gets the tangency vector on the curve at a location.
$dist getBeginSpacing
This action gets the requested grid point spacing at the beginning of the distribution.
$dist getEndSpacing
This action gets the requested grid point spacing at the end of the distribution.
A block is a volume grid bounded by one or more pw::Faces.
$dom getCellCount
This action gets the number of cells in this domain.
$block getCellCount
This action gets the number of cells in this block.
$dom getCell index
This action gets the indices of the given cell.
$block getCell index
This action gets the indices of the given cell.
Close