mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-18 06:21:40 +00:00
Missing FindFromKey() overload on older versions of occt
This commit is contained in:
@@ -115,18 +115,17 @@ namespace {
|
|||||||
TopExp::MapShapesAndAncestors(w, TopAbs_VERTEX, TopAbs_EDGE, map);
|
TopExp::MapShapesAndAncestors(w, TopAbs_VERTEX, TopAbs_EDGE, map);
|
||||||
|
|
||||||
bool all_linear = true, single_circle = false, first = true;
|
bool all_linear = true, single_circle = false, first = true;
|
||||||
TopTools_ListOfShape edges;
|
|
||||||
if (map.FindFromKey(v, edges)) {
|
const TopTools_ListOfShape& edges = map.FindFromKey(v);
|
||||||
TopTools_ListIteratorOfListOfShape it(edges);
|
TopTools_ListIteratorOfListOfShape it(edges);
|
||||||
for (; it.More(); it.Next()) {
|
for (; it.More(); it.Next()) {
|
||||||
const TopoDS_Edge& e = TopoDS::Edge(it.Value());
|
const TopoDS_Edge& e = TopoDS::Edge(it.Value());
|
||||||
double _, __;
|
double _, __;
|
||||||
Handle(Geom_Curve) crv = BRep_Tool::Curve(e, _, __);
|
Handle(Geom_Curve) crv = BRep_Tool::Curve(e, _, __);
|
||||||
const bool is_line = crv->DynamicType() == STANDARD_TYPE(Geom_Line);
|
const bool is_line = crv->DynamicType() == STANDARD_TYPE(Geom_Line);
|
||||||
const bool is_circle = crv->DynamicType() == STANDARD_TYPE(Geom_Circle);
|
const bool is_circle = crv->DynamicType() == STANDARD_TYPE(Geom_Circle);
|
||||||
all_linear = all_linear && all_linear;
|
all_linear = all_linear && all_linear;
|
||||||
single_circle = first && is_circle;
|
single_circle = first && is_circle;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (all_linear) {
|
if (all_linear) {
|
||||||
|
|||||||
Reference in New Issue
Block a user