Jim/Dan,
Thanks for the reply.
Adding material (and back_material) to grp works for me.
Understanding why this happens is even better.
Jim/Dan,
Thanks for the reply.
Adding material (and back_material) to grp works for me.
Understanding why this happens is even better.
Hi,
I am a real newbie when I comes to Sketchup and Ruby I was introduced to Sketchup and Ruby last week.
I have been trying some of the tutorials, etc..., but I am (obviously) not really familiar with all details of the object model of Sketchup.
I have an issue with putting colored text on a face (of a cube or just a 2d square).
I can see the text, but applying a color or material to it, is not so obvious, as far as I can see (newbie
The only think I could find is applying material to each individual face of a 3d_text string. See code snippet at the end of the message.
I hope there is an easier and more importantly faster way to do this
All help is welcome
Kind regards,
Jan
` grp = ent.add_group
grp.entities.add_3d_text("My Labels", TextAlignCenter , "Verdana", false, false, 4.inch, 1.mm, 0, true, 1.mm)
txtFaces = grp.entities.find_all{|f| f.is_a?(Sketchup::Face) }
for f in txtFaces
f.material=[0,0,255]
end #for`
Running Sketchup 2014 make, windows 8.1