mirror of
https://github.com/Open-Cascade-SAS/OCCT.git
synced 2026-09-05 04:07:58 +08:00
Modeling - Refactor Extrema package (#869)
- Replacing preprocessor-based generic programming with C++ templates - Converting inline implementation files (`.lxx`) to inline definitions within header files - Removing legacy instantiation files (`_0.cxx`) - Updating type aliases to use modern `using` declarations instead of macro-based instantiation
This commit is contained in:
@@ -14,9 +14,7 @@ set(OCCT_Geom2dInt_FILES
|
||||
Geom2dInt_MyImpParToolOfTheIntersectorOfTheIntConicCurveOfGInter.hxx
|
||||
Geom2dInt_MyImpParToolOfTheIntersectorOfTheIntConicCurveOfGInter_0.cxx
|
||||
Geom2dInt_PCLocFOfTheLocateExtPCOfTheProjPCurOfGInter.hxx
|
||||
Geom2dInt_PCLocFOfTheLocateExtPCOfTheProjPCurOfGInter_0.cxx
|
||||
Geom2dInt_TheCurveLocatorOfTheProjPCurOfGInter.hxx
|
||||
Geom2dInt_TheCurveLocatorOfTheProjPCurOfGInter_0.cxx
|
||||
Geom2dInt_TheDistBetweenPCurvesOfTheIntPCurvePCurveOfGInter.hxx
|
||||
Geom2dInt_TheDistBetweenPCurvesOfTheIntPCurvePCurveOfGInter_0.cxx
|
||||
Geom2dInt_TheIntConicCurveOfGInter.hxx
|
||||
@@ -26,7 +24,6 @@ set(OCCT_Geom2dInt_FILES
|
||||
Geom2dInt_TheIntPCurvePCurveOfGInter.hxx
|
||||
Geom2dInt_TheIntPCurvePCurveOfGInter_0.cxx
|
||||
Geom2dInt_TheLocateExtPCOfTheProjPCurOfGInter.hxx
|
||||
Geom2dInt_TheLocateExtPCOfTheProjPCurOfGInter_0.cxx
|
||||
Geom2dInt_ThePolygon2dOfTheIntPCurvePCurveOfGInter.hxx
|
||||
Geom2dInt_ThePolygon2dOfTheIntPCurvePCurveOfGInter_0.cxx
|
||||
Geom2dInt_TheProjPCurOfGInter.hxx
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#ifndef _Geom2dInt_GInter_HeaderFile
|
||||
#define _Geom2dInt_GInter_HeaderFile
|
||||
|
||||
#include <Geom2dInt_TheCurveLocatorOfTheProjPCurOfGInter.hxx>
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
|
||||
@@ -30,8 +31,6 @@ class Standard_ConstructionError;
|
||||
class Adaptor2d_Curve2d;
|
||||
class Geom2dInt_Geom2dCurveTool;
|
||||
class Geom2dInt_TheProjPCurOfGInter;
|
||||
class Geom2dInt_TheCurveLocatorOfTheProjPCurOfGInter;
|
||||
class Geom2dInt_TheLocateExtPCOfTheProjPCurOfGInter;
|
||||
class Geom2dInt_TheIntConicCurveOfGInter;
|
||||
class Geom2dInt_TheIntersectorOfTheIntConicCurveOfGInter;
|
||||
class Geom2dInt_IntConicCurveOfGInter;
|
||||
|
||||
+14
-85
@@ -17,92 +17,21 @@
|
||||
#ifndef _Geom2dInt_PCLocFOfTheLocateExtPCOfTheProjPCurOfGInter_HeaderFile
|
||||
#define _Geom2dInt_PCLocFOfTheLocateExtPCOfTheProjPCurOfGInter_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <gp_Pnt2d.hxx>
|
||||
#include <TColStd_SequenceOfReal.hxx>
|
||||
#include <TColStd_SequenceOfInteger.hxx>
|
||||
#include <Adaptor2d_Curve2d.hxx>
|
||||
#include <Extrema_GFuncExtPC.hxx>
|
||||
#include <Extrema_POnCurv2d.hxx>
|
||||
#include <Extrema_SequenceOfPOnCurv2d.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <math_FunctionWithDerivative.hxx>
|
||||
class Standard_OutOfRange;
|
||||
class Standard_TypeMismatch;
|
||||
class Adaptor2d_Curve2d;
|
||||
class Geom2dInt_Geom2dCurveTool;
|
||||
class Extrema_POnCurv2d;
|
||||
class gp_Pnt2d;
|
||||
class gp_Vec2d;
|
||||
#include <Geom2dInt_Geom2dCurveTool.hxx>
|
||||
#include <gp_Pnt2d.hxx>
|
||||
#include <gp_Vec2d.hxx>
|
||||
|
||||
class Geom2dInt_PCLocFOfTheLocateExtPCOfTheProjPCurOfGInter : public math_FunctionWithDerivative
|
||||
{
|
||||
public:
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
Standard_EXPORT Geom2dInt_PCLocFOfTheLocateExtPCOfTheProjPCurOfGInter();
|
||||
|
||||
Standard_EXPORT Geom2dInt_PCLocFOfTheLocateExtPCOfTheProjPCurOfGInter(const gp_Pnt2d& P,
|
||||
const Adaptor2d_Curve2d& C);
|
||||
|
||||
//! sets the field mycurve of the function.
|
||||
Standard_EXPORT void Initialize(const Adaptor2d_Curve2d& C);
|
||||
|
||||
//! sets the field P of the function.
|
||||
Standard_EXPORT void SetPoint(const gp_Pnt2d& P);
|
||||
|
||||
//! Calculation of F(U).
|
||||
Standard_EXPORT Standard_Boolean Value(const Standard_Real U, Standard_Real& F) Standard_OVERRIDE;
|
||||
|
||||
//! Calculation of F'(U).
|
||||
Standard_EXPORT Standard_Boolean Derivative(const Standard_Real U,
|
||||
Standard_Real& DF) Standard_OVERRIDE;
|
||||
|
||||
//! Calculation of F(U) and F'(U).
|
||||
Standard_EXPORT Standard_Boolean Values(const Standard_Real U,
|
||||
Standard_Real& F,
|
||||
Standard_Real& DF) Standard_OVERRIDE;
|
||||
|
||||
//! Save the found extremum.
|
||||
Standard_EXPORT virtual Standard_Integer GetStateNumber() Standard_OVERRIDE;
|
||||
|
||||
//! Return the number of found extrema.
|
||||
Standard_EXPORT Standard_Integer NbExt() const;
|
||||
|
||||
//! Returns the Nth distance.
|
||||
Standard_EXPORT Standard_Real SquareDistance(const Standard_Integer N) const;
|
||||
|
||||
//! Shows if the Nth distance is a minimum.
|
||||
Standard_EXPORT Standard_Boolean IsMin(const Standard_Integer N) const;
|
||||
|
||||
//! Returns the Nth extremum.
|
||||
Standard_EXPORT const Extrema_POnCurv2d& Point(const Standard_Integer N) const;
|
||||
|
||||
//! Determines boundaries of subinterval for find of root.
|
||||
Standard_EXPORT void SubIntervalInitialize(const Standard_Real theUfirst,
|
||||
const Standard_Real theUlast);
|
||||
|
||||
//! Computes a Tol value. If 1st derivative of curve
|
||||
//! |D1|<Tol, it is considered D1=0.
|
||||
Standard_EXPORT Standard_Real SearchOfTolerance();
|
||||
|
||||
protected:
|
||||
private:
|
||||
gp_Pnt2d myP;
|
||||
Standard_Address myC;
|
||||
Standard_Real myU;
|
||||
gp_Pnt2d myPc;
|
||||
Standard_Real myD1f;
|
||||
TColStd_SequenceOfReal mySqDist;
|
||||
TColStd_SequenceOfInteger myIsMin;
|
||||
Extrema_SequenceOfPOnCurv2d myPoint;
|
||||
Standard_Boolean myPinit;
|
||||
Standard_Boolean myCinit;
|
||||
Standard_Boolean myD1Init;
|
||||
Standard_Real myTol;
|
||||
Standard_Integer myMaxDerivOrder;
|
||||
Standard_Real myUinfium;
|
||||
Standard_Real myUsupremum;
|
||||
};
|
||||
//! Type alias for 2D curve extremum function using Geom2dInt_Geom2dCurveTool.
|
||||
using Geom2dInt_PCLocFOfTheLocateExtPCOfTheProjPCurOfGInter =
|
||||
Extrema_GFuncExtPC<Adaptor2d_Curve2d,
|
||||
Geom2dInt_Geom2dCurveTool,
|
||||
Extrema_POnCurv2d,
|
||||
gp_Pnt2d,
|
||||
gp_Vec2d,
|
||||
Extrema_SequenceOfPOnCurv2d>;
|
||||
|
||||
#endif // _Geom2dInt_PCLocFOfTheLocateExtPCOfTheProjPCurOfGInter_HeaderFile
|
||||
|
||||
-42
@@ -1,42 +0,0 @@
|
||||
// Created on: 1992-06-04
|
||||
// Created by: Jacques GOUSSARD
|
||||
// Copyright (c) 1992-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.
|
||||
|
||||
#include <Geom2dInt_PCLocFOfTheLocateExtPCOfTheProjPCurOfGInter.hxx>
|
||||
|
||||
#include <Standard_OutOfRange.hxx>
|
||||
#include <Standard_TypeMismatch.hxx>
|
||||
#include <Adaptor2d_Curve2d.hxx>
|
||||
#include <Geom2dInt_Geom2dCurveTool.hxx>
|
||||
#include <Extrema_POnCurv2d.hxx>
|
||||
#include <gp_Pnt2d.hxx>
|
||||
#include <gp_Vec2d.hxx>
|
||||
#include <Extrema_SequenceOfPOnCurv2d.hxx>
|
||||
|
||||
#define Curve Adaptor2d_Curve2d
|
||||
#define Curve_hxx <Adaptor2d_Curve2d.hxx>
|
||||
#define Tool Geom2dInt_Geom2dCurveTool
|
||||
#define Tool_hxx <Geom2dInt_Geom2dCurveTool.hxx>
|
||||
#define POnC Extrema_POnCurv2d
|
||||
#define POnC_hxx <Extrema_POnCurv2d.hxx>
|
||||
#define Pnt gp_Pnt2d
|
||||
#define Pnt_hxx <gp_Pnt2d.hxx>
|
||||
#define Vec gp_Vec2d
|
||||
#define Vec_hxx <gp_Vec2d.hxx>
|
||||
#define Extrema_SeqPC Extrema_SequenceOfPOnCurv2d
|
||||
#define Extrema_SeqPC_hxx <Extrema_SequenceOfPOnCurv2d.hxx>
|
||||
#define Extrema_FuncExtPC Geom2dInt_PCLocFOfTheLocateExtPCOfTheProjPCurOfGInter
|
||||
#define Extrema_FuncExtPC_hxx <Geom2dInt_PCLocFOfTheLocateExtPCOfTheProjPCurOfGInter.hxx>
|
||||
#include <Extrema_FuncExtPC.gxx>
|
||||
+8
-47
@@ -17,53 +17,14 @@
|
||||
#ifndef _Geom2dInt_TheCurveLocatorOfTheProjPCurOfGInter_HeaderFile
|
||||
#define _Geom2dInt_TheCurveLocatorOfTheProjPCurOfGInter_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
#include <Adaptor2d_Curve2d.hxx>
|
||||
#include <Extrema_GCurveLocator.hxx>
|
||||
#include <Extrema_POnCurv2d.hxx>
|
||||
#include <Geom2dInt_Geom2dCurveTool.hxx>
|
||||
#include <gp_Pnt2d.hxx>
|
||||
|
||||
#include <Standard_Real.hxx>
|
||||
class Adaptor2d_Curve2d;
|
||||
class Geom2dInt_Geom2dCurveTool;
|
||||
class Extrema_POnCurv2d;
|
||||
class gp_Pnt2d;
|
||||
|
||||
class Geom2dInt_TheCurveLocatorOfTheProjPCurOfGInter
|
||||
{
|
||||
public:
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
//! Among a set of points {C(ui),i=1,NbU}, locate the point
|
||||
//! P=C(uj) such that:
|
||||
//! distance(P,C) = Min{distance(P,C(ui))}
|
||||
Standard_EXPORT static void Locate(const gp_Pnt2d& P,
|
||||
const Adaptor2d_Curve2d& C,
|
||||
const Standard_Integer NbU,
|
||||
Extrema_POnCurv2d& Papp);
|
||||
|
||||
//! Among a set of points {C(ui),i=1,NbU}, locate the point
|
||||
//! P=C(uj) such that:
|
||||
//! distance(P,C) = Min{distance(P,C(ui))}
|
||||
//! The research is done between umin and usup.
|
||||
Standard_EXPORT static void Locate(const gp_Pnt2d& P,
|
||||
const Adaptor2d_Curve2d& C,
|
||||
const Standard_Integer NbU,
|
||||
const Standard_Real Umin,
|
||||
const Standard_Real Usup,
|
||||
Extrema_POnCurv2d& Papp);
|
||||
|
||||
//! Among two sets of points {C1(ui),i=1,NbU} and
|
||||
//! {C2(vj),j=1,NbV}, locate the two points P1=C1(uk) and
|
||||
//! P2=C2(vl) such that:
|
||||
//! distance(P1,P2) = Min {distance(C1(ui),C2(vj))}.
|
||||
Standard_EXPORT static void Locate(const Adaptor2d_Curve2d& C1,
|
||||
const Adaptor2d_Curve2d& C2,
|
||||
const Standard_Integer NbU,
|
||||
const Standard_Integer NbV,
|
||||
Extrema_POnCurv2d& Papp1,
|
||||
Extrema_POnCurv2d& Papp2);
|
||||
|
||||
protected:
|
||||
private:
|
||||
};
|
||||
//! Type alias for 2D curve locator using Geom2dInt_Geom2dCurveTool.
|
||||
using Geom2dInt_TheCurveLocatorOfTheProjPCurOfGInter =
|
||||
Extrema_GCurveLocator<Adaptor2d_Curve2d, Geom2dInt_Geom2dCurveTool, Extrema_POnCurv2d, gp_Pnt2d>;
|
||||
|
||||
#endif // _Geom2dInt_TheCurveLocatorOfTheProjPCurOfGInter_HeaderFile
|
||||
|
||||
-38
@@ -1,38 +0,0 @@
|
||||
// Created on: 1992-06-04
|
||||
// Created by: Jacques GOUSSARD
|
||||
// Copyright (c) 1992-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.
|
||||
|
||||
#include <Geom2dInt_TheCurveLocatorOfTheProjPCurOfGInter.hxx>
|
||||
|
||||
#include <Adaptor2d_Curve2d.hxx>
|
||||
#include <Geom2dInt_Geom2dCurveTool.hxx>
|
||||
#include <Extrema_POnCurv2d.hxx>
|
||||
#include <gp_Pnt2d.hxx>
|
||||
|
||||
#define Curve1 Adaptor2d_Curve2d
|
||||
#define Curve1_hxx <Adaptor2d_Curve2d.hxx>
|
||||
#define Tool1 Geom2dInt_Geom2dCurveTool
|
||||
#define Tool1_hxx <Geom2dInt_Geom2dCurveTool.hxx>
|
||||
#define Curve2 Adaptor2d_Curve2d
|
||||
#define Curve2_hxx <Adaptor2d_Curve2d.hxx>
|
||||
#define Tool2 Geom2dInt_Geom2dCurveTool
|
||||
#define Tool2_hxx <Geom2dInt_Geom2dCurveTool.hxx>
|
||||
#define POnC Extrema_POnCurv2d
|
||||
#define POnC_hxx <Extrema_POnCurv2d.hxx>
|
||||
#define Pnt gp_Pnt2d
|
||||
#define Pnt_hxx <gp_Pnt2d.hxx>
|
||||
#define Extrema_CurveLocator Geom2dInt_TheCurveLocatorOfTheProjPCurOfGInter
|
||||
#define Extrema_CurveLocator_hxx <Geom2dInt_TheCurveLocatorOfTheProjPCurOfGInter.hxx>
|
||||
#include <Extrema_CurveLocator.gxx>
|
||||
+12
-82
@@ -17,89 +17,19 @@
|
||||
#ifndef _Geom2dInt_TheLocateExtPCOfTheProjPCurOfGInter_HeaderFile
|
||||
#define _Geom2dInt_TheLocateExtPCOfTheProjPCurOfGInter_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <Adaptor2d_Curve2d.hxx>
|
||||
#include <Extrema_GenLocateExtPC.hxx>
|
||||
#include <Extrema_POnCurv2d.hxx>
|
||||
#include <Geom2dInt_Geom2dCurveTool.hxx>
|
||||
#include <Geom2dInt_PCLocFOfTheLocateExtPCOfTheProjPCurOfGInter.hxx>
|
||||
class Standard_DomainError;
|
||||
class Standard_TypeMismatch;
|
||||
class StdFail_NotDone;
|
||||
class Adaptor2d_Curve2d;
|
||||
class Geom2dInt_Geom2dCurveTool;
|
||||
class Extrema_POnCurv2d;
|
||||
class gp_Pnt2d;
|
||||
class gp_Vec2d;
|
||||
#include <gp_Pnt2d.hxx>
|
||||
|
||||
class Geom2dInt_TheLocateExtPCOfTheProjPCurOfGInter
|
||||
{
|
||||
public:
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
Standard_EXPORT Geom2dInt_TheLocateExtPCOfTheProjPCurOfGInter();
|
||||
|
||||
//! Calculates the distance with a close point.
|
||||
//! The close point is defined by the parameter value
|
||||
//! U0.
|
||||
//! The function F(u)=distance(P,C(u)) has an extremum
|
||||
//! when g(u)=dF/du=0. The algorithm searches a zero
|
||||
//! near the close point.
|
||||
//! TolU is used to decide to stop the iterations.
|
||||
//! At the nth iteration, the criteria is:
|
||||
//! abs(Un - Un-1) < TolU.
|
||||
Standard_EXPORT Geom2dInt_TheLocateExtPCOfTheProjPCurOfGInter(const gp_Pnt2d& P,
|
||||
const Adaptor2d_Curve2d& C,
|
||||
const Standard_Real U0,
|
||||
const Standard_Real TolU);
|
||||
|
||||
//! Calculates the distance with a close point.
|
||||
//! The close point is defined by the parameter value
|
||||
//! U0.
|
||||
//! The function F(u)=distance(P,C(u)) has an extremum
|
||||
//! when g(u)=dF/du=0. The algorithm searches a zero
|
||||
//! near the close point.
|
||||
//! Zeros are searched between Umin et Usup.
|
||||
//! TolU is used to decide to stop the iterations.
|
||||
//! At the nth iteration, the criteria is:
|
||||
//! abs(Un - Un-1) < TolU.
|
||||
Standard_EXPORT Geom2dInt_TheLocateExtPCOfTheProjPCurOfGInter(const gp_Pnt2d& P,
|
||||
const Adaptor2d_Curve2d& C,
|
||||
const Standard_Real U0,
|
||||
const Standard_Real Umin,
|
||||
const Standard_Real Usup,
|
||||
const Standard_Real TolU);
|
||||
|
||||
//! sets the fields of the algorithm.
|
||||
Standard_EXPORT void Initialize(const Adaptor2d_Curve2d& C,
|
||||
const Standard_Real Umin,
|
||||
const Standard_Real Usup,
|
||||
const Standard_Real TolU);
|
||||
|
||||
//! the algorithm is done with the point P.
|
||||
//! An exception is raised if the fields have not
|
||||
//! been initialized.
|
||||
Standard_EXPORT void Perform(const gp_Pnt2d& P, const Standard_Real U0);
|
||||
|
||||
//! Returns True if the distance is found.
|
||||
Standard_EXPORT Standard_Boolean IsDone() const;
|
||||
|
||||
//! Returns the value of the extremum square distance.
|
||||
Standard_EXPORT Standard_Real SquareDistance() const;
|
||||
|
||||
//! Returns True if the extremum distance is a minimum.
|
||||
Standard_EXPORT Standard_Boolean IsMin() const;
|
||||
|
||||
//! Returns the point of the extremum distance.
|
||||
Standard_EXPORT const Extrema_POnCurv2d& Point() const;
|
||||
|
||||
protected:
|
||||
private:
|
||||
Standard_Boolean myDone;
|
||||
Standard_Real mytolU;
|
||||
Standard_Real myumin;
|
||||
Standard_Real myusup;
|
||||
Geom2dInt_PCLocFOfTheLocateExtPCOfTheProjPCurOfGInter myF;
|
||||
};
|
||||
//! Type alias for Geom2dInt local extremum search.
|
||||
using Geom2dInt_TheLocateExtPCOfTheProjPCurOfGInter =
|
||||
Extrema_GenLocateExtPC<Adaptor2d_Curve2d,
|
||||
Geom2dInt_Geom2dCurveTool,
|
||||
Extrema_POnCurv2d,
|
||||
gp_Pnt2d,
|
||||
Geom2dInt_PCLocFOfTheLocateExtPCOfTheProjPCurOfGInter>;
|
||||
|
||||
#endif // _Geom2dInt_TheLocateExtPCOfTheProjPCurOfGInter_HeaderFile
|
||||
|
||||
-48
@@ -1,48 +0,0 @@
|
||||
// Created on: 1992-06-04
|
||||
// Created by: Jacques GOUSSARD
|
||||
// Copyright (c) 1992-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.
|
||||
|
||||
#include <Geom2dInt_TheLocateExtPCOfTheProjPCurOfGInter.hxx>
|
||||
|
||||
#include <Standard_DomainError.hxx>
|
||||
#include <Standard_TypeMismatch.hxx>
|
||||
#include <StdFail_NotDone.hxx>
|
||||
#include <Adaptor2d_Curve2d.hxx>
|
||||
#include <Geom2dInt_Geom2dCurveTool.hxx>
|
||||
#include <Extrema_POnCurv2d.hxx>
|
||||
#include <gp_Pnt2d.hxx>
|
||||
#include <gp_Vec2d.hxx>
|
||||
#include <Geom2dInt_PCLocFOfTheLocateExtPCOfTheProjPCurOfGInter.hxx>
|
||||
#include <Extrema_SequenceOfPOnCurv2d.hxx>
|
||||
|
||||
#define Curve Adaptor2d_Curve2d
|
||||
#define Curve_hxx <Adaptor2d_Curve2d.hxx>
|
||||
#define Tool Geom2dInt_Geom2dCurveTool
|
||||
#define Tool_hxx <Geom2dInt_Geom2dCurveTool.hxx>
|
||||
#define POnC Extrema_POnCurv2d
|
||||
#define POnC_hxx <Extrema_POnCurv2d.hxx>
|
||||
#define Pnt gp_Pnt2d
|
||||
#define Pnt_hxx <gp_Pnt2d.hxx>
|
||||
#define Vec gp_Vec2d
|
||||
#define Vec_hxx <gp_Vec2d.hxx>
|
||||
#define Extrema_PCLocF Geom2dInt_PCLocFOfTheLocateExtPCOfTheProjPCurOfGInter
|
||||
#define Extrema_PCLocF_hxx <Geom2dInt_PCLocFOfTheLocateExtPCOfTheProjPCurOfGInter.hxx>
|
||||
#define Extrema_SeqPCOfPCLocF Extrema_SequenceOfPOnCurv2d
|
||||
#define Extrema_SeqPCOfPCLocF_hxx <Extrema_SequenceOfPOnCurv2d.hxx>
|
||||
#define Extrema_SeqPCOfPCLocF Extrema_SequenceOfPOnCurv2d
|
||||
#define Extrema_SeqPCOfPCLocF_hxx <Extrema_SequenceOfPOnCurv2d.hxx>
|
||||
#define Extrema_GenLocateExtPC Geom2dInt_TheLocateExtPCOfTheProjPCurOfGInter
|
||||
#define Extrema_GenLocateExtPC_hxx <Geom2dInt_TheLocateExtPCOfTheProjPCurOfGInter.hxx>
|
||||
#include <Extrema_GenLocateExtPC.gxx>
|
||||
@@ -17,14 +17,12 @@
|
||||
#ifndef _Geom2dInt_TheProjPCurOfGInter_HeaderFile
|
||||
#define _Geom2dInt_TheProjPCurOfGInter_HeaderFile
|
||||
|
||||
#include <Geom2dInt_TheCurveLocatorOfTheProjPCurOfGInter.hxx>
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
|
||||
class Adaptor2d_Curve2d;
|
||||
class Geom2dInt_Geom2dCurveTool;
|
||||
class Geom2dInt_TheCurveLocatorOfTheProjPCurOfGInter;
|
||||
class Geom2dInt_TheLocateExtPCOfTheProjPCurOfGInter;
|
||||
class Geom2dInt_PCLocFOfTheLocateExtPCOfTheProjPCurOfGInter;
|
||||
class gp_Pnt2d;
|
||||
|
||||
class Geom2dInt_TheProjPCurOfGInter
|
||||
|
||||
@@ -75,7 +75,6 @@ set(OCCT_HLRBRep_FILES
|
||||
HLRBRep_MyImpParToolOfTheIntersectorOfTheIntConicCurveOfCInter.hxx
|
||||
HLRBRep_MyImpParToolOfTheIntersectorOfTheIntConicCurveOfCInter_0.cxx
|
||||
HLRBRep_PCLocFOfTheLocateExtPCOfTheProjPCurOfCInter.hxx
|
||||
HLRBRep_PCLocFOfTheLocateExtPCOfTheProjPCurOfCInter_0.cxx
|
||||
HLRBRep_PolyAlgo.cxx
|
||||
HLRBRep_PolyAlgo.hxx
|
||||
HLRBRep_PolyHLRToShape.cxx
|
||||
@@ -100,7 +99,6 @@ set(OCCT_HLRBRep_FILES
|
||||
HLRBRep_TheCSFunctionOfInterCSurf.hxx
|
||||
HLRBRep_TheCSFunctionOfInterCSurf_0.cxx
|
||||
HLRBRep_TheCurveLocatorOfTheProjPCurOfCInter.hxx
|
||||
HLRBRep_TheCurveLocatorOfTheProjPCurOfCInter_0.cxx
|
||||
HLRBRep_TheDistBetweenPCurvesOfTheIntPCurvePCurveOfCInter.hxx
|
||||
HLRBRep_TheDistBetweenPCurvesOfTheIntPCurvePCurveOfCInter_0.cxx
|
||||
HLRBRep_TheExactInterCSurf.hxx
|
||||
@@ -114,7 +112,6 @@ set(OCCT_HLRBRep_FILES
|
||||
HLRBRep_TheIntPCurvePCurveOfCInter.hxx
|
||||
HLRBRep_TheIntPCurvePCurveOfCInter_0.cxx
|
||||
HLRBRep_TheLocateExtPCOfTheProjPCurOfCInter.hxx
|
||||
HLRBRep_TheLocateExtPCOfTheProjPCurOfCInter_0.cxx
|
||||
HLRBRep_ThePolygon2dOfTheIntPCurvePCurveOfCInter.hxx
|
||||
HLRBRep_ThePolygon2dOfTheIntPCurvePCurveOfCInter_0.cxx
|
||||
HLRBRep_ThePolygonOfInterCSurf.hxx
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#ifndef _HLRBRep_CInter_HeaderFile
|
||||
#define _HLRBRep_CInter_HeaderFile
|
||||
|
||||
#include <HLRBRep_TheCurveLocatorOfTheProjPCurOfCInter.hxx>
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
|
||||
@@ -29,8 +30,6 @@
|
||||
class Standard_ConstructionError;
|
||||
class HLRBRep_CurveTool;
|
||||
class HLRBRep_TheProjPCurOfCInter;
|
||||
class HLRBRep_TheCurveLocatorOfTheProjPCurOfCInter;
|
||||
class HLRBRep_TheLocateExtPCOfTheProjPCurOfCInter;
|
||||
class HLRBRep_TheIntConicCurveOfCInter;
|
||||
class HLRBRep_TheIntersectorOfTheIntConicCurveOfCInter;
|
||||
class HLRBRep_IntConicCurveOfCInter;
|
||||
|
||||
+14
-84
@@ -17,91 +17,21 @@
|
||||
#ifndef _HLRBRep_PCLocFOfTheLocateExtPCOfTheProjPCurOfCInter_HeaderFile
|
||||
#define _HLRBRep_PCLocFOfTheLocateExtPCOfTheProjPCurOfCInter_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <gp_Pnt2d.hxx>
|
||||
#include <TColStd_SequenceOfReal.hxx>
|
||||
#include <TColStd_SequenceOfInteger.hxx>
|
||||
#include <Extrema_GFuncExtPC.hxx>
|
||||
#include <Extrema_POnCurv2d.hxx>
|
||||
#include <Extrema_SequenceOfPOnCurv2d.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <math_FunctionWithDerivative.hxx>
|
||||
class Standard_OutOfRange;
|
||||
class Standard_TypeMismatch;
|
||||
class HLRBRep_CurveTool;
|
||||
class Extrema_POnCurv2d;
|
||||
class gp_Pnt2d;
|
||||
class gp_Vec2d;
|
||||
#include <gp_Pnt2d.hxx>
|
||||
#include <gp_Vec2d.hxx>
|
||||
#include <HLRBRep_CurveTool.hxx>
|
||||
#include <Standard_TypeDef.hxx>
|
||||
|
||||
class HLRBRep_PCLocFOfTheLocateExtPCOfTheProjPCurOfCInter : public math_FunctionWithDerivative
|
||||
{
|
||||
public:
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
Standard_EXPORT HLRBRep_PCLocFOfTheLocateExtPCOfTheProjPCurOfCInter();
|
||||
|
||||
Standard_EXPORT HLRBRep_PCLocFOfTheLocateExtPCOfTheProjPCurOfCInter(const gp_Pnt2d& P,
|
||||
const Standard_Address& C);
|
||||
|
||||
//! sets the field mycurve of the function.
|
||||
Standard_EXPORT void Initialize(const Standard_Address& C);
|
||||
|
||||
//! sets the field P of the function.
|
||||
Standard_EXPORT void SetPoint(const gp_Pnt2d& P);
|
||||
|
||||
//! Calculation of F(U).
|
||||
Standard_EXPORT Standard_Boolean Value(const Standard_Real U, Standard_Real& F) Standard_OVERRIDE;
|
||||
|
||||
//! Calculation of F'(U).
|
||||
Standard_EXPORT Standard_Boolean Derivative(const Standard_Real U,
|
||||
Standard_Real& DF) Standard_OVERRIDE;
|
||||
|
||||
//! Calculation of F(U) and F'(U).
|
||||
Standard_EXPORT Standard_Boolean Values(const Standard_Real U,
|
||||
Standard_Real& F,
|
||||
Standard_Real& DF) Standard_OVERRIDE;
|
||||
|
||||
//! Save the found extremum.
|
||||
Standard_EXPORT virtual Standard_Integer GetStateNumber() Standard_OVERRIDE;
|
||||
|
||||
//! Return the number of found extrema.
|
||||
Standard_EXPORT Standard_Integer NbExt() const;
|
||||
|
||||
//! Returns the Nth distance.
|
||||
Standard_EXPORT Standard_Real SquareDistance(const Standard_Integer N) const;
|
||||
|
||||
//! Shows if the Nth distance is a minimum.
|
||||
Standard_EXPORT Standard_Boolean IsMin(const Standard_Integer N) const;
|
||||
|
||||
//! Returns the Nth extremum.
|
||||
Standard_EXPORT const Extrema_POnCurv2d& Point(const Standard_Integer N) const;
|
||||
|
||||
//! Determines boundaries of subinterval for find of root.
|
||||
Standard_EXPORT void SubIntervalInitialize(const Standard_Real theUfirst,
|
||||
const Standard_Real theUlast);
|
||||
|
||||
//! Computes a Tol value. If 1st derivative of curve
|
||||
//! |D1|<Tol, it is considered D1=0.
|
||||
Standard_EXPORT Standard_Real SearchOfTolerance();
|
||||
|
||||
protected:
|
||||
private:
|
||||
gp_Pnt2d myP;
|
||||
Standard_Address myC;
|
||||
Standard_Real myU;
|
||||
gp_Pnt2d myPc;
|
||||
Standard_Real myD1f;
|
||||
TColStd_SequenceOfReal mySqDist;
|
||||
TColStd_SequenceOfInteger myIsMin;
|
||||
Extrema_SequenceOfPOnCurv2d myPoint;
|
||||
Standard_Boolean myPinit;
|
||||
Standard_Boolean myCinit;
|
||||
Standard_Boolean myD1Init;
|
||||
Standard_Real myTol;
|
||||
Standard_Integer myMaxDerivOrder;
|
||||
Standard_Real myUinfium;
|
||||
Standard_Real myUsupremum;
|
||||
};
|
||||
//! Type alias for 2D curve extremum function using HLRBRep_CurveTool.
|
||||
using HLRBRep_PCLocFOfTheLocateExtPCOfTheProjPCurOfCInter =
|
||||
Extrema_GFuncExtPC<Standard_Address,
|
||||
HLRBRep_CurveTool,
|
||||
Extrema_POnCurv2d,
|
||||
gp_Pnt2d,
|
||||
gp_Vec2d,
|
||||
Extrema_SequenceOfPOnCurv2d>;
|
||||
|
||||
#endif // _HLRBRep_PCLocFOfTheLocateExtPCOfTheProjPCurOfCInter_HeaderFile
|
||||
|
||||
-41
@@ -1,41 +0,0 @@
|
||||
// Created on: 1992-10-14
|
||||
// Created by: Christophe MARION
|
||||
// Copyright (c) 1992-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.
|
||||
|
||||
#include <HLRBRep_PCLocFOfTheLocateExtPCOfTheProjPCurOfCInter.hxx>
|
||||
|
||||
#include <Standard_OutOfRange.hxx>
|
||||
#include <Standard_TypeMismatch.hxx>
|
||||
#include <HLRBRep_CurveTool.hxx>
|
||||
#include <Extrema_POnCurv2d.hxx>
|
||||
#include <gp_Pnt2d.hxx>
|
||||
#include <gp_Vec2d.hxx>
|
||||
#include <Extrema_SequenceOfPOnCurv2d.hxx>
|
||||
|
||||
#define Curve Standard_Address
|
||||
#define Curve_hxx <Standard_Address.hxx>
|
||||
#define Tool HLRBRep_CurveTool
|
||||
#define Tool_hxx <HLRBRep_CurveTool.hxx>
|
||||
#define POnC Extrema_POnCurv2d
|
||||
#define POnC_hxx <Extrema_POnCurv2d.hxx>
|
||||
#define Pnt gp_Pnt2d
|
||||
#define Pnt_hxx <gp_Pnt2d.hxx>
|
||||
#define Vec gp_Vec2d
|
||||
#define Vec_hxx <gp_Vec2d.hxx>
|
||||
#define Extrema_SeqPC Extrema_SequenceOfPOnCurv2d
|
||||
#define Extrema_SeqPC_hxx <Extrema_SequenceOfPOnCurv2d.hxx>
|
||||
#define Extrema_FuncExtPC HLRBRep_PCLocFOfTheLocateExtPCOfTheProjPCurOfCInter
|
||||
#define Extrema_FuncExtPC_hxx <HLRBRep_PCLocFOfTheLocateExtPCOfTheProjPCurOfCInter.hxx>
|
||||
#include <Extrema_FuncExtPC.gxx>
|
||||
+8
-46
@@ -17,52 +17,14 @@
|
||||
#ifndef _HLRBRep_TheCurveLocatorOfTheProjPCurOfCInter_HeaderFile
|
||||
#define _HLRBRep_TheCurveLocatorOfTheProjPCurOfCInter_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
#include <Extrema_GCurveLocator.hxx>
|
||||
#include <Extrema_POnCurv2d.hxx>
|
||||
#include <gp_Pnt2d.hxx>
|
||||
#include <HLRBRep_CurveTool.hxx>
|
||||
#include <Standard_TypeDef.hxx>
|
||||
|
||||
#include <Standard_Real.hxx>
|
||||
class HLRBRep_CurveTool;
|
||||
class Extrema_POnCurv2d;
|
||||
class gp_Pnt2d;
|
||||
|
||||
class HLRBRep_TheCurveLocatorOfTheProjPCurOfCInter
|
||||
{
|
||||
public:
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
//! Among a set of points {C(ui),i=1,NbU}, locate the point
|
||||
//! P=C(uj) such that:
|
||||
//! distance(P,C) = Min{distance(P,C(ui))}
|
||||
Standard_EXPORT static void Locate(const gp_Pnt2d& P,
|
||||
const Standard_Address& C,
|
||||
const Standard_Integer NbU,
|
||||
Extrema_POnCurv2d& Papp);
|
||||
|
||||
//! Among a set of points {C(ui),i=1,NbU}, locate the point
|
||||
//! P=C(uj) such that:
|
||||
//! distance(P,C) = Min{distance(P,C(ui))}
|
||||
//! The research is done between umin and usup.
|
||||
Standard_EXPORT static void Locate(const gp_Pnt2d& P,
|
||||
const Standard_Address& C,
|
||||
const Standard_Integer NbU,
|
||||
const Standard_Real Umin,
|
||||
const Standard_Real Usup,
|
||||
Extrema_POnCurv2d& Papp);
|
||||
|
||||
//! Among two sets of points {C1(ui),i=1,NbU} and
|
||||
//! {C2(vj),j=1,NbV}, locate the two points P1=C1(uk) and
|
||||
//! P2=C2(vl) such that:
|
||||
//! distance(P1,P2) = Min {distance(C1(ui),C2(vj))}.
|
||||
Standard_EXPORT static void Locate(const Standard_Address& C1,
|
||||
const Standard_Address& C2,
|
||||
const Standard_Integer NbU,
|
||||
const Standard_Integer NbV,
|
||||
Extrema_POnCurv2d& Papp1,
|
||||
Extrema_POnCurv2d& Papp2);
|
||||
|
||||
protected:
|
||||
private:
|
||||
};
|
||||
//! Type alias for curve locator using HLRBRep_CurveTool.
|
||||
using HLRBRep_TheCurveLocatorOfTheProjPCurOfCInter =
|
||||
Extrema_GCurveLocator<Standard_Address, HLRBRep_CurveTool, Extrema_POnCurv2d, gp_Pnt2d>;
|
||||
|
||||
#endif // _HLRBRep_TheCurveLocatorOfTheProjPCurOfCInter_HeaderFile
|
||||
|
||||
-37
@@ -1,37 +0,0 @@
|
||||
// Created on: 1992-10-14
|
||||
// Created by: Christophe MARION
|
||||
// Copyright (c) 1992-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.
|
||||
|
||||
#include <HLRBRep_TheCurveLocatorOfTheProjPCurOfCInter.hxx>
|
||||
|
||||
#include <HLRBRep_CurveTool.hxx>
|
||||
#include <Extrema_POnCurv2d.hxx>
|
||||
#include <gp_Pnt2d.hxx>
|
||||
|
||||
#define Curve1 Standard_Address
|
||||
#define Curve1_hxx <Standard_Address.hxx>
|
||||
#define Tool1 HLRBRep_CurveTool
|
||||
#define Tool1_hxx <HLRBRep_CurveTool.hxx>
|
||||
#define Curve2 Standard_Address
|
||||
#define Curve2_hxx <Standard_Address.hxx>
|
||||
#define Tool2 HLRBRep_CurveTool
|
||||
#define Tool2_hxx <HLRBRep_CurveTool.hxx>
|
||||
#define POnC Extrema_POnCurv2d
|
||||
#define POnC_hxx <Extrema_POnCurv2d.hxx>
|
||||
#define Pnt gp_Pnt2d
|
||||
#define Pnt_hxx <gp_Pnt2d.hxx>
|
||||
#define Extrema_CurveLocator HLRBRep_TheCurveLocatorOfTheProjPCurOfCInter
|
||||
#define Extrema_CurveLocator_hxx <HLRBRep_TheCurveLocatorOfTheProjPCurOfCInter.hxx>
|
||||
#include <Extrema_CurveLocator.gxx>
|
||||
+12
-77
@@ -17,84 +17,19 @@
|
||||
#ifndef _HLRBRep_TheLocateExtPCOfTheProjPCurOfCInter_HeaderFile
|
||||
#define _HLRBRep_TheLocateExtPCOfTheProjPCurOfCInter_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <Extrema_GenLocateExtPC.hxx>
|
||||
#include <Extrema_POnCurv2d.hxx>
|
||||
#include <gp_Pnt2d.hxx>
|
||||
#include <HLRBRep_CurveTool.hxx>
|
||||
#include <HLRBRep_PCLocFOfTheLocateExtPCOfTheProjPCurOfCInter.hxx>
|
||||
class Standard_DomainError;
|
||||
class Standard_TypeMismatch;
|
||||
class StdFail_NotDone;
|
||||
class HLRBRep_CurveTool;
|
||||
class Extrema_POnCurv2d;
|
||||
class gp_Pnt2d;
|
||||
class gp_Vec2d;
|
||||
class HLRBRep_PCLocFOfTheLocateExtPCOfTheProjPCurOfCInter;
|
||||
#include <Standard_TypeDef.hxx>
|
||||
|
||||
class HLRBRep_TheLocateExtPCOfTheProjPCurOfCInter
|
||||
{
|
||||
public:
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
Standard_EXPORT HLRBRep_TheLocateExtPCOfTheProjPCurOfCInter();
|
||||
|
||||
//! Calculates the distance with a close point.
|
||||
//! The close point is defined by the parameter value U0.
|
||||
//! The function F(u)=distance(P,C(u)) has an extremum when g(u)=dF/du=0.
|
||||
//! The algorithm searches a zero near the close point.
|
||||
//! TolU is used to decide to stop the iterations.
|
||||
//! At the nth iteration, the criteria is:
|
||||
//! abs(Un - Un-1) < TolU.
|
||||
Standard_EXPORT HLRBRep_TheLocateExtPCOfTheProjPCurOfCInter(const gp_Pnt2d& P,
|
||||
const Standard_Address& C,
|
||||
const Standard_Real U0,
|
||||
const Standard_Real TolU);
|
||||
|
||||
//! Calculates the distance with a close point.
|
||||
//! The close point is defined by the parameter value U0.
|
||||
//! The function F(u)=distance(P,C(u)) has an extremum when g(u)=dF/du=0.
|
||||
//! The algorithm searches a zero near the close point.
|
||||
//! Zeros are searched between Umin and Usup.
|
||||
//! TolU is used to decide to stop the iterations.
|
||||
//! At the nth iteration, the criteria is:
|
||||
//! abs(Un - Un-1) < TolU.
|
||||
Standard_EXPORT HLRBRep_TheLocateExtPCOfTheProjPCurOfCInter(const gp_Pnt2d& P,
|
||||
const Standard_Address& C,
|
||||
const Standard_Real U0,
|
||||
const Standard_Real Umin,
|
||||
const Standard_Real Usup,
|
||||
const Standard_Real TolU);
|
||||
|
||||
//! sets the fields of the algorithm.
|
||||
Standard_EXPORT void Initialize(const Standard_Address& C,
|
||||
const Standard_Real Umin,
|
||||
const Standard_Real Usup,
|
||||
const Standard_Real TolU);
|
||||
|
||||
//! the algorithm is done with the point P.
|
||||
//! An exception is raised if the fields have not
|
||||
//! been initialized.
|
||||
Standard_EXPORT void Perform(const gp_Pnt2d& P, const Standard_Real U0);
|
||||
|
||||
//! Returns True if the distance is found.
|
||||
Standard_EXPORT Standard_Boolean IsDone() const;
|
||||
|
||||
//! Returns the value of the extremum square distance.
|
||||
Standard_EXPORT Standard_Real SquareDistance() const;
|
||||
|
||||
//! Returns True if the extremum distance is a minimum.
|
||||
Standard_EXPORT Standard_Boolean IsMin() const;
|
||||
|
||||
//! Returns the point of the extremum distance.
|
||||
Standard_EXPORT const Extrema_POnCurv2d& Point() const;
|
||||
|
||||
private:
|
||||
Standard_Boolean myDone;
|
||||
Standard_Real mytolU;
|
||||
Standard_Real myumin;
|
||||
Standard_Real myusup;
|
||||
HLRBRep_PCLocFOfTheLocateExtPCOfTheProjPCurOfCInter myF;
|
||||
};
|
||||
//! Type alias for HLRBRep local extremum search.
|
||||
using HLRBRep_TheLocateExtPCOfTheProjPCurOfCInter =
|
||||
Extrema_GenLocateExtPC<Standard_Address,
|
||||
HLRBRep_CurveTool,
|
||||
Extrema_POnCurv2d,
|
||||
gp_Pnt2d,
|
||||
HLRBRep_PCLocFOfTheLocateExtPCOfTheProjPCurOfCInter>;
|
||||
|
||||
#endif // _HLRBRep_TheLocateExtPCOfTheProjPCurOfCInter_HeaderFile
|
||||
|
||||
-47
@@ -1,47 +0,0 @@
|
||||
// Created on: 1992-10-14
|
||||
// Created by: Christophe MARION
|
||||
// Copyright (c) 1992-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.
|
||||
|
||||
#include <HLRBRep_TheLocateExtPCOfTheProjPCurOfCInter.hxx>
|
||||
|
||||
#include <Standard_DomainError.hxx>
|
||||
#include <Standard_TypeMismatch.hxx>
|
||||
#include <StdFail_NotDone.hxx>
|
||||
#include <HLRBRep_CurveTool.hxx>
|
||||
#include <Extrema_POnCurv2d.hxx>
|
||||
#include <gp_Pnt2d.hxx>
|
||||
#include <gp_Vec2d.hxx>
|
||||
#include <HLRBRep_PCLocFOfTheLocateExtPCOfTheProjPCurOfCInter.hxx>
|
||||
#include <Extrema_SequenceOfPOnCurv2d.hxx>
|
||||
|
||||
#define Curve Standard_Address
|
||||
#define Curve_hxx <Standard_Address.hxx>
|
||||
#define Tool HLRBRep_CurveTool
|
||||
#define Tool_hxx <HLRBRep_CurveTool.hxx>
|
||||
#define POnC Extrema_POnCurv2d
|
||||
#define POnC_hxx <Extrema_POnCurv2d.hxx>
|
||||
#define Pnt gp_Pnt2d
|
||||
#define Pnt_hxx <gp_Pnt2d.hxx>
|
||||
#define Vec gp_Vec2d
|
||||
#define Vec_hxx <gp_Vec2d.hxx>
|
||||
#define Extrema_PCLocF HLRBRep_PCLocFOfTheLocateExtPCOfTheProjPCurOfCInter
|
||||
#define Extrema_PCLocF_hxx <HLRBRep_PCLocFOfTheLocateExtPCOfTheProjPCurOfCInter.hxx>
|
||||
#define Extrema_SeqPCOfPCLocF Extrema_SequenceOfPOnCurv2d
|
||||
#define Extrema_SeqPCOfPCLocF_hxx <Extrema_SequenceOfPOnCurv2d.hxx>
|
||||
#define Extrema_SeqPCOfPCLocF Extrema_SequenceOfPOnCurv2d
|
||||
#define Extrema_SeqPCOfPCLocF_hxx <Extrema_SequenceOfPOnCurv2d.hxx>
|
||||
#define Extrema_GenLocateExtPC HLRBRep_TheLocateExtPCOfTheProjPCurOfCInter
|
||||
#define Extrema_GenLocateExtPC_hxx <HLRBRep_TheLocateExtPCOfTheProjPCurOfCInter.hxx>
|
||||
#include <Extrema_GenLocateExtPC.gxx>
|
||||
@@ -17,15 +17,13 @@
|
||||
#ifndef _HLRBRep_TheProjPCurOfCInter_HeaderFile
|
||||
#define _HLRBRep_TheProjPCurOfCInter_HeaderFile
|
||||
|
||||
#include <HLRBRep_TheCurveLocatorOfTheProjPCurOfCInter.hxx>
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Real.hxx>
|
||||
class HLRBRep_CurveTool;
|
||||
class HLRBRep_TheCurveLocatorOfTheProjPCurOfCInter;
|
||||
class HLRBRep_TheLocateExtPCOfTheProjPCurOfCInter;
|
||||
class HLRBRep_PCLocFOfTheLocateExtPCOfTheProjPCurOfCInter;
|
||||
class gp_Pnt2d;
|
||||
|
||||
class HLRBRep_TheProjPCurOfCInter
|
||||
|
||||
Reference in New Issue
Block a user