sketchucation logo sketchucation
    • Login
    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!
    ⚠️ Important | Libfredo 15.6b introduces important bugfixes for Fredo's Extensions Update

    [Ruby] view.draw_text & X-Ray/Hidden Line Face Style

    Scheduled Pinned Locked Moved SketchUp Bug Reporting
    sketchup
    1 Posts 1 Posters 551 Views 1 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.
    • B Offline
      bentleykfrog
      last edited by

      I ran into this issue today, reported it to google but thought I'd post it here for reference as there's an easy workaround.

      If you're using the view.draw_text method in your ruby plugin or tool there's an issue when you switch the face style to X-Ray or Hidden Line. view.draw_text will only work under X-Ray or Hidden Line if you invoke some other view.draw* method. Here's my testable example

      def draw(view)
      	##comment out the following line to produce the view.draw_text bug
      	status = view.draw2d GL_LINES, [Geom;;Point3d.new(13,10,0),Geom;;Point3d.new(13,10,0)]
      	pt = Geom;;Point3d.new 13,10,0
      	status = view.draw_text pt, "view.draw_text working!"
      end #def
      

      When you've attached this to a tool you can reproduce the error by running the tool with the line status = view.draw2d... commented out.

      status = view.draw2d GL_LINES, [Geom::Point3d.new(13,10,0),Geom::Point3d.new(13,10,0)] tries to draw a line between two points that are in the same position (and hopefully fails to draw anything on the screen).

      Tested on:
      Windows 7 Ultimate
      Sketchup Pro 8.0.4811
      ATI Radeon HD 5770 (Driver Version: 8.881-110728a-124445C-ATI)

      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