Skip to content

Commit 158f5d5

Browse files
committed
[ENH] Introduce compute_overlap flag for improved clarity and streamline overlap handling in dual contouring logic
1 parent 151f400 commit 158f5d5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

gempy_engine/API/dual_contouring/multi_scalar_dual_contouring.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@ def dual_contouring_multi_scalar(
103103

104104
# endregion
105105

106+
compute_overlap = (len(all_left_right_codes) > 1) and DUAL_CONTOURING_VERTEX_OVERLAP
107+
106108
# region Vertex gen and triangulation
107109
left_right_per_mesh = []
108110
# Generate meshes for each scalar field
@@ -135,13 +137,14 @@ def dual_contouring_multi_scalar(
135137
)
136138

137139
dc_data_per_surface_all.append(dc_data_per_surface)
138-
left_right_per_mesh.append(all_left_right_codes[n_scalar_field][dc_data_per_surface.valid_voxels])
140+
if (compute_overlap):
141+
left_right_per_mesh.append(all_left_right_codes[n_scalar_field][dc_data_per_surface.valid_voxels])
139142

140143
all_meshes = compute_dual_contouring_v2(
141144
dc_data_list=dc_data_per_surface_all,
142145
)
143146
# endregion
144-
if (len(all_left_right_codes) > 1) and DUAL_CONTOURING_VERTEX_OVERLAP:
147+
if compute_overlap:
145148
apply_faults_vertex_overlap(all_meshes, data_descriptor.stack_structure, left_right_per_mesh)
146149

147150
return all_meshes

0 commit comments

Comments
 (0)