Part II: So close, yet so far...
Apical view and a sample slice.
For now, utterly failed to reconvert those shapes to the proper coordinates to be able to count the cubes
Just brute forced part 1, unless there is really clever way to cache the results. I don't know anyway to even keep track of all the points.
I'm in the final debugging stages of an alternative approach - also started out with a brute force like @cgoodman3 @LiuZhang and @dsmdavid - but for part two moved onto a different approach.
It works for all the routes in part 1, but for some reason is miscalculating something in the defined routes in part 2.
Update at 21:42 - found one problem - was overrunning an int16 data type - hopefully this fixes the problem.
Algo / recipe in the spoiler text below:
@SeanAdams I neglected to post some of these last few days.
@patrick_digan - after days of chasing down silly debugging, finally got mine up and running. I remain impressed and intimidated that you got yours done within a day or two of the challenge being published!
OK - here's my final solution for part 1 & 2. This became complex enough that I built test harnesses for the sub-macros so that I could continue to run all my test cases as I built them out. I've attached the solution and the two test harnesses.
The original approach was a simple brute-force explosion - but this had to be completely reengineered to make this work.
The data prep
Set up the Macro
This piece creates the initial version of the map file, containing the first row - i.e. set up the initial unverse
The iterative process:
did you know why the sum is roundup after macro?
but if i do it in new workflow, the sum is correct.
Update: Quick solution, use formula tool for Mod 1000
Macro