Skip to content

Commit 67f745c

Browse files
committed
add docstring
1 parent d47a727 commit 67f745c

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/components.jl

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,24 @@ end
665665
end
666666
end
667667

668+
"""
669+
BodyBox(; name, m = 1, r = [1, 0, 0], r_shape = [0, 0, 0], width_dir = [0,1,0])
670+
671+
Rigid body with box shape. The mass properties of the body (mass, center of mass, inertia tensor) are computed from the box data. Optionally, the box may be hollow. The (outer) box shape is used in the animation, the hollow part is not shown in the animation. The two connector frames `frame_a` and `frame_b` are always parallel to each other.
668672
673+
# Parameters
674+
- `r`: (structural parameter) Vector from `frame_a` to `frame_b` resolved in `frame_a`
675+
- `r_shape`: (structural parameter) Vector from `frame_a` to box origin, resolved in `frame_a`
676+
- `width_dir`: (structural parameter) Vector in width direction of box, resolved in `frame_a`
677+
- `length_dir`: (structural parameter) Vector in length direction of box, resolved in `frame_a`
678+
- `length`: (structural parameter) Length of box
679+
- `width = 0.3length`: Width of box
680+
- `height = width`: Height of box
681+
- `inner_width`: Width of inner box surface (0 <= inner_width <= width)
682+
- `inner_height`: Height of inner box surface (0 <= inner_height <= height)
683+
- `density = 7700`: Density of cylinder (e.g., steel: 7700 .. 7900, wood : 400 .. 800)
684+
- `color`: Color of box in animations
685+
"""
669686
@mtkmodel BodyBox begin
670687
@structural_parameters begin
671688
r = [1, 0, 0]

0 commit comments

Comments
 (0)