I have two objects not touching or intersecting each other.
After extracting every face from each object and iterating through the collection i get unexpected result:
faceElement1[a].Intersect(faceElement2[b]) gives Intersecting as result
How can this be possible?
Is it instance geometry or symbol geometry?
Presumably you have two face collections one for each element and are comparing each item from one against each item from the other?
i have 2 walls, and each face collection reports correctly 6 faces
this is my workflow for collecting faces:
GeometryElement geometryelem1 = (GeometryElement)join[e1].GetGeometryObjectFromReference(new Reference(join[e1])); //Tutti i solidi nel primo GeometryObject List<Autodesk.Revit.DB.Solid> solids1 = new List<Autodesk.Revit.DB.Solid>(); //Tutte le facce dei Solidi del primo GeometryObject List<Autodesk.Revit.DB.Face> faces1 = new List<Autodesk.Revit.DB.Face>(); //inserisco i solid1 nelle liste solids1 foreach (var element in geometryelem1) { solids1.Add((Autodesk.Revit.DB.Solid) element); } //inserisco le FacesArray di ogni solid nella lista arrays1 foreach (Autodesk.Revit.DB.Solid solid1 in solids1) { foreach (Autodesk.Revit.DB.Face face in solid1.Faces) { faces1.Add(face); } }
Apparently faces are infinite with therefore many possible intersections beyond the range of the element itself.
So perhaps not the best approach for your needs.
In the image below the green lines are plotted using curves from the overload Face.Intersect(ByVal Face, ByRef Curve). Hard to understand at first why they all exist but once you trace along parallel to the faces you start to see all are valid.