Skip to content

Commit 5c9c924

Browse files
committed
[WIP] debugging breaking changes in vertex overlap
1 parent 5999fb1 commit 5c9c924

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

gempy_engine/API/dual_contouring/multi_scalar_dual_contouring.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def dual_contouring_multi_scalar(
103103
# region Vertex gen and triangulation
104104
left_right_per_mesh = []
105105
# Generate meshes for each scalar field
106-
if LEGACY:=False:
106+
if LEGACY:=True:
107107
for n_scalar_field in range(data_descriptor.stack_structure.n_stacks):
108108
_compute_meshes_legacy(all_left_right_codes, all_mask_arrays, all_meshes, all_surfaces_intersection, all_valid_edges, n_scalar_field, octree_leaves, options, output_on_edges)
109109
else:
@@ -138,8 +138,8 @@ def dual_contouring_multi_scalar(
138138
dc_data_list=dc_data_per_surface_all,
139139
)
140140
# endregion
141-
if (options.debug or len(all_left_right_codes) > 1) and False:
142-
apply_faults_vertex_overlap(all_meshes, data_descriptor.stack_structure, left_right_per_mesh)
141+
if (options.debug or len(all_left_right_codes) > 1) and True:
142+
apply_faults_vertex_overlap(all_meshes, data_descriptor.stack_structure, all_left_right_codes)
143143

144144
return all_meshes
145145

gempy_engine/modules/dual_contouring/_vertex_overlap.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ def _apply_fault_relations_to_overlaps(
3535

3636
if overlap_key in voxel_overlaps:
3737
_apply_vertex_sharing(
38-
all_meshes,
39-
origin_stack,
40-
surface_n,
41-
voxel_overlaps[overlap_key]
38+
all_meshes=all_meshes,
39+
origin_mesh_idx=origin_stack,
40+
destination_mesh_idx=surface_n,
41+
overlap_data=voxel_overlaps[overlap_key]
4242
)
4343

4444

@@ -135,9 +135,10 @@ def _find_overlaps_between_stacks(
135135
for i in range(len(stack_codes)):
136136
for j in range(i + 1, len(stack_codes)):
137137
overlap_data = _process_stack_pair(
138-
stack_codes[i], stack_codes[j],
139-
all_left_right_codes[i], all_left_right_codes[j],
140-
i, j
138+
codes_i=stack_codes[i],
139+
codes_j=stack_codes[j],
140+
left_right_i=all_left_right_codes[i],
141+
left_right_j=all_left_right_codes[j],
141142
)
142143

143144
if overlap_data:
@@ -151,8 +152,6 @@ def _process_stack_pair(
151152
codes_j: np.ndarray,
152153
left_right_i: np.ndarray,
153154
left_right_j: np.ndarray,
154-
stack_i: int,
155-
stack_j: int
156155
) -> Optional[dict]:
157156
"""Process a pair of stacks to find overlapping voxels."""
158157
if codes_i.size == 0 or codes_j.size == 0:

0 commit comments

Comments
 (0)