def angle_alignment_cost_tagged(
    state: state_def.State,
    a: Union[str, list[str]],
    b: Union[str, list[str]],
    b_tags=None,
    visualize=False,
):
    """
    Return the dot product between the axes of a and the normal of the closest edge of b
    """
    if isinstance(a, str):
        a = [a]

    b_objs = iu.blender_objs_from_names(b)
    b_surfs = []
    for b_obj in b_objs:
        b_surf = tagging.extract_tagged_faces(b_obj, b_tags)
        b_surfs.append(b_surf)

    b_surf_names = []
    for i, b_surf in enumerate(b_surfs):
        add_to_scene(state.trimesh_scene, b_surf)
        b_surf_names.append(b_surf.name)

    res = angle_alignment_cost_base(state, a, b_surf_names, visualize)

    for b_surf_name in b_surf_names:
        iu.delete_obj(state.trimesh_scene, b_surf_name)

    return res

    Return the dot product between the axes of a and the normal of the closest edge of b
    
infinigen/core/constraints/evaluator/node_impl/trimesh_geometry.py