Page 1 of 1

Fit objects optimizing areas.

Posted: 2014-04-30T10:13:15-07:00
by Elapido
I don't know if Imagemagick is able to do this. If it isn't, I'd appreaciate if you tell me of any program that is designed for what I need. What I'd like is to provide some 2D vector objects, scaled with their real dimensiones in .ai or .eps format, for instance, and another larger vector object. The program should be able to place the objects inside the container optimizing the space, moving or rotating the objects for best fit.

Re: Fit objects optimizing areas.

Posted: 2014-04-30T10:23:40-07:00
by fmw42
Imagemagick is primarily a raster processor and does not do much will vector files. It always converts them to raster format. I do not know of any program that will do what you want. But that is not to say, one might not exist. I am just not an expert on vector file manipulations.

see http://www.imagemagick.org/Usage/formats/#vector

Re: Fit objects optimizing areas.

Posted: 2014-04-30T13:01:04-07:00
by fmw42
If the vector files are converted to raster, then one, in principle, can use -mophology distance to find the largest square area inside some region. Then you can scale the other vector file to fit that region and insert in there.

see
http://www.imagemagick.org/Usage/morphology/#distance


I do something similar without morphology in my autolabel script at the link below, though not quite what you want.