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

0024002: Overall code and build procedure refactoring -- automatic

Automatic upgrade of OCCT code by command "occt_upgrade . -nocdl":
- WOK-generated header files from inc and sources from drv are moved to src
- CDL files removed
- All packages are converted to nocdlpack
This commit is contained in:
abv
2015-07-12 07:42:38 +03:00
parent 543a996496
commit 42cf5bc1ca
15354 changed files with 623957 additions and 509844 deletions

12
src/Geom2dLProp/FILES Normal file
View File

@@ -0,0 +1,12 @@
Geom2dLProp_CLProps2d.hxx
Geom2dLProp_CLProps2d_0.cxx
Geom2dLProp_CurAndInf2d.cxx
Geom2dLProp_CurAndInf2d.hxx
Geom2dLProp_Curve2dTool.cxx
Geom2dLProp_Curve2dTool.hxx
Geom2dLProp_FuncCurExt.cxx
Geom2dLProp_FuncCurExt.hxx
Geom2dLProp_FuncCurNul.cxx
Geom2dLProp_FuncCurNul.hxx
Geom2dLProp_NumericCurInf2d.cxx
Geom2dLProp_NumericCurInf2d.hxx

View File

@@ -1,49 +0,0 @@
-- Created on: 1992-03-26
-- Created by: Herve LEGRAND
-- 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.
package Geom2dLProp
---Purpose: Handles local properties of curves and surfaces from the
-- packages Geom and Geom2d.
-- SeeAlso: Package LProp.
---Level : Public.
-- All methods of all classes will be public.
uses Standard, gp, Geom2d, LProp
is
class Curve2dTool;
class CLProps2d from Geom2dLProp instantiates
CLProps from LProp(Curve from Geom2d,
Vec2d from gp,
Pnt2d from gp,
Dir2d from gp,
Curve2dTool from Geom2dLProp);
class CurAndInf2d;
private class FuncCurExt;
private class FuncCurNul;
class NumericCurInf2d;
end Geom2dLProp;

View File

@@ -0,0 +1,112 @@
// Created on: 1992-03-26
// Created by: Herve LEGRAND
// 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.
#ifndef _Geom2dLProp_CLProps2d_HeaderFile
#define _Geom2dLProp_CLProps2d_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Real.hxx>
#include <Standard_Integer.hxx>
#include <gp_Pnt2d.hxx>
#include <gp_Vec2d.hxx>
#include <gp_Dir2d.hxx>
#include <LProp_Status.hxx>
#include <Standard_Boolean.hxx>
class Geom2d_Curve;
class LProp_BadContinuity;
class Standard_DomainError;
class Standard_OutOfRange;
class LProp_NotDefined;
class gp_Vec2d;
class gp_Pnt2d;
class gp_Dir2d;
class Geom2dLProp_Curve2dTool;
class Geom2dLProp_CLProps2d
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT Geom2dLProp_CLProps2d(const Handle(Geom2d_Curve)& C, const Standard_Integer N, const Standard_Real Resolution);
Standard_EXPORT Geom2dLProp_CLProps2d(const Handle(Geom2d_Curve)& C, const Standard_Real U, const Standard_Integer N, const Standard_Real Resolution);
Standard_EXPORT Geom2dLProp_CLProps2d(const Standard_Integer N, const Standard_Real Resolution);
Standard_EXPORT void SetParameter (const Standard_Real U);
Standard_EXPORT void SetCurve (const Handle(Geom2d_Curve)& C);
Standard_EXPORT const gp_Pnt2d& Value() const;
Standard_EXPORT const gp_Vec2d& D1();
Standard_EXPORT const gp_Vec2d& D2();
Standard_EXPORT const gp_Vec2d& D3();
Standard_EXPORT Standard_Boolean IsTangentDefined();
Standard_EXPORT void Tangent (gp_Dir2d& D);
Standard_EXPORT Standard_Real Curvature();
Standard_EXPORT void Normal (gp_Dir2d& N);
Standard_EXPORT void CentreOfCurvature (gp_Pnt2d& P);
protected:
private:
Handle(Geom2d_Curve) myCurve;
Standard_Real myU;
Standard_Integer myDerOrder;
Standard_Real myCN;
Standard_Real myLinTol;
gp_Pnt2d myPnt;
gp_Vec2d myDerivArr[3];
gp_Dir2d myTangent;
Standard_Real myCurvature;
LProp_Status myTangentStatus;
Standard_Integer mySignificantFirstDerivativeOrder;
};
#endif // _Geom2dLProp_CLProps2d_HeaderFile

