Hi everyone,
I'm new to Inkscape and this forum so please forgive me if I have overlooked something obvious.
I am making a logo with gradients that I want to transform into halftones. I found out how to do that with Tiled Clones. No problem sofar.
The final product however has a requirement for the minimum size of the dots.
I figured there could be two ways to do this:
1. Set a lower limit for the dot size in the tiling dialog. However I'm not sure if this is possible. I did not find where I can set a minimum value
2. After tiling select all the clones with a width < x and delete them. I found some promising possibilities here:
-setting a minimum exponent in the preferences.xml file. I'm not sure if this would only affect the widht/height or if other attributes are also affected
-using the find option with something like width < x. This did not work
Any help would be much appreciated!!
how to batch select small objects
Re: how to batch select small objects

Welcome to InkscapeForum!
It sounds like you must have used Tiled Clones to create clones with various, or many countless different sizes? I don't understand everything about halftones, just the general idea. But I always thought the units would be the same size.
Hhmmm....I don't suppose it would work, to use all the same size units/dots??
1. The only way I know to set a lower size limit, would be to use some....well, not necessarily simple math, but fairly simple. You know the size of your original unit/dot. And you know the values that you have set to act on the original, on the Scale tab. Or at least you can choose the values that you set, so that the results don't go beyond the size limit. If they are a straight percentage, it's easier math. But if there's an Exponent or Randomize value, the math gets trickier. Potentially MUCH trickier with Randomize.
2. I think the Find dialog is an interesting idea. It might be that it didn't work, because it couldn't determine the sizes of clones. Let me see here.... Well ok, no, it seems that clones is one of the Types that CAN be selected. Are the clones at least all the same shape, such as all circles, even if they are different widths? If they are, then it looks like you should be able to use the Find dialog, and search for Clones of a certain width, using Width attribute. I don't understand why clones are given a width (in XML Editor) and other objects aren't necessarily (at least in my experiments). But at least width can be used to select the clones.
However, now that I've gone through all that rationalization....it can only select clones of that exact width, and not all widths above or below a certain value. I don't know exactly how you've created the clones. If you have no more than say 5 or 10 different sizes/widths, you could conceivabley run the Find command several times, and weed out all those that are below some certain width (or above, whatever it is?). But if you've used Randomization, I guess you would have way too many different widths to be able to go this route.
More later....
Basics - Help menu > Tutorials
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Re: how to batch select small objects
Thanks Brynn for the welcome and your reply! I must say that the more I discover the potential of Inskcape the more I like it!
About halftoning: Under the tab Trace in the Tiling menu you can set parameters how the clones traces the subject. Here you find a tutorial of the method I used: http://www.youtube.com/watch?v=aFCZhchGA4A
The generated clones are all copies of a circle and their sizes are the same or smaller than the original circle.
It seems that the parameters of the Trace tab override the values of the Scale tab. Which seems logical as scaling only creates copies with sizes varying on the scaling parameters and not depending on the subject to trace. So the scaling tab is not an option even more because it does not have an entry to set a minimum size.
Selecting the exact sizes is indeed not the route. Although not literally random, the widths are calculated values, so the different widths are far too many to sift through.
Or suggestion to uses dots with the same size might be an option, if I use Voronoi halftones http://www.evilmadscientist.com/2012/stipplegen-weighted-voronoi-stippling-and-tsp-paths-in-processing/. However this presents me with another problem: I have two different overlapping halftones that should not interfere I have to be able to control the positions of the dots which is not possible with the Voronoi method.
However, I have the following idea for the Voronoi method: Subtract colour 2 from color 1. This will generate space in the halftones of color 1 for the dots of the halftones of color 2. Or at least the number of interfering dots might be so small that I am able to work this out manually.
About halftoning: Under the tab Trace in the Tiling menu you can set parameters how the clones traces the subject. Here you find a tutorial of the method I used: http://www.youtube.com/watch?v=aFCZhchGA4A
The generated clones are all copies of a circle and their sizes are the same or smaller than the original circle.
It seems that the parameters of the Trace tab override the values of the Scale tab. Which seems logical as scaling only creates copies with sizes varying on the scaling parameters and not depending on the subject to trace. So the scaling tab is not an option even more because it does not have an entry to set a minimum size.
Selecting the exact sizes is indeed not the route. Although not literally random, the widths are calculated values, so the different widths are far too many to sift through.
Or suggestion to uses dots with the same size might be an option, if I use Voronoi halftones http://www.evilmadscientist.com/2012/stipplegen-weighted-voronoi-stippling-and-tsp-paths-in-processing/. However this presents me with another problem: I have two different overlapping halftones that should not interfere I have to be able to control the positions of the dots which is not possible with the Voronoi method.
However, I have the following idea for the Voronoi method: Subtract colour 2 from color 1. This will generate space in the halftones of color 1 for the dots of the halftones of color 2. Or at least the number of interfering dots might be so small that I am able to work this out manually.
Re: how to batch select small objects
It looked to me like the dots generated in the tutorial were all the same size. Let me try and find something small....or maybe if I used large circles it would be ok. Anyway, I'll try it, and let you know shortly.
Basics - Help menu > Tutorials
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Re: how to batch select small objects
Ooooohh OK, I see how it works. The sizes of the circles is adjusted according to some color value. So that in my experiment, pure white had circles = 0 width, and moving on up to pure black = full size. But if you need to remove the smallest ones, up to a certain size, won't that negatively affect result -- so that you'll have more white space than actually was in the original?? Oh, or you mean run the trace from the beginning, so that nothing is ever smaller than a certain size?
No, I don't see a way to set a minimum size in the Tiled Clones dialog. There may be a way to set a minimum exponent in prefs file, but I don't know what it is, if there is. Depending on how big an original image, or how big the resultant clones are, there may be a fairly easy way to manually delete the smallest ones. But as I mentioned, it will result in extra "white" space.
I managed to catch a screenshot where you can see the bounding box as I drag it out. You can only select something if the bounding box goes all the way around it. So by limiting the height (or width) of the b box, you can select only those below a certain size. So in the top of the 2 below, you can see where I'm dragging the selection box. It's just tall enough to catch those 3 smallest circles in that row. Then just below that is the result after I release the mouse.

