mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +03:00
202 lines
6.9 KiB
Plaintext
Executable File
202 lines
6.9 KiB
Plaintext
Executable File
// Created on: 1993-05-04
|
|
// Created by: Philippe DAUTRY
|
|
// Copyright (c) 1993-1999 Matra Datavision
|
|
// Copyright (c) 1999-2012 OPEN CASCADE SAS
|
|
//
|
|
// The content of this file is subject to the Open CASCADE Technology Public
|
|
// License Version 6.5 (the "License"). You may not use the content of this file
|
|
// except in compliance with the License. Please obtain a copy of the License
|
|
// at http://www.opencascade.org and read it completely before using this file.
|
|
//
|
|
// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
|
|
// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
|
|
//
|
|
// The Original Code and all software distributed under the License is
|
|
// distributed on an "AS IS" basis, without warranty of any kind, and the
|
|
// Initial Developer hereby disclaims all such warranties, including without
|
|
// limitation, any warranties of merchantability, fitness for a particular
|
|
// purpose or non-infringement. Please see the License for the specific terms
|
|
// and conditions governing the rights and limitations under the License.
|
|
|
|
|
|
#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());
|
|
}
|
|
|