I have run across an odd problem and wanted to see if anyone has seen something similar.
I use the group.outer_shell on two manifold groups. I then use model.raytest on a resulting face, and use the following code to verify none of the returned items are invalid:
item[1].each_index {|i| printf("ITEM %d:%s; valid?(%s); deleted?(%s)\n", i, item[1][i].inspect, item[1][i].valid?, item[1][i].deleted?)}
And they are all valid. I then use entity.all_connected on the entity returned by raytest, and again check that all entities are valid:
cnn = entity.all_connected
cnn.each_index {|i| printf("CONNECTED %d of %d:%s; valid?(%s); deleted?(%s)\n", i, cnn.length, cnn[i].inspect, cnn[i].valid?, cnn[i].deleted?)}
All connected entities are reported as valid and not deleted. But then I get this on the floowing line which scans the all_connect list:
CONNECTED 140 of 143:#Sketchup::Edge:0x863fc60; valid?(true); deleted?(false)
CONNECTED 141 of 143:#Sketchup::Edge:0x863fc4c; valid?(true); deleted?(false)
CONNECTED 142 of 143:#Sketchup::Edge:0x863fc38; valid?(true); deleted?(false)
Error: #<TypeError: reference to deleted Edge>
C:/Program Files/Google/Google SketchUp 8/Plugins/<xxx>.rb:280:in `all_connected'
This only happens after I use group.outer_shell. And after doing that, I use model.commit_operation
Any thoughts? Is the something I need to do to purge deleted entities?