[Plugin] Color By
-
Colors faces and edges baseed on direction, slope, layer, or plane.
-
Cool Sam. Thanks for posting it!
-
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, -
Well spotted Didier -
model.active_entities
is usually preferred as it allows work inside a group/instance BUT reverts tomodel.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 socolor=[255,255,0]
becomescolor="Yellow"
- there's a long list of standard colors available... -
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.
-
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
Advertisement