Skip to content

[BUG]: Union_mesh fails on some intersection checks with other geometries, and rotation of shell points seem off #2421

@Lomholy

Description

@Lomholy

Overlap_issue.zip

Formalized bug report from personal email correspondence with Sam Lambrick

Describe the bug

  1. When using Union_mesh with Union_box in some configurations, the initialize check to see which geometries overlap fail, and the user receives the following output:
    "Somehow reached a situation with no intersection time found, but still inside volume"

  2. Furthermore, in a separate situation, when placing the Union_mesh component relative to a different coordinate system than Union_master, an error appears in the shell calculations.

Document steps to reproduce the bug
An instrument that reproduces these two bugs will be attached here.

Solutions

  1. I will be fixing this by attempting to optimize the r_within_mesh function, such that more shell points can be added to the other geometries (box, sphere etc.) without massive losses in performance. @mads-bertelsen has previously attempted to add more shell points to the other geometries, and this does seem to fix the issue.

  2. The coordinate transformation will be tested and fixed.

OS and McStas/McXtrace version (please complete the following information):

  • OS: MacOS Tahoe 26.3.1
  • McCode variant: McStas
  • Version 3.99.99 (Built from main as of 28/04/2026)

Add your code / dataset
If applicable:
[ ] Please provide a zip-archive of instrument plus any local components, datafiles, …
[ ] Please provide all settings used (e.g. input parameters, mpi parallelisation level, …)

Metadata

Metadata

Assignees

Labels

UnionItems related to the Union subsystem

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions