Move texture in ruby script

ruby

#1

Hi everyone. I am trying to understand Sketchup’s behaviour when moving textures.

Let’s assume I have a texture as follows:
A,B,C
D,E,F
G,H,I

now I draw 2 rectangles in the size of one letter, take the SU paint bucket and texturize those two, I get the following:
A,B

Next, I mark the entire right rectangle and move it to the right by the length of the x-axis. I then get:
AB,C
where AB is the now bigger left rectangle. The texture is seamlessly floated across the new larger area

Now I use Fredo’s ThruPaint-tool and do the same with two new rectangles of the same size. My first result is the same:
A,B

When I select B again (with edges) and move that to the right, I get:
AB,B instead of AB,C
because the texture is not floating anymore but sticks to the face.

The reason for this different behaviour seems to be that when using ThruPaint all texture pins are set to values and now it wouldn’t float anymore.

If I don’t move it but use Fredo’s Scale Tool instead, it would still float according to SU’s original behaviour.

So much for the background - now to ruby:
I used to just move entities like edges or faces (or alternatively vertices) by
entities.transform_entities(tr, sub_ents)

When doing so, the textures stick to the face instead of floating with the face.
Even if I look at older versions of Fredo’s Stretch Tool he doesn’t seem to do anything else than that and still in his tool everything works fine.

Can anyone tell me what I am doing wrong or what I am missing?
Any help is very much appreciated!

Andreas