pw::DatabaseMesher

The database mesher mode type

Derives From

pw::Object pw::Mode

Notes

This mode is used to create grid entities on database entities.

Unlike other modes, the state of the mode is saved when it is ended and subsequent modes will be created with the same state.  This state is also saved in the application project file, so a new mode created after a file is loaded will have the same state as the last mode ended before saving the file.

To create a mode of this type, use the pw::Application.begin command with the mode DatabaseMesher specified, like this:

set mesher [pw::Application begin DatabaseMesher $models]
Summary
pw::DatabaseMesherThe database mesher mode type
Instance Attributes
MergeToleranceThis attribute is the tolerance to use when merging connectors.
MinimumSpacingModeThis attribute is the preferred method for setting the minimum spacing.
MinimumBoundarySubdivisionsThis attribute is the minimum number of mesh subdivisions per database boundary.
MinimumEdgeSpacingThis attribute is the minimum edge spacing for the mesh.
MinimumSubdivisionLengthThis attribute is the minimum edge subdivision length in the mesh.
MinimumRadiusOfCurvatureThis attribute is the minimum radius of surface curvature to use when resolving curvature along an edge in the mesh.
MaximumSpacingModeThis attribute is the preferred method for setting the maximum spacing.
MaximumExtentsSubdivisionsThis attribute is the maximum number of mesh subdivisions per the extents of the entities being meshed.
MaximumEdgeSpacingThis attribute is the maximum edge spacing for the mesh.
CurvatureResolutionAngleThis attribute is the curvature angle resolution in degrees.
MaximumAspectRatioThis attribute specifies the maximum aspect ratio.
BoundaryGrowthRateThis attribute specifies the boundary growth rate.
DomainAlgorithmThis attribute determines the algorithm to use when meshing domains.
RefinementFactorThis attribute is the refinement factor used to globally scale the parameters of the mesher in order to increase the refinement.
MappedSurfaceSubdivisionRatioThis attribute is the ratio between the number of subdivisions used to detect domains that can be initialized from structured domains.
BoundaryProximityInfluenceThis attribute controls how nearby boundaries influence clustering on a surface.
BoundaryGapSubdivisionsThis attribute is the target number of mesh subdivisions across gaps between boundaries of the entities being meshed.
StretchingBufferThis attribute is the target number of buffer subdivisions when TRex stretching reaches the median between boundaries of the entities being meshed.
BoundaryGroupAngleThis attribute is the turning angle to use when grouping boundaries.
BoundaryCurvatureRatioThis attribute is the ratio between the surface and curve curvature along a boundary to use when detecting Curvature boundaries.
BoundaryHardAngleThis attribute is the angle between normals to use when detecting Convex and Concave manifold boundaries.
DomainAreaRatioThresholdThis attribute is the metric threshold for domain area ratio.
DomainAspectRatioThresholdThis attribute is the metric threshold for domain aspect ratio.
DomainMaximumAngleThresholdThis attribute is the metric threshold for domain maximum angle.
KeepExistingDomainsThis attribute controls whether any pre-existing domains constrained to the quilts in the mode are retained or destroyed.
SplitConnectorsAtAlignSourcesThis attribute controls whether connectors should be split where they intersect or come within Node tolerance of souce curves on the database being meshed.
Instance Actions
getExtentsThis action gets the extents of the models of the mode.
getThinSurfaceQuiltsThis action gets the quilts that are detected as thin surfaces, such as a blunt trailing edge of a wing.
getMinimumBoundaryGroupThis action gets the quilt boundary group with the minimum length.
getMinimumBoundaryGroupLengthThis action gets the length of the minimum boundary group.
getSymmetryLoopsThis action gets a list of symmetry loops, where each loop is a list of quilt boundaries that are lamina and lie on a symmetry plane.
getLaminaBoundaryGroupsThis action gets a list of lamina quilt boundary lists of a certain classification.
getManifoldBoundaryGroupsThis action gets a list of manifold quilt boundary lists of a certain classification.
createGridEntitiesThis action creates grid entities on the database entities of this mode.
getRejectedEntitiesThis action gets a list of database entities that a surface mesh was not able to be constructed on during the <createSurfaceMesh> action.
getExistingDomainsThis action gets a list of domains that are dependent upon the quilts included in the mode.
getExistingSourcesThis action gets a list of sources that are dependent upon the quilts included in the mode.
getFilterTypesThis action returns a list of supported filter type names.
addFilterThis action adds a new, mesher mode filter to a filter queue.
deleteFilterThis action deletes a filter.
setFilterNameThis action renames a filter.
getFilterNamesThis action returns a list of filter names defined in the mesher mode filter_type.
getFilterCountThis action returns the number of filters of the given filter_type defined in the mesher mode.
getFilterDefinitionThis action gets the definition of a filter identified by index or name.
getFilterDefinitionsThis action gets a list of all filter definitions of the given filter_type.
getFilterEntityCountsThis action matches the name of each mode entity against the filter patterns in filter priority order and returns the match count for each filter.
setFilterPriorityThis action sets the priority of one or more existing filters.
setFilterPatternsThis action sets the patterns of an existing filter.
setFilterEntitiesThis action modifies filter patterns as needed to guarantee that the entities in dbentity_list are captured by the specified filter.
setFilterValueThis action sets a filter’s value.
addMappingFilterThis action adds a new mapping filter for the mesher mode.
deleteMappingFilterThis action deletes a mapping filter.
setMappingFilterNameThis action renames a mapping filter.
getMappingFilterNamesThis action returns a list of mapping filter names defined in the mesher mode.
getMappingFilterCountThis action returns the number of mapping filters of the defined in the mesher mode.
getMappingFilterDefinitionThis action gets the definition of a mapping filter identified by index or name.
getMappingFilterDefinitionsThis action gets a list of all mapping filter definitions.
getMappingFilterEntityCountsThis action matches the name of each mode entity against the mapping filter patterns in filter priority order and returns the match count for each filter.
setMappingFilterPriorityThis action sets the priority of one or more existing mapping filters.
setMappingFilterPatternsThis action sets the patterns of an existing mapping filters.
setMappingFilterEntitiesThis action modifies mapping filter patterns as needed to guarantee that the entities in dbentity_list are captured by the specified filter.
setMappingFilterValueThis action sets a mapping filter’s value.
setMappingFilterEqualSpacingThis action sets a mapping filter to use equal spacing.
getMappingFilterEqualSpacingThis action returns whether a mapping filter uses equal spacing.
setMappingFilterForceAdjacentGridThis action sets a mapping filter to force adjacent grid spacing on neighboring surface grids.
getMappingFilterForceAdjacentGridThis action returns whether a mapping filter forces adjacent grid spacing on neighboring surface grids.
setMappingFilterMaximumAspectRatioThis action sets a mapping filter’s maximum aspect ratio.
getMappingFilterMaximumAspectRatioThis action returns the maximum aspect ratio allowed for a mapped domain.
getMappingResultThis action gets whether or not a created unstructured domain was mapped to a structured domain.
addBoundaryFilterThis action adds a new boundary filter to control how stretching is applied to the matching boundaries.
deleteBoundaryFilterThis function deletes an existing boundary filter.
getBoundaryFilterNamesThis function returns a list of the names of the current boundary filters.
setBoundaryFilterNameThis action changes the name of an existing boundary filter.
setBoundaryFilterDefinitionThis action specifies the patterns used to select which quilt boundaries will have the boundary conditions applied.
getBoundaryFilterDefinitionThis function returns the current definition for a boundary filter.
addBoundaryFilterDefinitionThis method adds a new entry to the end of a current boundary filter definition.
getBoundaryFilterGrowthTypeThis action returns the growth type associated with the boundary filter.
setBoundaryFilterGrowthTypeThis action sets the growth type associated with the boundary filter.
getBoundaryFilterGrowthRateThis action gets the growth rate associated with the boundary filter.
setBoundaryFilterGrowthRateThis action sets the growth rate associated with the boundary filter.
getBoundaryFilterGrowthAngleThis action gets the growth angle associated with an Angle boundary filter.
setBoundaryFilterGrowthAngleThis action sets the growth angle associated with a boundary filter of type Angle.
getBoundaryFilterGrowthMaximumAspectRatioThis action gets the maximum aspect ratio associated with a boundary filter.
setBoundaryFilterGrowthMaximumAspectRatioThis action sets the growth maximum aspect ratio associated with a boundary filter.
getBoundaryFilterGrowthWallSpacingThis action gets the initial growth boundary spacing for a Wall boundary filter.
setBoundaryFilterGrowthWallSpacingThis action sets the growth initial spacing for a Wall boundary filter.
getBoundaryFilterGrowthRateDelayThis action gets the growth rate delay associated with the boundary filter.
setBoundaryFilterGrowthRateDelayThis action sets the growth rate delay associated with the boundary filter.
getBoundaryFilterMinimumSubdivisionLengthThis action gets the lower limit for cell spacing along the boundaries matched by the filter.
setBoundaryFilterMinimumSubdivisionLengthThis action sets the target lower limit for cell spacing along a boundary.
getBoundaryFilterMinimumRadiusOfCurvatureThis action gets the lower limit for cell spacing along the boundaries matched by the filter.
setBoundaryFilterMinimumRadiusOfCurvatureThis action sets the target lower limit for evaluating the radius of curvature along a boundary.
getBoundaryFilterSpacingFactorThis function gets the factor used to scale the spacing of the boundaries associated with the filter.
setBoundaryFilterSpacingFactorThis function sets the factor used to scale the spacing of the boundaries associated with the filter.
getBoundaryFilterGroupsThis action returns a list of quilt boundaries associated with a boundary filter.
setBoundaryFilterPriorityThis sets the priority of one or more existing boundary filters.

Instance Attributes

MergeTolerance

$mesher get/setMergeTolerance tol

This attribute is the tolerance to use when merging connectors.

Type

This attribute is a float with the range [0, infinity), where 0 means no merging will be done.

Default

The default for this attribute is 0.

MinimumSpacingMode

$mesher get/setMinimumSpacingMode mode

This attribute is the preferred method for setting the minimum spacing.

Type

This attribute is of type string with values < Subdivisions | Spacing >.

Default

The default for this attribute is Subdivisions.

Information

This attribute will be set to match the last attribute set between MinimumBoundarySubdivisions and MinimumEdgeSpacing.

MinimumBoundarySubdivisions

This attribute is the minimum number of mesh subdivisions per database boundary.

Type

This attribute is an integer with the range [2, inf) that specifies the minimum number of boundary subdivisions.

Default

The default for this attribute is 2.

Information

This attribute and the MinimumEdgeSpacing attribute will be adjusted to match each other depending on the last one set, and the MinimumSpacingMode will be set to Subdivisions.

MinimumEdgeSpacing

$mesher get/setMinimumEdgeSpacing spacing

This attribute is the minimum edge spacing for the mesh.

Type

This attribute is a positive float that specifies the minimum edge spacing for the mesh.

Default

The default for this attribute is the minimum edge spacing based on the default for the <MinimumBoundarySubdivision> attribute.

Information

This attribute and the MinimumBoundarySubdivisions attribute will be adjusted to match each other depending on the last one set, and the MinimumSpacingMode will be set to Spacing.

MinimumSubdivisionLength

$mesher get/setMinimumSubdivisionLength length

This attribute is the minimum edge subdivision length in the mesh.

Type

This attribute is a positive float that specifies the minimum edge subdivision length for the mesh.

Default

The default for this attribute is 0.0 indicating that the minimum spacing determined by MinimumEdgeSpacing, MinimumBoundarySubdivisions and/or MinimumRadiusOfCurvature will be used to limit boundary edge lengths.

Information

This attribute and the MinimumRadiusOfCurvature attribute will be used to limit the minimum allowable edge length on any boundary in the mesh.

MinimumRadiusOfCurvature

$mesher get/setMinimumRadiusOfCurvature radius

This attribute is the minimum radius of surface curvature to use when resolving curvature along an edge in the mesh.

Type

This attribute is a positive float that specifies the minimum radius of surface curvature.

Default

The default for this attribute is 0.0 indicating that the minimum spacing determined by MinimumEdgeSpacing, MinimumBoundarySubdivisions and/or MinimumSubdivisionLength will be used to limit boundary edge lengths.

Information

This attribute and the MinimumSubdivisionLength attribute will be used to limit the minimum allowable edge length on any boundary in the mesh.

MaximumSpacingMode

$mesher get/setMaximumSpacingMode mode

This attribute is the preferred method for setting the maximum spacing.

Type

This attribute is of type string with values < Subdivisions | Spacing >.

Default

The default for this attribute is Subdivisions.

Information

This attribute will be set to match the last attribute set between MaximumExtentsSubdivisions and MaximumEdgeSpacing.

MaximumExtentsSubdivisions

$mesher get/setMaximumExtentsSubdivisions subdivisions

This attribute is the maximum number of mesh subdivisions per the extents of the entities being meshed.

Type

This attribute is an integer with the range [2, inf) that specifies the maximum number of mesh subdivisions.

Default

The default for this attribute is 150.

Information

This attribute and the MaximumEdgeSpacing attribute will be adjusted to match each other depending on the last one set, and the MaximumSpacingMode will be set to Subdivisions.

MaximumEdgeSpacing

$mesher get/setMaximumEdgeSpacing spacing

This attribute is the maximum edge spacing for the mesh.

Type

This attribute is a positive float that specifies the maximum edge spacing for the mesh.

Default

The default for this attribute is the maximum spacing based on the default for the <MaximumExtentsSubdivision> attribute.

Information

This attribute and the MaximumExtentsSubdivisions attribute will be adjusted to match each other depending on the last one set, and the MaximumSpacingMode will be set to Spacing.

CurvatureResolutionAngle

$mesher get/setCurvatureResolutionAngle angle

This attribute is the curvature angle resolution in degrees.

Type

This attribute is a float with the range [0, 180), where 0 means the curvature resolution will not be applied.

Default

The default for this attribute is 15.

MaximumAspectRatio

$mesher get/setMaximumAspectRatio ratio

This attribute specifies the maximum aspect ratio.

Type

This attribute is a float with the value of 0.0 or in the range [1.0, infinity), where 0.0 means the aspect ratio will not be enforced.

Default

The default for this attribute is 10.

BoundaryGrowthRate

$mesher get/setBoundaryGrowthRate rate

This attribute specifies the boundary growth rate.

Type

This attribute is a float with the range [1.0, 2.0].

Default

The default for this attribute is 1.2.

DomainAlgorithm

$mesher get/setDomainAlgorithm < AdvancingFront | QuadDominant | Hybrid >

This attribute determines the algorithm to use when meshing domains.

Type

This attribute is of type string with values < AdvancingFront | QuadDominant | Hybrid >.

Default

The default for this attribute is AdvancingFront.

RefinementFactor

$mesher get/setRefinementFactor factor

This attribute is the refinement factor used to globally scale the parameters of the mesher in order to increase the refinement.

Type

This attribute is a float with the range [0.125, 8], where 1 means no refinement, 2 means 2x refinement, 0.5 means 2x coarser, etc.

Default

The default for this attribute is 1.

MappedSurfaceSubdivisionRatio

$mesher get/setMappedSurfaceSubdivisionRatio factor

This attribute is the ratio between the number of subdivisions used to detect domains that can be initialized from structured domains.

Type

This attribute is a float with the range [0, infinity), where a value of 0.0 disables thin surface detection.

Default

The default for this attribute is 10.

BoundaryProximityInfluence

$mesher get/setBoundaryProximityInfluence < Orientation | All | None >

This attribute controls how nearby boundaries influence clustering on a surface.

Type

This attribute is of type string with values < Orientation | All | None >.

Default

The default for this attribute is Orientation.

Note

If the value is set to All, then all boundaries influence the mesh on a surface.  If the value is set to None, then no boundaries influence the mesh.  If the value is set to the default value of Orientation, then a boundary only contributes to the clustering on the surface if the majority of the boundary is on the outward side of the surface.  For example, this would prevent boundaries on a wing pylon from influencing the clustering on the other side of the wing.  Be aware that this computation can be very expensive for very large numbers of surfaces.

BoundaryGapSubdivisions

$mesher get/setBoundaryGapSubdivisions subdivisions

This attribute is the target number of mesh subdivisions across gaps between boundaries of the entities being meshed.

Type

This attribute is an integer with the range [0, inf) that specifies the target number of mesh subdivisions across the gap.

Default

The default for this attribute is 0.

Information

Defining this attribute greater than zero will enable additional processing to determine refined boundary spacing such that the target number of subdivisions is present across the gap.

StretchingBuffer

$mesher get/setStretchingBuffer subdivisions

This attribute is the target number of buffer subdivisions when TRex stretching reaches the median between boundaries of the entities being meshed.

Type

This attribute is an integer with the range [0, inf) that specifies the target number of buffer subdivisions across the median between stretching fronts.

Default

The default for this attribute is 1.

Information

Defining this attribute greater than zero will enable additional processing to determine refined TRex boundary spacing to ensure the target number of buffer cells at the median of the gap.

BoundaryGroupAngle

$mesher get/setBoundaryGroupAngle angle

This attribute is the turning angle to use when grouping boundaries.  A connector will be built on each boundary group.

Type

This attribute is a float with the range [0, 180), where 0 means no grouping will be done.

Default

The default for this attribute is 40.

BoundaryCurvatureRatio

$mesher get/setBoundaryCurvatureRatio ratio

This attribute is the ratio between the surface and curve curvature along a boundary to use when detecting Curvature boundaries.

Type

This attribute is a float with the range [0, infinity), where 0 means no Curvature boundaries will be detected.

Default

The default for this attribute is 2.5.

BoundaryHardAngle

$mesher get/setBoundaryHardAngle angle

