Group inconsistency between 2016 and 2017


#1

I ran into an odd bug/issue with my unfold extension in 2017. With some faces selected, try the following code in 2016 and 2017:

mod = Sketchup.active_model # Open model
ent = mod.entities # All entities in model
sel = mod.selection # Current selection
f = Array.new
sel.each {|e|
  f.push(e) if e.is_a? Sketchup::Face
}
p f
g = ent.add_group( f )
g.explode
p f

This basically creates an array of faces, groups it and explodes the group. In 2016 the last reference to the array yields the original faces, in 2017 it yields “deleted entities”. Is this part of the “unique ID” changes and should this be expected or is it a bug?


#2

it’s expected, and catches out a lot of old code…

there are other posts here and at SCF talking about this issue…

john


#3

I see. I’ll look those up. Thanks!