Source: GitHub
Signature¶
def sdynpy.fem.sdynpy_visualization_reduction.create_visualization_tracelines(geometry: sdynpy.core.sdynpy_geometry.Geometry, retained_node_ids=None, k_candidates=12, k_extra=2, block_penalty=0.5, max_length_factor=3.0, use_node_adjacency=False)Creates tracelines that can be used to improve visualization of a reduced geometry.
Parameters¶
geometry : Geometry The geometry containing the original mesh with original elements and colors.
retained_node_ids : np.ndarray, A numpy array consisting of the node IDs that will be retained.
k_candidates : int, optional Number of nearest neighbors to consider, by default 12
k_extra : int, optional Number of extra local edges per node beyond the MST, by default 2
block_penalty : float, optional Penalty applied when nodes share no block membership, by default 0.5
max_length_factor : float, optional Local edges longer than this times median nearest-neighbor distance are pruned. MST edges are always kept. By default 3.0
use_node_adjacency : bool, optional If True, require candidate edges to be between nodes that are adjacent in the coarse element-derived node adjacency graph. By default, False.
Returns¶
tracelines : TracelineArray Returns a TracelineArray containing lines that can be used to visualize reduced geometry.