#3201 take into account edge orientation correctly

This commit is contained in:
Thomas Krijnen
2023-06-07 08:43:08 +02:00
parent dda16c847d
commit 1a0280928b
+8 -2
View File
@@ -215,11 +215,17 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcCompositeCurve* l, TopoDS_Wire
V1.Normalize();
V2.Normalize();
V2.Reverse();
if (edges.First().Orientation() == TopAbs_REVERSED) {
V1.Reverse();
}
if (edges.Last().Orientation() == TopAbs_REVERSED) {
V2.Reverse();
}
auto ang = std::acos(V1.Dot(V2));
Logger::Notice(std::to_string(ang));
if (ang < 0.0314) {
edges_to_tesselate.Add(crv1->DynamicType() == STANDARD_TYPE(Geom_Circle) ? edges.First() : edges.Last());
Logger::Notice("Sharp circular corner detecting, substituting with linear approximation");