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!
    🫛 Lightbeans Update | Metallic and Roughness auto-applied in SketchUp 2025+ Download

    Simple Glazing Frame & Exterior Trim tool

    Scheduled Pinned Locked Moved Developers' Forum
    3 Posts 2 Posters 817 Views 2 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.
    • T Offline
      tomot
      last edited by

      As with the WindowGlass.rb (aka simple gazing tool)

      I used the "pick 3 points rectangle" approach to install glazing, frame,and exterior trim into any opening

      However once again I need some coding help!

      This particular ruby works correctly only if I want all 3 elements; glazing, frame and exterior trim. However, should I decide to "zero out" the exterior Trim values in the dialog box. I get an extra plane on the surface
      of the wall opening which then obscures the window.

      The following code draws the exterior trim,

      #------Draw the exterior Trim
      group=entities.add_group
      entities=group.entities
      base=entities.add_face($pt0t, $pt1t, $pt2t, $pt3t)
      base.pushpull -$etthick
      base=entities.add_face($pt0jj, $pt1jj, $pt2jj, $pt3jj)
      base.pushpull -$etthick

      Is there a way that those code lines will not be evaluated when $etthick & $etwidth are set to Zero?

      TIA


      win.png


      WindowGlassFrame.rb

      [my plugins](http://thingsvirtual.blogspot.ca/)
      tomot

      1 Reply Last reply Reply Quote 0
      • J Offline
        Jim
        last edited by

        Here's one test..

        
        if( ($etthick != 0) and ($etwidth != 0) )
          # Both are not zero
          #  Your code here
        end
        
        

        Hi

        1 Reply Last reply Reply Quote 0
        • T Offline
          tomot
          last edited by

          @jim said:

          Here's one test..

          
          > if( ($etthick != 0) and ($etwidth != 0) )
          >   # Both are not zero
          >   #  Your code here
          > end
          > 
          

          Thanks: Jim for jumping to the rescue!
          I will re post this Ruby with your added code,
          since some members may not know how to cut and paste
          code snippets into Ruby files.


          WindowGlassFrame.rb

          [my plugins](http://thingsvirtual.blogspot.ca/)
          tomot

          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