Commit 8e67848
Fix Calculation of Compound Center of Masses (#1822)
* Added a new method to help inspect compound shapes
* Extended Center of mass.
It now supports an optional argument that helps correctly analyze the shape.
* Refactored Center method.
Reimplemented Center of a Compound class
* Moved the compound-specific method implementation inside the child class
* Added new test-case.
The test case compares the center of mass of a compound consisting of faces with the expected value
* Add docstring
---------
Co-authored-by: AU <[email protected]>1 parent 9bd1cb6 commit 8e67848
2 files changed
+50
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
756 | 756 | | |
757 | 757 | | |
758 | 758 | | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
759 | 788 | | |
760 | 789 | | |
761 | 790 | | |
| |||
764 | 793 | | |
765 | 794 | | |
766 | 795 | | |
767 | | - | |
| 796 | + | |
768 | 797 | | |
769 | | - | |
770 | | - | |
771 | | - | |
772 | | - | |
773 | | - | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
774 | 801 | | |
775 | 802 | | |
776 | 803 | | |
| |||
780 | 807 | | |
781 | 808 | | |
782 | 809 | | |
783 | | - | |
| 810 | + | |
784 | 811 | | |
785 | | - | |
786 | | - | |
787 | | - | |
788 | | - | |
789 | | - | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
790 | 815 | | |
791 | 816 | | |
792 | 817 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5904 | 5904 | | |
5905 | 5905 | | |
5906 | 5906 | | |
| 5907 | + | |
| 5908 | + | |
| 5909 | + | |
| 5910 | + | |
| 5911 | + | |
| 5912 | + | |
| 5913 | + | |
| 5914 | + | |
| 5915 | + | |
| 5916 | + | |
| 5917 | + | |
| 5918 | + | |
| 5919 | + | |
0 commit comments