1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +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

View File

@@ -1,195 +0,0 @@
-- Created on: 1991-09-09
-- Created by: Michel Chauvat
-- Copyright (c) 1991-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.
-- JCV Decembre 1991
package CSLib
---Purpose: This package implements functions for basis geometric
-- computation on curves and surfaces.
-- The tolerance criterions used in this package are
-- Resolution from package gp and RealEpsilon from class
-- Real of package Standard.
uses gp,
TColgp,
TColStd,
math
is
enumeration DerivativeStatus is
Done, D1uIsNull, D1vIsNull, D1IsNull, D1uD1vRatioIsNull,
D1vD1uRatioIsNull, D1uIsParallelD1v;
--- Purpose :
--
-- D1uIsNull : ||D1U|| <= Resolution
--
-- D1vIsNull : ||D1V|| <= Resolution
--
-- D1IsNull : the first derivatives in the U and V parametric
-- directions have null length :
-- ||D1U|| <= Resolution and ||D1V|| <= Resolution
--
-- D1uD1vRatioIsNull : the first derivative in the U direction has
-- null length by comparison with the derivative
-- in the V direction
-- ||D1U|| / ||D1V|| <= RealEpsilon
--
-- D1vD1uRatioIsNull : the first derivative in the V direction has
-- null length by comparison with the derivative
-- in the U direction
-- ||D1V|| / ||D1U|| <= RealEpsilon
--
-- D1uIsParallelD1v : the angle between the derivatives in the U and
-- V direction is null (tolerance criterion given
-- as input data)
enumeration NormalStatus is
Singular,Defined,InfinityOfSolutions, D1NuIsNull, D1NvIsNull, D1NIsNull,
D1NuNvRatioIsNull, D1NvNuRatioIsNull, D1NuIsParallelD1Nv;
--- Purpose :
--
-- if N is the normal
--
-- InfinityOfSolutions : ||DN/du||>Resolution, ||DN/dv||>Resolution
--
-- D1NuIsNull : ||DN/du|| <= Resolution
--
-- D1NvIsNull : ||DN/dv|| <= Resolution
--
-- D1NIsNull : ||DN/du||<=Resolution, ||DN/dv||<=Resolution
--
-- D1NuNvRatioIsNull : ||D1Nu|| / ||D1Nv|| <= RealEpsilon
--
-- D1NvNuRatioIsNull : ||D1Nu|| / ||D1Nv|| <= RealEpsilon
--
-- D1NuIsParallelD1Nv : The angle between D1Nu and D1Nv is Null.
class Class2d;
private class NormalPolyDef;
--- Purpose :
-- The following functions computes the normal to a surface
-- inherits FunctionWithDerivative from math
--
Normal (D1U, D1V: Vec from gp; SinTol: Real;
Status: out DerivativeStatus;
Normal: out Dir from gp);
--- Purpose :
-- Computes the normal direction of a surface as the cross product
-- between D1U and D1V.
-- If D1U has null length or D1V has null length or D1U and D1V are
-- parallel the normal is undefined.
-- To check that D1U and D1V are colinear the sinus of the angle
-- between D1U and D1V is computed and compared with SinTol.
-- The normal is computed if Status == Done else the Status gives the
-- reason why the computation has failed.
Normal (D1U, D1V, D2U, D2V, D2UV: Vec from gp; SinTol: Real;
Done : out Boolean; Status : out NormalStatus;
Normal: out Dir from gp);
--- Purpose :
-- If there is a singularity on the surface the previous method
-- cannot compute the local normal.
-- This method computes an approched normal direction of a surface.
-- It does a limited development and needs the second derivatives
-- on the surface as input data.
-- It computes the normal as follow :
-- N(u, v) = D1U ^ D1V
-- N(u0+du,v0+dv) = N0 + DN/du(u0,v0) * du + DN/dv(u0,v0) * dv + Eps
-- with Eps->0 so we can have the equivalence N ~ dN/du + dN/dv.
-- DNu = ||DN/du|| and DNv = ||DN/dv||
--
-- . if DNu IsNull (DNu <= Resolution from gp) the answer Done = True
-- the normal direction is given by DN/dv
-- . if DNv IsNull (DNv <= Resolution from gp) the answer Done = True
-- the normal direction is given by DN/du
-- . if the two directions DN/du and DN/dv are parallel Done = True
-- the normal direction is given either by DN/du or DN/dv.
-- To check that the two directions are colinear the sinus of the
-- angle between these directions is computed and compared with
-- SinTol.
-- . if DNu/DNv or DNv/DNu is lower or equal than Real Epsilon
-- Done = False, the normal is undefined
-- . if DNu IsNull and DNv is Null Done = False, there is an
-- indetermination and we should do a limited developpement at
-- order 2 (it means that we cannot omit Eps).
-- . if DNu Is not Null and DNv Is not Null Done = False, there are
-- an infinity of normals at the considered point on the surface.
Normal (D1U, D1V: Vec from gp; MagTol: Real;
Status: out NormalStatus;
Normal: out Dir from gp);
--- Purpose :
-- Computes the normal direction of a surface as the cross product
-- between D1U and D1V.
--
Normal (MaxOrder : Integer ; DerNUV : Array2OfVec from TColgp; MagTol: Real;
U , V , Umin , Umax , Vmin , Vmax : Real; Status: out NormalStatus;
Normal : out Dir from gp; OrderU , OrderV : out Integer);
--- Purpose : find the first order k0 of deriviative of NUV
-- where: foreach order < k0 all the derivatives of NUV are
-- null all the derivatives of NUV corresponding to the order
-- k0 are collinear and have the same sens.
-- In this case, normal at U,V is unique.
DNNUV ( Nu , Nv : Integer; DerSurf : Array2OfVec from TColgp )
returns Vec from gp;
---Purpose : -- Computes the derivative of order Nu in the --
-- direction U and Nv in the direction V of the not --
-- normalized normal vector at the point P(U,V) The
-- array DerSurf contain the derivative (i,j) of the surface
-- for i=0,Nu+1 ; j=0,Nv+1
DNNUV (Nu,Nv : Integer ; DerSurf1 : Array2OfVec from TColgp;
DerSurf2 : Array2OfVec from TColgp )
returns Vec from gp;
---Purpose : Computes the derivatives of order Nu in the direction Nu
-- and Nv in the direction Nv of the not normalized vector
-- N(u,v) = dS1/du * dS2/dv (cases where we use an osculating surface)
-- DerSurf1 are the derivatives of S1
DNNormal( Nu , Nv : Integer; DerNUV : Array2OfVec from TColgp ;
Iduref : Integer = 0; Idvref : Integer = 0 )
returns Vec from gp;
---Purpose : -- Computes the derivative of order Nu in the --
-- direction U and Nv in the direction V of the
-- normalized normal vector at the point P(U,V) array
-- DerNUV contain the derivative (i+Iduref,j+Idvref)
-- of D1U ^ D1V for i=0,Nu ; j=0,Nv Iduref and Idvref
-- correspond to a derivative of D1U ^ D1V which can
-- be used to compute the normalized normal vector.
-- In the regular cases , Iduref=Idvref=0.
end CSLib;

View File

@@ -14,18 +14,18 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <CSLib.ixx>
#include <CSLib.hxx>
#include <CSLib_NormalPolyDef.hxx>
#include <gp.hxx>
#include <gp_Dir.hxx>
#include <gp_Vec.hxx>
#include <math_FunctionRoots.hxx>
#include <PLib.hxx>
#include <Precision.hxx>
#include <TColgp_Array2OfVec.hxx>
#include <TColStd_Array2OfReal.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <math_FunctionRoots.hxx>
#include <CSLib_NormalPolyDef.hxx>
#include <TColStd_Array2OfReal.hxx>
#define D1uD1vRatioIsNull CSLib_D1uD1vRatioIsNull
#define D1vD1uRatioIsNull CSLib_D1vD1uRatioIsNull

152
src/CSLib/CSLib.hxx Normal file
View File

@@ -0,0 +1,152 @@
// Created on: 1991-09-09
// Created by: Michel Chauvat
// Copyright (c) 1991-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 _CSLib_HeaderFile
#define _CSLib_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Real.hxx>
#include <CSLib_DerivativeStatus.hxx>
#include <Standard_Boolean.hxx>
#include <CSLib_NormalStatus.hxx>
#include <Standard_Integer.hxx>
#include <TColgp_Array2OfVec.hxx>
class gp_Vec;
class gp_Dir;
class CSLib_Class2d;
class CSLib_NormalPolyDef;
//! This package implements functions for basis geometric
//! computation on curves and surfaces.
//! The tolerance criterions used in this package are
//! Resolution from package gp and RealEpsilon from class
//! Real of package Standard.
class CSLib
{
public:
DEFINE_STANDARD_ALLOC
//! The following functions computes the normal to a surface
//! inherits FunctionWithDerivative from math
//!
//! Computes the normal direction of a surface as the cross product
//! between D1U and D1V.
//! If D1U has null length or D1V has null length or D1U and D1V are
//! parallel the normal is undefined.
//! To check that D1U and D1V are colinear the sinus of the angle
//! between D1U and D1V is computed and compared with SinTol.
//! The normal is computed if Status == Done else the Status gives the
//! reason why the computation has failed.
Standard_EXPORT static void Normal (const gp_Vec& D1U, const gp_Vec& D1V, const Standard_Real SinTol, CSLib_DerivativeStatus& Status, gp_Dir& Normal);
//! If there is a singularity on the surface the previous method
//! cannot compute the local normal.
//! This method computes an approched normal direction of a surface.
//! It does a limited development and needs the second derivatives
//! on the surface as input data.
//! It computes the normal as follow :
//! N(u, v) = D1U ^ D1V
//! N(u0+du,v0+dv) = N0 + DN/du(u0,v0) * du + DN/dv(u0,v0) * dv + Eps
//! with Eps->0 so we can have the equivalence N ~ dN/du + dN/dv.
//! DNu = ||DN/du|| and DNv = ||DN/dv||
//!
//! . if DNu IsNull (DNu <= Resolution from gp) the answer Done = True
//! the normal direction is given by DN/dv
//! . if DNv IsNull (DNv <= Resolution from gp) the answer Done = True
//! the normal direction is given by DN/du
//! . if the two directions DN/du and DN/dv are parallel Done = True
//! the normal direction is given either by DN/du or DN/dv.
//! To check that the two directions are colinear the sinus of the
//! angle between these directions is computed and compared with
//! SinTol.
//! . if DNu/DNv or DNv/DNu is lower or equal than Real Epsilon
//! Done = False, the normal is undefined
//! . if DNu IsNull and DNv is Null Done = False, there is an
//! indetermination and we should do a limited developpement at
//! order 2 (it means that we cannot omit Eps).
//! . if DNu Is not Null and DNv Is not Null Done = False, there are
//! an infinity of normals at the considered point on the surface.
Standard_EXPORT static void Normal (const gp_Vec& D1U, const gp_Vec& D1V, const gp_Vec& D2U, const gp_Vec& D2V, const gp_Vec& D2UV, const Standard_Real SinTol, Standard_Boolean& Done, CSLib_NormalStatus& Status, gp_Dir& Normal);
//! Computes the normal direction of a surface as the cross product
//! between D1U and D1V.
Standard_EXPORT static void Normal (const gp_Vec& D1U, const gp_Vec& D1V, const Standard_Real MagTol, CSLib_NormalStatus& Status, gp_Dir& Normal);
//! find the first order k0 of deriviative of NUV
//! where: foreach order < k0 all the derivatives of NUV are
//! null all the derivatives of NUV corresponding to the order
//! k0 are collinear and have the same sens.
//! In this case, normal at U,V is unique.
Standard_EXPORT static void Normal (const Standard_Integer MaxOrder, const TColgp_Array2OfVec& DerNUV, const Standard_Real MagTol, const Standard_Real U, const Standard_Real V, const Standard_Real Umin, const Standard_Real Umax, const Standard_Real Vmin, const Standard_Real Vmax, CSLib_NormalStatus& Status, gp_Dir& Normal, Standard_Integer& OrderU, Standard_Integer& OrderV);
//! -- Computes the derivative of order Nu in the --
//! direction U and Nv in the direction V of the not --
//! normalized normal vector at the point P(U,V) The
//! array DerSurf contain the derivative (i,j) of the surface
//! for i=0,Nu+1 ; j=0,Nv+1
Standard_EXPORT static gp_Vec DNNUV (const Standard_Integer Nu, const Standard_Integer Nv, const TColgp_Array2OfVec& DerSurf);
//! Computes the derivatives of order Nu in the direction Nu
//! and Nv in the direction Nv of the not normalized vector
//! N(u,v) = dS1/du * dS2/dv (cases where we use an osculating surface)
//! DerSurf1 are the derivatives of S1
Standard_EXPORT static gp_Vec DNNUV (const Standard_Integer Nu, const Standard_Integer Nv, const TColgp_Array2OfVec& DerSurf1, const TColgp_Array2OfVec& DerSurf2);
//! -- Computes the derivative of order Nu in the --
//! direction U and Nv in the direction V of the
//! normalized normal vector at the point P(U,V) array
//! DerNUV contain the derivative (i+Iduref,j+Idvref)
//! of D1U ^ D1V for i=0,Nu ; j=0,Nv Iduref and Idvref
//! correspond to a derivative of D1U ^ D1V which can
//! be used to compute the normalized normal vector.
//! In the regular cases , Iduref=Idvref=0.
Standard_EXPORT static gp_Vec DNNormal (const Standard_Integer Nu, const Standard_Integer Nv, const TColgp_Array2OfVec& DerNUV, const Standard_Integer Iduref = 0, const Standard_Integer Idvref = 0);
protected:
private:
friend class CSLib_Class2d;
friend class CSLib_NormalPolyDef;
};
#endif // _CSLib_HeaderFile

View File

@@ -1,70 +0,0 @@
-- Created on: 1995-03-08
-- Created by: Laurent BUCHARD
-- Copyright (c) 1995-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 Class2d from CSLib
---Purpose:
-- *** Class2d : Low level algorithm for 2d classification
-- this class was moved from package BRepTopAdaptor
uses
Pnt2d from gp,
Array1OfPnt2d from TColgp
is
Create(TP: Array1OfPnt2d from TColgp; aTolu,aTolv:Real from Standard;
umin,vmin,umax,vmax: Real from Standard)
returns Class2d from CSLib;
SiDans(me; P: Pnt2d from gp)
returns Integer from Standard;
SiDans_OnMode(me; P: Pnt2d from gp; Tol: Real from Standard)
returns Integer from Standard;
InternalSiDans(me; X,Y: Real from Standard)
returns Integer from Standard;
InternalSiDansOuOn(me; X,Y: Real from Standard)
returns Integer from Standard;
Copy(me; Other: Class2d from CSLib)
returns Class2d from CSLib;
---C++: return const &
---C++: alias operator=
--Purpose *** Raise if called ***
Destroy(me: in out);
---C++: alias ~
fields
MyPnts2dX: Address from Standard;
MyPnts2dY: Address from Standard;
Tolu : Real from Standard;
Tolv : Real from Standard;
N : Integer from Standard;
Umin : Real from Standard;
Vmin : Real from Standard;
Umax : Real from Standard;
Vmax : Real from Standard;
end Class2d from CSLib;

View File

@@ -16,7 +16,8 @@
//#define No_Standard_OutOfRange
#include <CSLib_Class2d.ixx>
#include <CSLib_Class2d.hxx>
#include <gp_Pnt2d.hxx>
#include <Standard_ConstructionError.hxx>
static inline

View File

@@ -0,0 +1,95 @@
// Created on: 1995-03-08
// Created by: Laurent BUCHARD
// Copyright (c) 1995-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 _CSLib_Class2d_HeaderFile
#define _CSLib_Class2d_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Address.hxx>
#include <Standard_Real.hxx>
#include <Standard_Integer.hxx>
#include <TColgp_Array1OfPnt2d.hxx>
class gp_Pnt2d;
//! *** Class2d : Low level algorithm for 2d classification
//! this class was moved from package BRepTopAdaptor
class CSLib_Class2d
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT CSLib_Class2d(const TColgp_Array1OfPnt2d& TP, const Standard_Real aTolu, const Standard_Real aTolv, const Standard_Real umin, const Standard_Real vmin, const Standard_Real umax, const Standard_Real vmax);
Standard_EXPORT Standard_Integer SiDans (const gp_Pnt2d& P) const;
Standard_EXPORT Standard_Integer SiDans_OnMode (const gp_Pnt2d& P, const Standard_Real Tol) const;
Standard_EXPORT Standard_Integer InternalSiDans (const Standard_Real X, const Standard_Real Y) const;
Standard_EXPORT Standard_Integer InternalSiDansOuOn (const Standard_Real X, const Standard_Real Y) const;
Standard_EXPORT const CSLib_Class2d& Copy (const CSLib_Class2d& Other) const;
const CSLib_Class2d& operator= (const CSLib_Class2d& Other) const
{
return Copy(Other);
}
Standard_EXPORT void Destroy();
~CSLib_Class2d()
{
Destroy();
}
protected:
private:
Standard_Address MyPnts2dX;
Standard_Address MyPnts2dY;
Standard_Real Tolu;
Standard_Real Tolv;
Standard_Integer N;
Standard_Real Umin;
Standard_Real Vmin;
Standard_Real Umax;
Standard_Real Vmax;
};
#endif // _CSLib_Class2d_HeaderFile

View File

@@ -0,0 +1,53 @@
// Created on: 1991-09-09
// Created by: Michel Chauvat
// Copyright (c) 1991-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 _CSLib_DerivativeStatus_HeaderFile
#define _CSLib_DerivativeStatus_HeaderFile
//! D1uIsNull : ||D1U|| <= Resolution
//!
//! D1vIsNull : ||D1V|| <= Resolution
//!
//! D1IsNull : the first derivatives in the U and V parametric
//! directions have null length :
//! ||D1U|| <= Resolution and ||D1V|| <= Resolution
//!
//! D1uD1vRatioIsNull : the first derivative in the U direction has
//! null length by comparison with the derivative
//! in the V direction
//! ||D1U|| / ||D1V|| <= RealEpsilon
//!
//! D1vD1uRatioIsNull : the first derivative in the V direction has
//! null length by comparison with the derivative
//! in the U direction
//! ||D1V|| / ||D1U|| <= RealEpsilon
//!
//! D1uIsParallelD1v : the angle between the derivatives in the U and
//! V direction is null (tolerance criterion given
//! as input data)
enum CSLib_DerivativeStatus
{
CSLib_Done,
CSLib_D1uIsNull,
CSLib_D1vIsNull,
CSLib_D1IsNull,
CSLib_D1uD1vRatioIsNull,
CSLib_D1vD1uRatioIsNull,
CSLib_D1uIsParallelD1v
};
#endif // _CSLib_DerivativeStatus_HeaderFile

View File

@@ -1,50 +0,0 @@
-- Created on: 1996-08-23
-- Created by: Benoit TANNIOU
-- Copyright (c) 1996-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 NormalPolyDef from CSLib
inherits FunctionWithDerivative from math
uses
Array1OfReal from TColStd
is
Create(k0:Integer; li:Array1OfReal) returns NormalPolyDef from CSLib;
Value(me: in out; X: Real; F: out Real)
---Purpose: computes the value <F>of the function for the variable <X>.
-- Returns True if the calculation were successfully done,
-- False otherwise.
returns Boolean;
Derivative(me: in out; X: Real; D: out Real)
---Purpose: computes the derivative <D> of the function
-- for the variable <X>.
-- Returns True if the calculation were successfully done,
-- False otherwise.
returns Boolean;
Values(me: in out; X: Real; F, D: out Real)
---Purpose: computes the value <F> and the derivative <D> of the
-- function for the variable <X>.
-- Returns True if the calculation were successfully done,
-- False otherwise.
returns Boolean;
fields
myK0: Integer from Standard;
myTABli: Array1OfReal from TColStd;
end NormalPolyDef;

