Open
Conversation
In 3.11, the function VoxelShape was no longer exposed to users since mx3 scripts do not allow for arbitrary arrays mumax#311 (comment). However, Voxelshape actually takes a slice as input, and therefore works with newScalarMask() without any other changes required.
Contributor
|
Seems alright to expose this to the user. I adapted your MWE into a small test script and slightly tweaked the description. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
In 3.11, Voxelshape was restricted from users. However, while the description says 'array', it actually works with slices. In particular, it works with slices created with NewScalarMask, with no other changes needed (surprisingly, no changes were needed to manage GPUAccess/CPUAccess at all). This can probably be safely re-exposed to the user? A minimal working example is attached:
testvoxel.txt