Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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