View File

@@ -0,0 +1,43 @@
// Created on: 1992-03-26
// Created by: Herve LEGRAND
// 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 <Geom2dLProp_CLProps2d.hxx>
#include <Geom2d_Curve.hxx>
#include <LProp_BadContinuity.hxx>
#include <Standard_DomainError.hxx>
#include <Standard_OutOfRange.hxx>
#include <LProp_NotDefined.hxx>
#include <gp_Vec2d.hxx>
#include <gp_Pnt2d.hxx>
#include <gp_Dir2d.hxx>
#include <Geom2dLProp_Curve2dTool.hxx>
#define Curve Handle(Geom2d_Curve)
#define Curve_hxx <Geom2d_Curve.hxx>
#define Vec gp_Vec2d
#define Vec_hxx <gp_Vec2d.hxx>
#define Pnt gp_Pnt2d
#define Pnt_hxx <gp_Pnt2d.hxx>
#define Dir gp_Dir2d
#define Dir_hxx <gp_Dir2d.hxx>
#define Tool Geom2dLProp_Curve2dTool
#define Tool_hxx <Geom2dLProp_Curve2dTool.hxx>
#define LProp_CLProps Geom2dLProp_CLProps2d
#define LProp_CLProps_hxx <Geom2dLProp_CLProps2d.hxx>
#include <LProp_CLProps.gxx>

View File

@@ -1,69 +0,0 @@
-- Created on: 1994-09-06
-- Created by: Yves FRICAUD
-- Copyright (c) 1994-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.
class CurAndInf2d from Geom2dLProp inherits CurAndInf from LProp
---Purpose: An algorithm for computing local properties of a curve.
-- These properties include:
-- - the maximum and minimum curvatures
-- - the inflection points.
-- A CurAndInf2d object provides the framework for:
-- - defining the curve to be analyzed
-- - implementing the computation algorithms
-- - consulting the results.
uses
Curve from Geom2d
is
Create;
--- Purpose: Initializes the framework.
-- Note: The curve on which the local properties are
-- computed is defined using one of the following
-- functions: Perform, PerformCurExt or PerformInf.
Perform (me : in out; C : Curve)
---Purpose: For the curve C, Computes both the
-- inflection points and the maximum and minimum curvatures.
is static;
PerformCurExt (me : in out; C : Curve)
---Purpose: For the curve C, Computes the locals extremas of curvature.
is static;
PerformInf (me : in out; C : Curve)
---Purpose: For the curve C, Computes the inflections.
-- After computation, the following functions can be used:
-- - IsDone to check if the computation was successful
-- - NbPoints to obtain the number of computed particular points
-- - Parameter to obtain the parameter on the curve for
-- each particular point
-- - Type to check if the point is an inflection point or an
-- extremum of curvature of the curve C.
-- Warning
-- These functions can be used to analyze a series of
-- curves, however it is necessary to clear the table of
-- results between each computation.
is static;
IsDone (me) returns Boolean
---Purpose: True if the solutions are found.
is static;
fields
isDone : Boolean from Standard;
end CurAndInf2d;

View File

@@ -14,19 +14,19 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Geom2dLProp_CurAndInf2d.ixx>
#include <Geom2dLProp_NumericCurInf2d.hxx>
#include <Geom2d_Curve.hxx>
#include <Geom2dAdaptor_Curve.hxx>
#include <LProp_AnalyticCurInf.hxx>
#include <gp_Lin2d.hxx>
#include <Geom2dLProp_CurAndInf2d.hxx>
#include <Geom2dLProp_NumericCurInf2d.hxx>
#include <gp_Circ2d.hxx>
#include <gp_Elips2d.hxx>
#include <gp_Hypr2d.hxx>
#include <gp_Lin2d.hxx>
#include <gp_Parab2d.hxx>
#include <LProp_AnalyticCurInf.hxx>
#include <TColStd_Array1OfReal.hxx>
//=======================================================================
//function : Geom2dLProp_CurAndInf2d
//purpose :

