Color coding Components Plugin or Dynamic Component Question
-
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:
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.
-
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.
-
@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.
-
@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.
-
@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.... -
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.
-
@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!
-
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.
-
@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 that7.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.
-
-
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
- Brown
- Red
- Orange
- Yellow
- Green
- Blue
- Violet
- Gray
- [highlight=#000000:2uojssqf]White[/highlight:2uojssqf]`
-
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 ?
-
@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.
-
@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.
Advertisement