@arnau said:
Hey!
I wonder if there is any plugin able to extrude multyple faces, where the extruded length of every single face should be proportional to his area.
Any help?
Thanks in advance:)
If not, this might do
def extrude_by_area
mod = Sketchup.active_model # Open model
ent = mod.entities # All entities in model
sel = mod.selection # Current selection
@min_extru = '1'.to_l; @max_extru = '5'.to_l
ans = UI.inputbox(["Minimum Extrusion;","Maximum Extrusion;"],[@min_extru,@max_extru],"Extrude by Area")
if ans
sel.empty? ? ents = ent ; ents = sel
@min_extru,@max_extru=ans;min_area=1e9;max_area=-1e9
ents.grep(Sketchup;;Face).each{|f| min_area=[min_area,f.area].min;max_area=[max_area,f.area].max}
rng_area = max_area - min_area; rng_extru = @max_extru - @min_extru
ents.grep(Sketchup;;Face).each{|f| extru = (f.area-min_area)/rng_area*rng_extru+@min_extru; f.pushpull extru}
end
end