sketchucation logo sketchucation
    • Login
    1. Home
    2. JustJan366
    3. Posts
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    πŸ«› Lightbeans Update | Metallic and Roughness auto-applied in SketchUp 2025+ Download
    J
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 2
    • Groups 1

    Posts

    Recent Best Controversial
    • RE: 3D_text color

      Jim/Dan,

      Thanks for the reply.

      Adding material (and back_material) to grp works for me.

      Understanding why this happens is even better.

      posted in Developers' Forum
      J
      JustJan366
    • 3D_text color

      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

      posted in Developers' Forum
      J
      JustJan366
    • 1 / 1