C#-How to judge brep equals to another?

I have two breps, how to judge they are the same one?
Or, how to remove a brep from a brep list?

I don’t know if there’s a better tool for this but I take a sample of points from each and compare them. I’m assuming the shape of the boundary is all you want to compare here.

If you want to check if one Brep is a copy of these other Brep, find a common relative location on each (corner of a BB is good), use the same technique to sample points on each (may involve breaking into surfaces), move one group of points from one of those corners to the other, and check for equality between those two groups. You may have to use a small tolerance. If one is a clone of the other, the ordering of the points should not be a problem.

Where ordering does become a problem is if you (for example) want to compare two brep cubes that are made in two different ways, meaning the orientation and make of those surfaces could be different, you’ll need to sort those sampled points in some way before comparing groups. You’ll also need to be using a sampling technique that ensures that points are on the surface of the object (i.e. not in the trimmed out region of surfaces)

Thanks Jobson, I’m doing it like your method.
I think the brep, curve and so on should override the equals method.

Thanks for you reply!


– Dale