main
John Lauer Add insulated sensor library and reconcile off-board harness and staged labels 10fc208
"""Load every shape returned by a STEP import, including separated assembly roots."""
from pathlib import Path
import cadquery as cq

def load_step(path):
    objects=cq.importers.importStep(str(Path(path))).vals()
    if not objects or not all(isinstance(obj,cq.Shape) for obj in objects):
        raise ValueError(f'No complete shape set in STEP: {path}')
    # .val() selects just the first root; assembly files can have several.
    return objects[0] if len(objects)==1 else cq.Compound.makeCompound(objects)