How to check intersect or not of two component in sketchup


#1

i want to check two or more component intersect between or not,
give me code as soon as possible guys


#2

Add duplicates the two component instances definitions inside a new temporary group’s entities [reusing their transformations etc].
Use the ‘ins_edges = group.entities,intersect_with(…)’ method on that group’s entities, intersecting those two instances and placing the resultant edges [if any] inside the group.entities.
http://www.sketchup.com/intl/en/developer/docs/ourdoc/entities#intersect_with
’if ins_edges[0]’ then they have intersecting geometry, else there is no intersection.
Use group.erase! to tidy up…