[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

@@ -1056,13 +1056,12 @@ void QGIViewPart::drawBreakLines()
QGIBreakLine* breakLine = new QGIBreakLine();
addToGroup(breakLine);
Base::Vector3d direction = dbv->directionFromObj(*breakObj);
direction.Normalize();
Base::Vector3d direction = dbv->guiDirectionFromObj(*breakObj);
breakLine->setDirection(direction);
// the bounds describe two corners of the removed area
// the bounds describe two corners of the removed area in the view
std::pair<Base::Vector3d, Base::Vector3d> bounds = dbv->breakBoundsFromObj(*breakObj);
// the bounds are in 3d form, so we need to invert & rez them
Base::Vector3d topLeft = Rez::guiX(DU::invertY(bounds.first));
Base::Vector3d topLeft = Rez::guiX(DU::invertY(bounds.first));
Base::Vector3d bottomRight = Rez::guiX(DU::invertY(bounds.second));
breakLine->setBounds(topLeft, bottomRight);
breakLine->setPos(0.0, 0.0);