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

    How to Get " are there shadows on a face?"

    Scheduled Pinned Locked Moved Developers' Forum
    4 Posts 4 Posters 328 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.
    • F Offline
      fabioccerri
      last edited by

      Hi to all,
      I have a problem.
      I would like to make a ruby script plugin that get information about shadows, when they are crossing on a selected face in the model..

      A simple code, like "is this face faded by a shadow? "..

      I tryed to find something on the official Sketchup API reference, looking methods and classes, but without results 😞

      Someone has ideas?
      Thanks in advance!
      Fabio

      1 Reply Last reply Reply Quote 0
      • thomthomT Offline
        thomthom
        last edited by

        No such method in the API. You would have to calculate this.

        Thomas Thomassen β€” SketchUp Monkey & Coding addict
        List of my plugins and link to the CookieWare fund

        1 Reply Last reply Reply Quote 0
        • A Offline
          a4chitect
          last edited by

          you have to emit a ray from a testing point in the direction of the sun, if there is an intersection - your point lies in a shadow

          if you know your way around scripting - i suggest to tailor/mix your script from existing plugins

          http://sketchuptips.blogspot.com/2008/01/plugin-map-sun.html (for finding the sun position)

          and the drop ruby (for the Model.raytest implementation)

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

            I recall that there's a '1001 shadow tool' to draw shadows on faces as new grouped faces - this is possibly the basis of what you want... http://www.1001shadows.com/en/index.html

            TIG

            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