[Plugin] Color By

[Plugin] Color By

Postby sdmitch » Sun Aug 28, 2011 10:37 pm

Colors faces and edges baseed on direction, slope, layer, or plane.
1
Last edited by sdmitch on Thu Sep 01, 2011 1:52 am, edited 3 times in total.
Nothing is worthless, it can always be used as a bad example.

http://sdmitch.blogspot.com/
User avatar
sdmitch 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Color By

Postby Chris Fullmer » Mon Aug 29, 2011 3:04 am

Cool Sam. Thanks for posting it!
0
Lately you've been tan, suspicious for the winter.
All my Plugins I've written
User avatar
Chris Fullmer 
SketchUp Team
SketchUp Team
 

Re: [Plugin] Color By

Postby Didier Bur » Mon Aug 29, 2011 11:48 am

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,
0
Didier Bur
Ecole Nationale Supérieure d'Architecture de Nancy (F)
http://rld.crai.archi.fr/rubylibrarydepot/
User avatar
Didier Bur 
 

Re: [Plugin] Color By

Postby TIG » Mon Aug 29, 2011 12:04 pm

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/do ... color.html so color=[255,255,0] becomes color="Yellow" - there's a long list of standard colors available...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Color By

Postby sdmitch » Mon Aug 29, 2011 4:14 pm

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.
0
Nothing is worthless, it can always be used as a bad example.

http://sdmitch.blogspot.com/
User avatar
sdmitch 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Color By

Postby AdamB » Mon Sep 26, 2011 4:05 pm

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
0
Developer of LightUp Click for website
User avatar
AdamB 
LightUp Support
LightUp Support
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 



 

Return to Plugins

Who is online

Users browsing this forum: arcad, Google Bot, halroach, ravibairwa333 and 44 guests

Visit our sponsors: