[TD]handle odd projection cs in broken view

This commit is contained in:
wandererfan
2024-04-09 08:30:45 -04:00
committed by WandererFan
parent 5ef1b96a9d
commit 74556bced8
6 changed files with 307 additions and 129 deletions

View File

@@ -75,7 +75,7 @@ void QGIBreakLine::draw()
Base::Vector3d horizontal{1.0, 0.0, 0.0};
prepareGeometryChange();
double offset = zigzagWidth / 2.0;
if (m_direction.IsEqual(horizontal, EWTOLERANCE)) {
if (DU::fpCompare(fabs(m_direction.Dot(horizontal)), 1.0, EWTOLERANCE)) {
// m_direction connects the two cut points. The zigzags have
// to be perpendicular to m_direction
// 2x vertical zigzag