Skip to content

merged

merged #

merged — seeds concatenated into one.

So a depth seed and a reconstruction's points start one splat together.

merged(clouds) #

The points of every present cloud in clouds, as one.

Raises:

Type Description
ValueError

If no cloud is present.

Source code in capturegraph-recipes/capturegraph_recipes/splats/seeds/merged.py
@cg.pure_function("splats.merged/1")
def merged(clouds: cg.Array[cg.PointCloud]) -> cg.PointCloud:
    """The points of every present cloud in ``clouds``, as one.

    Raises:
        ValueError: If no cloud is present.
    """
    present = [cloud_.points() for cloud_ in clouds if not cg.is_missing(cloud_)]
    if not present:
        raise ValueError("no point cloud to merge")
    return cloud(
        "Merged seeds",
        [positions for positions, _ in present],
        [colors for _, colors in present],
    )