Projecting a texture to a curved surface

Hi all,

I’m very new to Sketchup and relatively new to programming in general so I’m sorry if there is an easy answer to this question. I understand how to project a texture onto a curved surface from a reference face in Sketchup to avoid texture stretching (manually in the Sketchup Field/non-ruby API), but I’m wondering if it is possible to project a texture with a ruby script.

I’ve learned how to apply a custom texture to whichever face I want with code from browsing the forums, but I can’t seem to find any way to project the texture using script. Is this possible with a Ruby script? I’ve read that the command for choosing the direction for projection from a face does not work properly.

This is my first post on here so I don’t know if I’ve described my situation well enough or if I’ve provided all the necessary information. I’m using Sketchup Make 2017.

Any advice will be helpful,
Thanks

I don’t know if this will help address your question. but you might find these two plugins useful:

https://sites.google.com/site/spirixcode/code/spirix_textured_cylinder.rb

and

https://sites.google.com/site/spirixcode/code/spirix_textured_sphere.rb

Hi jimhami,

It seems like the examples you provided work great for faces created from arcs, but my curved surfaces are created from a followme command which seems to create multiple faces on the curve and when a texture is applied to it the texture shows up all choppy.

Thank you very nuch for the examples though.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.