View File

@@ -14,7 +14,8 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <CSLib_NormalPolyDef.ixx>
#include <CSLib_NormalPolyDef.hxx>
#include <PLib.hxx>
//=============================================================================

View File

@@ -0,0 +1,83 @@
// Created on: 1996-08-23
// Created by: Benoit TANNIOU
// Copyright (c) 1996-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 _CSLib_NormalPolyDef_HeaderFile
#define _CSLib_NormalPolyDef_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Integer.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <math_FunctionWithDerivative.hxx>
#include <Standard_Boolean.hxx>
#include <Standard_Real.hxx>
class CSLib_NormalPolyDef : public math_FunctionWithDerivative
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT CSLib_NormalPolyDef(const Standard_Integer k0, const TColStd_Array1OfReal& li);
//! computes the value <F>of the function for the variable <X>.
//! Returns True if the calculation were successfully done,
//! False otherwise.
Standard_EXPORT Standard_Boolean Value (const Standard_Real X, Standard_Real& F);
//! computes the derivative <D> of the function
//! for the variable <X>.
//! Returns True if the calculation were successfully done,
//! False otherwise.
Standard_EXPORT Standard_Boolean Derivative (const Standard_Real X, Standard_Real& D);
//! computes the value <F> and the derivative <D> of the
//! function for the variable <X>.
//! Returns True if the calculation were successfully done,
//! False otherwise.
Standard_EXPORT Standard_Boolean Values (const Standard_Real X, Standard_Real& F, Standard_Real& D);
protected:
private:
Standard_Integer myK0;
TColStd_Array1OfReal myTABli;
};
#endif // _CSLib_NormalPolyDef_HeaderFile

View File

@@ -0,0 +1,49 @@
// Created on: 1991-09-09
// Created by: Michel Chauvat
// Copyright (c) 1991-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 _CSLib_NormalStatus_HeaderFile
#define _CSLib_NormalStatus_HeaderFile
//! if N is the normal
//!
//! InfinityOfSolutions : ||DN/du||>Resolution, ||DN/dv||>Resolution
//!
//! D1NuIsNull : ||DN/du|| <= Resolution
//!
//! D1NvIsNull : ||DN/dv|| <= Resolution
//!
//! D1NIsNull : ||DN/du||<=Resolution, ||DN/dv||<=Resolution
//!
//! D1NuNvRatioIsNull : ||D1Nu|| / ||D1Nv|| <= RealEpsilon
//!
//! D1NvNuRatioIsNull : ||D1Nu|| / ||D1Nv|| <= RealEpsilon
//!
//! D1NuIsParallelD1Nv : The angle between D1Nu and D1Nv is Null.
enum CSLib_NormalStatus
{
CSLib_Singular,
CSLib_Defined,
CSLib_InfinityOfSolutions,
CSLib_D1NuIsNull,
CSLib_D1NvIsNull,
CSLib_D1NIsNull,
CSLib_D1NuNvRatioIsNull,
CSLib_D1NvNuRatioIsNull,
CSLib_D1NuIsParallelD1Nv
};
#endif // _CSLib_NormalStatus_HeaderFile

View File

@@ -1,2 +1,10 @@
CSLib_Offset.hxx
CSLib.cxx
CSLib.hxx
CSLib_Class2d.cxx
CSLib_Class2d.hxx
CSLib_DerivativeStatus.hxx
CSLib_NormalPolyDef.cxx
CSLib_NormalPolyDef.hxx
CSLib_NormalStatus.hxx
CSLib_Offset.cxx
CSLib_Offset.hxx