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

    Toggle Construction geometry?

    Scheduled Pinned Locked Moved Developers' Forum
    7 Posts 3 Posters 358 Views 3 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.
    • thomthomT Offline
      thomthom
      last edited by

      I'm not finding anything that toggles the display of Construction geometry - missing or am I just blind?

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

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

        Sketchup.active_model.rendering_options['HideConstructionGeometry']

        ( dont like the Hide* prefixed type of settings )

        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

          What's more awkward about 'Hide*' any more than 'Show*' or 'Display*' ?

          ros=Sketchup.active_model.rendering_options
          if ros['HideConstructionGeometry']
            ros['HideConstructionGeometry']=false 
          else
            ros['HideConstructionGeometry']=true
          end
          

          Or use one of your one-line tests "? ||" or "=!"...

          TIG

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

            I prefer to negate logic using the ! operator. The API is inconsistent and makes reading the code logic random.

            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

              Sketchup.active_model.rendering_options['HideConstructionGeometry'] =! Sketchup.active_model.rendering_options['HideConstructionGeometry'] would work logically too ? Doesn't it just reverse the current setting ?

              TIG

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

                I mean in the way you read code.

                This article explains:
                http://truelogic.org/wordpress/2009/02/27/how-not-to-name-a-boolean-variable/

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

                1 Reply Last reply Reply Quote 0
                • Dan RathbunD Offline
                  Dan Rathbun
                  last edited by

                  I note there are 7 other settings that are positive, and begin with the prefix "Display".. and one positive that begins with the prefix "Show"...

                  The lack of convention is annoying.

                  I'm not here much anymore.

                  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