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

Position sampling bug in egs_shape_collection #42

Closed
mchamberland opened this issue Feb 25, 2016 · 1 comment
Closed

Position sampling bug in egs_shape_collection #42

mchamberland opened this issue Feb 25, 2016 · 1 comment
Assignees
Labels

Comments

@mchamberland
Copy link
Contributor

When defining an egs_shape_collection composed of cylinder shapes with midpoints away from the origin, the midpoint translation is not applied.

Here is a simple egs_chamber input file which reproduces the problem. Remove the .txt extension, run egs_chamber -i shape_collection_midpoint and view tracks with egs_view to reveal the problem.

shape_collection_midpoint.egsinp.txt

This is the behaviour that fooled me into reporting a bug with the cylinder shape. My apologies for the trouble!

ftessier added a commit that referenced this issue Feb 25, 2016
The shape getPoint() method returns a point in the shape WITHOUT
applying its affine transformation. The shape collection must instead
call the getRandomPoint() method which applies the transformations
defined for each shape.
@ftessier
Copy link
Member

No worries, I did not realize myself at the time that the midpoint was already taken into account by an affine transformation. The underlying issue with the shape collection is that it calls the function getPoint for each shape in the collection, where it should call getRandomPoint which properly applies the affine transformation of the shape after sampling the point.

@ftessier ftessier self-assigned this Feb 25, 2016
@ftessier ftessier added the bug label Feb 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants