sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    Function to draw 3d text via ruby

    Scheduled Pinned Locked Moved Developers' Forum
    6 Posts 4 Posters 1.0k Views 4 Watching
    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

      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
      • Dan RathbunD Offline
        Dan Rathbun
        last edited by

        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
        • TIGT Online
          TIG Moderator
          last edited by

          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

            Entities#add_3d_text()?

            Hi

            1 Reply Last reply Reply Quote 0
            • TIGT Online
              TIG Moderator
              last edited by

              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

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

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

                Advertisement