-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Volume below a plane #219
Volume below a plane #219
Conversation
Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
Codecov Report
@@ Coverage Diff @@
## ign-math6 #219 +/- ##
=============================================
+ Coverage 99.40% 99.41% +0.01%
=============================================
Files 66 67 +1
Lines 6185 6347 +162
=============================================
+ Hits 6148 6310 +162
Misses 37 37
Continue to review full report at Codecov.
|
Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
19e5f67
to
f4e70c7
Compare
Signed-off-by: Arjo Chakravarty <[email protected]>
@scpeters I've addressed your feedback and removed the controversial function. |
Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for your patience with my review! the API looks good to me. I haven't gone over the test cases, but I think it is good for merging once CI is happy
🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸
🎉 New feature
Adds a
VolumeBelow(Plane<T> &_plane)
function to some of the shapes. This is useful for simulating surface behavior when the vehicle is buoyant. It also introduces aCenterOfVolumeBelow(const Planed &_plane)
which is useful for calculating the center of buoyancy. This is to support gazebosim/gz-sim#818.Summary
Currently the following shapes have a
VolumeBelow
:The sphere calculation is relatively simple formula can be found here.
The box calculation is relatively difficult. However the essence of it is we find out the points at which the plane intersects with the plane itself. We then reconstruct a triangle mesh using the resulting vertices. Subsequently we use the generic triangle mesh volume formula.
TODO:
Cylinder slices are relatively simple to calculate using Cylinder wedges. [To Be done in a Separate PR]
Checklist
codecheck
passed (See contributing)Note to maintainers: Remember to use Squash-Merge