Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:03:08

0001 // Created on: 1996-11-25
0002 // Created by: Philippe MANGIN
0003 // Copyright (c) 1996-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 _BRepBlend_AppSurface_HeaderFile
0018 #define _BRepBlend_AppSurface_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <Approx_SweepApproximation.hxx>
0025 #include <AppBlend_Approx.hxx>
0026 #include <GeomAbs_Shape.hxx>
0027 #include <Standard_Integer.hxx>
0028 #include <TColgp_Array2OfPnt.hxx>
0029 #include <TColStd_Array2OfReal.hxx>
0030 #include <TColStd_Array1OfReal.hxx>
0031 #include <TColStd_Array1OfInteger.hxx>
0032 #include <TColgp_Array1OfPnt2d.hxx>
0033 #include <Standard_OStream.hxx>
0034 class Approx_SweepFunction;
0035 
0036 
0037 //! Used to Approximate the blending surfaces.
0038 class BRepBlend_AppSurface  : public AppBlend_Approx
0039 {
0040 public:
0041 
0042   DEFINE_STANDARD_ALLOC
0043 
0044   
0045   //! Approximation     of   the   new  Surface  (and
0046   //! eventually the  2d    Curves   on the   support
0047   //! surfaces).
0048   //! Normally     the  2d    curve are
0049   //! approximated  with an  tolerance   given  by   the
0050   //! resolution on   support surfaces,  but  if this
0051   //! tolerance is too large Tol2d  is used.
0052   Standard_EXPORT BRepBlend_AppSurface(const Handle(Approx_SweepFunction)& Funct, const Standard_Real First, const Standard_Real Last, const Standard_Real Tol3d, const Standard_Real Tol2d, const Standard_Real TolAngular, const GeomAbs_Shape Continuity = GeomAbs_C0, const Standard_Integer Degmax = 11, const Standard_Integer Segmax = 50);
0053   
0054     Standard_Boolean IsDone() const;
0055   
0056   Standard_EXPORT void SurfShape (Standard_Integer& UDegree, Standard_Integer& VDegree, Standard_Integer& NbUPoles, Standard_Integer& NbVPoles, Standard_Integer& NbUKnots, Standard_Integer& NbVKnots) const;
0057   
0058   Standard_EXPORT void Surface (TColgp_Array2OfPnt& TPoles, TColStd_Array2OfReal& TWeights, TColStd_Array1OfReal& TUKnots, TColStd_Array1OfReal& TVKnots, TColStd_Array1OfInteger& TUMults, TColStd_Array1OfInteger& TVMults) const;
0059   
0060     Standard_Integer UDegree() const;
0061   
0062     Standard_Integer VDegree() const;
0063   
0064     const TColgp_Array2OfPnt& SurfPoles() const;
0065   
0066     const TColStd_Array2OfReal& SurfWeights() const;
0067   
0068     const TColStd_Array1OfReal& SurfUKnots() const;
0069   
0070     const TColStd_Array1OfReal& SurfVKnots() const;
0071   
0072     const TColStd_Array1OfInteger& SurfUMults() const;
0073   
0074     const TColStd_Array1OfInteger& SurfVMults() const;
0075   
0076   //! returns the maximum error in the surface approximation.
0077   Standard_EXPORT Standard_Real MaxErrorOnSurf() const;
0078   
0079     Standard_Integer NbCurves2d() const;
0080   
0081   Standard_EXPORT void Curves2dShape (Standard_Integer& Degree, Standard_Integer& NbPoles, Standard_Integer& NbKnots) const;
0082   
0083   Standard_EXPORT void Curve2d (const Standard_Integer Index, TColgp_Array1OfPnt2d& TPoles, TColStd_Array1OfReal& TKnots, TColStd_Array1OfInteger& TMults) const;
0084   
0085     Standard_Integer Curves2dDegree() const;
0086   
0087     const TColgp_Array1OfPnt2d& Curve2dPoles (const Standard_Integer Index) const;
0088   
0089     const TColStd_Array1OfReal& Curves2dKnots() const;
0090   
0091     const TColStd_Array1OfInteger& Curves2dMults() const;
0092   
0093   Standard_EXPORT void TolReached (Standard_Real& Tol3d, Standard_Real& Tol2d) const;
0094   
0095   //! returns the maximum error in the <Index> 2d curve approximation.
0096   Standard_EXPORT Standard_Real Max2dError (const Standard_Integer Index) const;
0097   
0098   Standard_EXPORT Standard_Real TolCurveOnSurf (const Standard_Integer Index) const;
0099   
0100   //! display information on approximation.
0101   Standard_EXPORT void Dump (Standard_OStream& o) const;
0102 
0103 
0104 
0105 
0106 protected:
0107 
0108 
0109 
0110 
0111 
0112 private:
0113 
0114 
0115 
0116   Approx_SweepApproximation approx;
0117 
0118 
0119 };
0120 
0121 
0122 #include <BRepBlend_AppSurface.lxx>
0123 
0124 
0125 
0126 
0127 
0128 #endif // _BRepBlend_AppSurface_HeaderFile