Skip to content

Conversation

@Lomholy
Copy link
Collaborator

@Lomholy Lomholy commented Jan 25, 2026

Free-form text area

Please describe what your PR is adding in terms of features or bugfixes:
This PR fixes two bugs. Firstly it fixes a bug in merge_lines_to_draw that would exit if no lines were to be drawn. This happened during occasions where the entirety of the shape (or subparts of it in the case of the cylinder tops) where completely enveloped in another shape. Such as (the silly) example of one cylinder with a priority of 1, inside a bigger cylinder with a priority of 10.

Secondly this PR adds a reallocation to the dummyint when mesh is the input shape, to draw_line_with_highest_priority. This would fail originally overflow when more than 2 intersections where the case for a line.


Development OS / boundary conditions

Please describe what OS you developed and tested your additions on, and if any special dependencies are required:
Developed on MacOs Tahoe 26.2


PR Checklist for contributing to McStas/McXtrace

  • My contribution contains something else

    • Explanation is added in free form text above or below the checklist

@willend
Copy link
Contributor

willend commented Jan 25, 2026

These edits look OK meaningful. Could you maybe include an example instrument with the mentioned (silly) geometry corner-case?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants