assembly-model-hierarchy#
Code |
CN.012 |
|---|---|
Validator |
AssemblyModelHierarchyChecker |
Compatibility |
open-usd |
Tags |
🔑 |
Summary#
The assembly default prim must have kind = "assembly". Each composed-in child asset root must have kind = "component" or kind = "assembly", and every prim between the default prim and a child asset root that carries a model kind must be group or assembly, so the model hierarchy is contiguous.
Description#
USD model hierarchy is contiguous: a prim is a model only when every ancestor is a group or assembly model. A component is a terminal model and has no model descendants.
An assembly stage therefore has this shape:
The default prim is
assembly.Each child asset root, the topmost prim on a branch that introduces a reference or payload arc (
CN.010), iscomponentorassembly. A nested assembly is anassemblychild.Each assembly-local prim above a child asset root is
grouporassembly. A compound body (CN.011) isgroup.No prim inside a
componentcarries a model kind. Internal structure such as links uses no kind orsubcomponent.
Child assets keep the kind they are published with. Attachment semantics do not depend on kind: mate sites, connections, and mate bodies are found by traversal (MC.001, CN.001, MC.003).
Why is it required?#
Model traversal, model-level selection, and catalog tooling stop at the first prim that breaks the model hierarchy.
An
assemblyroot overcomponentandassemblychildren lets an assembly be referenced into a larger assembly without kind edits.
Examples#
# Valid: assembly root, component children
def Xform "UR10_Robotiq_2F85" (
kind = "assembly"
)
{
def Xform "Arm" (
prepend references = @../../ur10/simready_usd/ur10.usd@</ur10>
)
{
}
def Xform "Gripper" (
prepend references = @../../Robotiq/2F-85/simready_usd/2F-85.usda@</Robotiq_2F_85>
)
{
}
}
# Valid: nested assemblies under a group compound body
def Xform "IndustrialPlasticPallet_Stack_B01" (
kind = "assembly"
)
{
def Xform "CompoundBody" (
kind = "group"
)
{
def Xform "Stack_0" (
prepend references = @../../industrialplasticpallet_stack_a01/simready_usd/industrialplasticpallet_stack_a01.usda@
)
{
}
}
}
# Invalid: default prim is a component
def Xform "UR10_Robotiq_2F85" (
kind = "component"
)
{
}
# Invalid: group model inside a component asset
def Xform "Robotiq_2F_85" (
kind = "component"
)
{
def Xform "base_link" (
kind = "group"
)
{
}
}
How to comply#
Set
kind = "assembly"on the assembly default prim.Publish each child asset with a
componentorassemblyroot.Set
kind = "group"on each assembly-local prim that holds child assets, including the compound body.Clear model kinds inside a
component, or usesubcomponent.