1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +03:00

Integration of OCCT 6.5.0 from SVN

This commit is contained in:
bugmaster
2011-03-16 07:30:28 +00:00
committed by bugmaster
parent 4903637061
commit 7fd59977df
16375 changed files with 3882564 additions and 0 deletions

2445
src/BSplCLib/BSplCLib.cdl Executable file

File diff suppressed because it is too large Load Diff

4184
src/BSplCLib/BSplCLib.cxx Executable file

File diff suppressed because it is too large Load Diff

186
src/BSplCLib/BSplCLib.lxx Executable file
View File

@@ -0,0 +1,186 @@
// File: BSplCLib.lxx
// Created: Tue May 4 16:02:54 1993
// Author: Philippe DAUTRY
// <fid@meteox>
// Copyright: Matra Datavision 1993
#include <PLib.hxx>
#include <TColgp_Array1OfPnt.hxx>
#include <TColgp_Array1OfPnt2d.hxx>
//=======================================================================
//function : MaxDegree
//purpose :
//=======================================================================
inline Standard_Integer BSplCLib::MaxDegree ()
{
return 25;
}
//=======================================================================
//function : NoWeights
//purpose :
//=======================================================================
inline TColStd_Array1OfReal& BSplCLib::NoWeights()
{
return (*((TColStd_Array1OfReal*) NULL));
}
//=======================================================================
//function : NoMults
//purpose :
//=======================================================================
inline TColStd_Array1OfInteger& BSplCLib::NoMults()
{
return (*((TColStd_Array1OfInteger*) NULL));
}
//=======================================================================
//function : CoefsD0
//purpose :
//=======================================================================
inline void BSplCLib::CoefsD0(const Standard_Real U,
const TColgp_Array1OfPnt& Poles,
const TColStd_Array1OfReal& Weights,
gp_Pnt& P)
{
BSplCLib::CacheD0(U, Poles.Length() -1, 0., 1., Poles, Weights, P);
}
//=======================================================================
//function : CoefsD0
//purpose :
//=======================================================================
inline void BSplCLib::CoefsD0(const Standard_Real U,
const TColgp_Array1OfPnt2d& Poles,
const TColStd_Array1OfReal& Weights,
gp_Pnt2d& P)
{
BSplCLib::CacheD0(U, Poles.Length() -1, 0., 1., Poles, Weights, P);
}
//=======================================================================
//function : CoefsD1
//purpose :
//=======================================================================
inline void BSplCLib::CoefsD1(const Standard_Real U,
const TColgp_Array1OfPnt& Poles,
const TColStd_Array1OfReal& Weights,
gp_Pnt& P,
gp_Vec& Vec)
{
BSplCLib::CacheD1(U, Poles.Length() -1, 0., 1., Poles, Weights, P, Vec);
}
//=======================================================================
//function : CoefsD1
//purpose :
//=======================================================================
inline void BSplCLib::CoefsD1(const Standard_Real U,
const TColgp_Array1OfPnt2d& Poles,
const TColStd_Array1OfReal& Weights,
gp_Pnt2d& P,
gp_Vec2d& Vec)
{
BSplCLib::CacheD1(U, Poles.Length() -1, 0., 1., Poles, Weights, P, Vec);
}
//=======================================================================
//function : CoefsD2
//purpose :
//=======================================================================
inline void BSplCLib::CoefsD2(const Standard_Real U,
const TColgp_Array1OfPnt& Poles,
const TColStd_Array1OfReal& Weights,
gp_Pnt& P,
gp_Vec& Vec1,
gp_Vec& Vec2)
{
BSplCLib::CacheD2(U, Poles.Length() -1, 0., 1., Poles, Weights,
P, Vec1, Vec2);
}
//=======================================================================
//function : CoefsD2
//purpose :
//=======================================================================
inline void BSplCLib::CoefsD2(const Standard_Real U,
const TColgp_Array1OfPnt2d& Poles,
const TColStd_Array1OfReal& Weights,
gp_Pnt2d& P,
gp_Vec2d& Vec1,
gp_Vec2d& Vec2)
{
BSplCLib::CacheD2(U, Poles.Length() -1, 0., 1., Poles, Weights,
P, Vec1, Vec2);
}
//=======================================================================
//function : CoefsD3
//purpose :
//=======================================================================
inline void BSplCLib::CoefsD3(const Standard_Real U,
const TColgp_Array1OfPnt& Poles,
const TColStd_Array1OfReal& Weights,
gp_Pnt& P,
gp_Vec& Vec1,
gp_Vec& Vec2,
gp_Vec& Vec3)
{
BSplCLib::CacheD3(U, Poles.Length() -1, 0., 1., Poles, Weights,
P, Vec1, Vec2, Vec3);
}
//=======================================================================
//function : CoefsD3
//purpose :
//=======================================================================
inline void BSplCLib::CoefsD3(const Standard_Real U,
const TColgp_Array1OfPnt2d& Poles,
const TColStd_Array1OfReal& Weights,
gp_Pnt2d& P,
gp_Vec2d& Vec1,
gp_Vec2d& Vec2,
gp_Vec2d& Vec3)
{
BSplCLib::CacheD3(U, Poles.Length() -1, 0., 1., Poles, Weights,
P, Vec1, Vec2, Vec3);
}
//=======================================================================
//function : PolesCoefficients
//purpose :
//=======================================================================
inline void BSplCLib::PolesCoefficients
(const TColgp_Array1OfPnt& Poles,
TColgp_Array1OfPnt& CachePoles)
{
BSplCLib::PolesCoefficients(Poles, PLib::NoWeights(),
CachePoles, PLib::NoWeights());
}
//=======================================================================
//function : PolesCoefficients
//purpose :
//=======================================================================
inline void BSplCLib::PolesCoefficients
(const TColgp_Array1OfPnt2d& Poles,
TColgp_Array1OfPnt2d& CachePoles)
{
BSplCLib::PolesCoefficients(Poles, PLib::NoWeights(),
CachePoles, PLib::NoWeights());
}

