The merge mode type
To create a mode of this type, use the pw::Application.begin command with the mode Merge specified, like this:
set merger [pw::Application begin Merge]
pw:: | The merge mode type |
Instance Actions | |
replace | This action replaces the first entity with the second entity, unless -automatic option is specified. |
merge | This action automatically merges two connectors. |
findPairs | This action finds pairs of entities that are within the given tolerance, filtered by the given type and topology. |
getPairCount | This action gets the number of pairs found from the last findPairs action. |
getPair | This action gets a pair of entities with the given index. |
getPairs | This action gets all the pairs of entities. |
setPairStatus | This action sets the merge status of the given pair. |
mergePairs | This action merges the pairs that have been marked for merging. |
mergeConnectors | This action merges connectors and nodes within the tolerance. |
$merger replace ?-automatic? < node1 node2 | con1 con2 >
This action replaces the first entity with the second entity, unless -automatic option is specified. For -automatic, the best replacement is done. The two entities must be of the same type.
-automatic | This optional parameter indicates to automatically choose the best replacement. |
node1 | This parameter is a pw::Node object to merge. |
node2 | This parameter is a pw::Node object to merge. |
con1 | This parameter is a pw::Connector object to merge. |
con2 | This parameter is a pw::Connector object to merge. |
This action returns nothing.
$merger merge con1 con2
This action automatically merges two connectors.
con1 | This parameter is a pw::Connector object to merge. |
con2 | This parameter is a pw::Connector object to merge. |
This action returns true if the connectors were merged.
$merger findPairs -tolerance tol ?-exclude topology? types
This action finds pairs of entities that are within the given tolerance, filtered by the given type and topology. Any previously found pairs will be cleared and not merged.
-tolerance tol | This parameter is the tolerance that connectors and nodes must be within for merging to take place |
-exclude topology | This optional parameter indicates the type of topology to exclude from merging; None | Manifold | NonFree |
-visibleOnly | This flag causes only visible entities to be considered for merging. All hidden entities are ignored. |
types | This parameter is the type of pairs to find; Node | Connector | NodeConnector. |
This action returns nothing.
$merger getPair ?-delta deltaVar? ?-status statusVar? index
This action gets a pair of entities with the given index.
-delta deltaVar | This optional parameter is a variable name to receive the difference between the pair. |
-status statusVar | This optional parameter is a variable name to receive the merge status of the pair; it is a boolean value where 0 means do not merge and 1 means merge. |
index | This parameter is the index of the pair to retrieve. |
Depending on the type of the last findPairs action this action will return a list of two pw::Node objects, a list of two pw::Connector objects, or a list of a single pw::Node object and a single pw::Connector object.
$merger getPairs
This action gets all the pairs of entities.
This action has no parameters.
Depending on the type of the last findPairs action this action will return a list of pairs which are two pw::Node objects, a list of two pw::Connector objects, or a list of a single pw::Node object and a single pw::Connector object fallowed by the merge status and delta between the objects; (ent1 ent2 0|1 delta).
$merger setPairStatus index status
This action sets the merge status of the given pair.
index | This parameter is the index of the pair for which to set the status. |
status | This parameter is the merge status of the pair; boolean value. |
This action returns nothing.
$merger mergeConnectors ?-exclude topology? ?-visibleOnly? -tolerance tol
This action merges connectors and nodes within the tolerance.
-exclude topology | This optional parameter indicates the topology to exclude from merging; None | Manifold | NonFree |
-tolerance tol | This parameter is the tolerance connectors and nodes must be within for merging to take place. |
-visibleOnly | This flag causes only visible connectors to be considered for merging. All hidden connectors are ignored. |
This action returns nothing.
This action replaces the first entity with the second entity, unless -automatic option is specified.
$merger replace ?-automatic? < node1 node2 | con1 con2 >
This action automatically merges two connectors.
$merger merge con1 con2
This action finds pairs of entities that are within the given tolerance, filtered by the given type and topology.
$merger findPairs -tolerance tol ?-exclude topology? types
This action gets the number of pairs found from the last findPairs action.
$merger getPairCount
This action gets a pair of entities with the given index.
$merger getPair ?-delta deltaVar? ?-status statusVar? index
This action gets all the pairs of entities.
$merger getPairs
This action sets the merge status of the given pair.
$merger setPairStatus index status
This action merges the pairs that have been marked for merging.
$merger mergePairs
This action merges connectors and nodes within the tolerance.
$merger mergeConnectors ?-exclude topology? ?-visibleOnly? -tolerance tol
This action begins a mode in the application.
pw::Application begin ?-mode_specific_flags? mode ?entities?