mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-26 02:07:36 +00:00
take into account edge orientation correctly #3201
This commit is contained in:
@@ -275,9 +275,16 @@ bool OpenCascadeKernel::convert(const taxonomy::loop::ptr loop, TopoDS_Wire& wir
|
|||||||
V1.Normalize();
|
V1.Normalize();
|
||||||
V2.Normalize();
|
V2.Normalize();
|
||||||
|
|
||||||
auto ang = std::acos(V1.Dot(V2));
|
V2.Reverse();
|
||||||
|
|
||||||
Logger::Notice(std::to_string(ang));
|
if (edges.First().Orientation() == TopAbs_REVERSED) {
|
||||||
|
V1.Reverse();
|
||||||
|
}
|
||||||
|
if (edges.Last().Orientation() == TopAbs_REVERSED) {
|
||||||
|
V2.Reverse();
|
||||||
|
}
|
||||||
|
|
||||||
|
auto ang = std::acos(V1.Dot(V2));
|
||||||
|
|
||||||
if (ang < 0.0314) {
|
if (ang < 0.0314) {
|
||||||
edges_to_tesselate.Add(crv1->DynamicType() == STANDARD_TYPE(Geom_Circle) ? edges.First() : edges.Last());
|
edges_to_tesselate.Add(crv1->DynamicType() == STANDARD_TYPE(Geom_Circle) ? edges.First() : edges.Last());
|
||||||
|
|||||||
Reference in New Issue
Block a user