Skip to content

Conversation

@Lomholy
Copy link
Collaborator

@Lomholy Lomholy commented Dec 11, 2025

Free-form text area

Please describe what your PR is adding in terms of features or bugfixes:
This PR changes a single Open_File to use "rb" instead of "r" and correspondingly changes the filetype used for the test in Geometry_test.instr.

I hope it is okay that I do not perform mcdoc, c-lint, etc. for this. It works on my mac and the windows, so I hope the checks go through :D


Development OS / boundary conditions

Please describe what OS you developed and tested your additions on, and if any special dependencies are required:
MacOs Tahoe and windows 11 i think.


PR Checklist for contributing to McStas/McXtrace

For a coherent and useful contribution to McStas/McXtrace, please fill in relevant parts of the checklist:

  • My contribution includes patches to an existing component file

    • I have used the mcdoc utility and rendered a reasonable documentation page for the component (please attach as screenshot in comments!)
    • I have ensured that basic use of the component is OK (e.g. an instrument using it compiles?)
    • I have used the mctest utility to test one or more instruments making use of the component (please attach mcviewtest report as screenshot in comments)
    • I have used the mcrun --c-lint "linter" and followed advice to remove most / all warnings that are raised
  • My contribution contains something else

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

Sync off file mesh with main
Apparently when reading binaries across different platforms, they can choose to insert newlines... using "rb" ensures that this does not happen.
Update Geometry_test to use the binary STL file.
@Lomholy Lomholy changed the title Addition of a single b in "rb" to ensure binaries are read properly across platform. Addition of a single b in "rb" to ensure binary stl files are read properly across platform Dec 11, 2025
@willend
Copy link
Contributor

willend commented Dec 11, 2025

@Lomholy I have removed the #define gymnastics to disable binary STL on Windows. Have further added a second test in the instr for binary STL.

@willend
Copy link
Contributor

willend commented Dec 11, 2025

@Lomholy binary support for STL indeed achieved on Windows - and now tested through CI also. Merging.

@willend willend merged commit 59b5b01 into main Dec 11, 2025
36 checks passed
@Lomholy
Copy link
Collaborator Author

Lomholy commented Dec 11, 2025

@willend Nice! Good to see that it worked elsewhere than just locally!

@Lomholy Lomholy deleted the off_file_mesh_component branch January 26, 2026 12:23
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