Very simple code. The problem of course is that if I specify a texture for the material it aligns per the horizontal axis and not per the long axis of the stringer which is inclined at some angle (theta) from the horizontal.
The problem is that once I have the array of points I need to somehow create the face (in the group), rotate the face by negative theta, ungroup the geometry regroup it, then rotate the group back into place by positive theta.
This just seems like a lot of messing around to get a very simple result. I’m looking for ideas or suggestions on how to accomplish this with a little less juggling.
I was thinking it might make sense to transform the array of points before actually utilizing them to create the face. The transform method does exist for a 3D point.
Is it possible to transform more than one point at one (an array of points)?
When you group and ungroup geometry via Ruby during a single operation, there’s usually another way to do it.
Are you using face.material= instead of face.position_material? The latter let you control how the texture is oriented. The former just applied default UVs.
The SketchUp API adds to the core Array class but assumes “point/vector-like” 3 element arrays of Float or Length, not arrays of points (or nested arrays).