Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:04:11

0001 // Created on: 1994-04-07
0002 // Created by: Isabelle GRIGNON
0003 // Copyright (c) 1994-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _Law_HeaderFile
0018 #define _Law_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <TColStd_HArray1OfReal.hxx>
0025 #include <Standard_Integer.hxx>
0026 #include <TColStd_Array1OfReal.hxx>
0027 #include <TColStd_Array1OfInteger.hxx>
0028 #include <Standard_Boolean.hxx>
0029 #include <Standard_Real.hxx>
0030 class Law_BSpFunc;
0031 class Law_Linear;
0032 class Law_BSpline;
0033 class Adaptor3d_Curve;
0034 
0035 
0036 //! Multiple services concerning 1d functions.
0037 class Law 
0038 {
0039 public:
0040 
0041   DEFINE_STANDARD_ALLOC
0042 
0043   
0044 
0045   //! This algorithm searches the knot values corresponding to the
0046   //! splitting of a given B-spline law into  several arcs with
0047   //! the same continuity. The continuity order is given at the
0048   //! construction time.
0049   //! Builds a 1d bspline that   is near from Lin with  null
0050   //! derivatives at the extremities.
0051   Standard_EXPORT static Handle(Law_BSpFunc) MixBnd (const Handle(Law_Linear)& Lin);
0052   
0053   //! Builds  the poles of the 1d  bspline that is near from
0054   //! Lin with null derivatives at the extremities.
0055   Standard_EXPORT static Handle(TColStd_HArray1OfReal) MixBnd (const Standard_Integer Degree, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, const Handle(Law_Linear)& Lin);
0056   
0057   //! Builds the poles of the 1d bspline that is null on the
0058   //! right    side   of   Knots(Index)  (on  the    left if
0059   //! NulOnTheRight  is  false)    and   that is     like  a
0060   //! t*(1-t)(1-t) curve  on the  left side of  Knots(Index)
0061   //! (on the right  if NulOnTheRight is false).  The result
0062   //! curve is  C1 with  a derivative  equal  to 1. at first
0063   //! parameter (-1 at last  parameter  if  NulOnTheRight is
0064   //! false).
0065   //! Warning: Mults(Index) must greater or equal to degree-1.
0066   Standard_EXPORT static Handle(TColStd_HArray1OfReal) MixTgt (const Standard_Integer Degree, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, const Standard_Boolean NulOnTheRight, const Standard_Integer Index);
0067   
0068   //! Computes a 1 d curve to  reparametrize a curve. Its an
0069   //! interpolation of NbPoints  points calculated  at quasi
0070   //! constant abscissa.
0071   Standard_EXPORT static Handle(Law_BSpline) Reparametrize (const Adaptor3d_Curve& Curve, const Standard_Real First, const Standard_Real Last, const Standard_Boolean HasDF, const Standard_Boolean HasDL, const Standard_Real DFirst, const Standard_Real DLast, const Standard_Boolean Rev, const Standard_Integer NbPoints);
0072   
0073   //! Computes a 1  d curve to  scale  a field of  tangency.
0074   //! Value is 1. for t = (First+Last)/2 .
0075   //! If HasFirst value for t = First is VFirst (null derivative).
0076   //! If HasLast value for t = Last is VLast (null derivative).
0077   //!
0078   //! 1.                   _
0079   //! _/ \_
0080   //! __/     \__
0081   //! /           
0082   //! VFirst    ____/             
0083   //! VLast                        \____
0084   //! First                    Last
0085   Standard_EXPORT static Handle(Law_BSpline) Scale (const Standard_Real First, const Standard_Real Last, const Standard_Boolean HasF, const Standard_Boolean HasL, const Standard_Real VFirst, const Standard_Real VLast);
0086   
0087   Standard_EXPORT static Handle(Law_BSpline) ScaleCub (const Standard_Real First, const Standard_Real Last, const Standard_Boolean HasF, const Standard_Boolean HasL, const Standard_Real VFirst, const Standard_Real VLast);
0088 
0089 };
0090 
0091 #endif // _Law_HeaderFile