I have discovered a surprising API behavior, and would like it confirmed as either a bug or as intended. I’m using Sketchup Make version 15.3.31 64-bit on a win7 PC (in case that matters). I have put off the 2016 update because i was mid-project.
I have ruby code that executes a model construction algorithmicly. The algorithm first creates the model hierarchy as a set of empty groups, and then goes back and adds content to each group. The algorithm is failing because when it adds a face to one group and pushpulls it into 3d, empty peer groups are deleted. So when the code reaches a peer group there is no group to receive its content.
I find this behavior quite odd, and of course for me highly undesirable. But, as often is the case, i’m sure i don’t have the whole picture. I created a short example script to demonstrate the problem. It is included here. You can just “load surprise_demo.rb” from the Sketchup console to execute it.
surprise_demo.rb (3.1 KB)
Thanks in advance for the help from you more experienced, knowledgeable, and generous ones. I have always found this forum to be a great resource for cases such as this.