This attribute is the angle between normals to use when detecting Convex and Concave manifold boundaries.

Type

This attribute is a float with the range [0, 180), where 0 means no Convex and Concave boundaries will be detected.

Default

The default for this attribute is 45.

DomainAreaRatioThreshold

$mesher get/setDomainAreaRatioThreshold threshold

This attribute is the metric threshold for domain area ratio.

Type

This attribute is a float with the range [1, inf)

Default

The default for this attribute is 1.0.

Information

This attribute has no effect on the meshing algorithm, and is used by the GUI when displaying metrics on the resulting mesh.

DomainAspectRatioThreshold

$mesher get/setDomainAspectRatioThreshold threshold

This attribute is the metric threshold for domain aspect ratio.

Type

This attribute is a float with the range [1, inf)

Default

The default for this attribute is 1.0.

Information

This attribute has no effect on the meshing algorithm, and is used by the GUI when displaying metrics on the resulting mesh.

DomainMaximumAngleThreshold

$mesher get/setDomainMaximumAngleThreshold threshold

This attribute is the metric threshold for domain maximum angle.

Type

This attribute is a float with the range [1, inf)

Default

The default for this attribute is 1.0.

Information

This attribute has no effect on the meshing algorithm, and is used by the GUI when displaying metrics on the resulting mesh.

KeepExistingDomains

$mesher get/setKeepExistingDomains value

This attribute controls whether any pre-existing domains constrained to the quilts in the mode are retained or destroyed.  If this attribute is true (the default) and new grid entities are created through the createGridEntities function, then any previously existing domains that were constrained to the models’ quilts will be destroyed, along with any blocks that used those domains and any connectors that were used exclusively by those domains.

Type

This attribute is a boolean value.

Default

The default for this attribute is false.

SplitConnectorsAtAlignSources

$mesher get/setSplitConnectorsAtAlignSources value

This attribute controls whether connectors should be split where they intersect or come within Node tolerance of souce curves on the database being meshed.

Type

This attribute is a boolean.

Default

The default for this attribute is true.

Instance Actions

getExtents

$mesher getExtents

This action gets the extents of the models of the mode.

Parameters

This action has no parameters.

Returns

This action returns a list of two vectors representing the min and max points of the extents.

Example

Code

# $mesher is a DatabaseMesher mode
puts [$mesher getExtents]

Output

{-1.0408340855860843e-16 -8.537024980200823e-18 1.0376479089327297} {1.3993905942253984 0.5000000036000275 1.1816511795199895}

getThinSurfaceQuilts

$mesher getThinSurfaceQuilts

This action gets the quilts that are detected as thin surfaces, such as a blunt trailing edge of a wing.

Parameters

This action has no parameters.

Returns

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

Example

Code

# $mesher is a DatabaseMesher mode
puts [$mesher getThinSurfaceQuilts]

Output

{::pw::Quilt_1 ::pw::Quilt_2}

getMinimumBoundaryGroup

$mesher getMinimumBoundaryGroup

This action gets the quilt boundary group with the minimum length.

Parameters

This action has no parameters.

Returns

This action returns a list of quilt boundaries forming the group with the minimum length.

Example

Code

# $mesher is a DatabaseMesher mode
puts [$mesher getMinimumBoundaryGroup]

Output

{::pw::Quilt_1 1}

getMinimumBoundaryGroupLength

$mesher getMinimumBoundaryGroupLength

This action gets the length of the minimum boundary group.

Parameters

This action has no parameters.

Returns

This action returns a float minimum length.

Example

Code

# $mesher is a DatabaseMesher mode
puts [$mesher getMinimumBoundaryGroupLength]

Output

5.9917162670408274e-5

getSymmetryLoops

$mesher getSymmetryLoops ?symmetry?

This action gets a list of symmetry loops, where each loop is a list of quilt boundaries that are lamina and lie on a symmetry plane.

Parameters

symmetryThis optional parameter is a string with options < MinimumX | MaximumX | MinimumY | MaximumY | MinimumZ | MaximumZ > that specifies the symmetry plane to get the boundary loops for.  If not given, the boundary loops for all symmetry planes are returned.

Returns

This action returns a list of quilt boundary lists.

Example

Code

# $mesher is a DatabaseMesher mode
foreach sym {{} MinimumX MaximumX MinimumY MaximumY MinimumZ MaximumZ} {
    set loops [$mesher getSymmetryLoops {*}$sym]
    puts [format "%-10.10s: %s" $sym $loops]
}

Output

          :
MinimumX  :
MaximumX  :
MinimumY  :
MaximumY  :
MinimumZ  :
MaximumZ  :

getLaminaBoundaryGroups

$mesher getLaminaBoundaryGroups classify

This action gets a list of lamina quilt boundary lists of a certain classification.  Note that this returns boundary values without regard for any boundary filters added with addBoundaryFilter.

Parameters

classifyThis parameter is a string with options < Symmetry | NonSymmetry | Curvature > of the classification of the boundaries to retrieve.

Returns

This action returns a list of quilt boundary lists.

Note

It is possible for boundary groups to be classified as both Curvature and Symmetry or NonSymmetry, but Symmetry and NonSymmetry groups will always be distinct.  Also, the Symmetry groups will be returned as loops using the getSymmetryLoops action.

Example

Code

# $mesher is a DatabaseMesher mode
foreach classifyType {Symmetry NonSymmetry Curvature} {
    puts [format "%12.12s: %s" $classifyType [$mesher getLaminaBoundaryGroups $classifyType]]
}

Output

   Symmetry:
NonSymmetry:
  Curvature:

getManifoldBoundaryGroups

$mesher getManifoldBoundaryGroups classify

This action gets a list of manifold quilt boundary lists of a certain classification.  Since all of the boundaries returned are manifold, they will be organized in pairs of boundaries that are topologically the same, one from each neighboring quilt.  Note that this returns boundary values without regard for any boundary filters added with addBoundaryFilter.

Parameters

classifyThis parameter is a string with options < None | Curvature | Convex | Concave > of the classification of the boundaries to retrieve.

Returns

This action returns a list of quilt boundary lists.

Example

Code

# $mesher is a DatabaseMesher mode
foreach classify {None Curvature Convex Concave} {
    set grps [$mesher getManifoldBoundaryGroups $classify]
    puts "$classify:"
    if { 0 == [llength $grps] } {
        lappend grps {<none>}
    }
    foreach grp $grps {
        puts "  $grp"
    }
}

Output

None:
  {::pw::Quilt_3 3} {::pw::Quilt_8 4}
  {::pw::Quilt_5 3} {::pw::Quilt_6 2}
  {::pw::Quilt_6 4} {::pw::Quilt_7 2}
  {::pw::Quilt_7 4} {::pw::Quilt_8 2}
Curvature:
  <none>
Convex:
  {::pw::Quilt_1 1} {::pw::Quilt_2 1}
  {::pw::Quilt_1 2} {::pw::Quilt_3 1}
     ...SNIP...
  {::pw::Quilt_4 5} {::pw::Quilt_6 3}
  {::pw::Quilt_4 6} {::pw::Quilt_5 2}
Concave:
  <none>

createGridEntities

$mesher createGridEntities ent_type

This action creates grid entities on the database entities of this mode.  The current settings of the mode will control how the connectors, domains, and/or blocks will be created and the parameters to use.  The grid entities created by previous invocations of this action will be deleted as part of the process.

Parameters

ent_typeThis parameter is the string type of the highest level of grid entities to create with options < Connector | Domain >.

Returns

This action returns a list of new pw::Connector or pw::Domain objects, depending on the ent_type parameter.

See Also

pw::Connector.createOnDatabase, pw::DomainStructured.createOnDatabase and pw::DomainUnstructured.createOnDatabase, which work similar to this action except that it does not allow as much control over the process.

Example

Code

# $mesher is a DatabaseMesher mode
foreach ent_type {Domain} {
    set ents [$mesher createGridEntities $ent_type]
    foreach ent $ents {
        puts "  $ent ([$ent getName])"
    }
}

Output

::pw::DomainUnstructured_1 (dom-1)
::pw::DomainUnstructured_2 (dom-2)
::pw::DomainUnstructured_3 (dom-3)
::pw::DomainUnstructured_4 (dom-4)
::pw::DomainUnstructured_5 (dom-5)
::pw::DomainUnstructured_6 (dom-6)
::pw::DomainUnstructured_7 (dom-7)
::pw::DomainUnstructured_8 (dom-8)
::pw::DomainStructured_1 (dom-9)

getRejectedEntities

$mesher getRejectedEntities

This action gets a list of database entities that a surface mesh was not able to be constructed on during the <createSurfaceMesh> action.

Parameters

This action has no parameters.

Returns

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

Example

Code

# $mesher is a DatabaseMesher mode
puts "rejected: [$mesher getRejectedEntities]"

Output

rejected:

getExistingDomains

$mesher getExistingDomains

This action gets a list of domains that are dependent upon the quilts included in the mode.  If <createSurfaceMesh> is called and the mode is ended through the <end> call, these domains, along with any connectors used exclusively by the domains, will be destroyed.

Parameters

This action has no parameters.

Returns

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

getExistingSources

$mesher getExistingSources

This action gets a list of sources that are dependent upon the quilts included in the mode.  If <createSurfaceMesh> is called and the mode is ended through the <end> call, these sources will be destroyed.

Parameters

This action has no parameters.

Returns

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

getFilterTypes

$mesher getFilterTypes

This action returns a list of supported filter type names.

Parameters

This action has no parameters.

Returns

A list of strings of the filter type names.  These names are suitable for use as -type filter_type parameters.

Example

Code

# $mesher is a DatabaseMesher mode
puts "\$mesher getFilterTypes: [list [$mesher getFilterTypes]]"

Output

$mesher getFilterTypes: MaximumEdgeSpacing

addFilter

$mesher addFilter ?-type filter_type? ?-priority < index | name >? ?-name name? value ?pattern_list?

This action adds a new, mesher mode filter to a filter queue.

Parameters

-type filter_typeThis optional parameter specifies the string type of the value parameter.  One of < MaximumEdgeSpacing >.  Each filter_type has an associated filter queue.
-priority < index | name >This optional parameter specifies the priority of the new filter.  The new filter will be inserted into the filter_type queue before the (existing) filter identified by its integer index or string name.  If not specified, the new filter is appended to the filter queue (lowest priority).
-name nameThis optional parameter is the string filter name.  If not provided, a unique “filter-N” name will be assigned.
valueThis required parameter is the filter’s value.  See Ranges section below.
pattern_listThis optional parameter defines the list of string patterns that will be used to match against database entity names.  The default is an empty list (matches nothing).

Returns

This action returns the name of the added filter.

Notes

When applying filters, each entity’s name is matched against each filter in a queue.  Within a queue, each filter is tried in priority order.  The first match within a queue stops searching, applies the filter to the matched entity, and then continues matching with the next filter queue.

MaximumEdgeSpacing filters are matched against quilts.  For each match, a quilt source is created with the specified value.

ThinSurfaceSubdivision filters are matched against quilts.  For each match, the domain built from the quilt will have special thin surface handling controlled by the value.

Ranges

MaximumEdgeSpacingvalue is a float in the range [0, infinity).

See Also

getFilterDefinition, getFilterDefinitions

Example

Code

# $mesher is a DatabaseMesher mode
$mesher addFilter -name F3 0.3 {quilt-1* quilt-2 quilt-4 !quilt-11}
$mesher addFilter -priority 1  -name F1 0.1 {quilt-4 quilt-5}
$mesher addFilter -priority F3 -name F2 0.2 quilt-3

puts "\$mesher getFilterDefinitions -dict"
dict for {priority filterDefn} [$mesher getFilterDefinitions -dict] {
    puts "$priority [list $filterDefn]"
    dict for {key val} $filterDefn {
        puts [format "  %-10.10s = %-s" $key $val]
    }
    puts ""
}

# Global filter always exists and always lowest priority
puts "\$mesher addFilter -name Global 0.2 bad*"
catch {$mesher addFilter -name Global 0.2 bad*} err
puts $err

Output

$mesher getFilterDefinitions -dict
1 {Type MaximumEdgeSpacing Priority 1 Name F1 Value 0.1 Patterns {quilt-4 quilt-5}}
  Type       = MaximumEdgeSpacing
  Priority   = 1
  Name       = F1
  Value      = 0.1
  Patterns   = quilt-4 quilt-5

2 {Type MaximumEdgeSpacing Priority 2 Name F2 Value 0.2 Patterns quilt-3}
  Type       = MaximumEdgeSpacing
  Priority   = 2
  Name       = F2
  Value      = 0.2
  Patterns   = quilt-3

3 {Type MaximumEdgeSpacing Priority 3 Name F3 Value 0.3 Patterns {quilt-1* quilt-2 quilt-4 !quilt-11}}
  Type       = MaximumEdgeSpacing
  Priority   = 3
  Name       = F3
  Value      = 0.3
  Patterns   = quilt-1* quilt-2 quilt-4 !quilt-11

4 {Type MaximumEdgeSpacing Priority 4 Name Global Value 0.0 Patterns *}
  Type       = MaximumEdgeSpacing
  Priority   = 4
  Name       = Global
  Value      = 0.0
  Patterns   = *

$mesher addFilter -name Global 0.2 bad*
ERROR: Filter Global already exists.

deleteFilter

$mesher deleteFilter ?-type filter_type? < index | name >

This action deletes a filter.

Parameters

-type filter_typeThis optional parameter specifies the string filter type.  One of < MaximumEdgeSpacing >.
indexThis parameter is the integer index of the filter in the range [1, number of filters].
nameThis parameter is the string filter name.

Returns

This action returns nothing.

See Also

addFilter, getFilterDefinition, getFilterDefinitions

Example

Code

# $mesher is a DatabaseMesher mode
puts "\$mesher addFilter F1 0.1 {quilt-1*}"
$mesher addFilter F1 0.1 {quilt-1*}

puts "\$mesher addFilter F2 0.2 {quilt-2*}"
$mesher addFilter F2 0.2 {quilt-2*}
puts "\$mesher getFilterCount: [$mesher getFilterCount]"

puts "\$mesher deleteFilter F1"
$mesher deleteFilter F1
puts "\$mesher getFilterCount: [$mesher getFilterCount]"

puts "\$mesher deleteFilter F2"
$mesher deleteFilter F2
puts "\$mesher getFilterCount: [$mesher getFilterCount]"

puts "\$mesher deleteFilter F1"
catch {$mesher deleteFilter F1} err
puts "  [join [split [string trim $err] "\n"] "\n  "]"

puts "\$mesher deleteFilter Global"
catch {$mesher deleteFilter Global} err
puts "  [join [split [string trim $err] "\n"] "\n  "]"

Output

$mesher addFilter F1 0.1 {quilt-1*}
$mesher addFilter F2 0.2 {quilt-2*}
$mesher getFilterCount: 3
$mesher deleteFilter F1
$mesher getFilterCount: 2
$mesher deleteFilter F2
$mesher getFilterCount: 1
$mesher deleteFilter F1
  ERROR: Filter 'F1' does not exist.
$mesher deleteFilter Global
  ERROR: Cannot delete the Global filter.

setFilterName

$mesher setFilterName ?-type filter_type? < index | name > newName

This action renames a filter.

Parameters

-type filter_typeThis optional parameter specifies the string filter type.  One of < MaximumEdgeSpacing >.
indexThis parameter is the integer index of the filter in the range [1, number of filters].
nameThis parameter is the string filter name.
newNameThe filter’s new name.

Returns

This action returns the actual new name.  Note that it will not be the specified name if another filter of that name exists.

See Also

addFilter, getFilterDefinition, getFilterDefinitions

Example

Code

# $mesher is a DatabaseMesher mode
puts "set nm \[\$mesher addFilter {} 0.1\]"
set nm [$mesher addFilter {} 0.1]
puts "\$mesher getFilterDefinition -dict \$nm"
puts "  [$mesher getFilterDefinition -dict $nm]"
puts "\$mesher setFilterName \$nm FX"
$mesher setFilterName $nm FX
puts "\$mesher getFilterDefinition -dict \$nm"
catch {$mesher getFilterDefinition -dict $nm} err
puts "  [join [split [string trim $err] "\n"] "\n  "]"
puts "\$mesher getFilterDefinition -dict FX"
puts "  [$mesher getFilterDefinition -dict FX]"

Output

set nm [$mesher addFilter {} 0.1]
$mesher getFilterDefinition -dict $nm
  Type MaximumEdgeSpacing Priority 1 Name filter-1 Value 0.1 Patterns {}
$mesher setFilterName $nm FX
$mesher getFilterDefinition -dict $nm
  ERROR: Filter 'filter-1' does not exist.
  ERROR: usage (argument 3): ::pw::DatabaseMesher_1 getFilterDefinition ?-type filter_type? < index | name >
$mesher getFilterDefinition -dict FX
  Type MaximumEdgeSpacing Priority 1 Name FX Value 0.1 Patterns {}

getFilterNames

$mesher getFilterNames ?-type filter_type? ?-regex? ?pattern?

This action returns a list of filter names defined in the mesher mode filter_type.

Parameters

-type filter_typeThis optional parameter specifies the string filter type.  One of < MaximumEdgeSpacing >.
-regexThis optional flag signifies that the given pattern should be considered a regular expression pattern rather than a glob pattern.
patternThis optional parameter is the string pattern used to filter the returned filter names.

Returns

A list of strings of the filter names that match the pattern.  If a pattern is not given, all filter names will be returned.

Example

Code

# $mesher is a DatabaseMesher mode
$mesher addFilter F1 0.1 {quilt-1*}
$mesher addFilter F2 0.2 {quilt-2*}
$mesher addFilter F3 0.3 {quilt-3*}

