mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-21 10:13:43 +03:00
0023782: Intersection algorithm produces wrong section curves for the attached faces
The fix is to keep the correlation between numbers of segments in U and V parametric directions (nbu and nbv). When minimal of these numbers (f.e. nbu) is set to default minimal value (10), other (nbv) is set to Min(30, nbv*(default/nbu)). 30 is used to avoid too small segments. Added test case bugs/modalg_5/bug23782
This commit is contained in:
parent
c1fe53c64e
commit
97acf541ac
@ -976,6 +976,23 @@ void Adaptor3d_TopolTool::BSplSamplePnts(const Standard_Real theDefl,
|
|||||||
Standard_Boolean bUuniform = Standard_False;
|
Standard_Boolean bUuniform = Standard_False;
|
||||||
Standard_Boolean bVuniform = Standard_False;
|
Standard_Boolean bVuniform = Standard_False;
|
||||||
|
|
||||||
|
//modified by NIZHNY-EMV Mon Jun 10 14:19:04 2013
|
||||||
|
if (nbsu < theNUmin || nbsv < theNVmin) {
|
||||||
|
Standard_Integer aNb;
|
||||||
|
if (nbsu < nbsv) {
|
||||||
|
aNb = (Standard_Integer)(nbsv * ((Standard_Real)theNUmin)/((Standard_Real)nbsu));
|
||||||
|
aNb = Min(aNb, 30);
|
||||||
|
bVuniform = (aNb > nbsv) ? Standard_True : bVuniform;
|
||||||
|
nbsv = bVuniform ? aNb : nbsv;
|
||||||
|
} else {
|
||||||
|
aNb = (Standard_Integer)(nbsu * ((Standard_Real)theNVmin)/((Standard_Real)nbsv));
|
||||||
|
aNb = Min(aNb, 30);
|
||||||
|
bUuniform = (aNb > nbsu) ? Standard_True : bUuniform;
|
||||||
|
nbsu = bUuniform ? aNb : nbsu;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//modified by NIZHNY-EMV Mon Jun 10 14:19:05 2013
|
||||||
|
|
||||||
if(nbsu < theNUmin) {
|
if(nbsu < theNUmin) {
|
||||||
nbsu = theNUmin;
|
nbsu = theNUmin;
|
||||||
bUuniform = Standard_True;
|
bUuniform = Standard_True;
|
||||||
|
19
tests/bugs/modalg_5/bug23782
Normal file
19
tests/bugs/modalg_5/bug23782
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
puts "========="
|
||||||
|
puts "OCC23782"
|
||||||
|
puts "========="
|
||||||
|
puts ""
|
||||||
|
#################################################################################
|
||||||
|
# Intersection algorithm produces wrong section curves for the attached faces
|
||||||
|
#################################################################################
|
||||||
|
|
||||||
|
restore [locate_data_file bug23782_c.brep] f
|
||||||
|
|
||||||
|
explode f
|
||||||
|
bsection result f_1 f_2
|
||||||
|
|
||||||
|
set nbsh_t 1
|
||||||
|
set nb_v_good 2
|
||||||
|
set nb_e_good 1
|
||||||
|
|
||||||
|
set 2dviewer 0
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user