Asigning colours to elements
-
hi,
after a long search i have to ask:is it possible to asign a colour to ALL faces within 1 group or 1 component?
every colour shall become its own values and names and shall be written in model's colour table.
what ever i try with the api-syntax, i fail....thanx stan
-
You assign the group's material, and leave all it's faces material set to
nil
.Same for a component.
-
hi dan, thanx, i know, it is like working in skp itself,
but when i have to transfer it to vis-software, i sometimes need all surfaces defined, since the importers do not transfer the group's color to the elements inside sometimes. but i will try once more, just not to be wrong on this.for that i would like to paint every surface, sometimes also the back-side directly.....
besides that, i would like to understand the syntax of the coor asignment, somehow i cannot get it from the api guide.
thanx stan -
Oh OK.
grp.entities.grep(Sketchup;;Face).each{|f| f.material=grp.material }
-
hi dan, thanx,
next step is done!
this one works:@c_step = Sketchup;;Color.new(30,125,180) group.entities.grep(Sketchup;;Face).each{|f| f.material=@c_step}
stan
Advertisement