puts "\$mesher getFilterNames: [list [$mesher getFilterNames]]"

Output

$mesher getFilterNames: {F1 F2 F3 Global}

getFilterCount

$mesher getFilterCount ?-type filter_type?

This action returns the number of filters of the given filter_type defined in the mesher mode.

Parameters

-type filter_typeThis optional parameter specifies the string filter type.  One of < MaximumEdgeSpacing >.

Returns

The integer number of filters.

Example

Code

# $mesher is a DatabaseMesher mode
puts "\$mesher getFilterCount: [$mesher getFilterCount]"

$mesher addFilter F1 0.1 {quilt-1*}
$mesher addFilter F2 0.2 {quilt-2*}
$mesher addFilter F3 0.3 {quilt-3*}

puts "\$mesher getFilterCount: [$mesher getFilterCount]"

Output

$mesher getFilterCount: 1
$mesher getFilterCount: 4

getFilterDefinition

$mesher getFilterDefinition ?-type filter_type? ?-dict? < index | name >

This action gets the definition of a filter identified by index or name.

Parameters

-type filter_typeThis optional parameter specifies the string filter type.  One of < MaximumEdgeSpacing >.
-dictThis optional flag signifies that the return value should be formatted as a dictionary instead of a plain old list.
indexThis parameter is the integer index of the filter in the range [1, number of filters].
nameThis parameter is the string filter name.

Returns

This action returns the filter definition as a list.

A returned list contains { type priority name value patterns }.

A return dictionary is suitable for use with the dict command and is of the form: { Type type Priority priority Name name Value value Patterns patterns }

Where,

  • type is the string type of the filter.
  • priority is the integer priority of the filter.
  • name is the string name of the filter
  • value is the value of the filter (see addFilter for details)
  • patterns is a string list of glob patterns matched against entity names.

See Also

addFilter, getFilterDefinitions

Example

Code

# $mesher is a DatabaseMesher mode
$mesher addFilter F1 0.1 {quilt-1* wing-1*}
$mesher addFilter F2 0.2 {quilt-2* wing-2*}

foreach name [$mesher getFilterNames] {
    puts ""
    puts "\$mesher getFilterDefinition [list $name]:"
    puts "    list[list [$mesher getFilterDefinition $name]]"
    puts "\$mesher getFilterDefinition -dict [list $name]:"
    dict for {key val} [$mesher getFilterDefinition -dict $name] {
        puts [format "    %-10.10s: %-s" $key $val]
    }
}
puts ""
for {set ii 1} {$ii <= [$mesher getFilterCount]} {incr ii} {
    puts ""
    puts "\$mesher getFilterDefinition $ii:"
    puts "    list[list [$mesher getFilterDefinition $ii]]"
    puts "\$mesher getFilterDefinition -dict $ii:"
    dict for {key val} [$mesher getFilterDefinition -dict $ii] {
        puts [format "    %-10.10s: %-s" $key $val]
    }
}

Output

$mesher getFilterDefinition F1:
    list{MaximumEdgeSpacing 1 F1 0.1 {quilt-1* wing-1*}}
$mesher getFilterDefinition -dict F1:
    Type      : MaximumEdgeSpacing
    Priority  : 1
    Name      : F1
    Value     : 0.1
    Patterns  : quilt-1* wing-1*

$mesher getFilterDefinition F2:
    list{MaximumEdgeSpacing 2 F2 0.2 {quilt-2* wing-2*}}
$mesher getFilterDefinition -dict F2:
    Type      : MaximumEdgeSpacing
    Priority  : 2
    Name      : F2
    Value     : 0.2
    Patterns  : quilt-2* wing-2*

$mesher getFilterDefinition Global:
    list{MaximumEdgeSpacing 3 Global 0.0 *}
$mesher getFilterDefinition -dict Global:
    Type      : MaximumEdgeSpacing
    Priority  : 3
    Name      : Global
    Value     : 0.0
    Patterns  : *


$mesher getFilterDefinition 1:
    list{MaximumEdgeSpacing 1 F1 0.1 {quilt-1* wing-1*}}
$mesher getFilterDefinition -dict 1:
    Type      : MaximumEdgeSpacing
    Priority  : 1
    Name      : F1
    Value     : 0.1
    Patterns  : quilt-1* wing-1*

$mesher getFilterDefinition 2:
    list{MaximumEdgeSpacing 2 F2 0.2 {quilt-2* wing-2*}}
$mesher getFilterDefinition -dict 2:
    Type      : MaximumEdgeSpacing
    Priority  : 2
    Name      : F2
    Value     : 0.2
    Patterns  : quilt-2* wing-2*

$mesher getFilterDefinition 3:
    list{MaximumEdgeSpacing 3 Global 0.0 *}
$mesher getFilterDefinition -dict 3:
    Type      : MaximumEdgeSpacing
    Priority  : 3
    Name      : Global
    Value     : 0.0
    Patterns  : *

getFilterDefinitions

$mesher getFilterDefinitions ?-type filter_type? ?-dict?

This action gets a list of all filter definitions of the given filter_type.

Parameters

-type filter_typeThis optional parameter specifies the string filter type.  One of < MaximumEdgeSpacing >.
-dictThis optional flag signifies that the return value should be formatted as a dictionary instead of a plain old list.

Returns

This action returns a list of all filter definitions in priority order.  See getFilterDefinition

See Also

addFilter, getFilterDefinition

Example

Code

# $mesher is a DatabaseMesher mode
$mesher addFilter F1 0.1 {quilt-1* wing-1*}
$mesher addFilter F2 0.2 {quilt-2* wing-2*}

puts "\n\$mesher getFilterDefinitions:"
foreach filterDefn [$mesher getFilterDefinitions] {
    puts "  [list $filterDefn]"
}

puts "\n\$mesher getFilterDefinitions -dict:"
dict for {priority filterDefn} [$mesher getFilterDefinitions -dict] {
    puts "  $priority [list $filterDefn]"
    dict for {key val} $filterDefn {
        puts [format "    %-10.10s: %-s" $key $val]
    }
}

Output

$mesher getFilterDefinitions:
  {MaximumEdgeSpacing 1 F1 0.1 {quilt-1* wing-1*}}
  {MaximumEdgeSpacing 2 F2 0.2 {quilt-2* wing-2*}}
  {MaximumEdgeSpacing 3 Global 0.0 *}

$mesher getFilterDefinitions -dict:
  1 {Type MaximumEdgeSpacing Priority 1 Name F1 Value 0.1 Patterns {quilt-1* wing-1*}}
    Type      : MaximumEdgeSpacing
    Priority  : 1
    Name      : F1
    Value     : 0.1
    Patterns  : quilt-1* wing-1*
  2 {Type MaximumEdgeSpacing Priority 2 Name F2 Value 0.2 Patterns {quilt-2* wing-2*}}
    Type      : MaximumEdgeSpacing
    Priority  : 2
    Name      : F2
    Value     : 0.2
    Patterns  : quilt-2* wing-2*
  3 {Type MaximumEdgeSpacing Priority 3 Name Global Value 0.0 Patterns *}
    Type      : MaximumEdgeSpacing
    Priority  : 3
    Name      : Global
    Value     : 0.0
    Patterns  : *

getFilterEntityCounts

$mesher getFilterEntityCounts ?-type filter_type? ?-includeEntities? ?-dict?

This action matches the name of each mode entity against the filter patterns in filter priority order and returns the match count for each filter.

Parameters

-type filter_typeThis optional parameter specifies the string filter type.  One of < MaximumEdgeSpacing >.
-includeEntitiesThis optional flag signifies that the matching entities should also be included in the return value.
-dictThis optional flag signifies that the return value should be formatted as a dictionary instead of a list.

Returns

This action returns the entity match count for each filter as a list or dictionary.

See Also

addFilter, getFilterDefinition

Note

Once an entity matches a filter, it is removed from consideration for lower priority filters.  That is, each entity is only counted once.

A return list is of the form: {filtername entcnt ?entitylist?  ... filtername entcnt ?entitylist?}

A return dictionary is suitable for use with the dict command and is of the form: {filtername {Count entcnt ?Entities entitylist?}  ... filtername {Count entcnt ?Entities entitylist?}}

Filters that do not match any mode entity names are not included in the return.

Mode entities that do not match any filter are included in the return in the Global filter.

Example

Code

# $mesher is a DatabaseMesher mode
# $dbEnts is a list of database entities

proc toNames { ents } {
    set ret [list]
    foreach ent $ents {
        lappend ret [$ent getName]
    }
    return $ret
}

puts "All Database Entities:"
puts "  [toNames $dbEnts]"
puts ""

$mesher addFilter F1 0.1 {quilt-4 quilt-5 {WING X*}}
$mesher addFilter F2 0.2 quilt-3
$mesher addFilter F3 0.3 {quilt-1* quilt-2 quilt-4 !quilt-11}

# format template
set fmt "| %-6.6s | %3.3s | %-30.30s | %-35.35s |"
set hr [string repeat - 50]

puts "\$mesher getFilterEntityCounts -includeEntities"
puts [format $fmt Filter Cnt "Matched Entities" Patterns]
puts [format $fmt $hr $hr $hr $hr]
foreach {name entCnt ents} [$mesher getFilterEntityCounts -includeEntities] {
    set patterns [dict get [$mesher getFilterDefinition -dict $name] Patterns]
    puts [format $fmt $name $entCnt [list [toNames $ents]] $patterns]
}

puts ""
puts "\$mesher getFilterEntityCounts -dict -includeEntities"
puts [format $fmt Filter Cnt "Matched Entities" Patterns]
puts [format $fmt $hr $hr $hr $hr]
dict for {name keyVals} [$mesher getFilterEntityCounts -dict -includeEntities] {
    set entCnt [dict get $keyVals Count]
    set ents [dict get $keyVals Entities]
    set patterns [dict get [$mesher getFilterDefinition -dict $name] Patterns]
    puts [format $fmt $name $entCnt [list [toNames $ents]] $patterns]
}

Output

All Database Entities:
  body_0 quilt-1 quilt-2 quilt-3 quilt-4 quilt-5 quilt-12 {WING XL} quilt-11

$mesher getFilterEntityCounts -includeEntities
| Filter | Cnt | Matched Entities               | Patterns                            |
| ------ | --- | ------------------------------ | ----------------------------------- |
| F1     |   3 | {quilt-4 quilt-5 {WING XL}}    | quilt-4 quilt-5 {WING X*}           |
| F2     |   1 | quilt-3                        | quilt-3                             |
| F3     |   3 | {quilt-1 quilt-2 quilt-12}     | quilt-1* quilt-2 quilt-4 !quilt-11  |
| Global |   1 | quilt-11                       | *                                   |

$mesher getFilterEntityCounts -dict -includeEntities
| Filter | Cnt | Matched Entities               | Patterns                            |
| ------ | --- | ------------------------------ | ----------------------------------- |
| F1     |   3 | {quilt-4 quilt-5 {WING XL}}    | quilt-4 quilt-5 {WING X*}           |
| F2     |   1 | quilt-3                        | quilt-3                             |
| F3     |   3 | {quilt-1 quilt-2 quilt-12}     | quilt-1* quilt-2 quilt-4 !quilt-11  |
| Global |   1 | quilt-11                       | *                                   |

setFilterPriority

$mesher setFilterPriority ?-type filter_type? name_list

This action sets the priority of one or more existing filters.

Parameters

-type filter_typeThis optional parameter specifies the string filter type.  One of < MaximumEdgeSpacing >.
name_listThis parameter is a list of string filter names.  Any filters not in name_list will be prioritized after the entities in name_list.

Returns

This action returns nothing.

See Also

addFilter, getFilterDefinition, getFilterDefinitions

Note

The relative ordering of the re-prioritized filters will be maintained.

Example

Code

# $mesher is a DatabaseMesher mode

proc doSetPriority { mesher names } {
    puts "\$mesher setFilterPriority [list $names]:"
    if { [catch {$mesher setFilterPriority $names} err] } {
        puts "  [string trim $err]"
    } else {
        puts "  [$mesher getFilterNames]"
    }
}

$mesher addFilter F1 0.1 {quilt-1*}
$mesher addFilter F2 0.2 {quilt-2*}
$mesher addFilter F3 0.3 {quilt-3*}
$mesher addFilter F4 0.4 {quilt-4*}
$mesher addFilter F5 0.5 {quilt-5*}
$mesher addFilter F6 0.6 {quilt-6*}

puts "Starting filter priority:"
puts "  [$mesher getFilterNames]"
doSetPriority $mesher {F2 F6 F4}
doSetPriority $mesher F6
doSetPriority $mesher {F6 F5 F4 F3 F2 F1}
puts "\nThese will fail:"
doSetPriority $mesher {F4 F2 F4 F2}
doSetPriority $mesher {XX YY}
doSetPriority $mesher {F4 F2 F4 XX}
doSetPriority $mesher {F2 Global F6 F4}

Output

Starting filter priority:
  F1 F2 F3 F4 F5 F6 Global
$mesher setFilterPriority {F2 F6 F4}:
  F2 F6 F4 F1 F3 F5 Global
$mesher setFilterPriority F6:
  F6 F2 F4 F1 F3 F5 Global
$mesher setFilterPriority {F6 F5 F4 F3 F2 F1}:
  F6 F5 F4 F3 F2 F1 Global

These will fail:
$mesher setFilterPriority {F4 F2 F4 F2}:
  ERROR: Found duplicate filter names {F4 F2}.
$mesher setFilterPriority {XX YY}:
  ERROR: Filters {XX YY} do not exist.
$mesher setFilterPriority {F4 F2 F4 XX}:
  ERROR: Filter XX does not exist. Found duplicate filter name F4.
$mesher setFilterPriority {F2 Global F6 F4}:
  ERROR: Cannot change the Global filter priority.

setFilterPatterns

$mesher setFilterPatterns ?-type filter_type? < index | name > pattern_list

This action sets the patterns of an existing filter.

Parameters

-type filter_typeThis optional parameter specifies the string filter type.  One of < MaximumEdgeSpacing >.
indexThis parameter is the integer index of the filter in the range [1, number of filters].
nameThis parameter is the string filter name.
patternsThe list of string patterns that will be used to match against database entity names.

Returns

This action returns nothing.

See Also

addFilter, getFilterDefinition, getFilterDefinitions

Example

Code

$mesher addFilter F1 0.1 {quilt-4 quilt-5}

puts "patterns: [dict get [$mesher getFilterDefinition -dict F1] Patterns]"
puts "\$mesher setFilterPatterns F1 {quilt-4 quilt-5 {WING X*}}"
$mesher setFilterPatterns F1 {quilt-4 quilt-5 {WING X*}}
puts "patterns: [dict get [$mesher getFilterDefinition -dict F1] Patterns]"

# Will fail
catch {$mesher setFilterPatterns Global {W*}} err
puts $err

Output

patterns: quilt-4 quilt-5
$mesher setFilterPatterns F1 {quilt-4 quilt-5 {WING X*}}
patterns: quilt-4 quilt-5 {WING X*}
ERROR: Cannot change the Global filter patterns.

setFilterEntities

$mesher setFilterEntities ?-type filter_type? ?-op op_type? < index | name > dbentity_list

This action modifies filter patterns as needed to guarantee that the entities in dbentity_list are captured by the specified filter.

Parameters

-type filter_typeThis optional parameter specifies the string filter type.  One of < MaximumEdgeSpacing >.
-op op_typeThis optional parameter specifies the string operation type.  One of < Set | Remove >.
indexThis parameter is the integer index of the filter in the range [1, number of filters].
nameThis parameter is the string filter name.
dbentity_listThis parameter is a list of pw::DatabaseEntity objects, or a single pw::DatabaseEntity object.

Returns

This action returns nothing.

See Also

addFilter, getFilterDefinition, getFilterDefinitions

Note

Other filters may need to be adjusted to properly fulfill the requested configure operation.  For instance, to add or set entities on a filter, those same entities will be removed from other filters as needed so that they no longer capture those entities.

Example

Code

# $mesher is a DatabaseMesher mode
# $dbEnts is a list of database entities

proc toNames { ents } {
    set ret [list]
    foreach ent $ents {
        lappend ret [$ent getName]
    }
    return $ret
}

proc dumpPatterns { mesher } {
    set filterCnts [$mesher getFilterEntityCounts -dict -includeEntities]
    set fmt "| %-6.6s | %-37.37s | %-55.55s |"
    set hr [string repeat - 80]
    puts [format $fmt Filter Patterns "Matched Entities"]
    puts [format $fmt $hr $hr $hr]
    foreach name [$mesher getFilterNames] {
        set defn [$mesher getFilterDefinition -dict $name]
        if { [catch {dict get $filterCnts $name Entities} ents] } {
            set ents [list]
        }
        puts [format $fmt $name [dict get $defn Patterns] [toNames $ents]]
    }
}

set quilts [list]
set names {quilt-11 quilt-2 quilt-1}
foreach name $names {
    lappend quilts [pw::DatabaseEntity getByName $name]
}

$mesher addFilter F1 0.1 {quilt-1*}
$mesher addFilter F2 0.2 {quilt-2*}
$mesher addFilter F3 0.3 {quilt-1* quilt-3*}

puts "All Database Entities:"
puts "  [toNames $dbEnts]"
puts ""
dumpPatterns $mesher
puts ""
puts "\$mesher setFilterEntities -op Set F2 [list $names]"
$mesher setFilterEntities -op Set F2 $quilts
dumpPatterns $mesher
puts ""
puts "\$mesher setFilterEntities -op Set F3 [list $names]"
$mesher setFilterEntities -op Set F3 $quilts
dumpPatterns $mesher
puts ""
puts "\$mesher setFilterEntities F1 [list $names]"
$mesher setFilterEntities F1 $quilts
dumpPatterns $mesher
puts ""
puts "\$mesher setFilterEntities -op Remove F1 [list $names]"
$mesher setFilterEntities -op Remove F1 $quilts
dumpPatterns $mesher
puts ""
# Setting entities to the Global filter removes them from all other filters
puts "\$mesher setFilterEntities Global [list $names]"
$mesher setFilterEntities Global $quilts
dumpPatterns $mesher
puts ""
puts "\$mesher setFilterEntities -op Remove Global [list $names]"
catch {$mesher setFilterEntities -op Remove Global $quilts} err
puts "  [join [split [string trim $err] "\n"] "\n  "]"

Output

All Database Entities:
  body_0 quilt-1 quilt-2 quilt-3 quilt-4 quilt-5 quilt-12 {WING XL} quilt-11

| Filter | Patterns                              | Matched Entities                                        |
| ------ | ------------------------------------- | ------------------------------------------------------- |
| F1     | quilt-1*                              | quilt-1 quilt-12 quilt-11                               |
| F2     | quilt-2*                              | quilt-2                                                 |
| F3     | quilt-1* quilt-3*                     | quilt-3                                                 |
| Global | *                                     | quilt-4 quilt-5 {WING XL}                               |

$mesher setFilterEntities -op Set F2 {quilt-11 quilt-2 quilt-1}
| Filter | Patterns                              | Matched Entities                                        |
| ------ | ------------------------------------- | ------------------------------------------------------- |
| F1     | quilt-1* !quilt-11 !quilt-1           | quilt-12                                                |
| F2     | quilt-2* quilt-11 quilt-1             | quilt-1 quilt-2 quilt-11                                |
| F3     | quilt-1* quilt-3*                     | quilt-3                                                 |
| Global | *                                     | quilt-4 quilt-5 {WING XL}                               |

$mesher setFilterEntities -op Set F3 {quilt-11 quilt-2 quilt-1}
| Filter | Patterns                              | Matched Entities                                        |
| ------ | ------------------------------------- | ------------------------------------------------------- |
| F1     | quilt-1* !quilt-11 !quilt-1           | quilt-12                                                |
| F2     | quilt-2* !quilt-2                     |                                                         |
| F3     | quilt-1* quilt-3* quilt-2             | quilt-1 quilt-2 quilt-3 quilt-11                        |
| Global | *                                     | quilt-4 quilt-5 {WING XL}                               |

$mesher setFilterEntities F1 {quilt-11 quilt-2 quilt-1}
| Filter | Patterns                              | Matched Entities                                        |
| ------ | ------------------------------------- | ------------------------------------------------------- |
| F1     | quilt-1* quilt-2                      | quilt-1 quilt-2 quilt-12 quilt-11                       |
| F2     | quilt-2* !quilt-2                     |                                                         |
| F3     | quilt-1* quilt-3* quilt-2             | quilt-3                                                 |
| Global | *                                     | quilt-4 quilt-5 {WING XL}                               |

$mesher setFilterEntities -op Remove F1 {quilt-11 quilt-2 quilt-1}
| Filter | Patterns                              | Matched Entities                                        |
| ------ | ------------------------------------- | ------------------------------------------------------- |
| F1     | quilt-1* !quilt-11 !quilt-1           | quilt-12                                                |
| F2     | quilt-2* !quilt-2                     |                                                         |
| F3     | quilt-1* quilt-3* quilt-2             | quilt-1 quilt-2 quilt-3 quilt-11                        |
| Global | *                                     | quilt-4 quilt-5 {WING XL}                               |

$mesher setFilterEntities Global {quilt-11 quilt-2 quilt-1}
| Filter | Patterns                              | Matched Entities                                        |
| ------ | ------------------------------------- | ------------------------------------------------------- |
| F1     | quilt-1* !quilt-11 !quilt-1           | quilt-12                                                |
| F2     | quilt-2* !quilt-2                     |                                                         |
| F3     | quilt-1* quilt-3* !quilt-11 !quilt-1  | quilt-3                                                 |
| Global | *                                     | quilt-1 quilt-2 quilt-4 quilt-5 {WING XL} quilt-11      |

$mesher setFilterEntities -op Remove Global {quilt-11 quilt-2 quilt-1}
  ERROR: Cannot remove entities from the Global filter.

setFilterValue

$mesher setFilterValue ?-type filter_type? < index | name > value

This action sets a filter’s value.

Parameters

-type filter_typeThis optional parameter specifies the string filter type.  One of < MaximumEdgeSpacing >.
indexThis parameter is the integer index of the filter in the range [1, number of filters].
nameThis parameter is the string filter name.
valueThe filter’s new value.  The value’s type and range depend on the filter_type.  See Ranges section below.

Returns

This action returns nothing.

See Also

addFilter, getFilterDefinition, getFilterDefinitions

Ranges

MaximumEdgeSpacingvalue is a float in the range [0, infinity).
ThinSurfaceInterpolationvalue is string with valid values < None | Automatic | ThinSurfaceInterpolation > or an integer with the range [2, infinity).

Example

Code

# $mesher is a DatabaseMesher mode
$mesher addFilter F1 0.1 {quilt-1*}

puts "value: [dict get [$mesher getFilterDefinition -dict F1] Value]"
$mesher setFilterValue F1 0.9
puts "\n\$mesher setFilterValue F1 0.9"
puts "value: [dict get [$mesher getFilterDefinition -dict F1] Value]"

puts "\n\$mesher setFilterValue F1 -1.0"
catch {$mesher setFilterValue F1 -1.0} err
puts "  [join [split [string trim $err] "\n"] "\n  "]"
puts "value: [dict get [$mesher getFilterDefinition -dict F1] Value]"

puts "\n\$mesher setFilterValue Q1 1.0"
catch {$mesher setFilterValue Q1 1.0} err
puts "  [join [split [string trim $err] "\n"] "\n  "]"

Output

value: 0.1

$mesher setFilterValue F1 0.9
value: 0.9

$mesher setFilterValue F1 -1.0
  ERROR: value outside the range [0,infinity)
  ERROR: usage (argument 3): ::pw::DatabaseMesher_1 setFilterValue ?-type filter_type? < index | name > value
value: 0.9

$mesher setFilterValue Q1 1.0
  ERROR: Filter 'Q1' does not exist.
  ERROR: usage (argument 2): ::pw::DatabaseMesher_1 setFilterValue ?-type filter_type? < index | name > value

addMappingFilter

$mesher addMappingFilter ?-priority < index | name >? ?-name name? value ?pattern_list ?equal_spacing ?force_adjacent ?max_aspect_ratio?

This action adds a new mapping filter for the mesher mode.  A mapping filter controls whether unstructured domains on quilts are mapped to structured domains or initialized via the Thin Surface Interpolation algorithm.

Parameters

-priority < index | name >This optional flag specifies the priority of the new mapping filter.  The new mapping filter will be inserted into the mapping filter queue before the (existing) mapping filter identified by its integer index or string name.  If not specified, the new filter is appended to the filter queue (lowest priority).
-name nameThis optional flag is the string mapping filter name.  If not provided, a unique “filter-N” name will be assigned.
valueThis required parameter is the mapping filter’s value.  See Ranges section below.
pattern_listThis optional parameter defines the list of string patterns that will be used to match against database entity names.  The default is an empty list (matches nothing).
equals_spacingThis optional boolean parameter controls whether or not equal spacing is applied along the short direction.  The default value is false.
force_adjacentIf this optional boolean parameter is set to true, adjacent domains will have their neighboring boundaries set to use the adjacent grid boundary condition.  The default value is false.
max_aspect_ratioIf set, this float parameter overrides the global maximum aspect ratio setting for any domain that maps to this filter.  The default value is 0.0, which forces the global value to be used.

Returns

This action returns the name of the added mapping filter.

Notes

When applying mapping filters, each entity’s name is matched against each mapping filter in a queue.  Within a queue, each mapping filter is tried in priority order.  The first match within a queue stops searching, applies the mapping filter to the matched entity, and then continues matching with the next mapping filter.

Mapping filters are matched against quilts.  For each match, the domain built from the quilt will have special thin surface handling controlled by the value.  A value of “None” causes the corresponding domains to be initialized normally without any special thin surface handling.  A value of “Automatic” is the default behavior and analyzes the domains to see if it is appropriate to map the unstructured domain to a corresponding structured domain, setting an appropriate number of subdivisions for the shorter sides of the domain.  The “ThinSurfaceInterpolation” setting will result in the domains getting initialized with the Thin Surface Interpolation algorithm.  The matching domains will not be mapped, but the resulting algorithm produces a similar result while allowing the dimensions to differ on opposing sides.  The “Force” value skips a large portion of the analysis performed with the “Automatic” mode and will map the filtered domains to structured domains where feasible regardless of any analytics with regard to aspect ratio, etc.  The number of subdivisions on the shorter sides will be automatically computed by the code.  Finally, an integer value of 2 or greater is similar to the “Force” value except that the number of subdivisions on the short edges is set to the given value.

Note that if the quilt has more than one boundary loop (i.e., holes) or has less that 4 boundaries, the resulting domains will not be mapped, regardless of the mapping filter specifications.

Ranges

A valid value is string with valid values < None | Automatic | Force | ThinSurfaceInterpolation > or an integer with the range [2, infinity).  Any explicit values are scaled by the refinement factor.

See Also

getMappingFilterDefinition, getMappingFilterDefinitions

Example

Code

# $mesher is a DatabaseMesher mode
$mesher addMappingFilter -name F3 3 {quilt-1* quilt-2 quilt-4 !quilt-11} 1 1 20.0
$mesher addMappingFilter -priority 1  -name F1 Automatic {quilt-4 quilt-5}
$mesher addMappingFilter -priority F3 -name F2 ThinSurfaceInterpolation quilt-3 0 1

puts "\$mesher getMappingFilterDefinitions -dict"
dict for {priority filterDefn} [$mesher getMappingFilterDefinitions -dict] {
    puts "$priority [list $filterDefn]"
    dict for {key val} $filterDefn {
        puts [format "  %-19.19s = %-s" $key $val]
    }
    puts ""
}

# Global filter always exists and always has the lowest priority
puts "\$mesher addMappingFilter -name Global 2 bad*"
catch {$mesher addMappingFilter -name Global 2 bad*} err
puts $err

Output

$mesher getMappingFilterDefinitions -dict
1 {Priority 1 Name F1 Value Automatic Patterns {quilt-4 quilt-5}}
  Priority           = 1
  Name               = F1
  Value              = Automatic
  Patterns           = quilt-4 quilt-5
  EqualSpacing       = 0
  ForceAdjacentGrid  = 0
  MaximumAspectRatio = 0.0

2 {Priority 2 Name F2 Value ThinSurfaceInterpolation Patterns quilt-3}
  Priority           = 2
  Name               = F2
  Value              = ThinSurfaceInterpolation
  Patterns           = quilt-3
  EqualSpacing       = 0
  ForceAdjacentGrid  = 1
  MaximumAspectRatio = 0.0

3 {Priority 3 Name F3 Value 3 Patterns {quilt-1* quilt-2 quilt-4 !quilt-11}}
  Priority           = 3
  Name               = F3
  Value              = 3
  Patterns           = quilt-1* quilt-2 quilt-4 !quilt-11
  EqualSpacing       = 1
  ForceAdjacentGrid  = 1
  MaximumAspectRatio = 20.0

4 {Priority 4 Name Global Value Automatic Patterns *}
  Priority           = 4
  Name               = Global
  Value              = Automatic
  Patterns           = *
  EqualSpacing       = 0
  ForceAdjacentGrid  = 0
  MaximumAspectRatio = 0.0

$mesher addMappingFilter -name Global 5 bad*
ERROR: Filter Global already exists.

deleteMappingFilter

$mesher deleteMappingFilter < index | name >

This action deletes a mapping filter.

Parameters

indexThis parameter is the integer index of the filter in the range [1, number of filters].
nameThis parameter is the string filter name.

Returns

This action returns nothing.

See Also

addMappingFilter, getMappingFilterDefinition, getMappingFilterDefinitions

Example

Code

# $mesher is a DatabaseMesher mode
puts "\$mesher addMappingFilter F1 5 {quilt-1*}"
$mesher addMappingFilter F1 5 {quilt-1*}

puts "\$mesher addMappingFilter F2 0.2 {quilt-2*}"
$mesher addMappingFilter F2 2 {quilt-2*}
puts "\$mesher getMappingFilterCount: [$mesher getMappingFilterCount]"

puts "\$mesher deleteMappingFilter F1"
$mesher deleteMappingFilter F1
puts "\$mesher getMappingFilterCount: [$mesher getMappingFilterCount]"

puts "\$mesher deleteMappingFilter F2"
$mesher deleteMappingFilter F2
puts "\$mesher getMappingFilterCount: [$mesher getMappingFilterCount]"

puts "\$mesher deleteMappingFilter F1"
catch {$mesher deleteMappingFilter F1} err
puts "  [join [split [string trim $err] "\n"] "\n  "]"

puts "\$mesher deleteMappingFilter Global"
catch {$mesher deleteMappingFilter Global} err
puts "  [join [split [string trim $err] "\n"] "\n  "]"

Output

$mesher addMappingFilter F1 5 {quilt-1*}
$mesher addMappingFilter F2 2 {quilt-2*}
$mesher getMappingFilterCount: 3
$mesher deleteMappingFilter F1
$mesher getMappingFilterCount: 2
$mesher deleteMappingFilter F2
$mesher getMappingFilterCount: 1
$mesher deleteMappingFilter F1
  ERROR: Filter 'F1' does not exist.
$mesher deleteMappingFilter Global
  ERROR: Cannot delete the Global filter.

setMappingFilterName

$mesher setMappingFilterName < index | name > newName

This action renames a mapping filter.

Parameters

indexThis parameter is the integer index of the filter in the range [1, number of filters].
nameThis parameter is the string mapping filter name.
newNameThe mapping filter’s new name.

Returns

This action returns the actual new name.  Note that it will not be the specified name if another filter of that name exists.

See Also

addMappingFilter, getMappingFilterDefinition, getMappingFilterDefinitions

Example

Code

# $mesher is a DatabaseMesher mode
puts "set nm \[\$mesher addMappingFilter {} 5\]"
set nm [$mesher addMappingFilter {} 5]
puts "\$mesher getMappingFilterDefinition -dict \$nm"
puts "  [$mesher getMappingFilterDefinition -dict $nm]"
puts "\$mesher setMappingFilterName \$nm FX"
$mesher setMappingFilterName $nm FX
puts "\$mesher getMappingFilterDefinition -dict \$nm"
catch {$mesher getMappingFilterDefinition -dict $nm} err
puts "  [join [split [string trim $err] "\n"] "\n  "]"
puts "\$mesher getMappingFilterDefinition -dict FX"
puts "  [$mesher getMappingFilterDefinition -dict FX]"

Output

set nm [$mesher addMappingFilter {} 5]
$mesher getMappingFilterDefinition -dict $nm
  Priority 1 Name filter-1 Value 5 Patterns {}
$mesher setMappingFilterName $nm FX
$mesher getMappingFilterDefinition -dict $nm
  ERROR: Filter 'filter-1' does not exist.
  ERROR: usage (argument 3): ::pw::DatabaseMesher_1 getMappingFilterDefinition ?-type filter_type? < index | name >
$mesher getMappingFilterDefinition -dict FX
  Priority 1 Name FX Value 5 Patterns {}

getMappingFilterNames

$mesher getMappingFilterNames ?-regex? ?pattern?

This action returns a list of mapping filter names defined in the mesher mode.

Parameters

-regexThis optional flag signifies that the given pattern should be considered a regular expression pattern rather than a glob pattern.
patternThis optional parameter is the string pattern used to filter the returned filter names.

Returns

A list of strings of the filter names that match the pattern.  If a pattern is not given, all filter names will be returned.

Example

Code

# $mesher is a DatabaseMesher mode
$mesher addMappingFilter F1 Automatic {quilt-1*}
$mesher addMappingFilter F2 2 {quilt-2*}
$mesher addMappingFilter F3 3 {quilt-3*}

puts "\$mesher getMappingFilterNames: [list [$mesher getMappingFilterNames]]"

Output

$mesher getMappingFilterNames: {F1 F2 F3 Global}

getMappingFilterCount

$mesher getMappingFilterCount ?-type filter_type?

This action returns the number of mapping filters of the defined in the mesher mode.

Parameters

None.

Returns

The integer number of filters.

Example

Code

# $mesher is a DatabaseMesher mode
puts "\$mesher getMappingFilterCount: [$mesher getMappingFilterCount]"

$mesher addMappingFilter F1 Automatic {quilt-1*}
$mesher addMappingFilter F2 2 {quilt-2*}
$mesher addMappingFilter F3 3 {quilt-3*}

puts "\$mesher getMappingFilterCount: [$mesher getMappingFilterCount]"

Output

$mesher getMappingFilterCount: 1
$mesher getMappingFilterCount: 4

getMappingFilterDefinition

$mesher getMappingFilterDefinition ?-type filter_type? ?-dict? < index | name >

This action gets the definition of a mapping filter identified by index or name.

Parameters

-dictThis optional flag signifies that the return value should be formatted as a dictionary instead of a plain old list.
indexThis parameter is the integer index of the filter in the range [1, number of filters].
nameThis parameter is the string filter name.

Returns

This action returns the filter definition as a list.

A returned list contains { priority name value patterns }.

A return dictionary is suitable for use with the dict command and is of the form: { Priority priority Name name Value value Patterns patterns }

