# How can I add an axis of rotation about the center of mass to the model?

**URL:** <https://discourse.slicer.org/t/how-can-i-add-an-axis-of-rotation-about-the-center-of-mass-to-the-model/27599>\
**Category:** Feature requests\
**Tags:** 3d-model\
**Created:** [February 2, 2023, 10:28am UTC](https://discourse.slicer.org/t/how-can-i-add-an-axis-of-rotation-about-the-center-of-mass-to-the-model/27599 "2023-02-02T10:28:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![q2577040659](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/q2577040659/32/16942_2.png) [@q2577040659](https://discourse.slicer.org/u/q2577040659)\
**Post date:** [February 2, 2023, 10:28am UTC](https://discourse.slicer.org/t/how-can-i-add-an-axis-of-rotation-about-the-center-of-mass-to-the-model/27599/1 "2023-02-02T10:28:19Z")

</div>

How can I add an axis of rotation about the center of mass to the model?

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [February 2, 2023, 1:44pm UTC](https://discourse.slicer.org/t/how-can-i-add-an-axis-of-rotation-about-the-center-of-mass-to-the-model/27599/2 "2023-02-02T13:44:29Z")

</div>

These links may help - you can get the center of mass from the statistics and make a transform around it.

[https://slicer.readthedocs.io/en/latest/developer\_guide/script\_repository.html#quantifying-segments](https://slicer.readthedocs.io/en/latest/developer_guide/script_repository.html#quantifying-segments)

[https://slicer.readthedocs.io/en/latest/developer\_guide/script\_repository.html#rotate-a-node-around-a-specified-point](https://slicer.readthedocs.io/en/latest/developer_guide/script_repository.html#rotate-a-node-around-a-specified-point)

---

<div class="post-metadata">

**Author:** ![q2577040659](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/q2577040659/32/16942_2.png) [@q2577040659](https://discourse.slicer.org/u/q2577040659)\
**Post date:** [February 3, 2023, 2:06am UTC](https://discourse.slicer.org/t/how-can-i-add-an-axis-of-rotation-about-the-center-of-mass-to-the-model/27599/3 "2023-02-03T02:06:24Z")

</div>

Thank youfor the reply, but I’m going to add an action axis to the model like this, what do I do?

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/9/3/93daeded781696728e28d8723568c4edd233f309.png)

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [February 3, 2023, 8:15am UTC](https://discourse.slicer.org/t/how-can-i-add-an-axis-of-rotation-about-the-center-of-mass-to-the-model/27599/4 "2023-02-03T08:15:25Z")

</div>

That should still be possible if you set up nested transforms. Study transform hierarchies and you can center the model around it’s center of mass and even align it to the principle axes (moments) and harden the transform if you want for convenience.

---

<div class="post-metadata">

**Author:** ![q2577040659](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/q2577040659/32/16942_2.png) [@q2577040659](https://discourse.slicer.org/u/q2577040659)\
**Post date:** [February 6, 2023, 1:40am UTC](https://discourse.slicer.org/t/how-can-i-add-an-axis-of-rotation-about-the-center-of-mass-to-the-model/27599/5 "2023-02-06T01:40:08Z")

</div>

Thanks, but I still want to use the action axis.