View File

@@ -0,0 +1,98 @@
// Created on: 1994-09-06
// Created by: Yves FRICAUD
// Copyright (c) 1994-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 _Geom2dLProp_CurAndInf2d_HeaderFile
#define _Geom2dLProp_CurAndInf2d_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Boolean.hxx>
#include <LProp_CurAndInf.hxx>
class Geom2d_Curve;
//! An algorithm for computing local properties of a curve.
//! These properties include:
//! - the maximum and minimum curvatures
//! - the inflection points.
//! A CurAndInf2d object provides the framework for:
//! - defining the curve to be analyzed
//! - implementing the computation algorithms
//! - consulting the results.
class Geom2dLProp_CurAndInf2d : public LProp_CurAndInf
{
public:
DEFINE_STANDARD_ALLOC
//! Initializes the framework.
//! Note: The curve on which the local properties are
//! computed is defined using one of the following
//! functions: Perform, PerformCurExt or PerformInf.
Standard_EXPORT Geom2dLProp_CurAndInf2d();
//! For the curve C, Computes both the
//! inflection points and the maximum and minimum curvatures.
Standard_EXPORT void Perform (const Handle(Geom2d_Curve)& C);
//! For the curve C, Computes the locals extremas of curvature.
Standard_EXPORT void PerformCurExt (const Handle(Geom2d_Curve)& C);
//! For the curve C, Computes the inflections.
//! After computation, the following functions can be used:
//! - IsDone to check if the computation was successful
//! - NbPoints to obtain the number of computed particular points
//! - Parameter to obtain the parameter on the curve for
//! each particular point
//! - Type to check if the point is an inflection point or an
//! extremum of curvature of the curve C.
//! Warning
//! These functions can be used to analyze a series of
//! curves, however it is necessary to clear the table of
//! results between each computation.
Standard_EXPORT void PerformInf (const Handle(Geom2d_Curve)& C);
//! True if the solutions are found.
Standard_EXPORT Standard_Boolean IsDone() const;
protected:
private:
Standard_Boolean isDone;
};
#endif // _Geom2dLProp_CurAndInf2d_HeaderFile

View File

@@ -1,63 +0,0 @@
-- Created on: 1992-03-26
-- Created by: Herve LEGRAND
-- 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.
class Curve2dTool from Geom2dLProp
uses Vec2d from gp,
Pnt2d from gp,
Dir2d from gp,
Curve from Geom2d
is
Value(myclass; C : Curve from Geom2d; U : Real;
P : out Pnt2d);
---Purpose: Computes the point <P> of parameter <U> on the curve <C>.
D1 (myclass; C : Curve from Geom2d; U : Real;
P : out Pnt2d; V1 : out Vec2d);
---Purpose: Computes the point <P> and first derivative <V1> of
-- parameter <U> on the curve <C>.
D2 (myclass; C : Curve from Geom2d; U : Real;
P : out Pnt2d; V1, V2 : out Vec2d);
---Purpose: Computes the point <P>, the first derivative <V1> and second
-- derivative <V2> of parameter <U> on the curve <C>.
D3 (myclass; C : Curve from Geom2d; U : Real;
P : out Pnt2d; V1, V2, V3 : out Vec2d);
---Purpose: Computes the point <P>, the first derivative <V1>, the
-- second derivative <V2> and third derivative <V3> of
-- parameter <U> on the curve <C>.
Continuity(myclass; C : Curve from Geom2d) returns Integer;
---Purpose: returns the order of continuity of the curve <C>.
-- returns 1 : first derivative only is computable
-- returns 2 : first and second derivative only are computable.
-- returns 3 : first, second and third are computable.
FirstParameter(myclass; C : Curve from Geom2d) returns Real;
---Purpose: returns the first parameter bound of the curve.
--
LastParameter(myclass; C : Curve from Geom2d) returns Real;
---Purpose: returns the last parameter bound of the curve.
-- FirstParameter must be less than LastParameter.
end Curve2dTool;

