WEMSubdivide¶
-
MLModule¶ genre WEMProcessingauthor MeVis Medical Solutions AGpackage MeVisLab/Standarddll MLWEMModulesdefinition MLWEMModules.def see also WEMReducePolygonsinherits from WEMProcessorkeywords split,surface
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.
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¶
Apply: Trigger |
listenToFinishNotifications: Bool |
PVL Threshold: Double |
Auto Apply: Bool |
listenToRepaintNotifications: Bool |
shouldComputeNormals: Bool |
Clear: Trigger |
listenToSelectionChangedNotifications: Bool |
Subdivision Mode: Enum |
Description: String |
Local Subdivision: Bool |
triangulationMode: Enum |
elapsedTime: Float |
Max. Edge Length: Float |
Update Mode: Enum |
id: Integer |
Overwrite label and description: Bool |
workDirectlyOnInputWEMs: Bool |
isProcessing: Bool |
progress: Float |
|
Label: String |
PVL Name: String |
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¶ Selects a 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. Thus, each edge results in 2n edges, with n being determined adaptively for each edge. |
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.