Nathanael Fri, 03/28/2014 - 23:20 Forums: Other usage issuesI 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 ? Nathanael Sat, 03/29/2014 - 21:23 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; } Log in to post comments
Sat, 03/29/2014 - 21:23
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;
}