Where,

  • priority is the integer priority of the filter.
  • name is the string name of the filter
  • value is either a string equaling either “None”, “Automatic”, “Force”, “ThinSurfaceInterpolation”, or an integer value representing the number of subdivisions to use on a “Force” mapping (see addMappingFilter for details)
  • patterns is a string list of glob patterns matched against entity names.

See Also

addMappingFilter, getMappingFilterDefinitions

Example

Code

# $mesher is a DatabaseMesher mode
$mesher addMappingFilter F1 Automatic {quilt-1* wing-1*}
$mesher addMappingFilter F2 2 {quilt-2* wing-2*}

foreach name [$mesher getMappingFilterNames] {
    puts ""
    puts "\$mesher getMappingFilterDefinition [list $name]:"
    puts "    list[list [$mesher getMappingFilterDefinition $name]]"
    puts "\$mesher getMappingFilterDefinition -dict [list $name]:"
    dict for {key val} [$mesher getMappingFilterDefinition -dict $name] {
        puts [format "    %-10.10s: %-s" $key $val]
    }
}
puts ""
for {set ii 1} {$ii <= [$mesher getMappingFilterCount]} {incr ii} {
    puts ""
    puts "\$mesher getMappingFilterDefinition $ii:"
    puts "    list[list [$mesher getMappingFilterDefinition $ii]]"
    puts "\$mesher getMappingFilterDefinition -dict $ii:"
    dict for {key val} [$mesher getMappingFilterDefinition -dict $ii] {
        puts [format "    %-10.10s: %-s" $key $val]
    }
}

Output

$mesher getMappingFilterDefinition F1:
    list{1 F1 Automatic {quilt-1* wing-1*}}
$mesher getMappingFilterDefinition -dict F1:
    Priority  : 1
    Name      : F1
    Value     : Automatic
    Patterns  : quilt-1* wing-1*

$mesher getMappingFilterDefinition F2:
    list{2 F2 2 {quilt-2* wing-2*}}
$mesher getMappingFilterDefinition -dict F2:
    Priority  : 2
    Name      : F2
    Value     : 2
    Patterns  : quilt-2* wing-2*

$mesher getMappingFilterDefinition Global:
    list{3 Global 0.0 *}
$mesher getMappingFilterDefinition -dict Global:
    Priority  : 3
    Name      : Global
    Value     : Automatic
    Patterns  : *


$mesher getMappingFilterDefinition 1:
    list{1 F1 Automatic {quilt-1* wing-1*}}
$mesher getMappingFilterDefinition -dict 1:
    Priority  : 1
    Name      : F1
    Value     : Automatic
    Patterns  : quilt-1* wing-1*

$mesher getMappingFilterDefinition 2:
    list{2 F2 0.2 {quilt-2* wing-2*}}
$mesher getMappingFilterDefinition -dict 2:
    Priority  : 2
    Name      : F2
    Value     : 2
    Patterns  : quilt-2* wing-2*

$mesher getMappingFilterDefinition 3:
    list{3 Global 0.0 *}
$mesher getMappingFilterDefinition -dict 3:
    Priority  : 3
    Name      : Global
    Value     : Automatic
    Patterns  : *

getMappingFilterDefinitions

$mesher getMappingFilterDefinitions ?-dict?

This action gets a list of all mapping filter definitions.

Parameters

-dictThis optional flag signifies that the return value should be formatted as a dictionary instead of a plain old list.

Returns

This action returns a list of all filter definitions in priority order.  See getMappingFilterDefinition

See Also

addMappingFilter, getMappingFilterDefinition

Example

Code

# $mesher is a DatabaseMesher mode
$mesher addMappingFilter F1 ThinSurfaceInterpolation {quilt-1* wing-1*}
$mesher addMappingFilter F2 2 {quilt-2* wing-2*} 1 1 15.0

puts "\n\$mesher getMappingFilterDefinitions:"
foreach filterDefn [$mesher getMappingFilterDefinitions] {
    puts "  [list $filterDefn]"
}

puts "\n\$mesher getMappingFilterDefinitions -dict:"
dict for {priority filterDefn} [$mesher getMappingFilterDefinitions -dict] {
    puts "  $priority [list $filterDefn]"
    dict for {key val} $filterDefn {
        puts [format "    %-19.19s: %-s" $key $val]
    }
}

Output

$mesher getMappingFilterDefinitions:
  {1 F1 ThinSurfaceInterpolation {quilt-1* wing-1*}}
  {2 F2 2 {quilt-2* wing-2*}}
  {3 Global Automatic *}

$mesher getMappingFilterDefinitions -dict:
  1 {Priority 1 Name F1 Value ThinSurfaceInterpolation Patterns {quilt-1* wing-1*}}
    Priority           : 1
    Name               : F1
    Value              : ThinSurfaceInterpolation
    Patterns           : quilt-1* wing-1*
    EqualSpacing       : 0
    ForceAdjacentGrid  : 0
    MaximumAspectRatio : 0.0
  2 {Priority 2 Name F2 Value 0.2 Patterns {quilt-2* wing-2*}}
    Priority           : 2
    Name               : F2
    Value              : 2
    Patterns           : quilt-2* wing-2*
    EqualSpacing       : 1
    ForceAdjacentGrid  : 1
    MaximumAspectRatio : 15.0
  3 {Priority 3 Name Global Value Automatic Patterns *}
    Priority           : 3
    Name               : Global
    Value              : Automatic
    Patterns           : *
    EqualSpacing       : 0
    ForceAdjacentGrid  : 0
    MaximumAspectRatio : 0.0

getMappingFilterEntityCounts

$mesher getMappingFilterEntityCounts ?-type filter_type? ?-includeEntities? ?-dict?

This action matches the name of each mode entity against the mapping filter patterns in filter priority order and returns the match count for each filter.

Parameters

-includeEntitiesThis optional flag signifies that the matching entities should also be included in the return value.
-dictThis optional flag signifies that the return value should be formatted as a dictionary instead of a list.

Returns

This action returns the entity match count for each filter as a list or dictionary.

See Also

addMappingFilter, getMappingFilterDefinition

Note

Once an entity matches a mapping filter, it is removed from consideration for lower priority filters.  That is, each entity is only counted once.

A return list is of the form: {filtername entcnt ?entitylist?  ... filtername entcnt ?entitylist?}

A return dictionary is suitable for use with the dict command and is of the form: {filtername {Count entcnt ?Entities entitylist?}  ... filtername {Count entcnt ?Entities entitylist?}}

Filters that do not match any mode entity names are not included in the return.

Mode entities that do not match any filter are included in the return in the Global filter.

Example

Code

# $mesher is a DatabaseMesher mode
# $dbEnts is a list of database entities

proc toNames { ents } {
    set ret [list]
    foreach ent $ents {
        lappend ret [$ent getName]
    }
    return $ret
}

puts "All Database Entities:"
puts "  [toNames $dbEnts]"
puts ""

$mesher addMappingFilter F1 ThinSurfaceInterpolation {quilt-4 quilt-5 {WING X*}}
$mesher addMappingFilter F2 2 quilt-3
$mesher addMappingFilter F3 3 {quilt-1* quilt-2 quilt-4 !quilt-11}

# format template
set fmt "| %-6.6s | %3.3s | %-30.30s | %-35.35s |"
set hr [string repeat - 50]

puts "\$mesher getMappingFilterEntityCounts -includeEntities"
puts [format $fmt Filter Cnt "Matched Entities" Patterns]
puts [format $fmt $hr $hr $hr $hr]
foreach {name entCnt ents} [$mesher getMappingFilterEntityCounts -includeEntities] {
    set patterns [dict get [$mesher getFilterDefinition -dict $name] Patterns]
    puts [format $fmt $name $entCnt [list [toNames $ents]] $patterns]
}

puts ""
puts "\$mesher getMappingFilterEntityCounts -dict -includeEntities"
puts [format $fmt Filter Cnt "Matched Entities" Patterns]
puts [format $fmt $hr $hr $hr $hr]
dict for {name keyVals} [$mesher getMappingFilterEntityCounts -dict -includeEntities] {
    set entCnt [dict get $keyVals Count]
    set ents [dict get $keyVals Entities]
    set patterns [dict get [$mesher getFilterDefinition -dict $name] Patterns]
    puts [format $fmt $name $entCnt [list [toNames $ents]] $patterns]
}

Output

All Database Entities:
  body_0 quilt-1 quilt-2 quilt-3 quilt-4 quilt-5 quilt-12 {WING XL} quilt-11

$mesher getMappingFilterEntityCounts -includeEntities
| Filter | Cnt | Matched Entities               | Patterns                            |
| ------ | --- | ------------------------------ | ----------------------------------- |
| F1     |   3 | {quilt-4 quilt-5 {WING XL}}    | quilt-4 quilt-5 {WING X*}           |
| F2     |   1 | quilt-3                        | quilt-3                             |
| F3     |   3 | {quilt-1 quilt-2 quilt-12}     | quilt-1* quilt-2 quilt-4 !quilt-11  |
| Global |   1 | quilt-11                       | *                                   |

$mesher getMappingFilterEntityCounts -dict -includeEntities
| Filter | Cnt | Matched Entities               | Patterns                            |
| ------ | --- | ------------------------------ | ----------------------------------- |
| F1     |   3 | {quilt-4 quilt-5 {WING XL}}    | quilt-4 quilt-5 {WING X*}           |
| F2     |   1 | quilt-3                        | quilt-3                             |
| F3     |   3 | {quilt-1 quilt-2 quilt-12}     | quilt-1* quilt-2 quilt-4 !quilt-11  |
| Global |   1 | quilt-11                       | *                                   |

setMappingFilterPriority

$mesher setMappingFilterPriority name_list

This action sets the priority of one or more existing mapping filters.

Parameters

name_listThis parameter is a list of string mapping filter names.  Any filters not in name_list will be prioritized after the entities in name_list.

Returns

This action returns nothing.

See Also

addMappingFilter, getMappingFilterDefinition, getMappingFilterDefinitions

Note

The relative ordering of the re-prioritized mapping filters will be maintained.

Example

Code

# $mesher is a DatabaseMesher mode

proc doSetPriority { mesher names } {
    puts "\$mesher setMappingFilterPriority [list $names]:"
    if { [catch {$mesher setMappingFilterPriority $names} err] } {
        puts "  [string trim $err]"
    } else {
        puts "  [$mesher getMappingFilterNames]"
    }
}

$mesher addMappingFilter F1 ThinSurfaceInterpolation {quilt-1*}
$mesher addMappingFilter F2 2 {quilt-2*}
$mesher addMappingFilter F3 3 {quilt-3*}
$mesher addMappingFilter F4 4 {quilt-4*}
$mesher addMappingFilter F5 5 {quilt-5*}
$mesher addMappingFilter F6 6 {quilt-6*}

puts "Starting filter priority:"
puts "  [$mesher getMappingFilterNames]"
doSetPriority $mesher {F2 F6 F4}
doSetPriority $mesher F6
doSetPriority $mesher {F6 F5 F4 F3 F2 F1}
puts "\nThese will fail:"
doSetPriority $mesher {F4 F2 F4 F2}
doSetPriority $mesher {XX YY}
doSetPriority $mesher {F4 F2 F4 XX}
doSetPriority $mesher {F2 Global F6 F4}

Output

Starting filter priority:
  F1 F2 F3 F4 F5 F6 Global
$mesher setMappingFilterPriority {F2 F6 F4}:
  F2 F6 F4 F1 F3 F5 Global
$mesher setMappingFilterPriority F6:
  F6 F2 F4 F1 F3 F5 Global
$mesher setMappingFilterPriority {F6 F5 F4 F3 F2 F1}:
  F6 F5 F4 F3 F2 F1 Global

These will fail:
$mesher setMappingFilterPriority {F4 F2 F4 F2}:
  ERROR: Found duplicate filter names {F4 F2}.
$mesher setMappingFilterPriority {XX YY}:
  ERROR: Filters {XX YY} do not exist.
$mesher setMappingFilterPriority {F4 F2 F4 XX}:
  ERROR: Filter XX does not exist. Found duplicate filter name F4.
$mesher setMappingFilterPriority {F2 Global F6 F4}:
  ERROR: Cannot change the Global filter priority.

setMappingFilterPatterns

$mesher setMappingFilterPatterns < index | name > pattern_list

This action sets the patterns of an existing mapping filters.

Parameters

indexThis parameter is the integer index of the mapping filter in the range [1, number of mapping filters].
nameThis parameter is the string mapping filter name.
patternsThe list of string patterns that will be used to match against database entity names.

Returns

This action returns nothing.

See Also

addMappingFilter, getMappingFilterDefinition, getMappingFilterDefinitions

Example

Code

$mesher addMappingFilter F1 ThinSurfaceInterpolation {quilt-4 quilt-5}

puts "patterns: [dict get [$mesher getMappingFilterDefinition -dict F1] Patterns]"
puts "\$mesher setMappingFilterPatterns F1 {quilt-4 quilt-5 {WING X*}}"
$mesher setMappingFilterPatterns F1 {quilt-4 quilt-5 {WING X*}}
puts "patterns: [dict get [$mesher getMappingFilterDefinition -dict F1] Patterns]"

# Will fail
catch {$mesher setMappingFilterPatterns Global {W*}} err
puts $err

Output

patterns: quilt-4 quilt-5
$mesher setMappingFilterPatterns F1 {quilt-4 quilt-5 {WING X*}}
patterns: quilt-4 quilt-5 {WING X*}
ERROR: Cannot change the Global filter patterns.

setMappingFilterEntities

$mesher setMappingFilterEntities ?-op op_type? < index | name > dbentity_list

This action modifies mapping filter patterns as needed to guarantee that the entities in dbentity_list are captured by the specified filter.

Parameters

-op op_typeThis optional parameter specifies the string operation type.  One of < Set | Remove >.
indexThis parameter is the integer index of the filter in the range [1, number of filters].
nameThis parameter is the string filter name.
dbentity_listThis parameter is a list of pw::DatabaseEntity objects, or a single pw::DatabaseEntity object.

Returns

This action returns nothing.

See Also

addMappingFilter, getMappingFilterDefinition, getMappingFilterDefinitions

Note

Other mapping filters may need to be adjusted to properly fulfill the requested configure operation.  For instance, to add or set entities on a mapping filter, those same entities will be removed from other mapping filters as needed so that they no longer capture those entities.

Example

Code

# $mesher is a DatabaseMesher mode
# $dbEnts is a list of database entities

proc toNames { ents } {
    set ret [list]
    foreach ent $ents {
        lappend ret [$ent getName]
    }
    return $ret
}

proc dumpPatterns { mesher } {
    set filterCnts [$mesher getMappingFilterEntityCounts -dict -includeEntities]
    set fmt "| %-6.6s | %-37.37s | %-55.55s |"
    set hr [string repeat - 80]
    puts [format $fmt Filter Patterns "Matched Entities"]
    puts [format $fmt $hr $hr $hr]
    foreach name [$mesher getMappingFilterNames] {
        set defn [$mesher getMappingFilterDefinition -dict $name]
        if { [catch {dict get $filterCnts $name Entities} ents] } {
            set ents [list]
        }
        puts [format $fmt $name [dict get $defn Patterns] [toNames $ents]]
    }
}

set quilts [list]
set names {quilt-11 quilt-2 quilt-1}
foreach name $names {
    lappend quilts [pw::DatabaseEntity getByName $name]
}

$mesher addMappingFilter F1 ThisSurfaceInterpolation {quilt-1*}
$mesher addMappingFilter F2 2 {quilt-2*}
$mesher addMappingFilter F3 3 {quilt-1* quilt-3*}

puts "All Database Entities:"
puts "  [toNames $dbEnts]"
puts ""
dumpPatterns $mesher
puts ""
puts "\$mesher setMappingFilterEntities -op Set F2 [list $names]"
$mesher setMappingFilterEntities -op Set F2 $quilts
dumpPatterns $mesher
puts ""
puts "\$mesher setMappingFilterEntities -op Set F3 [list $names]"
$mesher setMappingFilterEntities -op Set F3 $quilts
dumpPatterns $mesher
puts ""
puts "\$mesher setMappingFilterEntities F1 [list $names]"
$mesher setMappingFilterEntities F1 $quilts
dumpPatterns $mesher
puts ""
puts "\$mesher setMappingFilterEntities -op Remove F1 [list $names]"
$mesher setMappingFilterEntities -op Remove F1 $quilts
dumpPatterns $mesher
puts ""
# Setting entities to the Global mapping filter removes them from
# all other filters
puts "\$mesher setMappingFilterEntities Global [list $names]"
$mesher setMappingFilterEntities Global $quilts
dumpPatterns $mesher
puts ""
puts "\$mesher setMappingFilterEntities -op Remove Global [list $names]"
catch {$mesher setMappingFilterEntities -op Remove Global $quilts} err
puts "  [join [split [string trim $err] "\n"] "\n  "]"

Output

All Database Entities:
  body_0 quilt-1 quilt-2 quilt-3 quilt-4 quilt-5 quilt-12 {WING XL} quilt-11

| Filter | Patterns                              | Matched Entities                                        |
| ------ | ------------------------------------- | ------------------------------------------------------- |
| F1     | quilt-1*                              | quilt-1 quilt-12 quilt-11                               |
| F2     | quilt-2*                              | quilt-2                                                 |
| F3     | quilt-1* quilt-3*                     | quilt-3                                                 |
| Global | *                                     | quilt-4 quilt-5 {WING XL}                               |