But as I said, the problem with that, is more "white" space than you would have had to begin with. I do have a couple more suggestions. Below is a comparison of using Size (top) and Opacity (bottom) in Tiled Clones > Trace tab > #3. You can see that with Opacity, you get all the same size circles, just with different opacities. Maybe that would work instead of the size option?? (Yes, it's the Inkscape logo.)

And my last couple of ideas -- 1 would be to experiment with the options in #1, and try the R, G, B, H, S, and L options. And the 2nd, maybe you could try pre-processing the raster image, in a raster editor, so that the whitest areas are simply a light gray (and the rest of the colors shift by the same value) it would have the same effect as putting minimum size value for the original trace. I'm not very good with raster editors and raster color options. But someone else here might know a fairly quick way to make such an adjustment.
Well, I wish I had more than just ideas for you. But maybe you can do something with them
Edit
Oh oops, I just realized that using opacity or any of the other color values probably won't fit the definition of half-tone. Oh well, maybe someone else will have some ideas.... Good luck
No, I don't see a way to set a minimum size in the Tiled Clones dialog. There may be a way to set a minimum exponent in prefs file, but I don't know what it is, if there is. Depending on how big an original image, or how big the resultant clones are, there may be a fairly easy way to manually delete the smallest ones. But as I mentioned, it will result in extra "white" space.
I managed to catch a screenshot where you can see the bounding box as I drag it out. You can only select something if the bounding box goes all the way around it. So by limiting the height (or width) of the b box, you can select only those below a certain size. So in the top of the 2 below, you can see where I'm dragging the selection box. It's just tall enough to catch those 3 smallest circles in that row. Then just below that is the result after I release the mouse.

But as I said, the problem with that, is more "white" space than you would have had to begin with. I do have a couple more suggestions. Below is a comparison of using Size (top) and Opacity (bottom) in Tiled Clones > Trace tab > #3. You can see that with Opacity, you get all the same size circles, just with different opacities. Maybe that would work instead of the size option?? (Yes, it's the Inkscape logo.)

