mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 02:02:22 +00:00
#3201 take into account edge orientation correctly
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user