-
Notifications
You must be signed in to change notification settings - Fork 60
Union mcdisplay bugs #2294
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
Union mcdisplay bugs #2294
Conversation
…llocate in case of mesh
…nt statement to indicate how many face and verts are read
|
These edits look OK meaningful. Could you maybe include an example instrument with the mentioned (silly) geometry corner-case? (So that it can easily be demonstrated that "things now work”.) |
|
Hi Peter, Yes of course. Said example instrument should be attached here: I also have an instrument where the mesh would crash before, but doesn't with the current changes, but it is too voluminous to attach here. |
|
Thanks for that. I’d prefer to have it placed as part of the PR, e.g. in Tests_union/Hidden_cylinder/Hidden_cylinder.instr (renamed from the generic ‘imaging’) (And with updated documentation header so that others have a chance to understand what it does ;-) ) |
|
Ah of course. Then I will also add the mesh test there. |
|
If the two tests come in different instrument files, please add them with different names / folders in the hierarchy :-) |
|
Of course! Regarding the example, how can I force it to test for display? Something like:
|
|
Hmm yes I think 76 megs of STL is a bit much. :-) I would prefer a bare minimum to show whatever we want to show. :-) And sorry there is no way of running mcdisplay in testing at the moment - but I think it would be fine to run a corresponding simulation (which is what the %Example line would do) and maybe add an instruction in writing above mentioning what to do for the related mcdisplay run? |
|
Hi again, I was able to cut it down to 1 stl file instead of the many I had before. It should now fail on main, and work on this branch with the mcdisplay. |
|
After a couple of manual re-runs (temporary failures deploying to Windows systems) all seems OK. Also, I have rectified your instr headers for matching Instrument: labels and added short description strings (all described under https://github.com/mccode-dev/McCode/wiki/Component-development - work in progress component-developer docs) |


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