Smart Subtract Triangulations
Input Data
Select the Source of the data that will be used as input to the function:
Selection | Design elements you have interactively selected in the Design Window. |
Visible | Design elements that are visible in the loaded layer. Elements that have been specifically hidden are excluded. This a quick way of selecting all visible elements in a layer without having to explicitly select them. |
Layer | One or more layers that you select. Names of layers currently loaded in the Design Window are shown in bold. |
|
|
For large datasets, for performance reasons you may prefer to select a layer rather than load that layer and select all of the elements in the layer.
Selecting a non-applicable layer will have no effect. In most cases, an error icon will indicate that the chosen input layer is not valid. Hover over the icon to view a validation hint.
Subtract Mode
Select an (Order, Group, Design Element Sorting) Subtract Mode. The Mode you choose will determine the Settings that are required to be specified in the dialog.

If you selected Order as the Subtract Mode, triangulations will be subtracted based on element order. Order is determined by attribute or a sorting expression. An element can subtract elements of a lower order, but can only be subtracted by elements of a higher order.
In the following example, the inputs are three solids with Numeric values 0, 1, and 2.
Solid 0 remains unchanged, Solid 1 is subtracted by Solid 0, Solid 2 is subtracted by Solid 0 and Solid 1:

If you selected Group as the Subtract Mode, triangulations will be subtracted based on groups. Elements are assigned a group based on a grouping attribute or a sorting expression and each group is ordered. A group can subtract groups of a lower order, but can only be subtracted by groups of a higher order.
In the following example, the inputs are three solids with Numeric values 0, 1, and 2.
Solid 0 remains unchanged, Solid 1 is subtracted by Solid 0, Solid 2 is subtracted by Solid 0 and Solid 1:

If you selected Design Element Sorting as the Subtract Mode, triangulations will be subtracted based on an ordered list of Sorting Entries saved as an Element Sorting.
Element Sorting
Select an Element Sorting:
Sorting Entries comprise of an (Alphanumeric, Numeric, Text) Sort Type, a Sort Expression used to sort design elements based on their properties and attributes, and an (Ascending, Descending) Sort Order. For more information, see: Design Element Sortings
In the following example, the inputs are three solids with Numeric values 0, 1, and 2.
Solid 0 remains unchanged, Solid 1 is subtracted by both solid 0 and solid 2, Solid 2 is subtracted by solid 0 only:
Settings
The following settings apply when the Subtract Mode is Order or Group:
Sorting Mode
Select an (Attribute, Expression) Sorting Mode. The Mode you choose will determine the Inputs that are required to be specified in the dialog.
Sorting Attribute
If you selected Attribute as the Sorting Mode, select an Attribute with the values you want to sort by.
Sorting Type
If you selected Expression as the Sorting Mode, select an (AlphaNumeric, Numeric) Sorting Type.
Sorting Expression
If you selected Expression as the Sorting Mode, use the Expression editor to specify a Smart Subtract Expression.
The Sorting Entries you add in Design | Setup | Design Element Sortings use Sorting Expressions. A Sorting Expression is also specified when Expression is chosen as the Sorting Mode in the Smart Subtract Triangulations design action.
The SmartSubtract method takes a set of triangle meshes (from any type of layer triangulation). Depending on the Subtract Mode, either an attribute to order by and an order to sort by, or an attribute to group by and an order for the grouping, are required. Outputs are the subtracted triangulations.
GetValue(SmartSubtractNumeric)
GetValue(SmartSubtractText)
Sorting Order
Select an (Ascending, Descending) Sorting Order.
Case Sensitive
When the Sorting Mode is Attribute and a Text Attribute is selected, select this check box to make attribute matching case sensitive.
Output Layer
Use the drop-down to select an Output Layer.
Tip: In the Layer Selection pane, you can right-click on the Layers node (or a folder) to Add a new layer.
If <No Layer Selected> then the Output triangulations will overwrite the triangulations in the Input layer.
Apply
Click Apply to subtract triangulations.
Check the output is as you expect.
When subtracting triangulations by Order, an element can subtract elements of a lower order, but can only be subtracted by elements of a higher order.
When subtracting triangulations by Group, a group can subtract groups of a lower order, but can only be subtracted by groups of a higher order.
When subtracting triangulations by Design Element Sorting, triangulations are subtracted based upon a defined order of Sorting Entries.