if (aMinDist <= theTolZ) {
IntRes2d_Transition aTrOnLin(IntRes2d_Head);
IntRes2d_Position aPosOnCurve = IntRes2d_Middle;
- if (Abs(aPar - theDeb) <= Precision::Confusion()) {
+ if ((Abs(aPar - theDeb) <= Precision::Confusion())
+ || (aPar < theDeb)) {
aPosOnCurve = IntRes2d_Head;
}
- else if (Abs(aPar - theFin) <= Precision::Confusion()) {
+ else if ((Abs(aPar - theFin) <= Precision::Confusion())
+ || (aPar > theFin)) {
aPosOnCurve = IntRes2d_End;
}
//
{
Standard_Boolean aStatusOn = Standard_False;
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)
{
Append(aPntInter);
--- /dev/null
+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"
+}