add_rod
Add a cylindrical collision object (rod, rail, hanger bar) for cloth simulation in CLO3D. Specify center, length, diameter, and axis to place it precisely.
Instructions
Add a cylinder (curtain rod, rail, hanger bar...) that cloth collides with.
All rods and boxes form one collision object (CLO keeps a single avatar), placed exactly at the given coordinates. For curtains, make_rod_pocket does the whole job. Tested in CLO 2025.2: cloth passes through a thin rod unless its mesh is finer than the rod, so set the pieces' particle_distance to about a third of the diameter and use >= 30 mm.
Args: center: [x, y, z] centre in mm (see get_cloth_bounds for where the cloth is). length: Length in mm. diameter: Diameter in mm. axis: Direction of the rod: "x" (left-right), "y" (up-down) or "z" (front-back). replace_avatar: Allow replacing a human avatar in the scene.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| axis | No | x | |
| center | Yes | ||
| length | Yes | ||
| diameter | No | ||
| replace_avatar | No |