Skip to content

Re-expose Voxelshape to user#390

Open
jplauzie wants to merge 4 commits intomumax:3.11.2from
jplauzie:voxelshape
Open

Re-expose Voxelshape to user#390
jplauzie wants to merge 4 commits intomumax:3.11.2from
jplauzie:voxelshape

Conversation

@jplauzie
Copy link

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

JonathanMaes and others added 2 commits March 12, 2026 15:12
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.
@JLeliaert JLeliaert changed the base branch from master to 3.11.2 March 18, 2026 15:21
@JonathanMaes
Copy link
Contributor

Seems alright to expose this to the user. I adapted your MWE into a small test script and slightly tweaked the description.

@JonathanMaes JonathanMaes added this to the 3.12 milestone Mar 24, 2026
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.

2 participants