Push multiple: extruded lenght proportional to face area
-
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:)
-
@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
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better đź’—
Register LoginAdvertisement