mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-05-16 10:54:53 +03:00
0032876: Modeling algorithms - BRepClass_FaceClassifier issue
Modification of checking points for the state "ON" in BRepClass_Intersector.cxx; Added the test for this ticket; test case lowalgos/classifier/bug377: BAD -> OK
This commit is contained in:
parent
ed6a17ef6c
commit
80d4753574
@ -197,10 +197,12 @@ Standard_Boolean CheckOn(IntRes2d_IntersectionPoint& thePntInter,
|
|||||||
if (aMinDist <= theTolZ) {
|
if (aMinDist <= theTolZ) {
|
||||||
IntRes2d_Transition aTrOnLin(IntRes2d_Head);
|
IntRes2d_Transition aTrOnLin(IntRes2d_Head);
|
||||||
IntRes2d_Position aPosOnCurve = IntRes2d_Middle;
|
IntRes2d_Position aPosOnCurve = IntRes2d_Middle;
|
||||||
if (Abs(aPar - theDeb) <= Precision::Confusion()) {
|
if ((Abs(aPar - theDeb) <= Precision::Confusion())
|
||||||
|
|| (aPar < theDeb)) {
|
||||||
aPosOnCurve = IntRes2d_Head;
|
aPosOnCurve = IntRes2d_Head;
|
||||||
}
|
}
|
||||||
else if (Abs(aPar - theFin) <= Precision::Confusion()) {
|
else if ((Abs(aPar - theFin) <= Precision::Confusion())
|
||||||
|
|| (aPar > theFin)) {
|
||||||
aPosOnCurve = IntRes2d_End;
|
aPosOnCurve = IntRes2d_End;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
@ -381,8 +383,16 @@ void BRepClass_Intersector::Perform(const gp_Lin2d& L,
|
|||||||
{
|
{
|
||||||
Standard_Boolean aStatusOn = Standard_False;
|
Standard_Boolean aStatusOn = Standard_False;
|
||||||
IntRes2d_IntersectionPoint aPntInter;
|
IntRes2d_IntersectionPoint aPntInter;
|
||||||
|
Standard_Real aDebTol = deb;
|
||||||
|
Standard_Real aFinTol = fin;
|
||||||
|
if (aTolZ > Precision::Confusion())
|
||||||
|
{
|
||||||
|
aDebTol = deb - aTolZ;
|
||||||
|
aFinTol = fin + aTolZ;
|
||||||
|
}
|
||||||
|
Geom2dAdaptor_Curve aCurAdaptor(aC2D, aDebTol, aFinTol);
|
||||||
|
|
||||||
aStatusOn = CheckOn(aPntInter, F, L, C, aTolZ, fin, deb);
|
aStatusOn = CheckOn(aPntInter, F, L, aCurAdaptor, aTolZ, fin, deb);
|
||||||
if (aStatusOn)
|
if (aStatusOn)
|
||||||
{
|
{
|
||||||
Append(aPntInter);
|
Append(aPntInter);
|
||||||
|
29
tests/bugs/modalg_6/bug32876
Normal file
29
tests/bugs/modalg_6/bug32876
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
puts "============================"
|
||||||
|
puts "0032876: Modeling algorithms - BRepClass_FaceClassifier issue"
|
||||||
|
puts "============================"
|
||||||
|
puts ""
|
||||||
|
|
||||||
|
plane p
|
||||||
|
trim p p 0 4 0 2
|
||||||
|
mkface face p
|
||||||
|
|
||||||
|
point p1 4.02 -0.02
|
||||||
|
point p2 4.06 -0.02
|
||||||
|
point p3 3.8 -0.08
|
||||||
|
point p4 4.09 0
|
||||||
|
|
||||||
|
if ![regexp "ON" [b2dclassify face p1 0.1]] {
|
||||||
|
puts "Error: point p1 is classified as OUT"
|
||||||
|
}
|
||||||
|
|
||||||
|
if ![regexp "ON" [b2dclassify face p2 0.1]] {
|
||||||
|
puts "Error: point p2 is classified as OUT"
|
||||||
|
}
|
||||||
|
|
||||||
|
if ![regexp "ON" [b2dclassify face p3 0.1]] {
|
||||||
|
puts "Error: point p2 is classified as OUT"
|
||||||
|
}
|
||||||
|
|
||||||
|
if ![regexp "ON" [b2dclassify face p4 0.1]] {
|
||||||
|
puts "Error: point p2 is classified as OUT"
|
||||||
|
}
|
@ -1,5 +1,3 @@
|
|||||||
puts "TODO OCC11111 ALL: Error : OCC377"
|
|
||||||
|
|
||||||
pload QAcommands
|
pload QAcommands
|
||||||
|
|
||||||
puts "========"
|
puts "========"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user