@@ -445,15 +445,15 @@ def add_solid_name_to_stl(filename, solid_name, file_type: str = "ascii") -> Non
445445
446446
447447def find_corresponding_points (
448- master_surface : pv .PolyData , slave_surface : pv .PolyData , distance : float = 20
448+ first_surface : pv .PolyData , second_surface : pv .PolyData , distance : float = 20
449449) -> np .ndarray :
450450 """Find corresponding points between two surfaces.
451451
452452 Parameters
453453 ----------
454- master_surface : pv.PolyData
454+ first_surface : pv.PolyData
455455 first surface
456- slave_surface : pv.PolyData
456+ second_surface : pv.PolyData
457457 second surface
458458 distance : float
459459 approximate largest distance between two surfaces
@@ -462,8 +462,8 @@ def find_corresponding_points(
462462 -------
463463 np.ndarray
464464 2*N array
465- first row is node IDs of master surface ,
466- second row is corresponding node IDs on the slave surface
465+ first row is node IDs of first_surface ,
466+ second row is corresponding node IDs on the second_surface
467467 None if no corresponding node is found
468468
469469 Notes
@@ -477,22 +477,22 @@ def find_corresponding_points(
477477 # NOTE: using UVC coordinates leads to a shift in
478478 # longitudinal direction from epicardium to endocardium and is thus not an option.
479479
480- # Compute normal of master surface
481- master_surface .compute_normals (inplace = True )
480+ # Compute normal of the first surface
481+ first_surface .compute_normals (inplace = True )
482482
483- points_m = master_surface .points
484- normals_m = master_surface .point_data ["Normals" ]
483+ points_m = first_surface .points
484+ normals_m = first_surface .point_data ["Normals" ]
485485
486486 # corresponding points
487487 corresp_points = []
488- tree_s = slave_surface .find_closest_point
488+ tree_s = second_surface .find_closest_point
489489
490490 # Find intersections
491491 for i in range (len (points_m )):
492492 start_point = points_m [i ]
493493 direction = normals_m [i ]
494494 # Cast a ray along the normal direction
495- intersection , _ = slave_surface .ray_trace (
495+ intersection , _ = second_surface .ray_trace (
496496 start_point - direction * distance , start_point + direction * distance
497497 )
498498
@@ -505,7 +505,7 @@ def find_corresponding_points(
505505 else :
506506 corresp_points .append (None ) # fill None for no corresponding point
507507
508- return np .vstack ((range (0 , master_surface .n_points ), corresp_points ))
508+ return np .vstack ((range (0 , first_surface .n_points ), corresp_points ))
509509
510510
511511def generate_thickness_lines (
@@ -517,16 +517,16 @@ def generate_thickness_lines(
517517 Parameters
518518 ----------
519519 surface1 : pv.PolyData
520- master surface
520+ first surface
521521 surface2 : pv.PolyData
522- slave surface
522+ second surface
523523 res : np.ndarray, optional
524524 corresponding points array, default None
525525
526526 Returns
527527 -------
528528 pv.PolyData
529- it contains cell data named 'thickenss '.
529+ it contains cell data named 'thickness '.
530530 """
531531 if corresponding_points is None :
532532 corresponding_points = find_corresponding_points (surface1 , surface2 )
0 commit comments