// only shift-right supported so far srecord noeq OnePathShifter(OnePathWithOrigin path, bool shiftRight) { Pt p; int direction; int iStep; gettable OnePathWithOrigin outPath; run { assertTrue(shiftRight); outPath = new OnePathWithOrigin; p = path.origin(); while (iStep < path.nSteps()) { int step = path.getStep(iStep); if (direction == 0) { direction = step; outPath.setOrigin(ptPlus(path.origin(), rotatePtRight(onePathDirection(step)))); } outPath.addStep(step); ++iStep; } } OnePathWithOrigin get() { if (outPath == null) run(); ret outPath; } }