Feature: RegionShapes#385
Merged
Merged
Conversation
AddsAllregionshape functions. Allows users to given a region (int), return a corresponding Shape generate shapes for all regions, which can be accessed as: allregions:= AllRegionShapes() allregions(i) where i=0...255
JonathanMaes
requested changes
Mar 19, 2026
Add ext_ prefix for extension Add warnings about shift/redefining regions add test .mx3 script
JonathanMaes
approved these changes
Apr 2, 2026
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.
This PR adds a function
AllRegionShapeswhich for a given region value, will return a Shape with all cells in that region. Can be easily looped over all 256 regions. This is intended mainly if one wants to make Shapes of say, Voronoi grains, to be used with Masked().An example file is including showing how each shape can be accessed after AllRegionShapes is called (there is some slightly unusual syntax, it uses 2 sets of parantheses), and also how they can be added together in a simple loop, is attached here: regionshape_example.txt
does not yet work with shift/moving frame stuff. I am not sure if it could, or should?