$mesher setMappingFilterEntities -op Set F2 {quilt-11 quilt-2 quilt-1}
| Filter | Patterns                              | Matched Entities                                        |
| ------ | ------------------------------------- | ------------------------------------------------------- |
| F1     | quilt-1* !quilt-11 !quilt-1           | quilt-12                                                |
| F2     | quilt-2* quilt-11 quilt-1             | quilt-1 quilt-2 quilt-11                                |
| F3     | quilt-1* quilt-3*                     | quilt-3                                                 |
| Global | *                                     | quilt-4 quilt-5 {WING XL}                               |

$mesher setMappingFilterEntities -op Set F3 {quilt-11 quilt-2 quilt-1}
| Filter | Patterns                              | Matched Entities                                        |
| ------ | ------------------------------------- | ------------------------------------------------------- |
| F1     | quilt-1* !quilt-11 !quilt-1           | quilt-12                                                |
| F2     | quilt-2* !quilt-2                     |                                                         |
| F3     | quilt-1* quilt-3* quilt-2             | quilt-1 quilt-2 quilt-3 quilt-11                        |
| Global | *                                     | quilt-4 quilt-5 {WING XL}                               |

$mesher setMappingFilterEntities F1 {quilt-11 quilt-2 quilt-1}
| Filter | Patterns                              | Matched Entities                                        |
| ------ | ------------------------------------- | ------------------------------------------------------- |
| F1     | quilt-1* quilt-2                      | quilt-1 quilt-2 quilt-12 quilt-11                       |
| F2     | quilt-2* !quilt-2                     |                                                         |
| F3     | quilt-1* quilt-3* quilt-2             | quilt-3                                                 |
| Global | *                                     | quilt-4 quilt-5 {WING XL}                               |

$mesher setMappingFilterEntities -op Remove F1 {quilt-11 quilt-2 quilt-1}
| Filter | Patterns                              | Matched Entities                                        |
| ------ | ------------------------------------- | ------------------------------------------------------- |
| F1     | quilt-1* !quilt-11 !quilt-1           | quilt-12                                                |
| F2     | quilt-2* !quilt-2                     |                                                         |
| F3     | quilt-1* quilt-3* quilt-2             | quilt-1 quilt-2 quilt-3 quilt-11                        |
| Global | *                                     | quilt-4 quilt-5 {WING XL}                               |

$mesher setMappingFilterEntities Global {quilt-11 quilt-2 quilt-1}
| Filter | Patterns                              | Matched Entities                                        |
| ------ | ------------------------------------- | ------------------------------------------------------- |
| F1     | quilt-1* !quilt-11 !quilt-1           | quilt-12                                                |
| F2     | quilt-2* !quilt-2                     |                                                         |
| F3     | quilt-1* quilt-3* !quilt-11 !quilt-1  | quilt-3                                                 |
| Global | *                                     | quilt-1 quilt-2 quilt-4 quilt-5 {WING XL} quilt-11      |

$mesher setMappingFilterEntities -op Remove Global {quilt-11 quilt-2 quilt-1}
  ERROR: Cannot remove entities from the Global filter.

setMappingFilterValue

This action sets a mapping filter’s value.

Parameters

indexThis parameter is the integer index of the filter in the range [1, number of filters].
nameThis parameter is the string filter name.
valueThe filter’s new value.  The value is a string with valid values < None | Automatic | Force | ThinSurfaceInterpolation > or an integer with the range [2, infinity) representing the number of subdivisions along the short side of the mapped domain.  The ‘None’ option will prevent a mapped domain from possibly being generated on the corresponding quilts.  The ‘Automatic’ option is the default setting which lets the algorithm decide whether or not to generate a mapped domain.  The ‘Force’ option indicates that a mapped domain should be generated on the corresponding quilts, but leaves it up to the algorithm to determine the number of subdivisions on the smaller sides of the domains.  Note that this does not guarantee that mapped domains will be created -- there are still topological requirements that must be met.  The ‘ThinSurfaceInterpolation’ option specifies that any domains created on the corresponding quilts should be initialized with the ‘ThinSurfaceInterpolation’ algorithm.  Finally, an integer value is similar to the ‘Force’ option, but the integer value is used as the number of subdivisions to be imposed on the smaller sides of the domains.

Returns

This action returns nothing.

See Also

addMappingFilter, getMappingFilterDefinition, getMappingFilterDefinitions

Example

Code

# $mesher is a DatabaseMesher mode
$mesher addMappingFilter F1 ThinSurfaceInterpolation {quilt-1*}

puts "value: [dict get [$mesher getMappingFilterDefinition -dict F1] Value]"
$mesher setMappingFilterValue F1 9
puts "\n\$mesher setMappingFilterValue F1 9"
puts "value: [dict get [$mesher getMappingFilterDefinition -dict F1] Value]"

puts "\n\$mesher setMappingFilterValue F1 -1.0"
catch {$mesher setMappingFilterValue F1 -1.0} err
puts "  [join [split [string trim $err] "\n"] "\n  "]"
puts "value: [dict get [$mesher getMappingFilterDefinition -dict F1] Value]"

puts "\n\$mesher setMappingFilterValue Q1 1.0"
catch {$mesher setMappingFilterValue Q1 1.0} err
puts "  [join [split [string trim $err] "\n"] "\n  "]"

Output

value: 0.1

$mesher setMappingFilterValue F1 9
value: 0.9

$mesher setMappingFilterValue F1 -1
  ERROR: value outside the range [2,infinity)
  ERROR: usage (argument 3): ::pw::DatabaseMesher_1 setMappingFilterValue ?-type filter_type? < index | name > value
value: 0.9

$mesher setMappingFilterValue Q1 10
  ERROR: Filter 'Q1' does not exist.
  ERROR: usage (argument 2): ::pw::DatabaseMesher_1 setMappingFilterValue ?-type filter_type? < index | name > value

setMappingFilterEqualSpacing

$mesher setMappingFilterEqualSpacing < index | name > use_equal

This action sets a mapping filter to use equal spacing.

Parameters

indexThis parameter is the integer index of the filter in the range [1, number of filters].
nameThis parameter is the string filter name.
use_equala boolean indicating whether to enable equal spacing for the filter.

Returns

This action returns nothing.

See Also

addMappingFilter, getMappingFilterDefinition, getMappingFilterDefinitions, getMappingFilterEqualSpacing

Example

Code

# $mesher is a DatabaseMesher mode
$mesher addMappingFilter F1 ThinSurfaceInterpolation {quilt-1*}
$mesher setMappingFilterEqualSpacing true
puts [$mesher getMappingFilterEqualSpacing F1]

Output

1

getMappingFilterEqualSpacing

$mesher getMappingFilterEqualSpacing < name | index >

This action returns whether a mapping filter uses equal spacing.

Parameters

indexThis parameter is the integer index of the filter in the range [1, number of filters].
nameThis parameter is the string filter name.

Returns

A boolean indicating whether equal spacing should be applied for the filter.

Example

Code Code

# $mesher is a DatabaseMesher mode
$mesher addMappingFilter F1 ThinSurfaceInterpolation {quilt-1*}
$mesher setMappingFilterEqualSpacing F1 false
puts [$mesher getMappingFilterEqualSpacing F1]

Output

0

setMappingFilterForceAdjacentGrid

$mesher setMappingFilterForceAdjacentGrid < index | name > force

This action sets a mapping filter to force adjacent grid spacing on neighboring surface grids.

Parameters

indexThis parameter is the integer index of the filter in the range [1, number of filters].
nameThis parameter is the string filter name.
forcea boolean indicating whether to force adjacent grid spacing for the filter.

Returns

This action returns nothing.

See Also

addMappingFilter, getMappingFilterDefinition, getMappingFilterDefinitions, getMappingFilterForceAdjacentGrid

Example

Code

# $mesher is a DatabaseMesher mode
$mesher addMappingFilter F1 ThinSurfaceInterpolation {quilt-1*}
$mesher setMappingFilterForceAdjacentGrid F1 true
puts [$mesher getMappingFilterForceAdjacentGrid F1]

Output

1

getMappingFilterForceAdjacentGrid

$mesher getMappingFilterForceAdjacentGrid < name | index >

This action returns whether a mapping filter forces adjacent grid spacing on neighboring surface grids.

Parameters

indexThis parameter is the integer index of the filter in the range [1, number of filters].
nameThis parameter is the string filter name.

Returns

A boolean indicating whether adjacent grid spacing will be forced on neighboring surface grids for the filter.

See Also

addMappingFilter, getMappingFilterDefinition, getMappingFilterDefinitions, setMappingFilterForceAdjacentGrid

Example

Code Code

# $mesher is a DatabaseMesher mode
$mesher addMappingFilter F1 ThinSurfaceInterpolation {quilt-1*}
$mesher setMappingFilterForceAdjacentGrid F1 true
puts [$mesher getMappingFilterForceAdjacentGrid F1]

Output

1

setMappingFilterMaximumAspectRatio

$mesher setMappingFilterMaximumAspectRatio < index | name > max_ratio

This action sets a mapping filter’s maximum aspect ratio.

Parameters

indexThis parameter is the integer index of the filter in the range [1, number of filters].
nameThis parameter is the string filter name.
max_ratioa float indicating the maximum aspect ratio to allow for a mapped surface grid for the filter.  A value of 0.0 indicates that the filter should use the global value.  A value in the range [1.0, infinity) will override the global value.  Any other value will trigger an error.

Returns

This action returns nothing.

See Also

<setMaximumAspectRatio>, addMappingFilter, getMappingFilterDefinition, getMappingFilterDefinitions, getMappingFilterMaximumAspectRatio

Example

Code

# $mesher is a DatabaseMesher mode
$mesher addMappingFilter F1 ThinSurfaceInterpolation {quilt-1*}
$mesher setMappingFilterMaximumAspectRatio F1 10.0
puts [$mesher getMappingFilterMaximumAspectRatio F1]

Output

10.0

getMappingFilterMaximumAspectRatio

$mesher getMappingFilterMaximumAspectRatio < name | index >

This action returns the maximum aspect ratio allowed for a mapped domain.

Parameters

indexThis parameter is the integer index of the filter in the range [1, number of filters].
nameThis parameter is the string filter name.

Returns

A float indicating the maximum allowable aspect ratio for the filter.

See Also

addMappingFilter, getMappingFilterDefinition, getMappingFilterDefinitions, setMappingFilterMaximumAspectRatio

Example

Code

# $mesher is a DatabaseMesher mode
$mesher setMappingFilterMaximumAspectRatio F1 10.0
puts [$mesher getMappingFilterMaximumAspectRatio F1]

Output

10.0

getMappingResult

$mesher getMappingResult ?-details detailVar? domain

This action gets whether or not a created unstructured domain was mapped to a structured domain.  It also optionally provides details as to why a domain was not mapped.

Parameters

domainThis argument is expected to be pw::DomainUnstructured object created by the mode.
-detailsIf present, this flag specifies a variable to receive details of the result.  If the domain was mapped, this description will be the name of the structured domain to which the domain was mapped along with the point dimension ratio used to evaluate whether it could be mapped.  If the domain was not mapped, this description will provide a brief description of why the domain was not mapped.

Returns

This action returns a boolean value of true if the domain was mapped.

addBoundaryFilter

$mesher addBoundaryFilter ?filter_name?

This action adds a new boundary filter to control how stretching is applied to the matching boundaries.

Parameters

filter_nameThis optional parameter specifies the name of the filter.  If not specified, a generated name will be automatically provided.  The name should be unique.  If not, an integer suffix will be added to the name.  If the specified name already had an integer suffix of the form “-N”, then the integer portion will be modified to an available value in order to make the name unique.

Returns

This function returns the name of the newly created boundary filter.

See Also

deleteBoundaryFilter, getBoundaryFilterNames, setBoundaryFilterDefinition, and addBoundaryFilterDefinition.

Example

Code

# $mesher is a DatabaseMesher mode
puts "set filter(1) \[\$mesher addBoundaryFilter\]"
set filter(1) [$mesher addBoundaryFilter]
puts "filter(1) is $filter(1)"
puts "set filter(2) \[\$mesher addBoundaryFilter TrailingEdge\]"
set filter(2) [$mesher addBoundaryFilter TrailingEdge]
puts "filter(2) is $filter(2)"
puts "set filter(3) \[\$mesher addBoundaryFilter TrailingEdge\]"
set filter(3) [$mesher addBoundaryFilter TrailingEdge]
puts "filter(3) is $filter(3)"

Output

set filter(1) [$mesher addBoundaryFilter]
filter(1) is bf-1
set filter(2) [$mesher addBoundaryFilter TrailingEdge]
filter(2) is TrailingEdge
set filter(3) [$mesher addBoundaryFilter TrailingEdge]
filter(3) is TrailingEdge-2

deleteBoundaryFilter

$mesher deleteBoundaryFilter filter_name

This function deletes an existing boundary filter.

Parameters

filter_nameThis required parameter is the name of an existing filter to be deleted.

Returns

This action returns nothing.

See Also

addBoundaryFilter, getBoundaryFilterNames, and setBoundaryFilterName.

Example Code

# $mesher is a DatabaseMesher mode
puts "set filter(1) \[\$mesher addBoundaryFilter\]"
set filter(1) [$mesher addBoundaryFilter]
puts "set filter(2) \[\$mesher addBoundaryFilter TrailingEdge\]"
set filter(2) [$mesher addBoundaryFilter TrailingEdge]
puts "Filter names:"
foreach f [$mesher getBoundaryFilterNames] {
  puts "  f"
}
puts "--"
puts "\$mesher deleteBoundaryFilter \$filter(1)"
$mesher deleteBoundaryFilter $filter(1)
puts "\$mesher deleteBoundaryFilter \$filter(2)"
$mesher deleteBoundaryFilter $filter(2)
puts "Filter names:"
foreach f [$mesher getBoundaryFilterNames] {
  puts "  f"
}
puts "--"

Output

set filter(1) [$mesher addBoundaryFilter]
set filter(2) [$mesher addBoundaryFilter TrailingEdge]
Filter names:
  bf-1
  TrailingEdge
--
$mesher deleteBoundaryFilter $filter(1)
$mesher deleteBoundaryFilter $filter(2)
Filter names:
--

getBoundaryFilterNames

$mesher getBoundaryFilterNames

This function returns a list of the names of the current boundary filters.

Parameters

None.

Returns

This function returns a list of string values with each value representing the name of a boundary filter.  The names are in priority order with the highest priority boundary filter listed first.

See Also

addBoundaryFilter and deleteBoundaryFilter.

Example

Code

# $mesher is a DatabaseMesher mode
puts "set filter(1) \[\$mesher addBoundaryFilter\]"
set filter(1) [$mesher addBoundaryFilter]
puts "set filter(2) \[\$mesher addBoundaryFilter TrailingEdge\]"
set filter(2) [$mesher addBoundaryFilter TrailingEdge]
puts "Filter names:"
foreach f [$mesher getBoundaryFilterNames] {
  puts "  f"
}
puts "--"

Output

set filter(1) [$mesher addBoundaryFilter]
set filter(2) [$mesher addBoundaryFilter TrailingEdge]
Filter names:
  bf-1
  TrailingEdge
--

setBoundaryFilterName

$mesher setBoundaryFilterName old_name new_name

This action changes the name of an existing boundary filter.  The new name should be unique.  If the name collides with an existing boundary filter name, the new name will be updated to be unique.

Parameters

old_nameThis parameter is a string value representing an existing boundary filter name.
new_nameThis parameter is a string value representing the desired name of the boundary filter.

Returns

This action returns the actual updated name as a string value.

See Also

addBoundaryFilter and getBoundaryFilterNames.

Example

Code

# $mesher is a DatabaseMesher mode
puts "set filter(1) \[\$mesher addBoundaryFilter\]"
set filter(1) [$mesher addBoundaryFilter]
puts "filter(1) is $filter(1)"
puts "set filter(2) \[\$mesher addBoundaryFilter\]"
set filter(2) [$mesher addBoundaryFilter]
puts "filter(2) is $filter(2)"

puts "set filter(1) \[\$mesher setBoundaryFilterName \$filter(1) \"My Filter\"\]"
set filter(1) [$mesher setBoundaryFilterName $filter(1) "My Filter"]
puts "filter(1) is $filter(1)"
puts "set filter(2) \[\$mesher setBoundaryFilterName \$filter(2) \"My Filter\"\]"
set filter(2) [$mesher setBoundaryFilterName $filter(2) "My Filter"]
puts "filter(2) is $filter(2)"

Output

set filter(1) [$mesher addBoundaryFilter]
filter(1) is bf-1
set filter(2) [$mesher addBoundaryFilter]
filter(2) is bf-2
set filter(1) [$mesher setBoundaryFilterName $filter(1) "My Filter"]
filter(1) is My Filter
set filter(2) [$mesher setBoundaryFilterName $filter(2) "My Filter"]
filter(2) is My Filter-2

setBoundaryFilterDefinition

$mesher setBoundaryFilterDefinition filter_name pattern_list

This action specifies the patterns used to select which quilt boundaries will have the boundary conditions applied.

Parameters

filter_nameThis parameter is the string boundary filter name.
pattern_listThis parameter is a list of filter patterns.  A filter pattern entry must consist of a “Pattern A” element.  It may optionally include a “Pattern B” element and/or a boundary classification element.  See the Notes section for a description of each element.

Returns

This action returns nothing.

Notes

Filter Entry: A boundary filter entry consists of the following parts: pattern A, pattern B, and a list of boundary classifications.

Pattern A: This string can either be the name of a quilt or a pattern that can match multiple quilts.  Wildcard patterns are specified with ‘*’, ‘?’, and ‘[‘ - ‘]’ pairs.  A ‘*’ character matches any number (including zero) of characters.  A ‘?’ character matches any single character.  Brackets indicate a range of characters to match or exclude and has the following 4 available forms: “[abc]” matches one character given in the bracket, “[a-c]” matches one character from the range (inclusive) given in the bracket, “[!abc]” matches one character that is not in the bracket, and “[!a-c]” matches one character that is not in the range specified by the bracket.  A backslash “\” can be used to escape any special meaning by a wildcard character.  For example, “\?” will match a question mark while “?” will match any single character.

