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

    Color coding Components Plugin or Dynamic Component Question

    Scheduled Pinned Locked Moved Plugins
    14 Posts 3 Posters 388 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.
    • bmikeB Offline
      bmike
      last edited by

      Is there any way to write a script (or build a dynamic component) that will color code individual faces of components based on their X or Y width?

      See image:

      Typical Model:
      Screen Shot 2014-07-03 at 11.32.02 AM.png

      After plugin:
      Screen Shot 2014-07-03 at 11.32.48 AM.png

      There would need to be a list of colors assigned to a range of values, and we could ignore the Z axis, as I build all my components for timber with X,Y as width and depth, and Z being the length.

      Ideally I could select the entire model and let the script run. I'd hate to have to select each and every timber to make it work.

      The other stipulation is that whatever solution is created - the timbers must be able to maintain their ability to be 'solid' - as I use solid tools, trim and keep, etc. for much of the joinery workflow.

      Background:
      Most of my work is in timber structures - I use SketchUp and LayOut primarily for shop drawings and overall design / modeling. A time consuming part of my workflow is applying labels in LO to individual components. The new leader with auto text picked up from the component is a great first start. But I don't name components by size, typically they are named based on their location within the structure.

      But, what I'd like is a graphic way to easily see face dimensions via color.

      If any of the plugin authors knows of a way to do this, PM me or reply here.

      mike beganyi design + consulting llc

      1 Reply Last reply Reply Quote 0
      • sdmitchS Offline
        sdmitch
        last edited by

        could you supply a sample model and color list?

        Do you really want each individual face colored or just applied to the component which would have to be unique in either case.

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

        http://sdmitch.blogspot.com/

        1 Reply Last reply Reply Quote 0
        • bmikeB Offline
          bmike
          last edited by

          @sdmitch said:

          could you supply a sample model and color list?

          Do you really want each individual face colored or just applied to the component which would have to be unique in either case.

          Do you want a model with the colors applied? Or just a base model?

          Not sure what you mean by the last part of the question.
          I typically call out sizes like this "1P1 8x10" or "3G4 7.5x11.7"
          The location is 1P1 (Bent 1, Post 1) and the size is 8" x 10".

          So, it is really helpful to see each face colored, rather than having the entire component be the same color.

          mike beganyi design + consulting llc

          1 Reply Last reply Reply Quote 0
          • sdmitchS Offline
            sdmitch
            last edited by

            @bmike said:

            @sdmitch said:

            could you supply a sample model and color list?

            Do you really want each individual face colored or just applied to the component which would have to be unique in either case.

            Do you want a model with the colors applied? Or just a base model?
            both would be nice or just a base model.

            Not sure what you mean by the last part of the question.
            I typically call out sizes like this "1P1 8x10" or "3G4 7.5x11.7"
            The location is 1P1 (Bent 1, Post 1) and the size is 8" x 10".

            So, it is really helpful to see each face colored, rather than having the entire component be the same color.

            so the 8" wide face gets a different color that the 10" wide face on the same beam.

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

            http://sdmitch.blogspot.com/

            1 Reply Last reply Reply Quote 0
            • bmikeB Offline
              bmike
              last edited by

              @sdmitch said:

              so the 8" wide face gets a different color that the 10" wide face on the same beam.

              Yes, ideally.
              Otherwise I'd need to setup a color system of gradients for the entire timber to be a specific color matched to a specific size....

              mike beganyi design + consulting llc

              1 Reply Last reply Reply Quote 0
              • sdmitchS Offline
                sdmitch
                last edited by

                To bad you didn't think of this in the beginning where you could have colored the faces when you made the components but the solution seems to be simple enough. So, if you could provide a base model to test on, I'll be happy to give it a shot.

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

                http://sdmitch.blogspot.com/

                1 Reply Last reply Reply Quote 0
                • bmikeB Offline
                  bmike
                  last edited by

                  @sdmitch said:

                  To bad you didn't think of this in the beginning where you could have colored the faces when you made the components but the solution seems to be simple enough. So, if you could provide a base model to test on, I'll be happy to give it a shot.

                  I can build 20-30-40 library components and use them... but sometimes I get AutoCAD data or SketchUp models from clients / partners... I can guarantee you that those will not be built with my components.

                  I'll post up a test model later tonight. Really though, all we are doing, that I cannot do as I don't code or know Ruby, is color a face within a component based on its width. Its width of course, is determined by its orientation in the model though.

                  I tried doing this with a dynamic component... but didn't get very far.
                  I have also played around with embedding dimensions into a component on a layer I can toggle on and off - but that removes the ability for the component to be a solid...

                  Thanks for the help!

                  mike beganyi design + consulting llc

                  1 Reply Last reply Reply Quote 0
                  • sdmitchS Offline
                    sdmitch
                    last edited by

                    bmike,

                    Did you forget to post the model?

                    Yes the faces bounding box dimensions change depending on orientation in the model but that is not a problem.

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

                    http://sdmitch.blogspot.com/

                    1 Reply Last reply Reply Quote 0
                    • bmikeB Offline
                      bmike
                      last edited by

                      @sdmitch said:

                      bmike,

                      Did you forget to post the model?

                      Yes the faces bounding box dimensions change depending on orientation in the model but that is not a problem.

                      sorry, got involved with family stuff over the holiday weekend.
                      attached are 2 models - 2014 and V8.

                      i have created an array of timber off to the side with colors and sizes.
                      depending on the client i work in either whole inch, or nominal, so coloring might get complicated in that

                      7.5" to 8" = green (8x timber), etc.

                      if that isn't possible then we can add another shade of the same color for the whole inch or nominal size.


                      facecolor-test-V8.skp


                      facecolor-test.skp

                      mike beganyi design + consulting llc

                      1 Reply Last reply Reply Quote 0
                      • sdmitchS Offline
                        sdmitch
                        last edited by

                        Took a look at both of the models posted and I'm a little confused. In the 4X? and 6X?, the two largest beams seem to be the same size but are colored differently. Also, the materials used, are they imported or picked from a materials palette?


                        Color by Size.jpg

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

                        http://sdmitch.blogspot.com/

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

                          One common way of color coding loosely mimics the order of visible spectral colors.
                          This set is used to mark electrical resistors and colored conductors in certain cabling.

                          ` __0. Black

                          1. Brown
                          2. Red
                          3. Orange
                          4. Yellow
                          5. Green
                          6. Blue
                          7. Violet
                          8. Gray
                          9. [highlight=#000000:2uojssqf]White[/highlight:2uojssqf]`

                          I'm not here much anymore.

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

                            Another thot.

                            Could the faces in the component definitions were placed upon layers named for the width (ie, "7.5 wide",) then "Color by Layer" could be toggled on / off at will. The face "colors" would actually be layer colors ?

                            I'm not here much anymore.

                            1 Reply Last reply Reply Quote 0
                            • bmikeB Offline
                              bmike
                              last edited by

                              @dan rathbun said:

                              Another thot.

                              Could the faces in the component definitions were placed upon layers named for the width (ie, "7.5 wide",) then "Color by Layer" could be toggled on / off at will. The face "colors" would actually be layer colors ?

                              that is clever... would allow me to keep styles for presentation, without affecting overall model.

                              layers would then be 'T-8x' 'T-10x' etc.

                              mike beganyi design + consulting llc

                              1 Reply Last reply Reply Quote 0
                              • bmikeB Offline
                                bmike
                                last edited by

                                @sdmitch said:

                                Took a look at both of the models posted and I'm a little confused. In the 4X? and 6X?, the two largest beams seem to be the same size but are colored differently. Also, the materials used, are they imported or picked from a materials palette?

                                nope, you are not confused. those last ones should have grown another 2". operator error on my part.
                                new models attached here.

                                colors were picked from the 'color by name' palette.


                                facecolor-test-V8.skp


                                facecolor-test.skp

                                mike beganyi design + consulting llc

                                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