View File

@@ -14,9 +14,12 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Geom2dLProp_Curve2dTool.ixx>
#include <Geom2d_Curve.hxx>
#include <Geom2dLProp_Curve2dTool.hxx>
#include <GeomAbs_Shape.hxx>
#include <gp_Pnt2d.hxx>
#include <gp_Vec2d.hxx>
void Geom2dLProp_Curve2dTool::Value(const Handle(Geom2d_Curve)& C,
const Standard_Real U, gp_Pnt2d& P)

View File

@@ -0,0 +1,91 @@
// Created on: 1992-03-26
// Created by: Herve LEGRAND
// 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.
#ifndef _Geom2dLProp_Curve2dTool_HeaderFile
#define _Geom2dLProp_Curve2dTool_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Real.hxx>
#include <Standard_Integer.hxx>
class Geom2d_Curve;
class gp_Pnt2d;
class gp_Vec2d;
class Geom2dLProp_Curve2dTool
{
public:
DEFINE_STANDARD_ALLOC
//! Computes the point <P> of parameter <U> on the curve <C>.
Standard_EXPORT static void Value (const Handle(Geom2d_Curve)& C, const Standard_Real U, gp_Pnt2d& P);
//! Computes the point <P> and first derivative <V1> of
//! parameter <U> on the curve <C>.
Standard_EXPORT static void D1 (const Handle(Geom2d_Curve)& C, const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& V1);
//! Computes the point <P>, the first derivative <V1> and second
//! derivative <V2> of parameter <U> on the curve <C>.
Standard_EXPORT static void D2 (const Handle(Geom2d_Curve)& C, const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2);
//! Computes the point <P>, the first derivative <V1>, the
//! second derivative <V2> and third derivative <V3> of
//! parameter <U> on the curve <C>.
Standard_EXPORT static void D3 (const Handle(Geom2d_Curve)& C, const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2, gp_Vec2d& V3);
//! returns the order of continuity of the curve <C>.
//! returns 1 : first derivative only is computable
//! returns 2 : first and second derivative only are computable.
//! returns 3 : first, second and third are computable.
Standard_EXPORT static Standard_Integer Continuity (const Handle(Geom2d_Curve)& C);
//! returns the first parameter bound of the curve.
Standard_EXPORT static Standard_Real FirstParameter (const Handle(Geom2d_Curve)& C);
//! returns the last parameter bound of the curve.
//! FirstParameter must be less than LastParameter.
Standard_EXPORT static Standard_Real LastParameter (const Handle(Geom2d_Curve)& C);
protected:
private:
};
#endif // _Geom2dLProp_Curve2dTool_HeaderFile

View File

@@ -1,52 +0,0 @@
-- Created on: 1994-09-02
-- Created by: Yves FRICAUD
-- Copyright (c) 1994-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.
private class FuncCurExt from Geom2dLProp inherits FunctionWithDerivative from math
---Purpose: Function used to find the extremas of curvature in 2d.
uses Curve from Geom2d,
Vec2d from gp,
Pnt2d from gp,
Dir2d from gp,
Curve2dTool from Geom2dLProp
is
Create ( C : Curve from Geom2d ; Tol : Real) returns FuncCurExt from Geom2dLProp;
Value (me : in out; X : Real; F : out Real)
---Purpose: Returns the value for the variable <X>.
returns Boolean;
Derivative (me : in out; X : Real; D : out Real)
---Purpose: Returns the derivative for the variable <X>.
returns Boolean;
Values (me : in out ; X : Real; F : out Real; D : out Real)
---Purpose: Returns the value of the function and the derivative
-- for the variable <X>.
returns Boolean;
IsMinKC (me ; Param : Real)
---Purpose: True if Param corresponds to a minus
-- of the radius of curvature.
returns Boolean;
fields
theCurve : Curve from Geom2d;
epsX : Real from Standard;
end FuncCurExt;

View File

