[GFA] Wish to have a valid result, or at least identify faulty shapes

Hi dear Friends,

I'm using the GFA to compute splits parts of a couple of objects.

I've attached a sample, for wich the GFA always fail to give a valid result (by mean of BRepCheck_Analyzer & BOPAlgo_ArgumentAnalyzer).

Initial shapes are all valid (tolerance 1E-7, BRepCheck_Analyzer  & BOPAlgo_ArgumentAnalyzer are OK).

I've tried with Fuzzy ON/OFF, several values, and to increase tolerance without success.

The obvious problem is that solids are slightly overlapping ...

Not being able to have a valid result is not the main issue, but I wish I could at least identify the faulty input shapes.

I've tried such a detection with this code, but it doesn't work :

if (gfa.HasWarnings() || gfa.HasErrors())
{
	auto report = gfa.GetReport();
	auto errors = report->GetAlerts(Message_Warning);
	auto alarm = report->GetAlerts(Message_Alarm);
	auto fail = report->GetAlerts(Message_Fail);
	errors.Append(alarm);
	errors.Append(fail);
	for (Message_ListOfAlert::Iterator aIt(errors); aIt.More(); aIt.Next())
	{
		auto aShapeAlert = Handle(TopoDS_AlertWithShape)::DownCast(aIt.Value());
		if (aShapeAlert.IsNull()) continue;

		auto faulty = aShapeAlert->GetShape();
		for (int i=0; i<shapesIN->Count; i++)
		{
			for (TopExp_Explorer expl(shapesIN[i], faulty.ShapeType()); expl.More(); expl.Next())
			{
				if (expl.Current() == faulty)
				{
					auto faultyIN = shapesIN[i];
					break;
				}

				auto images = gfa.Images().Seek(expl.Current());
				if (!images) continue;
				for (TopTools_ListIteratorOfListOfShape iter(*images); iter.More(); iter.Next())
				{
					if (faulty != iter.Value()) continue;
					auto faultyIN = shapesIN[i];
					break;
				}
			}
		}
	}
}

Any advice appreciated ;-)

Attachments: 
o b's picture

After some deep investigation, I've found that inside GFA's Report, there are some TopoDS_AlertWithShape containing a Compound, and inside the compound there are some TopoDS_Solid that are actually present in GFA Arguments.

So I'm able to make a link between Arguments and Errors.

By the way, if anybody have a clue about what can be done with my BREP to prevent GFA crazyness, let me known :-)