I’m looking to offset multiple curves at once, but by a percentage of each curve’s area rather than a set distance. So, this would be similar to using the scale function with a box edit function, however, I can’t use the box edit because I need the new shapes to offset ‘concentric’ to the original shape, rather than towards the center of a bounding box.
— Below is a screencap of how it looks to use scale with the box edit function - the more circular shapes look good, but the traingular-ish ones especially move away from the center of the original shape
–- And here’s a screencap from using offset multiple - overall this looks better, but I’m trying to get each shape to offset proportionate to the size of the original, i.e. shrink down to a shape 80% the size, rather than each offsetting by a set distance (.375” in this case)
I did not do an in-depth analysis of the mathematics, but rather threw a square root in, and used trial and error to get to the above result.
Then I had a rethink, and changed the script to a more scientific version. In short, I calculated the area of the offset, and divided it by the length of the original curve. The resulting division of the area’s is now closer to the 20%-80% you asked for.
I can amend the script such that you can alter the offsetparam variable when you run the script, but the downside is that you have to do that every time you run it.
Otherwise you have to edit it in the script itself. Easy to do by opening the ScriptEditor, and edit the value, which is shown as a decimal fraction :
offsetparam = 0.2 # the offset area is 20% of the total area
The other way is to find the script file, and edit it. It is just a text file ( with a .py extension).
And as I have shown in one of my earlier posts, I also developed the script in a version that presents the offset as two differently colored surfaces, with or without a colored background. The surfaces are collected in 3 different layers, so you can manipulate the colors by changing the respective layer color.
in both scripts you will now and then see one of the original curves appearing fully zoomed in, asking for a point inside the curve to be entered. This happens when the curve centroid is located outside the curve, mostly in horseshoe types. The centroid or the selected point are required to “pull” the offset curve towards the inside of the original curve, in the same way as you would do manually when using the Offset command.