I use " Entities.intersect_with" to do something recently,but I find there is a bug about the function,when I execute the code in model which existing “c_line”,my Sketchup crashes . After testing many times , I find this bug exist in Sketchup 2016 and above,in Sketchup 2015,it can work well.
Below is my code:
grpss = ents.grep(Sketchup::Group)
grps = grp.entities
Sketchup.active_model.start_operation(“干挂石材”)
grpss.each{|gr|
if gr != grp
grps.intersect_with(false, grp.transformation, grps, grp.transformation, true, gr)#模型交错
end
p gr
}
Sketchup.active_model.commit_operation
000-测试模型.zip (74.4 KB)