Skip to content
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

Add minimal version of GenTrap (Arb8) shape #1171

Merged
merged 15 commits into from
Apr 3, 2024

Conversation

mrguilima
Copy link
Contributor

Add support for the GenTrap shape [orange]

Tracing unit tests to be implemented in another MR.

This is a simplified version of the GenTrap (or ROOT's Arb8) shape, which still does not support twisted side faces.

Also, for the case of triangular z-faces, it seems to work properly for well behaved cases (e.g. triangular prism), while failing for harder ones, like when the two z-face triangles are not directly aligned (e.g. mirror-reflected triangles).

Lastly, the ROOT docs suggest that a tetrahedron (1 + 3 vertices) should work, but this is not yet supported.

Still, the current implementation works for a lot of the intended cases, as far as the side-faces are planar.

@sethrj sethrj self-requested a review March 30, 2024 12:18
@sethrj sethrj added enhancement New feature or request orange Work on ORANGE geometry engine labels Mar 30, 2024
@sethrj sethrj changed the title First, simplified version of the GenTrap (ROOT's Arb8) shape Add minimal version of GenTrap (Arb8) shape Mar 30, 2024
Copy link
Member

@sethrj sethrj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @mrguilima ! There's still a bit of work to do but I this is solid.

src/geocel/detail/PolygonUtils.hh Outdated Show resolved Hide resolved
src/geocel/detail/PolygonUtils.hh Outdated Show resolved Hide resolved
src/geocel/detail/PolygonUtils.hh Outdated Show resolved Hide resolved
src/geocel/detail/PolygonUtils.hh Outdated Show resolved Hide resolved
src/geocel/detail/PolygonUtils.hh Outdated Show resolved Hide resolved
src/orange/orangeinp/ConvexRegion.cc Outdated Show resolved Hide resolved
src/orange/orangeinp/ConvexRegion.cc Outdated Show resolved Hide resolved
test/geocel/PolygonUtils.test.cc Outdated Show resolved Hide resolved
test/orange/orangeinp/ConvexRegion.test.cc Outdated Show resolved Hide resolved
test/orange/orangeinp/ConvexRegion.test.cc Outdated Show resolved Hide resolved
Copy link
Member

@sethrj sethrj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work @mrguilima !

@sethrj sethrj enabled auto-merge (squash) April 3, 2024 13:33
@sethrj sethrj merged commit 5edf749 into celeritas-project:develop Apr 3, 2024
25 of 26 checks passed
@mrguilima mrguilima deleted the lima/gentrap branch April 24, 2024 13:30
@sethrj sethrj mentioned this pull request Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request orange Work on ORANGE geometry engine
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants