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

0027325: [Regression to 6.9.1] geom/revolution_00/A1: BOPTools_AlgoTools2D::AttachExistingPCurve doesn't work

1. Check, if edge is same-range, is now made with some tolerance (not strictly) in GeomLib_CheckCurveOnSurface class. Default value of this tolerance is Precision::PConfusion(). However, this value can be changed with corresponding interface.

2. DRAW-command "attachpcurve" has been added to BOPTest_UtilityCommands.cxx file. This command creates p-curve of given edge on given face. It can assign 2D-curve of one of the edge already included in the face or (if it is not possible) rebuilds new 2D-curve.

Creation of test case for this issue.
Adjusting test case boolean volumemaker A8 according to its new behavior on Windows.
This commit is contained in:
nbv
2016-04-01 14:54:12 +03:00
committed by abv
parent 4c0d97ac42
commit 6ca1c7466b
11 changed files with 172 additions and 20 deletions

View File

@@ -310,7 +310,8 @@ GeomLib_CheckCurveOnSurface::GeomLib_CheckCurveOnSurface()
myLast(0.),
myErrorStatus(0),
myMaxDistance(RealLast()),
myMaxParameter(0.)
myMaxParameter(0.),
myTolRange(Precision::PConfusion())
{
}
@@ -322,14 +323,16 @@ GeomLib_CheckCurveOnSurface::
GeomLib_CheckCurveOnSurface(const Handle(Geom_Curve)& theCurve,
const Handle(Geom_Surface)& theSurface,
const Standard_Real theFirst,
const Standard_Real theLast):
const Standard_Real theLast,
const Standard_Real theTolRange):
myCurve(theCurve),
mySurface(theSurface),
myFirst(theFirst),
myLast(theLast),
myErrorStatus(0),
myMaxDistance(RealLast()),
myMaxParameter(0.)
myMaxParameter(0.),
myTolRange(theTolRange)
{
}
@@ -346,6 +349,7 @@ void GeomLib_CheckCurveOnSurface::Init()
myErrorStatus = 0;
myMaxDistance = RealLast();
myMaxParameter = 0.0;
myTolRange = Precision::PConfusion();
}
//=======================================================================
@@ -355,7 +359,8 @@ void GeomLib_CheckCurveOnSurface::Init()
void GeomLib_CheckCurveOnSurface::Init( const Handle(Geom_Curve)& theCurve,
const Handle(Geom_Surface)& theSurface,
const Standard_Real theFirst,
const Standard_Real theLast)
const Standard_Real theLast,
const Standard_Real theTolRange)
{
myCurve = theCurve;
mySurface = theSurface;
@@ -364,13 +369,13 @@ void GeomLib_CheckCurveOnSurface::Init( const Handle(Geom_Curve)& theCurve,
myErrorStatus = 0;
myMaxDistance = RealLast();
myMaxParameter = 0.0;
myTolRange = theTolRange;
}
//=======================================================================
//function : Perform
//purpose :
//=======================================================================
#ifndef HAVE_TBB
//After fixing bug # 26365, this fragment should be deleted
//(together the text "#ifdef HAVE_TBB")
@@ -392,10 +397,10 @@ void GeomLib_CheckCurveOnSurface::Perform(const Handle(Geom2d_Curve)& thePCurve,
return;
}
if( (myCurve->FirstParameter() > myFirst) ||
(myCurve->LastParameter() < myLast) ||
(thePCurve->FirstParameter() > myFirst) ||
(thePCurve->LastParameter() < myLast))
if(((myCurve->FirstParameter() - myFirst) > myTolRange) ||
((myCurve->LastParameter() - myLast) < -myTolRange) ||
((thePCurve->FirstParameter() - myFirst) > myTolRange) ||
((thePCurve->LastParameter() - myLast) < -myTolRange))
{
myErrorStatus = 2;
return;

View File

@@ -16,6 +16,7 @@
#define _GeomLib_CheckCurveOnSurface_HeaderFile
#include <Geom_Curve.hxx>
#include <Precision.hxx>
#include <Standard.hxx>
class Geom_Surface;
@@ -33,16 +34,20 @@ public:
Standard_EXPORT GeomLib_CheckCurveOnSurface(void);
//! Contructor
Standard_EXPORT GeomLib_CheckCurveOnSurface(const Handle(Geom_Curve)& theCurve,
const Handle(Geom_Surface)& theSurface,
const Standard_Real theFirst,
const Standard_Real theLast);
Standard_EXPORT
GeomLib_CheckCurveOnSurface(const Handle(Geom_Curve)& theCurve,
const Handle(Geom_Surface)& theSurface,
const Standard_Real theFirst,
const Standard_Real theLast,
const Standard_Real theTolRange =
Precision::PConfusion());
//! Sets the data for the algorithm
Standard_EXPORT void Init (const Handle(Geom_Curve)& theCurve,
const Handle(Geom_Surface)& theSurface,
const Standard_Real theFirst,
const Standard_Real theLast);
const Standard_Real theLast,
const Standard_Real theTolRange = Precision::PConfusion());
//! Initializes all members by dafault values
Standard_EXPORT void Init();
@@ -112,6 +117,7 @@ private:
Standard_Integer myErrorStatus;
Standard_Real myMaxDistance;
Standard_Real myMaxParameter;
Standard_Real myTolRange;
};
#endif // _BRepLib_CheckCurveOnSurface_HeaderFile