sketchucation logo sketchucation
    • Login
    1. Home
    2. JustJan366
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info
    J
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 2
    • Groups 1

    JustJan366

    @JustJan366

    0
    Reputation
    1
    Profile views
    2
    Posts
    0
    Followers
    0
    Following
    Joined
    Last Online

    JustJan366 Unfollow Follow
    registered-users

    Latest posts made by JustJan366

    • 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