Pattern B: This string follows the same syntax as ‘Pattern A’.  If the B pattern is empty, then this filter entry will be applied to lamina boundaries on the quilts that match pattern A.  If the B pattern is non-empty, then the filter entry will only be applied to manifold boundaries shared between quilts that match pattern A and quilts that match pattern B and are not excluded by the specified boundary classifications.  If omitted, an empty string is assumed.

Boundary Classifications: This list of 5 possible string values restricts the filter entry to boundaries that match the quilt patterns specified with Pattern A and Pattern B based on their classifications.  The five classification options are: “All”, “None”, “Curvature”, “Convex”, and “Concave”.  The “All” option indicates that all boundaries regardless of classification should be allowed.  Note that “None” means boundaries that are not classified as either “Curvature”, “Convex”, or “Concave”.  If the boundary classification list is not specified, “All” is assumed.

See Also

addBoundaryFilterDefinition and getBoundaryFilterDefinition.

Example

Code

# Each entry has the following meaning:
#     Entry 1: any boundaries between any quilt that matches "upper-*" and
#         any quilt that matches "lower-*" regardless of classification
#         will be included.
#     Entry 2: any convex boundaries shared between any quilt that matches
#         "left-*" and any quilt that matches "right-*" will be included.
#     Entry 3: any boundaries not classified as convex or concave shared
#         between any quilt that matches "forward-*" and any quilt that
#         matches "aft-*" will be included.
#     Entry 4: any lamina boundaries on a quilt that matches "inner-*"
#         will be included, regardless of classification.
#     Entry 5: any lamina boundaries not classified as curvature, convex,
#         or concave on any quilt that matches "outer-*-aft" will be
#         included.
#     Entry 6: any lamina boundaries not classified as curvature, convex,
#         or concave on any quilt that matches "fuselage-*" will be
#         included.
#     Entry 7: any manifold boundaries not classified as curvature,
#         convex, or concave shared between a quilt that matches
#         "fuselage-*" and any other quilt will be included.
#     Entry 8: any boundaries regardless of classification shared between
#         any quilt that matches "canard-upper-*" and any quilt that
#         matches "canard-lower-*" will be included.
#     Entry 9: any curvature boundaries between the quilt named
#         "canard-upper-inner" and "canard-lower-inner" will be excluded.
#
# $mesher is a DatabaseMesher mode
set filter_name [$mesher addBoundaryFilter]
$mesher setBoundaryFilterDefinition $filter_name [list \
  {upper-* lower-*} \
  {left-* right-* Convex} \
  {forward-* aft-* {None Curvature}} \
  {inner-*} \
  {outer-*-aft None} \
  {fuselage-* None} \
  {fuselage-* * None} \
  {canard-upper-* canard-lower-*} \
  {!canard-upper-inner canard-lower-inner Curvature} \
  ]
puts "$filter_name elements:"
foreach entry [$mesher getBoundaryFilterDefinition $filter_name] {
  puts "  $entry"
}

Output

bf-1 elements:
 upper-* lower-* All
 left-* right-* Convex
 forward-* aft-* {None Curvature}
 inner-* {} All
 outer-*-aft {} None
 fuselage-* {} None
 fuselage-* * None
 canard-upper-* canard-lower-* All
 !canard-upper-inner canard-lower-inner Curvature

getBoundaryFilterDefinition

$mesher getBoundaryFilterDefinition filter_name

This function returns the current definition for a boundary filter.

Parameters

filter_nameThis parameter is the string boundary filter name.

Returns

This action returns a list of boundary filter patterns.  Each entry in the list will consist of 3 entries.  The first entry will be “Pattern A” (see the Notes section of setBoundaryFilterDefinition).  The second entry will be the “Pattern B” value, while the third entry will be the boundary classification specification.

See Also

addBoundaryFilter and setBoundaryFilterDefinition.

Example

Code

# $mesher is a DatabaseMesher mode
set filter_name [$mesher addBoundaryFilter]
$mesher setBoundaryFilterDefinition $filter_name [list \
  {upper-* lower-*} \
  {left-* right-* Convex} \
  {forward-* aft-* {None Curvature}} \
  {inner-*} \
  {outer-*-aft None} \
  {fuselage-* None} \
  {fuselage-* * None} \
  {canard-upper-* canard-lower-*} \
  {!canard-upper-inner canard-lower-inner Curvature} \
  ]
puts "$filter_name elements:"
foreach entry [$mesher getBoundaryFilterDefinition $filter_name] {
  puts "  $entry"
}

Output

bf-1 elements:
 upper-* lower-* All
 left-* right-* Convex
 forward-* aft-* {None Curvature}
 inner-* {} All
 outer-*-aft {} None
 fuselage-* {} None
 fuselage-* * None
 canard-upper-* canard-lower-* All
 !canard-upper-inner canard-lower-inner Curvature

See Also

setBoundaryFilterDefinition.

Example

addBoundaryFilterDefinition

$mesher addBoundaryFilterDefinition filter_name pattern_list

This method adds a new entry to the end of a current boundary filter definition.

Parameters

filter_nameThis parameter is the string boundary filter name.
pattern_listThis parameter is a list of filter patterns.  See setBoundaryFilterDefinition for an explanation of filter patterns.

Note

While similar to setBoundaryFilterDefinition, this extends the existing filter and may remove earlier entries.  This only occurs with explicit namings (no special pattern matching characters in the patterns) and only among entries after an entry that does use special pattern matching characters.  For example, if a definition ends with the entry “{quilt-1 quilt-2 Curvature}” (additive entry) and this function adds “{!quilt-1 quilt-2 Curvature}” (subtractive entry), then the second entry nullifies the first entry, removing it from the list instead of adding to the list.  Conversely, if a list ends with a subtractive entry and a matching additive entry is added, the subtractive entry will be removed from the list in addition to the additive entry being appended.

Returns

This action returns nothing.

See Also

setBoundaryFilterDefinition.

Example

Code

# $mesher is a DatabaseMesher mode
# Set the initial definition
set filter_name [$mesher addBoundaryFilter]
$mesher setBoundaryFilterDefinition $filter_name [list \
  {upper-* lower-*} \
  {left-tail right-tail Convex} \
  {canard-upper-* canard-lower-*} \
  {!canard-upper-inner canard-lower-inner Curvature} \
  ]
puts "$filter_name elements:"
foreach entry [$mesher getBoundaryFilterDefinition $filter_name] {
  puts "  $entry"
}
puts "--"
# Cancel the subtractive entry
puts "\$mesher addBoundaryFilterDefinition \$filter_name \[list {canard-upper-inner canard-lower-inner Curvature}\]"
$mesher addBoundaryFilterDefinition $filter_name [list {canard-upper-inner canard-lower-inner Curvature}]
puts "$filter_name elements:"
foreach entry [$mesher getBoundaryFilterDefinition $filter_name] {
  puts "  $entry"
}
puts "--"
# Cancel the additive entry just added
puts "\$mesher addBoundaryFilterDefinition \$filter_name \[list {!canard-upper-inner canard-lower-inner Curvature}\]"
$mesher addBoundaryFilterDefinition $filter_name [list {!canard-upper-inner canard-lower-inner Curvature}]
puts "$filter_name elements:"
foreach entry [$mesher getBoundaryFilterDefinition $filter_name] {
  puts "  $entry"
}
puts "--"
# Add the convex boundaries between left-tail and right-tail to
# the list. Note the earlier matching subtractive entry wasn't
# removed because an entry with wildcard patterns exists after it.
puts "\$mesher addBoundaryFilterDefinition \$filter_name \[list {!left-tail right-tail Convex}\]"
$mesher addBoundaryFilterDefinition $filter_name [list {left-tail right-tail Convex}]
puts "$filter_name elements:"
foreach entry [$mesher getBoundaryFilterDefinition $filter_name] {
  puts "  $entry"
}

Output

bf-1 elements:
  upper-* lower-* All
  left-tail right-tail Convex
  canard-upper-* canard-lower-* All
  !canard-upper-inner canard-lower-inner Curvature
--
$mesher addBoundaryFilterDefinition $filter_name [list {canard-upper-inner canard-lower-inner Curvature}]
bf-1 elements:
  upper-* lower-* All
  left-tail right-tail Convex
  canard-upper-* canard-lower-* All
  canard-upper-inner canard-lower-inner Curvature
--
$mesher addBoundaryFilterDefinition $filter_name [list {!canard-upper-inner canard-lower-inner Curvature}]
bf-1 elements:
  upper-* lower-* All
  left-tail right-tail Convex
  canard-upper-* canard-lower-* All
--
$mesher addBoundaryFilterDefinition $filter_name [list {!left-tail right-tail Convex}]
bf-1 elements:
  upper-* lower-* All
  left-tail right-tail Convex
  canard-upper-* canard-lower-* All
  left-tail right-tail Convex

getBoundaryFilterGrowthType

$mesher getBoundaryFilterGrowthType filter_name

This action returns the growth type associated with the boundary filter.

Parameters

filter_nameThis parameter is the string boundary filter name.

Returns

This function returns the growth type associated with this filter as a string value, either “Off”, “Angle”, “MaximumAspectRatio” or “Wall”.

See Also

setBoundaryFilterGrowthType.

Example

Code

# $mesher is a DatabaseMesher mode
set filter_name [$mesher addBoundaryFilter]
puts "Growth type: [$mesher getBoundaryFilterGrowthType $filter_name]"
puts "\$mesher setBoundaryFilterGrowthType \$filter_name Angle"
$mesher setBoundaryFilterGrowthType $filter_name Angle
puts "Growth type: [$mesher getBoundaryFilterGrowthType $filter_name]"

Output

Growth type: Off
$mesher setBoundaryFilterGrowthType $filter_name Angle
Growth type: Angle

setBoundaryFilterGrowthType

$mesher setBoundaryFilterGrowthType filter_name type

This action sets the growth type associated with the boundary filter.

Parameters

filter_nameThis parameter is the string boundary filter name.
typeThis string value represents the desired growth type.  Valid values are < Off | Wall | Angle | MaximumAspectRatio >.

Returns

This action returns nothing.

See Also

getBoundaryFilterGrowthType.

Notes

When using Angle or MaximumAspectRatio, use <setBoundaryFilterGrowthValue> to specify the angle or maximum aspect ratio value.

Example

Code

# $mesher is a DatabaseMesher mode
set filter_name [$mesher addBoundaryFilter]
puts "Growth type: [$mesher getBoundaryFilterGrowthType $filter_name]"
puts "\$mesher setBoundaryFilterGrowthType \$filter_name Angle"
$mesher setBoundaryFilterGrowthType $filter_name Angle
puts "Growth type: [$mesher getBoundaryFilterGrowthType $filter_name]"

Output

Growth type: Off
$mesher setBoundaryFilterGrowthType $filter_name Angle
Growth type: Angle

getBoundaryFilterGrowthRate

$mesher getBoundaryFilterGrowthRate filter_name

This action gets the growth rate associated with the boundary filter.

Parameters

filter_nameThis parameter is the string boundary filter name.

Returns

This function returns the growth rate as a float value, with a growth rate of 0.0 meaning to use the growth rate specified by the domain.

setBoundaryFilterGrowthRate

$mesher setBoundaryFilterGrowthRate filter_name rate

This action sets the growth rate associated with the boundary filter.

Parameters

filter_nameThis parameter is the string boundary filter name.
rateThis float parameter is the growth rate to use.  A value of 0.0 allows the growth rate to be controlled by the domain.  Otherwise, the value must be in the range [1.0, infinity).

See Also

pw::DomainUnstructured.TRexGrowthProfile, pw::DomainUnstructured.TRexGrowthRate

Returns

This action returns nothing.

getBoundaryFilterGrowthAngle

$mesher getBoundaryFilterGrowthAngle filter_name

This action gets the growth angle associated with an Angle boundary filter.

Parameters

filter_nameThis parameter is the string boundary filter name.

Returns

This function returns the growth angle as a float value.

setBoundaryFilterGrowthAngle

$mesher setBoundaryFilterGrowthAngle filter_name angle

This action sets the growth angle associated with a boundary filter of type Angle.

Parameters

filter_nameThis parameter is the string boundary filter name.
angleThis parameter is the float angle to use to determine the initial layer height for a boundary of type Angle.  The valid range is [0.0, 90.0], with a value of 0.0 disabling growth.

Returns

This action returns nothing.

Information

When a maximum aspect ratio limit is applied to an Angle boundary filter type, the boundary spacing may be affected.

getBoundaryFilterGrowthMaximumAspectRatio

$mesher getBoundaryFilterGrowthMaximumAspectRatio filter_name

This action gets the maximum aspect ratio associated with a boundary filter.

Parameters

filter_nameThis parameter is the string boundary filter name.

Returns

This function returns the maximum aspect ratio as a float value.

Information

Maximum aspect ratio applies to all filter types, including Angle and Wall, to limit the maximum allowable aspect ratio in the initial growth layer.

setBoundaryFilterGrowthMaximumAspectRatio

$mesher setBoundaryFilterGrowthMaximumAspectRatio filter_name max_aspect_ratio

This action sets the growth maximum aspect ratio associated with a boundary filter.

Parameters

filter_nameThis parameter is the string boundary filter name.
max_aspect_ratioThis parameter is the float maximum aspect ratio to allow for a boundary of type Angle, MaximumAspectRatio, or Wall.  Setting this to zero for Angle or Wall filters indicates that the global maximum aspect ratio should be used.  A value in the range [1.0, infinity] overrides the global value.  Any other value will trigger an error.

See Also

<setMaximumAspectRatio>

Returns

This action returns nothing.

getBoundaryFilterGrowthWallSpacing

$mesher getBoundaryFilterGrowthWallSpacing filter_name

This action gets the initial growth boundary spacing for a Wall boundary filter.

Parameters

filter_nameThis parameter is the string boundary filter name.

Returns

This function returns the initial growth spacing as a float value.

Information

When a maximum aspect ratio limit is applied to a Wall boundary filter type, the boundary spacing may be affected.

setBoundaryFilterGrowthWallSpacing

$mesher setBoundaryFilterGrowthWallSpacing filter_name spacing

This action sets the growth initial spacing for a Wall boundary filter.

Parameters

filter_nameThis parameter is the string boundary filter name.
spacingThis parameter is the float initial spacing.

Returns

This action returns nothing.

getBoundaryFilterGrowthRateDelay

$mesher getBoundaryFilterGrowthRateDelay filter_name

This action gets the growth rate delay associated with the boundary filter.

Parameters

filter_nameThis parameter is the string boundary filter name.

Returns

This function returns the growth rate delay as an integer value.

setBoundaryFilterGrowthRateDelay

$mesher setBoundaryFilterGrowthRateDelay filter_name delay

This action sets the growth rate delay associated with the boundary filter.

Parameters

filter_nameThis parameter is the string boundary filter name.
delayThis parameter is the number of steps of growth generated before the growth rate is applied.  All steps in this range with have a same step size as the initial layer.  The value should be a positive integer value in the range [0, infinity).  The default is 0.

Returns

This action returns nothing.

getBoundaryFilterMinimumSubdivisionLength

$mesher getBoundaryFilterMinimumSubdivisionLength filter_name

This action gets the lower limit for cell spacing along the boundaries matched by the filter.

Parameters

filter_nameThis parameter is the string boundary filter name.

Returns

This function returns the lower limit for cell spacing as a float value.  A value of 0.0 indicates that the global limit will be used.

setBoundaryFilterMinimumSubdivisionLength

$mesher setBoundaryFilterMinimumSubdivisionLength filter_name spacing

This action sets the target lower limit for cell spacing along a boundary.

Parameters

filter_nameThis parameter is the string boundary filter name.
spacingThis parameter is the float target lower limit for cell spacing.  The default value of 0.0 disables this filter from overriding the global limit.  The valid range is [0.0, infinity).

Returns

This action returns nothing.

getBoundaryFilterMinimumRadiusOfCurvature

$mesher getBoundaryFilterMinimumRadiusOfCurvature filter_name

This action gets the lower limit for cell spacing along the boundaries matched by the filter.

Parameters

filter_nameThis parameter is the string boundary filter name.

Returns

This function returns the lower limit for cell spacing as a float value.  A value of 0.0 indicates that the global limit will be used.  The valid range is [0.0, infinity).

setBoundaryFilterMinimumRadiusOfCurvature

$mesher setBoundaryFilterMinimumRadiusOfCurvature filter_name radius

This action sets the target lower limit for evaluating the radius of curvature along a boundary.

Parameters

filter_nameThis parameter is the string boundary filter name.
radiusThis parameter is the float target lower limit for any radius of curvature calculations along the boundary.  The default value of 0.0 disables this filter from overriding the global limit.

Returns

This action returns nothing.

getBoundaryFilterSpacingFactor

$mesher getBoundaryFilterSpacingFactor filter_name

This function gets the factor used to scale the spacing of the boundaries associated with the filter.

Parameters

filter_nameThis parameter is the string boundary filter name.

Returns

The return value is a float value with the range (0, 1], where 1 means no refinement, 0.5 means 2x refinement, etc.

See Also

setBoundaryFilterSpacingFactor, <getBoundaryCurvatureSpacingFactor>, <getBoundaryConvexSpacingFactor>, and <getBoundaryConcaveSpacingFactor>.

Example

Code