41
src/BSplCLib/BSplCLib_1.cxx Executable file
View File

@@ -0,0 +1,41 @@
#include <BSplCLib.hxx>
#include <Standard_NotImplemented.hxx>
// BSpline Curve in 2d space
// **************************
#define No_Standard_RangeError
#define No_Standard_OutOfRange
#define Dimension_gen 2
#define Array1OfPoints TColgp_Array1OfPnt2d
#define Point gp_Pnt2d
#define Vector gp_Vec2d
#define PointToCoords(carr,pnt,op) \
(carr)[0] = (pnt).X() op, \
(carr)[1] = (pnt).Y() op
#define CoordsToPoint(pnt,carr,op) \
(pnt).SetX ((carr)[0] op), \
(pnt).SetY ((carr)[1] op)
#define NullifyPoint(pnt) \
(pnt).SetCoord (0.,0.)
#define NullifyCoords(carr) \
(carr)[0] = (carr)[1] = 0.
#define ModifyCoords(carr,op) \
(carr)[0] op, \
(carr)[1] op
#define CopyCoords(carr,carr2) \
(carr)[0] = (carr2)[0], \
(carr)[1] = (carr2)[1]
#define BSplCLib_DataContainer BSplCLib_DataContainer_2d
#include <BSplCLib_CurveComputation.gxx>

1231
src/BSplCLib/BSplCLib_2.cxx Executable file

File diff suppressed because it is too large Load Diff

50
src/BSplCLib/BSplCLib_3.cxx Executable file
View File

@@ -0,0 +1,50 @@
// File: BSplCLib_3.cxx
// Created: Fri May 19 18:33:07 1995
// Author: Xavier BENVENISTE
// <xab@nonox>
#include <BSplCLib.ixx>
#include <Standard_NotImplemented.hxx>
// BSpline Curve in 3d space
// ***************************
#define No_Standard_RangeError
#define No_Standard_OutOfRange
#define Dimension_gen 3
#define Array1OfPoints TColgp_Array1OfPnt
#define Point gp_Pnt
#define Vector gp_Vec
#define PointToCoords(carr,pnt,op) \
(carr)[0] = (pnt).X() op, \
(carr)[1] = (pnt).Y() op, \
(carr)[2] = (pnt).Z() op
#define CoordsToPoint(pnt,carr,op) \
(pnt).SetX ((carr)[0] op), \
(pnt).SetY ((carr)[1] op), \
(pnt).SetZ ((carr)[2] op)
#define NullifyPoint(pnt) \
(pnt).SetCoord (0.,0.,0.)
#define NullifyCoords(carr) \
(carr)[0] = (carr)[1] = (carr)[2] = 0.
#define ModifyCoords(carr,op) \
(carr)[0] op, \
(carr)[1] op, \
(carr)[2] op
#define CopyCoords(carr,carr2) \
(carr)[0] = (carr2)[0], \
(carr)[1] = (carr2)[1], \
(carr)[2] = (carr2)[2]
#define BSplCLib_DataContainer BSplCLib_DataContainer_3d
#include <BSplCLib_CurveComputation.gxx>

View File

