[TD] Move Circulation method to DrawUtil

This commit is contained in:
edi271
2022-01-18 17:06:39 +01:00
committed by WandererFan
parent 5a40cd0ae5
commit c46a4f776b
5 changed files with 12 additions and 30 deletions

View File

@@ -789,6 +789,15 @@ Base::Vector3d DrawUtil::getFaceCenter(TopoDS_Face f)
return v;
}
// test the circulation of the triangle A-B-C
bool DrawUtil::circulation(Base::Vector3d A, Base::Vector3d B, Base::Vector3d C)
{
if (A.x * B.y + A.y * C.x + B.x * C.y - C.x * B.y - C.y * A.x - B.x * A.y > 0.0)
return true;
else
return false;
}
// Supplementary mathematical functions
// ====================================