# $mesher is a DatabaseMesher mode
set filter_name [$mesher addBoundaryFilter]
puts "Spacing value: [$mesher getBoundaryFilterSpacingFactor $filter_name]"
puts "\$mesher setBoundaryFilterSpacingFactor \$filter_name 0.75"
$mesher setBoundaryFilterSpacingFactor $filter_name 0.75
puts "Spacing value: [$mesher getBoundaryFilterSpacingFactor $filter_name]"

Output

Spacing value: 0.5
$mesher setBoundaryFilterSpacingFactor $filter_name 0.75
Spacing value: 0.75

setBoundaryFilterSpacingFactor

$mesher setBoundaryFilterSpacingFactor filter_name spacing_factor

This function sets the factor used to scale the spacing of the boundaries associated with the filter.

Parameters

filter_nameThis parameter is the string boundary filter name.
spacing_factorThis parameter is the new spacing factor to be assigned to the boundary filter.  It should be a float value in the range (0.0, 1.0], where 1 means no refinement, 0.5 means 2x refinement, etc.

Returns

This action returns nothing.

See Also

getBoundaryFilterSpacingFactor, <setBoundaryCurvatureSpacingFactor>, <setBoundaryConvexSpacingFactor>, and <setBoundaryConcaveSpacingFactor>.

Example

Code

# $mesher is a DatabaseMesher mode
set filter_name [$mesher addBoundaryFilter]
puts "Spacing value: [$mesher getBoundaryFilterSpacingFactor $filter_name]"
puts "\$mesher setBoundaryFilterSpacingFactor \$filter_name 0.75"
$mesher setBoundaryFilterSpacingFactor $filter_name 0.75
puts "Spacing value: [$mesher getBoundaryFilterSpacingFactor $filter_name]"

Output

Spacing value: 0.5
$mesher setBoundaryFilterSpacingFactor $filter_name 0.75
Spacing value: 0.75

getBoundaryFilterGroups

$mesher getBoundaryFilterGroups filter_name

This action returns a list of quilt boundaries associated with a boundary filter.

Parameters

filter_nameThis parameter is the string boundary filter name.  In addition to any boundary filters created with addBoundaryFilter, the reserved boundary filter names of Unspecified, Concave, Convex, and Curvature and be used to get the boundaries associated with those classifications.  These reserved names are populated with boundary curves that were not filtered out by any of the added boundary filters.  The Unspecified group will be populated with all boundary curves not filtered out and without any classification of convex, concave, or curvature.

Returns

This action returns a list of quilt boundary groups, where each item of the list is a list of one or more quilt boundaries that are aliased.  Each quilt boundary is specified as a two item list with the quilt as the first item and the boundary index as the second item.  For example, if the third boundary of quilt A (::pw::Quilt_1) shares a boundary with the second boundary of quilt B (::pw::Quilt_2), the entry for this boundary will be {{::pw::Quilt_1 3} {::pw::Quilt_2 2}}.  A lamina boundary would have just have a single boundary in the element, such as {{::pw::Quilt_1 4}}.

See Also

addBoundaryFilter

setBoundaryFilterPriority

$mesher setBoundaryFilterPriority ordered_filter_names

This sets the priority of one or more existing boundary filters.

Parameters

ordered_filter_namesThis parameter is the ordered list of boundary filter names to make the highest priority.  Any boundary filters not in ordered_filter_names will be prioritized after the specified boundary filters (preserving their same relative order).  Note that only user added boundary filters can be prioritized.  The default boundary filters of Curvature, Convex, and Concave remain the lowest priority boundary filters.  The getBoundaryFilterNames can be used to get the current priority order.

Returns

This action returns nothing.

See Also

getBoundaryFilterNames.

Example

Code

# $mesher is a DatabaseMesher mode
set filter(1) [$mesher addBoundaryFilter One]
set filter(2) [$mesher addBoundaryFilter Two]
set filter(3) [$mesher addBoundaryFilter Three]
set filter(4) [$mesher addBoundaryFilter Four]
puts "Filters by priority:"
set n 1
foreach f [$mesher getBoundaryFilterNames] {
  puts "  $n: $f"
  incr n
}
puts "\$mesher setBoundaryFilterPriority \[list \$filter(3) \$filter(2)\]"
$mesher setBoundaryFilterPriority [list $filter(3) $filter(2)]
puts "Filters by priority:"
set n 1
foreach f [$mesher getBoundaryFilterNames] {
  puts "  $n: $f"
  incr n
}

Output

Filters by priority:
  1: One
  2: Two
  3: Three
  4: Four
$mesher setBoundaryFilterPriority [list $filter(3) $filter(2)]
Filters by priority:
  1: Three
  2: Two
  3: One
  4: Four
$mesher get/setMergeTolerance tol
This attribute is the tolerance to use when merging connectors.
$mesher get/setMinimumSpacingMode mode
This attribute is the preferred method for setting the minimum spacing.
$mesher get/setMinimumEdgeSpacing spacing
This attribute is the minimum edge spacing for the mesh.
$mesher get/setMinimumSubdivisionLength length
This attribute is the minimum edge subdivision length in the mesh.
$mesher get/setMinimumRadiusOfCurvature radius
This attribute is the minimum radius of surface curvature to use when resolving curvature along an edge in the mesh.
$mesher get/setMaximumSpacingMode mode
This attribute is the preferred method for setting the maximum spacing.
$mesher get/setMaximumExtentsSubdivisions subdivisions
This attribute is the maximum number of mesh subdivisions per the extents of the entities being meshed.
$mesher get/setMaximumEdgeSpacing spacing
This attribute is the maximum edge spacing for the mesh.
$mesher get/setCurvatureResolutionAngle angle
This attribute is the curvature angle resolution in degrees.
$mesher get/setMaximumAspectRatio ratio
This attribute specifies the maximum aspect ratio.
$mesher get/setBoundaryGrowthRate rate
This attribute specifies the boundary growth rate.
$mesher get/setDomainAlgorithm < AdvancingFront | QuadDominant | Hybrid >
This attribute determines the algorithm to use when meshing domains.
$mesher get/setRefinementFactor factor
This attribute is the refinement factor used to globally scale the parameters of the mesher in order to increase the refinement.
$mesher get/setMappedSurfaceSubdivisionRatio factor
This attribute is the ratio between the number of subdivisions used to detect domains that can be initialized from structured domains.
$mesher get/setBoundaryProximityInfluence < Orientation | All | None >
This attribute controls how nearby boundaries influence clustering on a surface.
$mesher get/setBoundaryGapSubdivisions subdivisions
This attribute is the target number of mesh subdivisions across gaps between boundaries of the entities being meshed.
$mesher get/setStretchingBuffer subdivisions
This attribute is the target number of buffer subdivisions when TRex stretching reaches the median between boundaries of the entities being meshed.
$mesher get/setBoundaryGroupAngle angle
This attribute is the turning angle to use when grouping boundaries.
$mesher get/setBoundaryCurvatureRatio ratio
This attribute is the ratio between the surface and curve curvature along a boundary to use when detecting Curvature boundaries.
$mesher get/setBoundaryHardAngle angle
This attribute is the angle between normals to use when detecting Convex and Concave manifold boundaries.
$mesher get/setDomainAreaRatioThreshold threshold
This attribute is the metric threshold for domain area ratio.
$mesher get/setDomainAspectRatioThreshold threshold
This attribute is the metric threshold for domain aspect ratio.
$mesher get/setDomainMaximumAngleThreshold threshold
This attribute is the metric threshold for domain maximum angle.
$mesher get/setKeepExistingDomains value
This attribute controls whether any pre-existing domains constrained to the quilts in the mode are retained or destroyed.
$mesher get/setSplitConnectorsAtAlignSources value
This attribute controls whether connectors should be split where they intersect or come within Node tolerance of souce curves on the database being meshed.
$mesher getExtents
This action gets the extents of the models of the mode.
$mesher getThinSurfaceQuilts
This action gets the quilts that are detected as thin surfaces, such as a blunt trailing edge of a wing.
$mesher getMinimumBoundaryGroup
This action gets the quilt boundary group with the minimum length.
$mesher getMinimumBoundaryGroupLength
This action gets the length of the minimum boundary group.
$mesher getSymmetryLoops ?symmetry?
This action gets a list of symmetry loops, where each loop is a list of quilt boundaries that are lamina and lie on a symmetry plane.
$mesher getLaminaBoundaryGroups classify
This action gets a list of lamina quilt boundary lists of a certain classification.
A boundary is reference to either a database curve or the edge of a database surface.
$mesher getManifoldBoundaryGroups classify
This action gets a list of manifold quilt boundary lists of a certain classification.
$mesher createGridEntities ent_type
This action creates grid entities on the database entities of this mode.
$mesher getRejectedEntities
This action gets a list of database entities that a surface mesh was not able to be constructed on during the createSurfaceMesh action.
$mesher getExistingDomains
This action gets a list of domains that are dependent upon the quilts included in the mode.
$mesher getExistingSources
This action gets a list of sources that are dependent upon the quilts included in the mode.
$mesher getFilterTypes
This action returns a list of supported filter type names.
$mesher addFilter ?-type filter_type? ?-priority < index | name >? ?-name name? value ?pattern_list?
This action adds a new, mesher mode filter to a filter queue.
$mesher deleteFilter ?-type filter_type? < index | name >
This action deletes a filter.
$mesher setFilterName ?-type filter_type? < index | name > newName
This action renames a filter.
$mesher getFilterNames ?-type filter_type? ?-regex? ?pattern?
This action returns a list of filter names defined in the mesher mode filter_type.
$mesher getFilterCount ?-type filter_type?
This action returns the number of filters of the given filter_type defined in the mesher mode.
$mesher getFilterDefinition ?-type filter_type? ?-dict? < index | name >
This action gets the definition of a filter identified by index or name.
$mesher getFilterDefinitions ?-type filter_type? ?-dict?
This action gets a list of all filter definitions of the given filter_type.
$mesher getFilterEntityCounts ?-type filter_type? ?-includeEntities? ?-dict?
This action matches the name of each mode entity against the filter patterns in filter priority order and returns the match count for each filter.
$mesher setFilterPriority ?-type filter_type? name_list
This action sets the priority of one or more existing filters.
$mesher setFilterPatterns ?-type filter_type? < index | name > pattern_list
This action sets the patterns of an existing filter.
$mesher setFilterEntities ?-type filter_type? ?-op op_type? < index | name > dbentity_list
This action modifies filter patterns as needed to guarantee that the entities in dbentity_list are captured by the specified filter.
$mesher setFilterValue ?-type filter_type? < index | name > value
This action sets a filter’s value.
$mesher addMappingFilter ?-priority < index | name >? ?-name name? value ?pattern_list ?equal_spacing ?force_adjacent ?max_aspect_ratio?
This action adds a new mapping filter for the mesher mode.
$mesher deleteMappingFilter < index | name >
This action deletes a mapping filter.
$mesher setMappingFilterName < index | name > newName
This action renames a mapping filter.
$mesher getMappingFilterNames ?-regex? ?pattern?
This action returns a list of mapping filter names defined in the mesher mode.
$mesher getMappingFilterCount ?-type filter_type?
This action returns the number of mapping filters of the defined in the mesher mode.
$mesher getMappingFilterDefinition ?-type filter_type? ?-dict? < index | name >
This action gets the definition of a mapping filter identified by index or name.
$mesher getMappingFilterDefinitions ?-dict?
This action gets a list of all mapping filter definitions.
$mesher getMappingFilterEntityCounts ?-type filter_type? ?-includeEntities? ?-dict?
This action matches the name of each mode entity against the mapping filter patterns in filter priority order and returns the match count for each filter.
$mesher setMappingFilterPriority name_list
This action sets the priority of one or more existing mapping filters.
$mesher setMappingFilterPatterns < index | name > pattern_list
This action sets the patterns of an existing mapping filters.
$mesher setMappingFilterEntities ?-op op_type? < index | name > dbentity_list
This action modifies mapping filter patterns as needed to guarantee that the entities in dbentity_list are captured by the specified filter.
$mesher setMappingFilterEqualSpacing < index | name > use_equal
This action sets a mapping filter to use equal spacing.
$mesher getMappingFilterEqualSpacing < name | index >
This action returns whether a mapping filter uses equal spacing.
$mesher setMappingFilterForceAdjacentGrid < index | name > force
This action sets a mapping filter to force adjacent grid spacing on neighboring surface grids.
$mesher getMappingFilterForceAdjacentGrid < name | index >
This action returns whether a mapping filter forces adjacent grid spacing on neighboring surface grids.
$mesher setMappingFilterMaximumAspectRatio < index | name > max_ratio
This action sets a mapping filter’s maximum aspect ratio.
$mesher getMappingFilterMaximumAspectRatio < name | index >
This action returns the maximum aspect ratio allowed for a mapped domain.
$mesher getMappingResult ?-details detailVar? domain
This action gets whether or not a created unstructured domain was mapped to a structured domain.
$mesher addBoundaryFilter ?filter_name?
This action adds a new boundary filter to control how stretching is applied to the matching boundaries.
$mesher deleteBoundaryFilter filter_name
This function deletes an existing boundary filter.
$mesher getBoundaryFilterNames
This function returns a list of the names of the current boundary filters.
$mesher setBoundaryFilterName old_name new_name
This action changes the name of an existing boundary filter.
$mesher setBoundaryFilterDefinition filter_name pattern_list
This action specifies the patterns used to select which quilt boundaries will have the boundary conditions applied.
$mesher getBoundaryFilterDefinition filter_name
This function returns the current definition for a boundary filter.
$mesher addBoundaryFilterDefinition filter_name pattern_list
This method adds a new entry to the end of a current boundary filter definition.
$mesher getBoundaryFilterGrowthType filter_name
This action returns the growth type associated with the boundary filter.
$mesher setBoundaryFilterGrowthType filter_name type
This action sets the growth type associated with the boundary filter.
$mesher getBoundaryFilterGrowthRate filter_name
This action gets the growth rate associated with the boundary filter.
$mesher setBoundaryFilterGrowthRate filter_name rate
This action sets the growth rate associated with the boundary filter.
$mesher getBoundaryFilterGrowthAngle filter_name
This action gets the growth angle associated with an Angle boundary filter.
$mesher setBoundaryFilterGrowthAngle filter_name angle
This action sets the growth angle associated with a boundary filter of type Angle.
$mesher getBoundaryFilterGrowthMaximumAspectRatio filter_name
This action gets the maximum aspect ratio associated with a boundary filter.
$mesher setBoundaryFilterGrowthMaximumAspectRatio filter_name max_aspect_ratio
This action sets the growth maximum aspect ratio associated with a boundary filter.
$mesher getBoundaryFilterGrowthWallSpacing filter_name
This action gets the initial growth boundary spacing for a Wall boundary filter.
$mesher setBoundaryFilterGrowthWallSpacing filter_name spacing
This action sets the growth initial spacing for a Wall boundary filter.
$mesher getBoundaryFilterGrowthRateDelay filter_name
This action gets the growth rate delay associated with the boundary filter.
$mesher setBoundaryFilterGrowthRateDelay filter_name delay
This action sets the growth rate delay associated with the boundary filter.
$mesher getBoundaryFilterMinimumSubdivisionLength filter_name
This action gets the lower limit for cell spacing along the boundaries matched by the filter.
$mesher setBoundaryFilterMinimumSubdivisionLength filter_name spacing
This action sets the target lower limit for cell spacing along a boundary.
$mesher getBoundaryFilterMinimumRadiusOfCurvature filter_name
This action gets the lower limit for cell spacing along the boundaries matched by the filter.
$mesher setBoundaryFilterMinimumRadiusOfCurvature filter_name radius
This action sets the target lower limit for evaluating the radius of curvature along a boundary.
$mesher getBoundaryFilterSpacingFactor filter_name
This function gets the factor used to scale the spacing of the boundaries associated with the filter.
$mesher setBoundaryFilterSpacingFactor filter_name spacing_factor
This function sets the factor used to scale the spacing of the boundaries associated with the filter.
$mesher getBoundaryFilterGroups filter_name
This action returns a list of quilt boundaries associated with a boundary filter.
$mesher setBoundaryFilterPriority ordered_filter_names
This sets the priority of one or more existing boundary filters.
Base type for all glyph types
The mode base type
pw::Application begin ?-mode_specific_flags? mode ?entities?
This action begins a mode in the application.
A float is a fractional number.
A string is an array of characters.
This attribute is the minimum number of mesh subdivisions per database boundary.
An integer is a whole number.
A boolean is represented as a 0 or 1, with 0 being false and 1 being true.
A vector is a list of float values.
Database quilt type
A connector is a computationally one-dimensional grid entity, defined in the parameter space of one or more end-connected curve segments.
A domain is a computationally two-dimensional grid entity, bounded by one or more pw::Edges.
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::DomainStructured createOnDatabase ?-merge tolerance? ?-splitConnectors split_angle? ?-joinConnectors join_angle? ?-parametricConnectors mode? ?-reject rejectVar? entities
This action creates new structured domain objects on the given database entities.
pw::DomainUnstructured createOnDatabase ?-merge tolerance? ?-splitConnectors split_angle? ?-joinConnectors join_con_angle? ?-joinDomains join_dom_angle? ?-parametricConnectors mode? ?-reject rejectVar? entities
This creates new unstructured domain objects on the given database entities.
Base type for all database entities
Base type for all source entities
An unstructured domain is a watertight collection of edge-connected surface elements (triangle, quadrilateral, etc.)
$domain get/setUnstructuredSolverAttribute TRexGrowthProfile profile
This attribute specifies the growth rate for each anisotropic layer.
$dom get/setUnstructuredSolverAttribute TRexGrowthRate value
This attribute is the growth rate of TRex layers for the domain.
Close