sketchucation logo sketchucation
    • Login
    1. Home
    2. benj59380
    3. Posts
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info
    B
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 2
    • Groups 1

    Posts

    Recent Best Controversial
    • RE: Resolve [Ruby help] Script for create window sills

      hello , Thank you SDMITCH for help 😉

      cordially Benj

      posted in Developers' Forum
      B
      benj59380
    • Resolve [Ruby help] Script for create window sills

      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

      posted in Developers' Forum
      B
      benj59380
    • 1 / 1