12-22-2021, 11:44 AM
(12-22-2021, 10:15 AM)rich2005 Wrote: However, that using the unified transform tool, very easy to move, rotate, scale all in one
It is picky about position and I could generate errors when the input and seed had a large separation.
Yes, indeed, I had not noticed the Unified Transform tool.
What errors did you get? If it was
"No affine transformation was found.
Perhaps you chose the wrong transformed path
or used in its construction some other tool than
Move, Scale, Rotate, Share, or Flip?
"
then it came from the plugin. The plugin works by examining the two paths and it tries to find out if one is obtained by an affine transformation from the other. Crucial is line 424:
ACCEPT_ERROR = 1e-3
and that error limit 1e-3 = 0.001 could be too small, I don't know. It is in pixels.
But I tried now the Unified Transform tool and I think that perhaps the question was that you made in the tool some non-affine transformation (that is, Perspective). It happens if you crab the small diamond in some corner. When you use the tool, pay attention to the 3x3-matrix in the top right corner and there look at the bottom row. The bottom row should remain as
0.0000 0.0000 1.0000
and if it changes then the transformation is no longer affine.
There is a very good reason why the plugin accepts only affine transformations: it was easy to make. And most importantly the repeated transformations are easy to do, one needs only to map the control points, without creating any approximate Bezier curves. But I think I know how to make rather easily a similar plugin that accepts Perspective transformations if we restrict it to straight-edge paths. And then, if we want to generalize that further, to accept curved paths, then we need some approximation algorithm and that means harder work. Who knows, perhaps later?