HactarCE/Hyperspeedcube

Error cutting piece on one of two equivalent shape definitions

Closed this issue · 2 comments

TestA works fine, but TestB has error cutting piece

common = require('common')

puzzledef{
  id = 'testA',
  name = "testA",
  ndim = 4,

  build = function()
    for v in cd{4, 3, 3}:expand('xoxo') do
      carve(v)
      -- slice{normal=v,distance=0}
      add_color(v)
    end
  end,
}
puzzledef{
  id = 'testB',
  name = "testB",
  ndim = 4,

  build = function()
    for v in cd{3, 3, 4}:expand('oxox') do
      carve(v)
      -- slice{normal=v,distance=0}
      add_color(v)
    end
  end,
}

This happens in v2.0.0-pre.6

This is probably fixed in the latest dev build

This is fixed in the latest dev build (v2.0.0-pre.14) using these updated puzzle definitions:

puzzles:add('testA', {
  ndim = 4,
  build = function(self)
    local sym = cd'bc4'
    self:carve(sym:orbit(sym.xoxo))
  end,
})
puzzles:add('testB', {
  ndim = 4,
  build = function(self)
    local sym = cd'bc4'
    self:carve(sym:orbit(sym.oxox))
  end,
})