1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-19 13:40:49 +03:00

0029430: [Regression] Curve evaluation at boundary point.

Before the fix, BRepAdaptor_CompCurve considered the input wire to be periodic with period LastParameter()-FirstParameter().
Now, method IsPeriodic will always return FALSE because it is impossible to obtain correspondence between the members of BRepAdaptor_CompCurve class and its periodicity status.
New behavior has been documented in upgrade-guide.
This commit is contained in:
nbv
2018-01-16 16:03:01 +03:00
committed by apn
parent 4bc805bfc6
commit f24150b851
6 changed files with 99 additions and 45 deletions

View File

@@ -2768,6 +2768,40 @@ static Standard_Integer OCC29371 (Draw_Interpretor& di, Standard_Integer n, cons
return 0;
}
#include <BRepOffsetAPI_MakePipeShell.hxx>
#include <GC_MakeArcOfCircle.hxx>
#include <BRepAdaptor_CompCurve.hxx>
#include <gp_Circ.hxx>
//=======================================================================
//function : OCC29430
//purpose :
//=======================================================================
static Standard_Integer OCC29430(Draw_Interpretor& theDI,
Standard_Integer /*theNArg*/,
const char** theArgVal)
{
const Standard_Real r45 = M_PI / 4.0, r225 = 3.0*M_PI / 4.0;
GC_MakeArcOfCircle arcMaker(gp_Circ(gp_Ax2(gp_Pnt(0.0, 0.0, 0.0), gp_Dir(0.0, 0.0, 1.0), gp_Dir(1.0, 0.0, 0.0)), 1.0), r45, r225, Standard_True);
BRepBuilderAPI_MakeEdge edgeMaker(arcMaker.Value());
BRepBuilderAPI_MakeWire wireMaker(edgeMaker.Edge());
const TopoDS_Wire circle = wireMaker.Wire();
DBRep::Set(theArgVal[1], circle);
BRepAdaptor_CompCurve curve(circle);
theDI << "Curve.FirstParameter() = " << curve.FirstParameter() << "\n";
theDI << "Curve.LastParameter() = " << curve.LastParameter() << "\n";
theDI << "Curve.Period() = " << (curve.IsPeriodic()? curve.Period() : 0.0) << "\n";
const gp_Pnt aStartPt = curve.Value(curve.FirstParameter());
const gp_Pnt anEndPt = curve.Value(curve.LastParameter());
DrawTrSurf::Set(theArgVal[2], aStartPt);
DrawTrSurf::Set(theArgVal[3], anEndPt);
return 0;
}
void QABugs::Commands_20(Draw_Interpretor& theCommands) {
const char *group = "QABugs";
@@ -2798,5 +2832,9 @@ void QABugs::Commands_20(Draw_Interpretor& theCommands) {
theCommands.Add("OCC28131", "OCC28131 name: creates face problematic for offset", __FILE__, OCC28131, group);
theCommands.Add("OCC29289", "OCC29289 : searching trigonometric root by Newton iterations", __FILE__, OCC29289, group);
theCommands.Add ("OCC29371", "OCC29371", __FILE__, OCC29371, group);
theCommands.Add("OCC29430", "OCC29430 <result wire> "
"<result first point> <result last point>",
__FILE__, OCC29430, group);
return;
}