1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0027133: Incorrect result of the normal projection algorithm

Topological tolerances changed to geometric tolerances.
Test case added.
This commit is contained in:
aml
2016-02-08 11:39:54 +03:00
parent b3b55601fb
commit 134f1e8d5f
2 changed files with 29 additions and 5 deletions

View File

@@ -611,7 +611,7 @@ void ProjLib_CompProjectedCurve::Init()
gp_Pnt Triple, prevTriple;
//Basic loop
//Basic loop
while(t <= LastU)
{
//Search for the begining a new continuous part
@@ -660,7 +660,8 @@ void ProjLib_CompProjectedCurve::Init()
#ifdef OCCT_DEBUG_CHRONO
InitChron(chr_init_point);
#endif
initpoint=InitialPoint(CPoint, t,myCurve,mySurface, myTolU, myTolV, U, V);
// PConfusion - use geometric tolerances in extrema / optimization.
initpoint=InitialPoint(CPoint, t,myCurve,mySurface, Precision::PConfusion(), Precision::PConfusion(), U, V);
#ifdef OCCT_DEBUG_CHRONO
ResultChron(chr_init_point,t_init_point);
init_point_count++;
@@ -855,10 +856,10 @@ void ProjLib_CompProjectedCurve::Init()
(Abs (Triple.Z() - mySurface->FirstVParameter()) < Precision::Confusion() ||
Abs (Triple.Z() - mySurface->LastVParameter() ) < Precision::Confusion() ))
{
// Go out from possible attraktor.
// Go out from possible attractor.
Standard_Real U,V;
InitialPoint(myCurve->Value(t), t, myCurve, mySurface, myTolU, myTolV, U, V);
// PConfusion - use geometric tolerances in extrema / optimization.
InitialPoint(myCurve->Value(t), t, myCurve, mySurface, Precision::PConfusion(), Precision::PConfusion(), U, V);
if (Abs (Abs(U - Triple.Y()) - mySurface->UPeriod()) < Precision::Confusion())
{
// Handle period jump.

View File

@@ -0,0 +1,23 @@
puts "================"
puts "0027133"
puts "================"
puts ""
##############################################################
# Incorrect result of the normal projection algorithm
# Oscillation at the edge end
##############################################################
restore [locate_data_file bug27133_aE.brep] aE
restore [locate_data_file bug27133_aF.brep] aF
nproject result aE aF
# Result length check.
checkprops result -l 0.0037337
# Visual check.
donly result
smallview
fit
display aE aF
checkview -screenshot -2d -path ${imagedir}/${test_image}.png