mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +03:00
0026554: Error in IntPatch_PrmPrmIntersection: initial step for walking line is not related with actual tolerance
Test case for issue CR26554 Small corrections for issue CR26554
This commit is contained in:
parent
e99a2eef31
commit
3e1b1da77c
@ -48,9 +48,10 @@ void ComputePasInit(Standard_Real *pasuv,
|
|||||||
Standard_Real _Vm1,Standard_Real _VM1,
|
Standard_Real _Vm1,Standard_Real _VM1,
|
||||||
Standard_Real _Um2,Standard_Real _UM2,
|
Standard_Real _Um2,Standard_Real _UM2,
|
||||||
Standard_Real _Vm2,Standard_Real _VM2,
|
Standard_Real _Vm2,Standard_Real _VM2,
|
||||||
const Handle(Adaptor3d_HSurface)& ,
|
const Handle(Adaptor3d_HSurface)& Caro1,
|
||||||
const Handle(Adaptor3d_HSurface)& ,
|
const Handle(Adaptor3d_HSurface)& Caro2,
|
||||||
const Standard_Real Increment)
|
const Standard_Real Increment,
|
||||||
|
const Standard_Real tolconf)
|
||||||
{
|
{
|
||||||
Standard_Real du1=Abs(UM1-Um1);
|
Standard_Real du1=Abs(UM1-Um1);
|
||||||
Standard_Real dv1=Abs(VM1-Vm1);
|
Standard_Real dv1=Abs(VM1-Vm1);
|
||||||
@ -74,6 +75,20 @@ void ComputePasInit(Standard_Real *pasuv,
|
|||||||
pasuv[1]=Increment*dv1;
|
pasuv[1]=Increment*dv1;
|
||||||
pasuv[2]=Increment*du2;
|
pasuv[2]=Increment*du2;
|
||||||
pasuv[3]=Increment*dv2;
|
pasuv[3]=Increment*dv2;
|
||||||
|
|
||||||
|
Standard_Real ResoU1tol = Adaptor3d_HSurfaceTool::UResolution(Caro1, tolconf);
|
||||||
|
Standard_Real ResoV1tol = Adaptor3d_HSurfaceTool::VResolution(Caro1, tolconf);
|
||||||
|
Standard_Real ResoU2tol = Adaptor3d_HSurfaceTool::UResolution(Caro2, tolconf);
|
||||||
|
Standard_Real ResoV2tol = Adaptor3d_HSurfaceTool::VResolution(Caro2, tolconf);
|
||||||
|
|
||||||
|
if (pasuv[0] < 2*ResoU1tol)
|
||||||
|
pasuv[0] = 2*ResoU1tol;
|
||||||
|
if (pasuv[1] < 2*ResoV1tol)
|
||||||
|
pasuv[1] = 2*ResoV1tol;
|
||||||
|
if (pasuv[2] < 2*ResoU2tol)
|
||||||
|
pasuv[2] = 2*ResoU2tol;
|
||||||
|
if (pasuv[3] < 2*ResoV2tol)
|
||||||
|
pasuv[3] = 2*ResoV2tol;
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
@ -703,7 +718,7 @@ void IntWalk_PWalking::Perform(const TColStd_Array1OfReal& ParDep,
|
|||||||
const Standard_Real VLast2 = Adaptor3d_HSurfaceTool::LastVParameter (Caro2);
|
const Standard_Real VLast2 = Adaptor3d_HSurfaceTool::LastVParameter (Caro2);
|
||||||
//
|
//
|
||||||
ComputePasInit(pasuv,u1min,u1max,v1min,v1max,u2min,u2max,v2min,v2max,
|
ComputePasInit(pasuv,u1min,u1max,v1min,v1max,u2min,u2max,v2min,v2max,
|
||||||
Um1,UM1,Vm1,VM1,Um2,UM2,Vm2,VM2,Caro1,Caro2,pasMax+pasMax);
|
Um1,UM1,Vm1,VM1,Um2,UM2,Vm2,VM2,Caro1,Caro2,pasMax+pasMax,tolconf);
|
||||||
//
|
//
|
||||||
if(pasuv[0]<100.0*ResoU1) {
|
if(pasuv[0]<100.0*ResoU1) {
|
||||||
pasuv[0]=100.0*ResoU1;
|
pasuv[0]=100.0*ResoU1;
|
||||||
|
@ -7,4 +7,4 @@ restore [locate_data_file buc60462b.brep] b
|
|||||||
|
|
||||||
bsection result a b
|
bsection result a b
|
||||||
|
|
||||||
set length 261.53
|
set length 268.348
|
@ -13,18 +13,18 @@ prj res wire plate 0 0 -1
|
|||||||
|
|
||||||
renamevar res_1 result
|
renamevar res_1 result
|
||||||
|
|
||||||
set length 1003.94
|
set length 1189.91
|
||||||
|
|
||||||
set nbshapes_expected "
|
set nbshapes_expected "
|
||||||
Number of shapes in shape
|
Number of shapes in shape
|
||||||
VERTEX : 2
|
VERTEX : 3
|
||||||
EDGE : 1
|
EDGE : 2
|
||||||
WIRE : 1
|
WIRE : 1
|
||||||
FACE : 0
|
FACE : 0
|
||||||
SHELL : 0
|
SHELL : 0
|
||||||
SOLID : 0
|
SOLID : 0
|
||||||
COMPSOLID : 0
|
COMPSOLID : 0
|
||||||
COMPOUND : 0
|
COMPOUND : 0
|
||||||
SHAPE : 4
|
SHAPE : 6
|
||||||
"
|
"
|
||||||
checknbshapes result -ref ${nbshapes_expected} -t -m "fuzzy booleans with multiple tools"
|
checknbshapes result -ref ${nbshapes_expected} -t -m "fuzzy booleans with multiple tools"
|
||||||
|
32
tests/bugs/modalg_6/bug26554
Normal file
32
tests/bugs/modalg_6/bug26554
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
puts "============"
|
||||||
|
puts "OCC26554"
|
||||||
|
puts "============"
|
||||||
|
puts ""
|
||||||
|
#######################################################################
|
||||||
|
# Error in IntPatch_PrmPrmIntersection: initial step for walking line is not related with actual tolerance
|
||||||
|
#######################################################################
|
||||||
|
|
||||||
|
restore [locate_data_file bug26554_a.brep] a
|
||||||
|
restore [locate_data_file bug26554_b.brep] b
|
||||||
|
|
||||||
|
bop a b
|
||||||
|
bopsection result
|
||||||
|
|
||||||
|
set length 0.00502025
|
||||||
|
|
||||||
|
set nbshapes_expected "
|
||||||
|
Number of shapes in shape
|
||||||
|
VERTEX : 2
|
||||||
|
EDGE : 1
|
||||||
|
WIRE : 0
|
||||||
|
FACE : 0
|
||||||
|
SHELL : 0
|
||||||
|
SOLID : 0
|
||||||
|
COMPSOLID : 0
|
||||||
|
COMPOUND : 1
|
||||||
|
SHAPE : 4
|
||||||
|
|
||||||
|
"
|
||||||
|
checknbshapes result -ref ${nbshapes_expected} -t -m "result"
|
||||||
|
|
||||||
|
set 2dviewer 1
|
@ -7,36 +7,15 @@ puts ""
|
|||||||
##################################################
|
##################################################
|
||||||
|
|
||||||
restore [locate_data_file OCC13-1.draw] su1
|
restore [locate_data_file OCC13-1.draw] su1
|
||||||
############### checkshape su1 # is not a topological shape
|
|
||||||
restore [locate_data_file OCC13-2.draw] su2
|
restore [locate_data_file OCC13-2.draw] su2
|
||||||
############### checkshape su2 # is not a topological shape
|
|
||||||
|
|
||||||
#Try to intersect two surfaces with tolerance 0.1
|
mkface f1 su1
|
||||||
#note that distance between shapes is about 0.005942345501409
|
mkface f2 su2
|
||||||
|
|
||||||
catch {intersect res su1 su2 0.1 } result
|
bop f1 f2
|
||||||
set nom 0
|
bopsection result
|
||||||
set j 1
|
|
||||||
repeat 10 {
|
tolerance result
|
||||||
set che [whatis res_$j]
|
checkshape result
|
||||||
set che1 [whatis res_$j]
|
|
||||||
set err [lindex $che [expr [llength $che] - 1]]
|
set 3dviewer 1
|
||||||
set err1 [lindex $che1 [expr [llength $che1] - 2]]
|
|
||||||
if { $err != "curve" && $err1 != "3d"} {
|
|
||||||
break
|
|
||||||
} else {
|
|
||||||
set nom [expr $nom + 1]
|
|
||||||
|
|
||||||
#Check, if curve has non-zero length
|
|
||||||
set info [length res_$j]
|
|
||||||
regexp {The length res_1 is+ +([-0-9.+eE]+)} $info full ll
|
|
||||||
if {${ll} < 1.0e-7} {
|
|
||||||
puts "Error : res_$j has null-length"
|
|
||||||
}
|
|
||||||
|
|
||||||
incr j
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if { $nom == 0} {
|
|
||||||
puts "Error : Intersection was made WRONGLY"
|
|
||||||
}
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user