Good evening All,
I have a drawing with approx 2,000 small surfaces which I want to make in groups to be push pulled afterwards. The script below is working very well when the drawing is fresh after the surfaces have been created. When I make a second or third selection of only surfaces it run still fast, but when I make a selection and there is one previously created group inside the script runs only at half or even less of the speed and the script to become “not responding” but eventually it finishes after a while in the background. Even when I re-start sketchup or even the pc and re-run of the script it remains slow. When I explode all groups and make another selection the script is fast again. Perhaps somebody can tell me if I do something wrong. My laptop has 16 GB memory and the graphic card is and set to Nvidia
the “puts” command in the middle might slow the script down but I put it there to see the speed
Thanks in advance for your comments
model=Sketchup.active_model
active=model.active_entities
c = 0
model.selection.grep(Sketchup::Face).each{|f|a.add_group(f);puts "#{c}";c+= 1}
model.commit_operation
puts "Made #{c} face groups"