3D cylinders with flat caps.
This archetype is for cylinder primitives defined by their axial length and radius.
For points whose radii are for visualization purposes, use archetypes.Points3D instead.
Orienting and placing cylinders forms a separate transform that is applied prior to archetypes.InstancePoses3D and archetypes.Transform3D.
Fields
Required
Recommended
centers:Translation3Dcolors:Color
Optional
rotation_axis_angles:RotationAxisAnglequaternions:RotationQuatline_radii:Radiusfill_mode:FillModelabels:Textshow_labels:ShowLabelsclass_ids:ClassId
Can be shown in
- Spatial3DView
- Spatial2DView (if logged above active projection)
- DataframeView
API reference links
- π C++ API docs for
Cylinders3D - π Python API docs for
Cylinders3D - π¦ Rust API docs for
Cylinders3D
Example
Batch of cylinders
"""Log a batch of cylinders."""
import rerun as rr
rr.init("rerun_example_cylinders3d_batch", spawn=True)
rr.log(
"cylinders",
rr.Cylinders3D(
lengths=[0.0, 2.0, 4.0, 6.0, 8.0],
radii=[1.0, 0.5, 0.5, 0.5, 1.0],
colors=[
(255, 0, 0),
(188, 188, 0),
(0, 255, 0),
(0, 188, 188),
(0, 0, 255),
],
centers=[
(0.0, 0.0, 0.0),
(2.0, 0.0, 0.0),
(4.0, 0.0, 0.0),
(6.0, 0.0, 0.0),
(8.0, 0.0, 0.0),
],
rotation_axis_angles=[
rr.RotationAxisAngle(
[1.0, 0.0, 0.0],
rr.Angle(deg=float(i) * -22.5),
)
for i in range(5)
],
),
)
