• Login
sketchucation logo sketchucation
  • Login
ℹ️ GoFundMe | Our friend Gus Robatto needs some help in a challenging time Learn More

Function to draw 3d text via ruby

Scheduled Pinned Locked Moved Developers' Forum
6 Posts 4 Posters 1.0k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    csharp
    last edited by 19 Oct 2011, 08:32

    Hi all. I need function to draw 3D text via ruby. Exists this function? If not how to draw 3D text?

    1 Reply Last reply Reply Quote 0
    • D Offline
      Dan Rathbun
      last edited by 19 Oct 2011, 08:48

      I think TIG has an extension that does this. Check the Index in the Plugins forum.

      I'm not here much anymore.

      1 Reply Last reply Reply Quote 0
      • T Offline
        TIG Moderator
        last edited by 19 Oct 2011, 21:59

        My 2dTools 2dText makes 3d 'flat text' with zero thickness - it'd be easy enough to cannibalize the code to have a 'thickness' etc... read its code...

        TIG

        1 Reply Last reply Reply Quote 0
        • J Offline
          Jim
          last edited by 19 Oct 2011, 22:25

          Entities#add_3d_text()?

          Hi

          1 Reply Last reply Reply Quote 0
          • T Offline
            TIG Moderator
            last edited by 20 Oct 2011, 08:09

            As Jim says there is a straightforward entities.add_3d_text() method.
            You need to pass a whole raft of arguments to it to specify height, font, extrusion and so on.
            The arguments are:
            The text string [use a "\n" for newline], alignment [only relevant for multi-line strings], the font [ttf name], then 'optional' settings - bold?, italic?, height [inches/units], tolerance [for curves, 0=best], z-height [default=0], faced? and extrusion thickness [inches/units, default=0]
            ("text", TextAlignLeft, "Arial", true, false, 1.0, 0.0, 0.5, true, 1.0)
            You also need to do something like this to keep the 3dtext's geometry away from other stuff...
            grp=Sketchup.active_entities.add_group() grp.entities.add_3d_text(...)
            Because you then have the geometry safely inside a group you can easily do extra thing to it - like add materials, hide edges etc...
            Because 3dtext is always made flat, 'lying down', you can then also transform the group [or its entities] so that the letters are standing up etc...

            TIG

            1 Reply Last reply Reply Quote 0
            • C Offline
              csharp
              last edited by 20 Oct 2011, 08:42

              entities.add_3d_text. This function I am needed. Thank you.

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              1 / 1
              • First post
                1/6
                Last post
              Buy SketchPlus
              Buy SUbD
              Buy WrapR
              Buy eBook
              Buy Modelur
              Buy Vertex Tools
              Buy SketchCuisine
              Buy FormFonts

              Advertisement