srecord noeq G22MeshMapper(G22Mesh mesh1, G22Mesh mesh2) > AbstractSteppable { // import the important classes delegate Anchor, Curve to G22Mesh. // keys are the anchors from mesh1, values are the anchors from mesh2 new Map anchorMap; // keys are the curves from mesh1, values are the curves from mesh2 new Map curveMap; bool prechecksDone; // set to the reason why when a mapping is deemed impossible settable O rejectedBecause; bool rejected() { ret rejectedBecause != null; } public bool step() { if (!prechecksDone) { prechecks(); ret !rejected(); } } void prechecks { set prechecksDone; sig1 = mesh1.signature(); sig2 = mesh1.signature(); if (!eq(sig1, sig2)) ret with rejectedBecause(G22SignatureMismatch(mesh1, mesh2)); } }