def compute_joining_effects(genome, parts):
    """
    Compute all joining curves between parts
    (only those with some bridge or smooth rad specified in attachment params),
    and compute any bridge parts requested.

    ASSUMES: All parts have same matrix_world, and are triangles only
    """

    inter_curves, bridge_objs = {}, []

    g_items = enumerate(tree.iter_items(genome.parts, postorder=True))
    part_items = tree.iter_parent_child(parts, postorder=True)
    for (i, genome), (parent, part) in zip(g_items, part_items):
        if genome.att is None:
            continue

        br, sr = genome.att.bridge_rad, genome.att.smooth_rad
        if not br > 0 and not sr > 0:
            continue

        logger.debug(f"Computing joining geometry for {i=} with {br=} and {sr=}")

        try:
            inter = join_smoothing.compute_intersection_curve(
                parent.obj, part.obj, parent.bvh(), part.bvh()
            )
            inter.name = "intersection_curve"
        except ValueError as e:
            logger.warning(
                f"join_smoothing.compute_intersection_curve for threw {e}, skipping"
            )
            inter = None

        if inter is not None and len(inter.data.vertices) < 4:
            logger.warning(
                "join_smoothing.compute_intersection_curve found too few verts, skipping"
            )
            inter = None

        if br > 0 and inter is not None:
            b = join_smoothing.create_bevel_connection(
                parent.obj,
                part.obj,
                parent.bvh(),
                part.bvh(),
                width=br,
                intersection_curve=inter,
                segments=5,
            )
            b.name = part.obj.name + ".bevel_connector"
            b.parent = parent.obj
            bridge_objs.append(b)

        inter_curves[i] = inter

    return inter_curves, bridge_objs

    Compute all joining curves between parts
    (only those with some bridge or smooth rad specified in attachment params),
    and compute any bridge parts requested.

    ASSUMES: All parts have same matrix_world, and are triangles only
    
infinigen/assets/objects/creatures/util/joining.py