Check assembly
When the frame shows a stable result after the step (it is inside, connected, apart), prefer this group - Inside container, Contact or connection, and Objects apart.
When the frame shows a stable result after the step (it is inside, connected, apart), prefer this group.
Inside container
What it judges: if the center of the target part's box falls inside the container part's box, the part counts as installed.
Typical uses:
- Battery into the battery compartment;
- Pen cap and barrel together into the pen box;
- Inner tray into the outer box;
- In per-piece mode, each slot of each workpiece (part → workpiece + sub-zone); see Use per-piece mode.
How to configure:
- Target classes: the parts to go in; you can select several. With several, the default is 全部目标都进入父容器才通过 (Pass only when all targets are inside the container); you can change it to 任一目标进入即通过 (Pass when any target is inside).
- Parent container: the part or fixture that receives them.
- Sub-zone in the parent container (optional): use it when parts may only go into a specific position in the container.
For sub-zones, 在参考图上框 (Draw on reference image) is recommended:
- First draw an example parent container on the reference image, about the same size as the box the model recognizes.
- Then draw where the part should be.
- After you confirm, it is saved as a proportion relative to the parent container box.
- When the parent container moves in the frame or gets nearer or farther, the sub-zone moves with it.
- The sub-zone can extend beyond the parent container box (for example, when the slot is on the side of the workpiece).
- Boxes can be selected, dragged, resized by dragging the small handles, and deleted with Delete.
- You can also use the 9 宫格 (3×3 grid) presets, or drag the sliders (inside the box only).
Multiple targets must land in the same container
If there are two pen boxes in the frame, one with the cap and one with the barrel, it does not pass.
For long, thin parts, use "Contact or connection" instead
For ribbon cables, wires and similar long, thin parts, the box center often falls outside the container, so Inside container gives wrong results.
Contact or connection
What it judges: if the boxes of two parts overlap by a certain ratio, or are very close edge to edge, they count as connected.
Typical uses: ribbon cable connected to the main board; wire plugged into a connector; label applied to the product; lid snapped onto the box.
How to configure:
- Object A / Object B: the two parts; order does not matter.
- Overlap ratio threshold:
- 0.05 = edges touching (default);
- 0.20 = clearly fitted together;
- 0.50 = almost fully overlapping.
- Contact tolerance (px): for parts that touch without overlapping; enter 5~10. Meant for parts butting against each other and wires fully plugged in.
Note: the camera must be able to see the seam, and the seam must not be completely blocked by a hand.
Objects apart
What it judges: if both parts are in the frame right now and their boxes do not touch, they count as apart. It does not require them to have been connected before.
Typical uses: pulling out a ribbon cable; peeling off a protective film; removing a fixture.
How to configure:
- Object A / Object B;
- Minimum separation (px): enter 10~30 when they must be pulled some distance apart. By default, not intersecting is enough.
A part leaving the frame does not count as apart
Taking one part away does not count as apart. For "unplug and take it away", use "Object absent" (whole frame) or "Object left zone"; see Present or absent.
Also note:
- It does not require the parts to have been connected before: if the two parts were placed apart to begin with, it passes immediately. To judge "connected first, then taken apart", use the combination 依次满足 (In sequence): first [Contact or connection], then [Objects apart]. See Use combined conditions.
- With several parts of the same class, every pair must be apart for it to pass. 3 A's and 2 B's make 6 pairs; if even one pair is still touching, it does not pass. Before choosing this type, make sure the number of parts in the frame is under control.
