A fixture can look correctly sized in its source file and come into a robot cell at the wrong scale. OpenUSD stores the linear metric at stage level in meters per unit. When an assembly references geometry from another stage, the assembly workflow must account for differences in the metric. Measuring a known part dimension in the composed scene is a direct way to check that the correction was applied where intended.

Follow the same part into two compositions

The synthetic fixture below ran with OpenUSD 26.11. It uses a simple cubical block authored 24 units wide in a centimeter asset. The cell uses a meter for each unit. The intended edge is 0.24 m, or about 9.45 in. The code references the same asset into the cell twice. It compares an unscaled reference with a reference under a parent transform that applies the ratio of the source metric to the destination metric.

from math import isclose

from pxr import Gf, Usd, UsdGeom

asset = Usd.Stage.CreateInMemory()

UsdGeom.SetStageMetersPerUnit(asset, 0.01)

UsdGeom.Xform.Define(asset, "/Fixture")

block = UsdGeom.Cube.Define(asset, "/Fixture/Block")

block.CreateSizeAttr(24.0)

block.CreateExtentAttr([Gf.Vec3f(-12), Gf.Vec3f(12)])

cell = Usd.Stage.CreateInMemory()

UsdGeom.SetStageMetersPerUnit(cell, 1.0)

ratio = (UsdGeom.GetStageMetersPerUnit(asset)

/ UsdGeom.GetStageMetersPerUnit(cell))

def add_fixture(path, scale):

wrapper = UsdGeom.Xform.Define(cell, path)

wrapper.AddScaleOp().Set(Gf.Vec3f(scale))

model = UsdGeom.Xform.Define(cell, path + "/Model")

assert model.GetPrim().GetReferences().AddReference(

asset.GetRootLayer().identifier, "/Fixture"

)

return wrapper.GetPrim()

unscaled = add_fixture("/Unscaled", 1.0)

corrected = add_fixture("/Corrected", ratio)

cache = UsdGeom.BBoxCache(Usd.TimeCode.Default(), [UsdGeom.Tokens.default_])

def x_width_m(prim):

world_range = cache.ComputeWorldBound(prim).ComputeAlignedRange()

return world_range.GetSize()[0] * UsdGeom.GetStageMetersPerUnit(cell)

assert isclose(x_width_m(unscaled), 24.0)

assert isclose(x_width_m(corrected), 0.24, rel_tol=1e-6)

In the unscaled composition, the world-aligned bounds span 24 cell units, which means 24 m in this cell. In the corrected composition, the span is about 0.24 cell units, which means about 0.24 m. Both references point at the same 24-unit source geometry. Changing the stage metric alone changes how the stage's units are interpreted. A scale operation at the composition boundary changes the coordinates at which the referenced geometry appears in the assembled stage.

Keep the correction at a known assembly boundary

Read both metrics from the actual stages or from a documented export contract. OpenUSD resolves a stage with no authored linear metric to centimeters by default. That fallback gives a usable number even when no exporter recorded its intent. If the source asset is expected to use millimeters, a default-looking readout needs investigation before the reference is relied on. Capture whether the metadata was authored so a missing export setting does not silently pass a validation rule.

Applying a correction to a wrapper prim keeps the source geometry available to other scenes in its original units. In this fixture the wrapper has no existing transform. In a real assembly, make clear which transform expresses unit conversion and which expresses the placement in the cell. For instance, if a fixture origin needs to be placed two meters from the cell origin, that placement belongs in the cell's coordinates. A transform stack that also scales the placement can move the fixture to a different position despite correcting its size. Measure a known displacement as well as a known dimension after composing.

Measure the world quantity that matches the check

The code computes a world bound and converts the aligned range along x to meters. This works as an edge-length check in the fixture because the geometry is aligned to the world axes. A rotated rectangular part can have a world-aligned range that is larger or smaller than a particular edge. For a rotated fixture, choose two known model points or a documented local-axis dimension, transform those points to the composed stage, and measure the quantity against the drawing. Use a world-aligned bound when the physical quantity of interest is an axis-aligned envelope.

For a multi-link robot or a fixture with proxy geometry, choose the prim and purpose that match the validation question. A render mesh, collision proxy, and tool frame may come from different parts of a package. An acceptable visual dimension leaves the collision proxy or frame offset to be checked separately. When animation matters, take the measurement at the intended time code and rebuild caching when inputs change. The simple block example exercises only the geometry and its placement transform.

An import check can save the source metric, target metric, applied scale, tested prim, and expected and measured sizes. Run the check on the same composed stage that downstream inspection or simulation will read. Keep a second example with matching metrics to catch double application of a conversion. If an importer already normalizes the asset, an additional adjustment would make the measured dimension wrong in the opposite direction.

When handing off a cell, include one known dimension and one placement measurement with their physical units. A reviewer can repeat those two checks without relying on the apparent proportions of a viewport. The reference may look credible at an arbitrary camera zoom, while a measured value reveals whether the assembly actually carries the intended scale.

Sources

OpenUSD, Encoding Stage Linear Units

https://openusd.org/release/api/group___usd_geom_linear_units__group.html

OpenUSD, UsdGeomBBoxCache

https://openusd.org/release/api/class_usd_geom_b_box_cache.html