"""Inspect the pusher blade's actual geometry and any existing D-push helpers.""" import omni.usd from pxr import Usd, UsdGeom stage = omni.usd.get_context().get_stage() bbc = UsdGeom.BBoxCache(Usd.TimeCode.Default(), [UsdGeom.Tokens.default_, UsdGeom.Tokens.render]) for path in ["/World/Diverters/DiverterY_Split", "/World/Diverters/DiverterY_Split/Pusher", "/World/Diverters/DiverterY_Split/Pusher/Geom"]: prim = stage.GetPrimAtPath(path) if not prim.IsValid(): print(path, "MISSING"); continue r = bbc.ComputeWorldBound(prim).ComputeAlignedRange() mn, mx = r.GetMin(), r.GetMax() print(f"{path}") print(f" bbox x[{mn[0]:+.3f}..{mx[0]:+.3f}] ({(mx[0]-mn[0])*1000:.0f}mm) " f"y[{mn[1]:+.3f}..{mx[1]:+.3f}] ({(mx[1]-mn[1])*1000:.0f}mm) " f"z[{mn[2]:+.3f}..{mx[2]:+.3f}]") print(f" children: {[c.GetName() for c in prim.GetChildren()]}")