WEMSubdivide¶
- MLModule¶
genre
author
package
dll
definition
see also
inherits from
keywords
Purpose¶
The module WEMSubdivide can be used to subdivide a WEM in order to produce more nodes, edges, and faces without modifying the overall geometry.
Details¶
Note: This module works on triangles only!
The WEMSubdivide module searches exhaustively in a WEM for edges with lengths that exceed an adjustable length threshold. Such an edge is split by inserting a node into the middle of the corresponding edge (and additionally, two edges and two faces are inserted into the WEM). Internally, a priority queue is used; because of this, the longest edges are split first. Additionally, after each run of splitting edges, the module attempts to optimize the triangles by applying an edge-swap operation. Furthermore, the faces’ normals are smoothed before checking for a potential swap.
Tips¶
The average edge length can be determined with the WEMInfo.
Windows¶
Default Panel¶
Input Fields¶
inWEM¶
- name: inWEM, type: WEM(MLBase)¶
Any valid WEM that contains only triangles.
For accessing this object via scripting, see the Scripting Reference:
MLWEMWrapper.
Output Fields¶
outWEM¶
- name: outWEM, type: WEM(MLBase)¶
The subdivided WEM.
For accessing this object via scripting, see the Scripting Reference:
MLWEMWrapper.
Parameter Fields¶
Field Index¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Visible Fields¶
Auto Apply¶
- name: autoApply, type: Bool, default: TRUE¶
If checked, all parameter changes take immediately effect.
see also WEMGenerator.autoApply
Update Mode¶
- name: updateMode, type: Enum, default: AutoUpdate, deprecated name: autoUpdate¶
Defines how this module should react on any input field change.
see also WEMGenerator.updateMode
Apply¶
- name: apply, type: Trigger¶
When pressed, the subdividing algorithm is applied to the WEM.
see also WEMGenerator.apply
Clear¶
- name: clear, type: Trigger¶
When pressed, the output WEM is cleared (made empty).
see also WEMGenerator.clear
Overwrite label and description¶
- name: overwriteLabelDescription, type: Bool, default: FALSE¶
If checked, label and description strings are set in the output WEM to
LabelandDescription.
Label¶
- name: label, type: String¶
Sets a label string in the output WEM.
see also WEMGenerator.label
Description¶
- name: description, type: String¶
Sets a description string in the output WEM.
see also WEMGenerator.description
Subdivision Mode¶
- name: subdivisionMode, type: Enum, default: Adaptive Subdivision¶
Defines the subdivision mode.
Values:
Title |
Name |
Description |
|---|---|---|
Split Each Edge Once |
Split Each Edge Once |
Each edge is split into two edges, independent of the edge length. |
Adaptive Subdivision |
Adaptive Subdivision |
Each edge is recursively split in half until the resulting new edges are not longer than |
Max. Edge Length¶
- name: maxEdgeLength, type: Float, default: 1¶
Sets the maximum length an edge can have in a WEM. If any edge exceeds this length, it will be split by inserting a node in the middle of that edge.
Local Subdivision¶
PVL Name¶
- name: localSubdivisionPVL, type: String, default: LUT¶
Sets the name of the Primitive Value List (PVL) to use (only node and edge PVLs are supported).
PVL Threshold¶
- name: localSubdivisionPVLThreshold, type: Double, default: 1¶
Sets the threshold for the Primitive Value List (PVL) value. If the PVL value is greater than or equal to the threshold, the edge can be subdivided.
Max Iterations¶
- name: maxIterations, type: Integer, default: 1000000¶
Sets the maximum number of iterations. A value of -1 indicates that no limit is imposed.
By iteration, a splitting of an edge is meant. If the algorithm stops before all edges have been split according to the length criterion, the result is a valid WEM containing edges longer than the
Max. Edge Length.