And my last couple of ideas -- 1 would be to experiment with the options in #1, and try the R, G, B, H, S, and L options. And the 2nd, maybe you could try pre-processing the raster image, in a raster editor, so that the whitest areas are simply a light gray (and the rest of the colors shift by the same value) it would have the same effect as putting minimum size value for the original trace. I'm not very good with raster editors and raster color options. But someone else here might know a fairly quick way to make such an adjustment.
Well, I wish I had more than just ideas for you. But maybe you can do something with them

Edit
Oh oops, I just realized that using opacity or any of the other color values probably won't fit the definition of half-tone. Oh well, maybe someone else will have some ideas.... Good luck

Last edited by brynn on Thu Dec 20, 2012 5:24 pm, edited 1 time in total.
Reason: oops
Reason: oops
Basics - Help menu > Tutorials
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Re: how to batch select small objects
Thanks Brian for your elaborate answer!
Unfortunately halftoning with tiling appeared not to work for me. The goal is to cut out halftones in a selfadhesive foil. The smallest dot that I'm allowed to use is 3 mm. The largest dot that I want to use in order not avoid polka dot effect is 5 mm. This dot size range is too small to create a convincing halftone.
The voronoi method has the possibility to use fixed dot sizes while the halftones are created by varying the spacing of the dots. I use Stipplegen wich generates SVG files. This is, however, very hardware intensive. But the first results look promising. I will post a sample later.
Your way of selecting small dots just by selecting them is basically a good if you work on a small number of dots. The logo that I'm working on has rows and columns in the order of magnitude of 1000, so it would not have been a realistic option for me.
Although I found the voronoi method more suitable for me, just for the record, I found a way to eliminate small dots: Open the SVG file in a text editor. Copy it into a spreadsheet. Write a function that identifies radii < value x, mark the associated rows. Delete marked rows. Copy paste the result back into the text file et voila! I did not fully test this method, but I tested deleting a couple of the entries in the tile group in the SVG file and that worked. Getting the spreadsheet to run is just a bit of excel/calc programming.
As to your remark about loosing quality when removing the smallest dots, you are correct. I know I have to sacrifice the lightest parts of the gradient, likely also with the voronoi method, but I hope to still be able to generate a convincing 3D effect in the end result.
Unfortunately halftoning with tiling appeared not to work for me. The goal is to cut out halftones in a selfadhesive foil. The smallest dot that I'm allowed to use is 3 mm. The largest dot that I want to use in order not avoid polka dot effect is 5 mm. This dot size range is too small to create a convincing halftone.
The voronoi method has the possibility to use fixed dot sizes while the halftones are created by varying the spacing of the dots. I use Stipplegen wich generates SVG files. This is, however, very hardware intensive. But the first results look promising. I will post a sample later.
Your way of selecting small dots just by selecting them is basically a good if you work on a small number of dots. The logo that I'm working on has rows and columns in the order of magnitude of 1000, so it would not have been a realistic option for me.
Although I found the voronoi method more suitable for me, just for the record, I found a way to eliminate small dots: Open the SVG file in a text editor. Copy it into a spreadsheet. Write a function that identifies radii < value x, mark the associated rows. Delete marked rows. Copy paste the result back into the text file et voila! I did not fully test this method, but I tested deleting a couple of the entries in the tile group in the SVG file and that worked. Getting the spreadsheet to run is just a bit of excel/calc programming.
As to your remark about loosing quality when removing the smallest dots, you are correct. I know I have to sacrifice the lightest parts of the gradient, likely also with the voronoi method, but I hope to still be able to generate a convincing 3D effect in the end result.
Re: how to batch select small objects
Wow, 3 to 5 mm are tiny dots, and tiny pieces of foil! I hope you find an acceptable technique 

Basics - Help menu > Tutorials
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Re: how to batch select small objects
Hi Brynn,
Sorry for misspelling your name in my earlier posts.
I had to abandon this project as I found out that I can't get a good representation of the dark and light gradients given the range of 3 to 5 mm and the fact that the stipples are not allowed to overlap.
Thanks for your support anyway!!
Sorry for misspelling your name in my earlier posts.
I had to abandon this project as I found out that I can't get a good representation of the dark and light gradients given the range of 3 to 5 mm and the fact that the stipples are not allowed to overlap.
Thanks for your support anyway!!