@@ -14,12 +14,12 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Geom2dLProp_FuncCurExt.ixx>
#include <gp_Pnt2d.hxx>
#include <Geom2d_Curve.hxx>
#include <Geom2dLProp_Curve2dTool.hxx>
#include <Geom2dLProp_FuncCurExt.hxx>
#include <gp.hxx>
#include <gp_Pnt2d.hxx>
#include <Precision.hxx>
//=============================================================================

View File

@@ -0,0 +1,79 @@
// Created on: 1994-09-02
// Created by: Yves FRICAUD
// Copyright (c) 1994-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 _Geom2dLProp_FuncCurExt_HeaderFile
#define _Geom2dLProp_FuncCurExt_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Real.hxx>
#include <math_FunctionWithDerivative.hxx>
#include <Standard_Boolean.hxx>
class Geom2d_Curve;
//! Function used to find the extremas of curvature in 2d.
class Geom2dLProp_FuncCurExt : public math_FunctionWithDerivative
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT Geom2dLProp_FuncCurExt(const Handle(Geom2d_Curve)& C, const Standard_Real Tol);
//! Returns the value for the variable <X>.
Standard_EXPORT Standard_Boolean Value (const Standard_Real X, Standard_Real& F);
//! Returns the derivative for the variable <X>.
Standard_EXPORT Standard_Boolean Derivative (const Standard_Real X, Standard_Real& D);
//! Returns the value of the function and the derivative
//! for the variable <X>.
Standard_EXPORT Standard_Boolean Values (const Standard_Real X, Standard_Real& F, Standard_Real& D);
//! True if Param corresponds to a minus
//! of the radius of curvature.
Standard_EXPORT Standard_Boolean IsMinKC (const Standard_Real Param) const;
protected:
private:
Handle(Geom2d_Curve) theCurve;
Standard_Real epsX;
};
#endif // _Geom2dLProp_FuncCurExt_HeaderFile

View File

@@ -1,47 +0,0 @@
-- Created on: 1994-09-02
-- Created by: Yves FRICAUD
-- Copyright (c) 1994-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.
private class FuncCurNul from Geom2dLProp inherits FunctionWithDerivative from math
---Purpose: Function used to find the inflections in 2d.
uses
Curve from Geom2d,
Vec2d from gp,
Pnt2d from gp,
Dir2d from gp,
Curve2dTool from Geom2dLProp
is
Create ( C : Curve from Geom2d) returns FuncCurNul from Geom2dLProp;
Value (me : in out; X : Real; F : out Real)
---Purpose: Returns the value for the variable <X>.
returns Boolean;
Derivative(me : in out; X : Real; D : out Real)
---Purpose: Returns the derivative for the variable <X>
returns Boolean;
Values(me : in out ; X : Real; F : out Real; D : out Real)
---Purpose: Returns the value of the function and the derivative
-- for the variable <X>.
returns Boolean;
fields
theCurve : Curve from Geom2d;
end FuncCurNul;

View File

@@ -14,12 +14,12 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Geom2dLProp_FuncCurNul.ixx>
#include <gp_Pnt2d.hxx>
#include <Geom2d_Curve.hxx>
#include <Geom2dLProp_Curve2dTool.hxx>
#include <Geom2dLProp_FuncCurNul.hxx>
#include <gp.hxx>
#include <gp_Pnt2d.hxx>
#include <Precision.hxx>
//=============================================================================

View File

@@ -0,0 +1,74 @@
// Created on: 1994-09-02
// Created by: Yves FRICAUD
// Copyright (c) 1994-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 _Geom2dLProp_FuncCurNul_HeaderFile
#define _Geom2dLProp_FuncCurNul_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <math_FunctionWithDerivative.hxx>
#include <Standard_Boolean.hxx>
#include <Standard_Real.hxx>
class Geom2d_Curve;
//! Function used to find the inflections in 2d.
class Geom2dLProp_FuncCurNul : public math_FunctionWithDerivative
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT Geom2dLProp_FuncCurNul(const Handle(Geom2d_Curve)& C);
//! Returns the value for the variable <X>.
Standard_EXPORT Standard_Boolean Value (const Standard_Real X, Standard_Real& F);
//! Returns the derivative for the variable <X>
Standard_EXPORT Standard_Boolean Derivative (const Standard_Real X, Standard_Real& D);
//! Returns the value of the function and the derivative
//! for the variable <X>.
Standard_EXPORT Standard_Boolean Values (const Standard_Real X, Standard_Real& F, Standard_Real& D);
protected:
private:
Handle(Geom2d_Curve) theCurve;
};
#endif // _Geom2dLProp_FuncCurNul_HeaderFile