@@ -0,0 +1,242 @@
// File: BSplCLib_BzSyntaxes.cxx
// Created: Fri Sep 8 16:23:47 1995
// Author: Laurent BOURESCHE
// <lbo@phylox>
#include <BSplCLib.hxx>
#include <TColStd_Array1OfInteger.hxx>
#include <TColStd_Array1OfReal.hxx>
#define No_Standard_RangeError
#define No_Standard_OutOfRange
//=======================================================================
//struct : BSplCLib_BezierArrays
//purpose: Auxiliary structure providing standard definitions of bspline
// knots for bezier (using stack allocation)
//=======================================================================
class BSplCLib_BezierArrays
{
public:
BSplCLib_BezierArrays (Standard_Integer Degree)
: knots (aKnots[0], 1, 2), mults (aMults[0], 1, 2)
{
aKnots[0] = 0.;
aKnots[1] = 1.;
aMults[0] = aMults[1] = Degree + 1;
}
private:
Standard_Real aKnots[2];
Standard_Integer aMults[2];
public:
TColStd_Array1OfReal knots;
TColStd_Array1OfInteger mults;
};
//=======================================================================
//function : IncreaseDegree
//purpose :
//=======================================================================
void BSplCLib::IncreaseDegree(const Standard_Integer NewDegree,
const TColgp_Array1OfPnt& Poles,
const TColStd_Array1OfReal& Weights,
TColgp_Array1OfPnt& NewPoles,
TColStd_Array1OfReal& NewWeights)
{
Standard_Integer deg = Poles.Length() - 1;
BSplCLib_BezierArrays bzarr(deg);
BSplCLib::IncreaseDegree(deg, NewDegree, 0,
Poles, Weights, bzarr.knots, bzarr.mults,
NewPoles, NewWeights, bzarr.knots, bzarr.mults);
}
//=======================================================================
//function : IncreaseDegree
//purpose :
//=======================================================================
void BSplCLib::IncreaseDegree(const Standard_Integer NewDegree,
const TColgp_Array1OfPnt2d& Poles,
const TColStd_Array1OfReal& Weights,
TColgp_Array1OfPnt2d& NewPoles,
TColStd_Array1OfReal& NewWeights)
{
Standard_Integer deg = Poles.Length() - 1;
BSplCLib_BezierArrays bzarr(deg);
BSplCLib::IncreaseDegree(deg, NewDegree, 0,
Poles, Weights, bzarr.knots, bzarr.mults,
NewPoles, NewWeights, bzarr.knots, bzarr.mults);
}
//=======================================================================
//function : PolesCoefficients
//purpose :
//=======================================================================
void BSplCLib::PolesCoefficients(const TColgp_Array1OfPnt& Poles,
const TColStd_Array1OfReal& Weights,
TColgp_Array1OfPnt& CachePoles,
TColStd_Array1OfReal& CacheWeights)
{
Standard_Integer deg = Poles.Length() - 1;
TColStd_Array1OfReal bidflatknots (FlatBezierKnots(deg), 1, 2*(deg+1));
BSplCLib::BuildCache(0.,1.,0,deg,bidflatknots,
Poles, Weights, CachePoles,CacheWeights);
}
//=======================================================================
//function : PolesCoefficients
//purpose :
//=======================================================================
void BSplCLib::PolesCoefficients(const TColgp_Array1OfPnt2d& Poles,
const TColStd_Array1OfReal& Weights,
TColgp_Array1OfPnt2d& CachePoles,
TColStd_Array1OfReal& CacheWeights)
{
Standard_Integer deg = Poles.Length() - 1;
TColStd_Array1OfReal bidflatknots (FlatBezierKnots(deg), 1, 2*(deg+1));
BSplCLib::BuildCache(0.,1.,0,deg,bidflatknots,
Poles, Weights, CachePoles,CacheWeights);
}
//=======================================================================
//function : D0
//purpose :
//=======================================================================
void BSplCLib::D0(const Standard_Real U,
const TColgp_Array1OfPnt& Poles,
const TColStd_Array1OfReal& Weights,
gp_Pnt& P)
{
Standard_Integer deg = Poles.Length() - 1;
BSplCLib_BezierArrays bzarr(deg);
BSplCLib::D0(U, 1, deg, 0, Poles, Weights, bzarr.knots, bzarr.mults, P);
}
//=======================================================================
//function : D0
//purpose :
//=======================================================================
void BSplCLib::D0(const Standard_Real U,
const TColgp_Array1OfPnt2d& Poles,
const TColStd_Array1OfReal& Weights,
gp_Pnt2d& P)
{
Standard_Integer deg = Poles.Length() - 1;
BSplCLib_BezierArrays bzarr(deg);
BSplCLib::D0(U, 1, deg, 0, Poles, Weights, bzarr.knots, bzarr.mults, P);
}
//=======================================================================
//function : D1
//purpose :
//=======================================================================
void BSplCLib::D1(const Standard_Real U,
const TColgp_Array1OfPnt& Poles,
const TColStd_Array1OfReal& Weights,
gp_Pnt& P,
gp_Vec& V)
{
Standard_Integer deg = Poles.Length() - 1;
BSplCLib_BezierArrays bzarr(deg);
BSplCLib::D1(U, 1, deg, 0, Poles, Weights, bzarr.knots, bzarr.mults, P, V);
}
//=======================================================================
//function : D1
//purpose :
//=======================================================================
void BSplCLib::D1(const Standard_Real U,
const TColgp_Array1OfPnt2d& Poles,
const TColStd_Array1OfReal& Weights,
gp_Pnt2d& P,
gp_Vec2d& V)
{
Standard_Integer deg = Poles.Length() - 1;
BSplCLib_BezierArrays bzarr(deg);
BSplCLib::D1(U, 1, deg, 0, Poles, Weights, bzarr.knots, bzarr.mults, P, V);
}
//=======================================================================
//function : D2
//purpose :
//=======================================================================
void BSplCLib::D2(const Standard_Real U,
const TColgp_Array1OfPnt& Poles,
const TColStd_Array1OfReal& Weights,
gp_Pnt& P,
gp_Vec& V1,
gp_Vec& V2)
{
Standard_Integer deg = Poles.Length() - 1;
BSplCLib_BezierArrays bzarr(deg);
BSplCLib::D2(U, 1, deg, 0, Poles, Weights, bzarr.knots, bzarr.mults, P, V1, V2);
}
//=======================================================================
//function : D2
//purpose :
//=======================================================================
void BSplCLib::D2(const Standard_Real U,
const TColgp_Array1OfPnt2d& Poles,
const TColStd_Array1OfReal& Weights,
gp_Pnt2d& P,
gp_Vec2d& V1,
gp_Vec2d& V2)
{
Standard_Integer deg = Poles.Length() - 1;
BSplCLib_BezierArrays bzarr(deg);
BSplCLib::D2(U, 1, deg, 0, Poles, Weights, bzarr.knots, bzarr.mults, P, V1, V2);
}
//=======================================================================
//function : D3
//purpose :
//=======================================================================
void BSplCLib::D3(const Standard_Real U,
const TColgp_Array1OfPnt& Poles,
const TColStd_Array1OfReal& Weights,
gp_Pnt& P,
gp_Vec& V1,
gp_Vec& V2,
gp_Vec& V3)
{
Standard_Integer deg = Poles.Length() - 1;
BSplCLib_BezierArrays bzarr(deg);
BSplCLib::D3(U, 1, deg, 0, Poles, Weights, bzarr.knots, bzarr.mults,
P, V1, V2, V3);
}
//=======================================================================
//function : D3
//purpose :
//=======================================================================
void BSplCLib::D3(const Standard_Real U,
const TColgp_Array1OfPnt2d& Poles,
const TColStd_Array1OfReal& Weights,
gp_Pnt2d& P,
gp_Vec2d& V1,
gp_Vec2d& V2,
gp_Vec2d& V3)
{
Standard_Integer deg = Poles.Length() - 1;
BSplCLib_BezierArrays bzarr(deg);
BSplCLib::D3(U, 1, deg, 0, Poles, Weights, bzarr.knots, bzarr.mults,
P, V1, V2, V3);
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,39 @@
// File: BSplCLib_EvaluatorFunction.hxx
// Created: Mon Mar 3 10:11:41 1997
// Author: Xavier BENVENISTE
// <xab@zozox.paris1.matra-dtv.fr>
#ifndef _BSplCLib_EvaluatorFunction_HeaderFile
#define _BSplCLib_EvaluatorFunction_HeaderFile
// File: AdvApprox_EvaluatorFunction.hxx
// Created: Mon May 29 17:04:50 1995
// Author: Xavier BENVENISTE
// <xab@nonox>
#ifndef _Standard_Integer_HeaderFile
#include <Standard_Integer.hxx>
#endif
#ifndef _Standard_Real_HeaderFile
#include <Standard_Real.hxx>
#endif
#ifndef _Standard_PrimitiveTypes_HeaderFile
#include <Standard_PrimitiveTypes.hxx>
#endif
typedef void (* BSplCLib_EvaluatorFunction) (const Standard_Integer ,
// Derivative Request
const Standard_Real *,
// StartEnd[2]
const Standard_Real ,
// Parameter
Standard_Real &,
// Result
Standard_Integer & ) ;
// Error Code
#endif

7
src/BSplCLib/FILES Executable file
View File

@@ -0,0 +1,7 @@
BSplCLib_1.cxx
BSplCLib_2.cxx
BSplCLib_3.cxx
BSplCLib_BzSyntaxes.cxx
BSplCLib_CurveComputation.gxx
BSplCLib_EvaluatorFunction.hxx