Forum archiveIssue archiveOther usage issues

Archived discussion

Analyse connectivity of two faces

Other usage issuesFri, 03/28/2014 - 23:201 reply

Browse this forum
QuestionAuthor

I have a TopTools_ListOfShape containing 2 faces sharing a common edge and I look for the connectivity between the two face (C0, C1).
How could I do that ?

Discussion

1 archived reply

Posts are displayed in their archived order.

01Author

Answer :

const TopoDS_Edge &edg(TopoDS::Edge(edgeExplorer.Current()));

TopTools_ListOfShape parents;
parents = edgeAnceMap.FindFromKey(edg);
const TopoDS_Shape& face1 = parents.First();
const TopoDS_Shape& face2 = parents.Last();
GeomAbs_Shape cont = BRep_Tool::Continuity(edg, TopoDS::Face(face1), TopoDS::Face(face2));

if (cont == 0)
{ // Sharp edge
std::cout << "Sharp edge" << std::endl;
}
else
{ // Dead edge
std::cout << "Unsharp edge" << std::endl;
}