Choosing the closest bound to the checking point.
Test cases for the issue.
Updating test cases for the current behavior.
aFirst=aC3D->FirstParameter();
aLast =aC3D->LastParameter();
//
- //Checking extermities first
+ Standard_Boolean bIsClosed = IntTools_Tools::IsClosed(aC3D);
+ // Checking extermities first
+ // It is necessary to chose the closest bound to the point
+ Standard_Boolean bFirstValid = Standard_False;
+ Standard_Real aFirstDist = Precision::Infinite();
+ //
if (!Precision::IsInfinite(aFirst)) {
gp_Pnt aPCFirst=aC3D->Value(aFirst);
- aDist=aPv.Distance(aPCFirst);
- if (aDist < aTolSum) {
+ aFirstDist = aPv.Distance(aPCFirst);
+ if (aFirstDist < aTolSum) {
+ bFirstValid = Standard_True;
aT=aFirst;
//
- if(aDist > aTolV) {
+ if (aFirstDist > aTolV) {
Extrema_LocateExtPC anExt(aPv, aGAC, aFirst, 1.e-10);
if(anExt.IsDone()) {
}
}
//
- return Standard_True;
+ if (bIsClosed) {
+ return Standard_True;
+ }
}
}
//
- //if (!Precision::IsInfinite(aFirst)) {
if (!Precision::IsInfinite(aLast)) {
gp_Pnt aPCLast=aC3D->Value(aLast);
aDist=aPv.Distance(aPCLast);
+ if (bFirstValid && (aFirstDist < aDist)) {
+ return Standard_True;
+ }
+ //
if (aDist < aTolSum) {
aT=aLast;
//
return Standard_True;
}
}
+ else if (bFirstValid) {
+ return Standard_True;
+ }
//
GeomAPI_ProjectPointOnCurve& aProjector=ProjPT(aC3D);
aProjector.Perform(aPv);
+puts "TODO ?OCC26619 ALL: Faulty shapes in variables faulty_1 to faulty_"
+
source [locate_data_file 200A0-1_BE.asm.1.gdml.tcl]
+puts "TODO ?OCC26619 ALL: Faulty shapes in variables faulty_1 to faulty_"
+
source [locate_data_file 200a0-1_be_piquage.prt.1.gdml.tcl]
+puts "TODO ?OCC26619 ALL: Faulty shapes in variables faulty_1 to faulty_"
+
source [locate_data_file 200a0-1_sid_piquage.prt.1.gdml.tcl]
+puts "TODO ?OCC26619 ALL: Faulty shapes in variables faulty_1 to faulty_"
+
source [locate_data_file 200a0-1_sopac-dn200.asm.1.gdml.tcl]
+puts "TODO ?OCC26619 ALL: Faulty shapes in variables faulty_1 to faulty_"
+
source [locate_data_file 200a0-1_sopac-dn200_piquage.prt.1.gdml.tcl]
+puts "TODO ?OCC26619 ALL: Faulty shapes in variables faulty_1 to faulty_"
+
source [locate_data_file 200a0-1_spec.asm.1.gdml.tcl]
+puts "TODO ?OCC26619 ALL: Faulty shapes in variables faulty_1 to faulty_"
+
source [locate_data_file 200a0-1_spec_piquage.prt.1.gdml.tcl]
009 modalg_4
010 modalg_5
011 modalg_6
-012 moddata_1
-013 moddata_2
-014 moddata_3
-015 step
-016 caf
-017 mesh
-018 heal
-019 stlvrml
+012 modalg_7
+013 moddata_1
+014 moddata_2
+015 moddata_3
+016 step
+017 caf
+018 mesh
+019 heal
+020 stlvrml
--- /dev/null
+puts "============"
+puts "OCC27441"
+puts "============"
+puts ""
+###############################
+## The method IntTools_ContextIsVertexOnLine incorrectly computes parameter of the point on the curve
+###############################
+
+restore [locate_data_file bug27428_shapes.brep] b
+explode b
+bsection result b_1 b_2
+set bcheck [bopcheck result]
+puts $bcheck
+if {![regexp {This shape seems to be OK.} $bcheck]} {
+ puts "Error: bopcheck failed"
+}
--- /dev/null
+set subgroup modalg
--- /dev/null
+puts "======="
+puts "OCC28883"
+puts "======="
+puts ""
+##################################################
+# Invalid result of Section operation
+##################################################
+
+restore [locate_data_file bug28883_Prism.brep] b1
+restore [locate_data_file bug28883_LES_2d_shell.brep] b2
+
+explode b1 f; copy b1_51 b1
+explode b2 f; copy b2_8 b2
+
+bsection result b1 b2
+
+checkshape result
+checksection result
+
+checknbshapes result -edge 1 -vertex 2
+set length 7.13116e-007
--- /dev/null
+puts "======="
+puts "OCC28883"
+puts "======="
+puts ""
+##################################################
+# Invalid result of Section operation
+##################################################
+
+restore [locate_data_file bug28883_Prism.brep] b1
+restore [locate_data_file bug28883_LES_2d_shell.brep] b2
+
+bsection result b1 b2
+
+checkshape result
+checksection result
+
+checknbshapes result -edge 133 -vertex 134
+set length 2.20769