mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +03:00
0023472: BRepAlgoAPI_Section algorithm fails with exception while intersecting two faces
This commit is contained in:
parent
45c0ba3664
commit
07782e0ce6
@ -1070,7 +1070,7 @@ void Adaptor3d_TopolTool::BSplSamplePnts(const Standard_Real theDefl,
|
|||||||
|
|
||||||
anUFlg(1) = Standard_True;
|
anUFlg(1) = Standard_True;
|
||||||
anUFlg(nbsu) = Standard_True;
|
anUFlg(nbsu) = Standard_True;
|
||||||
myNbSamplesU = 2;
|
//myNbSamplesU = 2;
|
||||||
for(i = 1; i <= nbsv; ++i) {
|
for(i = 1; i <= nbsv; ++i) {
|
||||||
t1 = aVPars(i);
|
t1 = aVPars(i);
|
||||||
j = 1;
|
j = 1;
|
||||||
@ -1113,7 +1113,7 @@ void Adaptor3d_TopolTool::BSplSamplePnts(const Standard_Real theDefl,
|
|||||||
if(!ok) {
|
if(!ok) {
|
||||||
j = k - 1;
|
j = k - 1;
|
||||||
anUFlg(j) = Standard_True;
|
anUFlg(j) = Standard_True;
|
||||||
++myNbSamplesU;
|
//++myNbSamplesU;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1129,6 +1129,12 @@ void Adaptor3d_TopolTool::BSplSamplePnts(const Standard_Real theDefl,
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
myNbSamplesU = 0;
|
||||||
|
for (i = 1; i <= nbsu; i++)
|
||||||
|
if (anUFlg(i) == Standard_True)
|
||||||
|
myNbSamplesU++;
|
||||||
|
|
||||||
if(myNbSamplesU < myMinPnts) {
|
if(myNbSamplesU < myMinPnts) {
|
||||||
if(myNbSamplesU == 2) {
|
if(myNbSamplesU == 2) {
|
||||||
//"uniform" distribution;
|
//"uniform" distribution;
|
||||||
@ -1149,7 +1155,7 @@ void Adaptor3d_TopolTool::BSplSamplePnts(const Standard_Real theDefl,
|
|||||||
|
|
||||||
aVFlg(1) = Standard_True;
|
aVFlg(1) = Standard_True;
|
||||||
aVFlg(nbsv) = Standard_True;
|
aVFlg(nbsv) = Standard_True;
|
||||||
myNbSamplesV = 2;
|
//myNbSamplesV = 2;
|
||||||
for(i = 1; i <= nbsu; ++i) {
|
for(i = 1; i <= nbsu; ++i) {
|
||||||
t1 = anUPars(i);
|
t1 = anUPars(i);
|
||||||
j = 1;
|
j = 1;
|
||||||
@ -1191,7 +1197,7 @@ void Adaptor3d_TopolTool::BSplSamplePnts(const Standard_Real theDefl,
|
|||||||
if(!ok) {
|
if(!ok) {
|
||||||
j = k - 1;
|
j = k - 1;
|
||||||
aVFlg(j) = Standard_True;
|
aVFlg(j) = Standard_True;
|
||||||
++myNbSamplesV;
|
//++myNbSamplesV;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1207,6 +1213,12 @@ void Adaptor3d_TopolTool::BSplSamplePnts(const Standard_Real theDefl,
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
myNbSamplesV = 0;
|
||||||
|
for (i = 1; i <= nbsv; i++)
|
||||||
|
if (aVFlg(i) == Standard_True)
|
||||||
|
myNbSamplesV++;
|
||||||
|
|
||||||
if(myNbSamplesV < myMinPnts) {
|
if(myNbSamplesV < myMinPnts) {
|
||||||
if(myNbSamplesV == 2) {
|
if(myNbSamplesV == 2) {
|
||||||
//"uniform" distribution;
|
//"uniform" distribution;
|
||||||
|
22
tests/bugs/modalg/bug23472
Executable file
22
tests/bugs/modalg/bug23472
Executable file
@ -0,0 +1,22 @@
|
|||||||
|
puts "============"
|
||||||
|
puts "CR23472"
|
||||||
|
puts "============"
|
||||||
|
puts ""
|
||||||
|
##########################################################################################################
|
||||||
|
# BRepAlgoAPI_Section algorithm fails with exception while intersecting two faces
|
||||||
|
##########################################################################################################
|
||||||
|
|
||||||
|
restore [locate_data_file bug23472_f1.brep] f1
|
||||||
|
restore [locate_data_file bug23472_f2.brep] f2
|
||||||
|
|
||||||
|
bsection result f1 f2 -2d
|
||||||
|
|
||||||
|
regexp {Mass +: +([-0-9.+eE]+)} [lprops result] full l
|
||||||
|
|
||||||
|
if { $l != 0} {
|
||||||
|
puts "Error : The bsection is not valid"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Service parameters
|
||||||
|
set mass -0.1
|
||||||
|
set m -0.1
|
Loading…
x
Reference in New Issue
Block a user