# Common item of groups

Good morning
I create two groups. let say two rectangles. They are in the same plane. I place them next to each other.
Then I need to find common edge of those rectangles.
Intersection dont show anything that is planar.
My real objects are far more complicated and there is far more of them.
Thanks for help

Good evening!

Intersection will not create an intersection on a grouped object, so one of your groups will need to be exploded for this to work. Then run intercept on the grouped object, and intersect with the model.
If they intercept, intersection will find it, being planar won’t matter.

If they are separate groups there is no real common edge. However the edges where the groups touch can be think of as corresponding edges. What is your use case?

Yes you are right. I’m searching for what you called “corresponding edges”.
Actually I just need to detect whether corresponding edge between two
groups exists or not.
I try fo make a follow up list for assembling a steel structure from
smaller prefabrictated units. My units are modelled into groups.
I need to loop this function over all my units to generate list of all
joints.
L.

2017-07-16 9:16 GMT+02:00 Julia Christina Eneroth <
sketchup@discoursemail.com>:

eneroth3 http://forums.sketchup.com/u/eneroth3 Certified Content
Developer
July 16

## If they are separate groups there is no real common edge. However the edges where the groups touch can be think of as corresponding edges. What is your use case?

Visit Topic http://forums.sketchup.com/t/common-item-of-groups/48387/3
or reply to this email to respond.

http://forums.sketchup.com/email/unsubscribe/5214964b12573bde7e80b61c25b0d325e96090ed9f1d4908a37c3981d0c452b5
.

To find corresponding edges you can loop all edges in both groups, transform the coordinates of their vertices to a common coordinate system (using the transformations of the two groups) and then look for edge pairs with corresponding coordinates.

Partially overlapping edges won’t have both endpoints with equal coordinates.
@lech.oleszczuk, this is going the direction of develloping an extention, maybe replace your topic in another thread.

I moved it to Ruby because similar request have been discussed here before…

john

It seems “intersect” methods bring troubles. They work quite ok when solids overlap.
But while they only “touch” each other (by vertex, edge or even face) they are not reliable. I looped pairs of my groups through
result = e1.bounds.intersect(e2.bounds)
even having 100% symetrical situation received left against center empty bound but right against center not empty.
can’t find a reason…

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.