• Login
sketchucation logo sketchucation
  • Login
ℹ️ GoFundMe | Our friend Gus Robatto needs some help in a challenging time Learn More

[Plugin] Color By

Scheduled Pinned Locked Moved Plugins
6 Posts 5 Posters 8.5k Views
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.
  • S Offline
    sdmitch
    last edited by sdmitch 28 Aug 2011, 21:37

    Colors faces and edges baseed on direction, slope, layer, or plane.


    Color By direction,slope,layer or plane

    Nothing is worthless, it can always be used as a bad example.

    http://sdmitch.blogspot.com/

    1 Reply Last reply Reply Quote 0
    • C Offline
      Chris Fullmer
      last edited by 29 Aug 2011, 02:04

      Cool Sam. Thanks for posting it!

      Lately you've been tan, suspicious for the winter.
      All my Plugins I've written

      1 Reply Last reply Reply Quote 0
      • D Offline
        Didier Bur
        last edited by 29 Aug 2011, 10:48

        Hi,
        Nice plugin but 'Color by Layer' doesn't work when editing a group or component.
        I suggest you replace ent=mod.entities with ent=mod.active_entities
        And Color by Plane seems to give strange results, or I didn't understood what's the 'value' of the plane.
        Regards,

        DB

        1 Reply Last reply Reply Quote 0
        • T Online
          TIG Moderator
          last edited by 29 Aug 2011, 11:04

          Well spotted Didier - model.active_entities is usually preferred as it allows work inside a group/instance BUT reverts to model.entities when you are in the model context anyway...

          Another point is that your 'colors' will have names like 'Material1', 'Material2'.
          You can either make the colors [if they don't exist] with logical names first or use the ability to use a 'standard' color on the fly 'by name' from the list here http://code.google.com/apis/sketchup/docs/ourdoc/color.html so color=[255,255,0] becomes color="Yellow" - there's a long list of standard colors available...

          TIG

          1 Reply Last reply Reply Quote 0
          • S Offline
            sdmitch
            last edited by 29 Aug 2011, 15:14

            Thanks for the tips, it is definitely a work in progress.

            Didier, If XY plane is selected then the value would represent a specific Z to look for and select.

            Nothing is worthless, it can always be used as a bad example.

            http://sdmitch.blogspot.com/

            1 Reply Last reply Reply Quote 0
            • A Offline
              AdamB
              last edited by 26 Sept 2011, 15:05

              I was needing something like this last week..

              And while thinking how it might be done, it would seem an elegant way might be to write it so an arbitrary fragment of Ruby is evaluated with known arguments. You could have some "presets" - as you do - but they would simply be preset Ruby fragments that are eval-ed on the arguments.

              Users could add any Ruby fragment they liked to extend it.

              two cents worth and all that..

              Adam

              Developer of LightUp Click for website

              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