1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0027884: Modeling Algorithms - Possible improvement for 2d classifier

Added the implementation of bndbox<->line and bndbox<->segment intersections for 2D to Bnd_Box2d
Added the speedup for 2d classification to BRepClass_Intersector.cxx
Added the test for our improvement
This commit is contained in:
abulyche
2021-07-14 23:40:32 +03:00
committed by bugmaster
parent fceeb82917
commit 715fcb5a92
14 changed files with 513 additions and 101 deletions

View File

@@ -124,7 +124,7 @@ Standard_Integer b2dclassify (Draw_Interpretor& theDI,
const char** theArgVec)
{
if (theArgNb < 3) {
theDI << " use b2dclassify Face Point2d [Tol]\n";
theDI << " use b2dclassify Face Point2d [Tol] [UseBox] [GapCheckTol]\n";
return 1;
}
@@ -144,9 +144,11 @@ Standard_Integer b2dclassify (Draw_Interpretor& theDI,
const TopoDS_Face& aF = TopoDS::Face(aS);
const Standard_Real aTol = (theArgNb == 4) ?
Draw::Atof (theArgVec[3]) : BRep_Tool::Tolerance (aF);
const Standard_Boolean anUseBox = (theArgNb == 5 && Draw::Atof(theArgVec[4]) == 0) ?
Standard_False : Standard_True;
const Standard_Real aGapCheckTol = (theArgNb == 6) ? Draw::Atof(theArgVec[5]) : 0.1;
BRepClass_FaceClassifier aClassifier;
aClassifier.Perform(aF, aP, aTol);
aClassifier.Perform(aF, aP, aTol, anUseBox, aGapCheckTol);
PrintState (theDI, aClassifier.State());
//
return 0;