Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Created on: 1995-01-27
0002 // Created by: Jacques GOUSSARD
0003 // Copyright (c) 1995-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 _GeomInt_TheMultiLineOfWLApprox_HeaderFile
0018 #define _GeomInt_TheMultiLineOfWLApprox_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <Standard_Integer.hxx>
0025 #include <Standard_Boolean.hxx>
0026 #include <Standard_Real.hxx>
0027 #include <Approx_Status.hxx>
0028 #include <TColgp_Array1OfPnt.hxx>
0029 #include <TColgp_Array1OfPnt2d.hxx>
0030 #include <TColgp_Array1OfVec.hxx>
0031 #include <TColgp_Array1OfVec2d.hxx>
0032 class IntPatch_WLine;
0033 class ApproxInt_SvSurfaces;
0034 
0035 
0036 
0037 class GeomInt_TheMultiLineOfWLApprox 
0038 {
0039 public:
0040 
0041   DEFINE_STANDARD_ALLOC
0042 
0043   Standard_EXPORT GeomInt_TheMultiLineOfWLApprox();
0044   
0045   //! The class SvSurfaces is used when the approximation algorithm 
0046   //! needs some extra points on the line <line>. 
0047   //! A New line  is then created which shares the same surfaces and functions.
0048   //! SvSurfaces is a deferred class which allows several implementations of
0049   //! this  algorithm with different surfaces (bi-parametric ones, or 
0050   //! implicit and biparametric ones)
0051   Standard_EXPORT GeomInt_TheMultiLineOfWLApprox( const Handle(IntPatch_WLine)& line,
0052                                                   const Standard_Address PtrSvSurfaces,
0053                                                   const Standard_Integer NbP3d,
0054                                                   const Standard_Integer NbP2d,
0055                                                   const Standard_Boolean ApproxU1V1,
0056                                                   const Standard_Boolean ApproxU2V2,
0057                                                   const Standard_Real xo,
0058                                                   const Standard_Real yo,
0059                                                   const Standard_Real zo,
0060                                                   const Standard_Real u1o,
0061                                                   const Standard_Real v1o,
0062                                                   const Standard_Real u2o,
0063                                                   const Standard_Real v2o,
0064                                                   const Standard_Boolean P2DOnFirst,
0065                                                   const Standard_Integer IndMin = 0,
0066                                                   const Standard_Integer IndMax = 0);
0067   
0068   //! No Extra points will be added on the current line
0069   Standard_EXPORT GeomInt_TheMultiLineOfWLApprox( const Handle(IntPatch_WLine)& line,
0070                                                   const Standard_Integer NbP3d,
0071                                                   const Standard_Integer NbP2d,
0072                                                   const Standard_Boolean ApproxU1V1,
0073                                                   const Standard_Boolean ApproxU2V2,
0074                                                   const Standard_Real xo,
0075                                                   const Standard_Real yo,
0076                                                   const Standard_Real zo,
0077                                                   const Standard_Real u1o,
0078                                                   const Standard_Real v1o,
0079                                                   const Standard_Real u2o,
0080                                                   const Standard_Real v2o,
0081                                                   const Standard_Boolean P2DOnFirst,
0082                                                   const Standard_Integer IndMin = 0,
0083                                                   const Standard_Integer IndMax = 0);
0084   
0085   Standard_EXPORT Standard_Integer FirstPoint() const;
0086   
0087   Standard_EXPORT Standard_Integer LastPoint() const;
0088 
0089   //! Returns the number of 2d points of a TheLine.
0090   Standard_EXPORT Standard_Integer NbP2d() const;
0091 
0092   //! Returns the number of 3d points of a TheLine.
0093   Standard_EXPORT Standard_Integer NbP3d() const;
0094   
0095   Standard_EXPORT Approx_Status WhatStatus() const;
0096   
0097   //! Returns the 3d points of the multipoint <MPointIndex> when only 3d points exist.
0098   Standard_EXPORT void Value (const Standard_Integer MPointIndex, TColgp_Array1OfPnt& tabPt) const;
0099   
0100   //! Returns the 2d points of the multipoint <MPointIndex> when only 2d points exist.
0101   Standard_EXPORT void Value (const Standard_Integer MPointIndex,
0102                               TColgp_Array1OfPnt2d& tabPt2d) const;  
0103 
0104   //! returns the 3d and 2d points of the multipoint <MPointIndex>.
0105   Standard_EXPORT void Value (const Standard_Integer MPointIndex, TColgp_Array1OfPnt& tabPt, TColgp_Array1OfPnt2d& tabPt2d) const;
0106   
0107   //! Returns the 3d tangency points of the multipoint <MPointIndex> only
0108   //! when 3d points exist.
0109   Standard_EXPORT Standard_Boolean Tangency ( const Standard_Integer MPointIndex,
0110                                               TColgp_Array1OfVec& tabV) const;
0111   
0112   //! Returns the 2d tangency points of the multipoint <MPointIndex> only
0113   //! when 2d points exist.
0114   Standard_EXPORT Standard_Boolean Tangency ( const Standard_Integer MPointIndex,
0115                                               TColgp_Array1OfVec2d& tabV2d) const;
0116   
0117   //! Returns the 3d and 2d points of the multipoint <MPointIndex>.
0118   Standard_EXPORT Standard_Boolean Tangency (const Standard_Integer MPointIndex, TColgp_Array1OfVec& tabV, TColgp_Array1OfVec2d& tabV2d) const;
0119   
0120   //! Tries to make a sub-line between <Low> and <High> points of this line
0121   //! by adding <NbPointsToInsert> new points
0122   Standard_EXPORT GeomInt_TheMultiLineOfWLApprox MakeMLBetween (const Standard_Integer Low,
0123                                                                 const Standard_Integer High,
0124                                                                 const Standard_Integer NbPointsToInsert) const;
0125   
0126   //! Tries to make a sub-line between <Low> and <High> points of this line
0127   //! by adding one more point between (indbad-1)-th and indbad-th points
0128   Standard_EXPORT Standard_Boolean MakeMLOneMorePoint (const Standard_Integer Low,
0129                                                        const Standard_Integer High,
0130                                                        const Standard_Integer indbad,
0131                                                        GeomInt_TheMultiLineOfWLApprox& OtherLine) const;
0132 
0133   //! Dump of the current multi-line.
0134   Standard_EXPORT void Dump() const;
0135 
0136 
0137 
0138 
0139 protected:
0140 
0141 private:
0142   Standard_Address PtrOnmySvSurfaces;
0143   Handle(IntPatch_WLine) myLine;
0144   Standard_Integer indicemin;
0145   Standard_Integer indicemax;
0146   Standard_Integer nbp3d;
0147   Standard_Integer nbp2d;
0148   Standard_Boolean myApproxU1V1;
0149   Standard_Boolean myApproxU2V2;
0150   Standard_Boolean p2donfirst;
0151   Standard_Real Xo;
0152   Standard_Real Yo;
0153   Standard_Real Zo;
0154   Standard_Real U1o;
0155   Standard_Real V1o;
0156   Standard_Real U2o;
0157   Standard_Real V2o;
0158 
0159 
0160 };
0161 
0162 #endif // _GeomInt_TheMultiLineOfWLApprox_HeaderFile