1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-21 10:13:43 +03:00
occt/src/GeomLib/GeomLib_Check2dBSplineCurve.hxx
jgv e67e482d99 0029511: Section fails for these two faces
Modified method: Approx_ComputeLine::Compute
Check of multicurve is now always unconditional, the procedure of check is modified to avoid infinite loops.

Modified classes: GeomLib_CheckBSplineCurve and GeomLib_Check2dBSplineCurve
Correction of poles at the ends of curve is modified to fit the direction of tangent defined by two first points or two last points of walking line.

Also modified:

BOPAlgo_PaveFiller: modified methods PostTreatFF, RemoveUsedVertices - now unused vertices are included in the list of vertices to be absorbed by other ones.
2018-06-14 14:03:08 +03:00

93 lines
2.6 KiB
C++

// Created on: 1997-05-28
// Created by: Xavier BENVENISTE
// Copyright (c) 1997-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _GeomLib_Check2dBSplineCurve_HeaderFile
#define _GeomLib_Check2dBSplineCurve_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Boolean.hxx>
#include <Standard_Real.hxx>
#include <gp_Pnt2d.hxx>
class Geom2d_BSplineCurve;
class StdFail_NotDone;
class Standard_OutOfRange;
//! Checks for the end tangents : wether or not those
//! are reversed
class GeomLib_Check2dBSplineCurve
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT GeomLib_Check2dBSplineCurve(const Handle(Geom2d_BSplineCurve)& Curve,
const Standard_Real Tolerance,
const Standard_Real AngularTolerance);
Standard_Boolean IsDone() const;
Standard_EXPORT void NeedTangentFix (Standard_Boolean& FirstFlag, Standard_Boolean& SecondFlag) const;
Standard_EXPORT void FixTangent (const Standard_Boolean FirstFlag, const Standard_Boolean LastFlag);
//! modifies the curve
//! by fixing the first or the last tangencies
//!
//! if Index3D not in the Range [1,Nb3dSpaces]
//! if the Approx is not Done
Standard_EXPORT Handle(Geom2d_BSplineCurve) FixedTangent (const Standard_Boolean FirstFlag, const Standard_Boolean LastFlag);
protected:
private:
void FixTangentOnCurve(Handle(Geom2d_BSplineCurve)& theCurve,
const Standard_Boolean FirstFlag,
const Standard_Boolean LastFlag);
Handle(Geom2d_BSplineCurve) myCurve;
Standard_Boolean myDone;
Standard_Boolean myFixFirstTangent;
Standard_Boolean myFixLastTangent;
Standard_Real myAngularTolerance;
Standard_Real myTolerance;
Standard_Integer myIndSecondPole;
Standard_Integer myIndPrelastPole;
};
#include <GeomLib_Check2dBSplineCurve.lxx>
#endif // _GeomLib_Check2dBSplineCurve_HeaderFile