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!
    πŸ›£οΈ Road Profile Builder | Generate roads, curbs and pavements easily Download

    Shadow bug to be fixed (@TIG(?))

    Scheduled Pinned Locked Moved Plugins
    10 Posts 5 Posters 812 Views 5 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.
    • R Offline
      rv1974
      last edited by

      Hi! Here is some ruby idea:
      To fix shadow bug I use to add a section plane cutting the model via camera's point and facing the vista. But very often it's hard to add it manually.
      So why TIG you may ask? Optionally I'd like to unite sec plane creation with TIG's elevation_45_shadow.rb (as if some plane on 'face me' component in front of camera was preselected).
      P.S. And it should turn off 'view section plane'!
      Many thanks in advance.

      1 Reply Last reply Reply Quote 0
      • CadFatherC Offline
        CadFather
        last edited by

        A shadow camera section.. super idea

        1 Reply Last reply Reply Quote 0
        • GaieusG Offline
          Gaieus
          last edited by

          This is brilliant. If it really works, you should get the Google Nobel Prize. They have been suffering with it for 5 years now!
          😲

          Gai...

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

            There is one snag here: we got virtually no control over section planes via the API:
            http://code.google.com/apis/sketchup/docs/ourdoc/sectionplane.html

            We can only get and set the direction of the plane.

            No way method to add one (though one can work around this by putting a section plane inside a component and store that in the plugin's folder - that can then be used to add a plane)

            And there is no way to make a plane the active one. So we can get a nearly automatic process, but you'd have to set the active plane manually.

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

            1 Reply Last reply Reply Quote 0
            • R Offline
              rv1974
              last edited by

              @thomthom said:

              There is one snag here: we got virtually no control over section planes via the API:
              http://code.google.com/apis/sketchup/docs/ourdoc/sectionplane.html

              We can only get and set the direction of the plane.

              No way method to add one (though one can work around this by putting a section plane inside a component and store that in the plugin's folder - that can then be used to add a plane)

              And there is no way to make a plane the active one. So we can get a nearly automatic process, but you'd have to set the active plane manually.

              Oh nooo.. Sometimes SU make me sh!t bricks 😑

              1 Reply Last reply Reply Quote 0
              • CadFatherC Offline
                CadFather
                last edited by

                well, i have full confidence in our ruby masters (while i open my prayer book..) πŸ˜„

                1 Reply Last reply Reply Quote 0
                • R Offline
                  rv1974
                  last edited by

                  @cadfather said:

                  well, i have full confidence in our ruby masters (while i open my prayer book..) πŸ˜„

                  Me too. But if Thom is right, could it be a 3-stage script:

                  1. it'd hide entire model and creates 'face me' face say 100cm from the cameras point.
                  2. user sets sec plane manually and makes it active.
                  3. script continues: moves 101 cm to the camera, , unhides model, set 45 degeree shadows,deletes temp face, creates scene. Pervertive? πŸ˜†
                  1 Reply Last reply Reply Quote 0
                  • thomthomT Offline
                    thomthom
                    last edited by

                    One can make the script do everything except activating the section plane.

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

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

                      Since a SectionPlane is a DrawingElelment you should be able to do most things with it like Move, Rotate etc. You also have two extra methods to 'set' and 'get' a SectionPlane's 'plane'...
                      You can't make a SectionPlane - unfortunately there is not equivalent method to entities.add_section_plane(plane) - though the trick of importing an 'empty' component that contains only a SectionPlane and then exploding it works - you can get it's id and then change it's location/plane...
                      The BIG problem is that there is no entities.active_section_plane [returning a SectionPlane or nil if none is active] or entities.active_section_plane=SectionPlane [setting that active and all others not - equivalent to model.active_layers/= but entities based as there can be one active SectionPlane in each set], also SectionPlane.active? to see if a particular one is active and SectionPlane.deactivate to switch it 'off', would be good. Note that hiding/showing active/visible SectionPlanes can already be done though Display settings... and you can already search through an entities set and make an array of its SectionPlanes - though then you can't do that much to them... πŸ˜•
                      If these simple methods were added to the Ruby API it would open up loads of possibilities... πŸ˜’
                      It's beyond a mere scripter to hack into the SKP format and get/set the entities's active SectionPlane BUT it must be possible πŸ€“

                      TIG

                      1 Reply Last reply Reply Quote 0
                      • R Offline
                        rv1974
                        last edited by

                        @tig said:

                        Since a SectionPlane is a DrawingElelment you should be able to do most things with it like Move, Rotate etc. You also have two extra methods to 'set' and 'get' a SectionPlane's 'plane'...
                        You can't make a SectionPlane - unfortunately there is not equivalent method to entities.add_section_plane(plane) - though the trick of importing an 'empty' component that contains only a SectionPlane and then exploding it works - you can get it's id and then change it's location/plane...
                        The BIG problem is that there is no entities.active_section_plane [returning a SectionPlane or nil if none is active] or entities.active_section_plane=SectionPlane [setting that active and all others not - equivalent to model.active_layers/= but entities based as there can be one active SectionPlane in each set], also SectionPlane.active? to see if a particular one is active and SectionPlane.deactivate to switch it 'off', would be good. Note that hiding/showing active/visible SectionPlanes can already be done though Display settings... and you can already search through an entities set and make an array of its SectionPlanes - though then you can't do that much to them... πŸ˜•
                        If these simple methods were added to the Ruby API it would open up loads of possibilities... πŸ˜’
                        It's beyond a mere scripter to hack into the SKP format and get/set the entities's active SectionPlane BUT it must be possible πŸ€“


                        Why does the green color lenses of your geek sunglasses shine like light at the tunnel's end?

                        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