TechDraw: Fix hatch drawing (#19458)

* TechDraw: Fix hatch drawing (#16353)

* TechDraw: Fix hatch drawing in Tech View
This commit is contained in:
Aurélien Pascal
2025-03-03 17:35:13 +01:00
committed by GitHub
parent b4b93763ae
commit e97aa7d47e
5 changed files with 109 additions and 146 deletions

View File

@@ -110,21 +110,8 @@ Base::Vector3d LineSet::getUnitDir()
Base::Vector3d LineSet::getUnitOrtho()
{
Base::Vector3d result;
Base::Vector3d unit = getUnitDir();
Base::Vector3d X(1.0, 0.0, 0.0);
Base::Vector3d Y(0.0, 1.0, 0.0);
if (unit.IsEqual(X, 0.000001)) {
result = Y;
} else if (unit.IsEqual(Y, 0.000001)) {
result = X;
} else {
double unitX = unit.x;
double unitY = unit.y;
result = Base::Vector3d(unitY, -unitX, 0.0); //perpendicular
}
result.Normalize(); //probably redundant
return result;
return Base::Vector3d(-unit.y, unit.x, 0.0);
}