View File

@@ -1,67 +0,0 @@
-- Created on: 1994-09-02
-- Created by: Yves FRICAUD
-- Copyright (c) 1994-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.
class NumericCurInf2d from Geom2dLProp
---Purpose: Computes the locals extremas of curvature and the
-- inflections of a bounded curve in 2d.
uses
CurAndInf from LProp,
Curve from Geom2d,
Vec2d from gp,
Pnt2d from gp,
Dir2d from gp,
Curve2dTool from Geom2dLProp
is
Create;
PerformCurExt (me : in out; C : Curve from Geom2d; Result : in out CurAndInf)
---Purpose: Computes the locals extremas of curvature.
is static;
PerformInf (me : in out; C : Curve from Geom2d; Result : in out CurAndInf)
---Purpose: Computes the inflections.
is static;
PerformCurExt (me : in out;
C : Curve from Geom2d ;
UMin : Real;
UMax : Real;
Result : in out CurAndInf)
---Purpose: Computes the locals extremas of curvature.
-- in the interval of parmeters [UMin,UMax].
is static;
PerformInf (me : in out;
C : Curve from Geom2d ;
UMin : Real;
UMax : Real;
Result : in out CurAndInf)
---Purpose: Computes the inflections in the interval of
-- parmeters [UMin,UMax].
is static;
IsDone (me) returns Boolean
---Purpose: True if the solutions are found.
is static;
fields
isDone : Boolean from Standard;
end NumericCurInf2d;

View File

@@ -14,14 +14,15 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Geom2dLProp_NumericCurInf2d.ixx>
#include <Geom2d_Curve.hxx>
#include <Geom2dLProp_Curve2dTool.hxx>
#include <Geom2dLProp_FuncCurExt.hxx>
#include <Geom2dLProp_FuncCurNul.hxx>
#include <Geom2dLProp_Curve2dTool.hxx>
#include <math_FunctionRoots.hxx>
#include <Geom2dLProp_NumericCurInf2d.hxx>
#include <LProp_CurAndInf.hxx>
#include <math_BracketedRoot.hxx>
#include <math_FunctionRoots.hxx>
#include <Precision.hxx>
//=======================================================================

View File

@@ -0,0 +1,82 @@
// Created on: 1994-09-02
// Created by: Yves FRICAUD
// Copyright (c) 1994-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 _Geom2dLProp_NumericCurInf2d_HeaderFile
#define _Geom2dLProp_NumericCurInf2d_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Boolean.hxx>
#include <Standard_Real.hxx>
class Geom2d_Curve;
class LProp_CurAndInf;
//! Computes the locals extremas of curvature and the
//! inflections of a bounded curve in 2d.
class Geom2dLProp_NumericCurInf2d
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT Geom2dLProp_NumericCurInf2d();
//! Computes the locals extremas of curvature.
Standard_EXPORT void PerformCurExt (const Handle(Geom2d_Curve)& C, LProp_CurAndInf& Result);
//! Computes the inflections.
Standard_EXPORT void PerformInf (const Handle(Geom2d_Curve)& C, LProp_CurAndInf& Result);
//! Computes the locals extremas of curvature.
//! in the interval of parmeters [UMin,UMax].
Standard_EXPORT void PerformCurExt (const Handle(Geom2d_Curve)& C, const Standard_Real UMin, const Standard_Real UMax, LProp_CurAndInf& Result);
//! Computes the inflections in the interval of
//! parmeters [UMin,UMax].
Standard_EXPORT void PerformInf (const Handle(Geom2d_Curve)& C, const Standard_Real UMin, const Standard_Real UMax, LProp_CurAndInf& Result);
//! True if the solutions are found.
Standard_EXPORT Standard_Boolean IsDone() const;
protected:
private:
Standard_Boolean isDone;
};
#endif // _Geom2dLProp_NumericCurInf2d_HeaderFile