hello , Thank you SDMITCH for help
cordially Benj
hello , Thank you SDMITCH for help
cordially Benj
Hello , Today I wanted Creat script for window sills
my approach is create face manuel
click for select
run script
( part 1 : select face , creat color , Push -30 mm
Part 2 : select vertical face for push +30)
Part 1 work , but Part 2 fail
But Ruby = SyntaxError help me please for resolve the problem
thank you in advance , Benjamin
#part 1
model = Sketchup.active_model
ent = model.entities
sel = model.selection
ad = sel.ent
faces = []
sel.each do |e|
faces <<e if e.is_a? Sketchup::Face
end
faces.each do |appui|
appuicolor = Sketchup::Color.new(238,130,238)
appui.material = appuicolor
appui.back_material = appuicolor
status = appui.pushpull(-30.mm , true)
end
#part 2
ad.each do |e|
s=Sketchup.active_model.selection;
a=s.to_a;s.clear;
a.grep(Sketchup::Face).each{|f|s.add(f)if f.normal.z==0}
faces.each do |facade|
status = facade.pushpull(30.mm )
end