08-22-2017, 07:20 PM
You can:
This creates a vector/path with one stroke per rectangle. Each stroke appears to be 4 "triplets" (24 coordinates: 4 corners times 3 points(*) times 2 coordinates). The difficulty may be to figure out the inner ones from the outer ones (ie, which are "holes"). But if you have only one outer one, the rest being holes, this isn't too hard.
See here for an introductions to paths if needed.
See there for a bunch of scripts that deal with path, in particular the "pathSummary" function in ofn-path-edits.
(*) since lines from the corners are straight lines, the "tangent handles" have the same coordinates as the anchors.
See here for an introductions to paths if needed.
See there for a bunch of scripts that deal with path, in particular the "summary" function in ofn-path-edits.
Code:
pdb.plug_in_sel2path(image,None)
This creates a vector/path with one stroke per rectangle. Each stroke appears to be 4 "triplets" (24 coordinates: 4 corners times 3 points(*) times 2 coordinates). The difficulty may be to figure out the inner ones from the outer ones (ie, which are "holes"). But if you have only one outer one, the rest being holes, this isn't too hard.
See here for an introductions to paths if needed.
See there for a bunch of scripts that deal with path, in particular the "pathSummary" function in ofn-path-edits.
(*) since lines from the corners are straight lines, the "tangent handles" have the same coordinates as the anchors.
See here for an introductions to paths if needed.
See there for a bunch of scripts that deal with path, in particular the "summary" function in ofn-path-edits.