Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-25 09:19:52

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_TheMultiLineToolOfWLApprox_HeaderFile
0018 #define _GeomInt_TheMultiLineToolOfWLApprox_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <gp_Pnt.hxx>
0025 #include <NCollection_Array1.hxx>
0026 #include <Standard_Boolean.hxx>
0027 class GeomInt_TheMultiLineOfWLApprox;
0028 class ApproxInt_SvSurfaces;
0029 
0030 class GeomInt_TheMultiLineToolOfWLApprox
0031 {
0032 public:
0033   DEFINE_STANDARD_ALLOC
0034 
0035   //! Returns the number of multipoints of the TheMultiLine.
0036   static int FirstPoint(const GeomInt_TheMultiLineOfWLApprox& ML);
0037 
0038   //! Returns the number of multipoints of the TheMultiLine.
0039   static int LastPoint(const GeomInt_TheMultiLineOfWLApprox& ML);
0040 
0041   //! Returns the number of 2d points of a TheMultiLine.
0042   static int NbP2d(const GeomInt_TheMultiLineOfWLApprox& ML);
0043 
0044   //! Returns the number of 3d points of a TheMultiLine.
0045   static int NbP3d(const GeomInt_TheMultiLineOfWLApprox& ML);
0046 
0047   //! returns the 3d points of the multipoint <MPointIndex>
0048   //! when only 3d points exist.
0049   static void Value(const GeomInt_TheMultiLineOfWLApprox& ML,
0050                     const int                             MPointIndex,
0051                     NCollection_Array1<gp_Pnt>&           tabPt);
0052 
0053   //! returns the 2d points of the multipoint <MPointIndex>
0054   //! when only 2d points exist.
0055   static void Value(const GeomInt_TheMultiLineOfWLApprox& ML,
0056                     const int                             MPointIndex,
0057                     NCollection_Array1<gp_Pnt2d>&         tabPt2d);
0058 
0059   //! returns the 3d and 2d points of the multipoint
0060   //! <MPointIndex>.
0061   static void Value(const GeomInt_TheMultiLineOfWLApprox& ML,
0062                     const int                             MPointIndex,
0063                     NCollection_Array1<gp_Pnt>&           tabPt,
0064                     NCollection_Array1<gp_Pnt2d>&         tabPt2d);
0065 
0066   //! returns the 3d points of the multipoint <MPointIndex>
0067   //! when only 3d points exist.
0068   static bool Tangency(const GeomInt_TheMultiLineOfWLApprox& ML,
0069                        const int                             MPointIndex,
0070                        NCollection_Array1<gp_Vec>&           tabV);
0071 
0072   //! returns the 2d tangency points of the multipoint
0073   //! <MPointIndex> only when 2d points exist.
0074   static bool Tangency(const GeomInt_TheMultiLineOfWLApprox& ML,
0075                        const int                             MPointIndex,
0076                        NCollection_Array1<gp_Vec2d>&         tabV2d);
0077 
0078   //! returns the 3d and 2d points of the multipoint
0079   //! <MPointIndex>.
0080   static bool Tangency(const GeomInt_TheMultiLineOfWLApprox& ML,
0081                        const int                             MPointIndex,
0082                        NCollection_Array1<gp_Vec>&           tabV,
0083                        NCollection_Array1<gp_Vec2d>&         tabV2d);
0084 
0085   //! returns the 3d curvature of the multipoint <MPointIndex>
0086   //! when only 3d points exist.
0087   static bool Curvature(const GeomInt_TheMultiLineOfWLApprox& ML,
0088                         const int                             MPointIndex,
0089                         NCollection_Array1<gp_Vec>&           tabV);
0090 
0091   //! returns the 2d curvature points of the multipoint
0092   //! <MPointIndex> only when 2d points exist.
0093   static bool Curvature(const GeomInt_TheMultiLineOfWLApprox& ML,
0094                         const int                             MPointIndex,
0095                         NCollection_Array1<gp_Vec2d>&         tabV2d);
0096 
0097   //! returns the 3d and 2d curvature of the multipoint
0098   //! <MPointIndex>.
0099   static bool Curvature(const GeomInt_TheMultiLineOfWLApprox& ML,
0100                         const int                             MPointIndex,
0101                         NCollection_Array1<gp_Vec>&           tabV,
0102                         NCollection_Array1<gp_Vec2d>&         tabV2d);
0103 
0104   //! Is called if WhatStatus returned "PointsAdded".
0105   static GeomInt_TheMultiLineOfWLApprox MakeMLBetween(const GeomInt_TheMultiLineOfWLApprox& ML,
0106                                                       const int                             I1,
0107                                                       const int                             I2,
0108                                                       const int                             NbPMin);
0109 
0110   //! Is called when the Bezier curve contains a loop
0111   static bool MakeMLOneMorePoint(const GeomInt_TheMultiLineOfWLApprox& ML,
0112                                  const int                             I1,
0113                                  const int                             I2,
0114                                  const int                             indbad,
0115                                  GeomInt_TheMultiLineOfWLApprox&       OtherLine);
0116 
0117   static Approx_Status WhatStatus(const GeomInt_TheMultiLineOfWLApprox& ML,
0118                                   const int                             I1,
0119                                   const int                             I2);
0120 
0121   //! Dump of the current multi-line.
0122   static void Dump(const GeomInt_TheMultiLineOfWLApprox& ML);
0123 };
0124 
0125 #define TheMultiLine GeomInt_TheMultiLineOfWLApprox
0126 #define TheMultiLine_hxx <GeomInt_TheMultiLineOfWLApprox.hxx>
0127 #define TheMultiMPoint ApproxInt_SvSurfaces
0128 #define TheMultiMPoint_hxx <ApproxInt_SvSurfaces.hxx>
0129 #define ApproxInt_MultiLineTool GeomInt_TheMultiLineToolOfWLApprox
0130 #define ApproxInt_MultiLineTool_hxx <GeomInt_TheMultiLineToolOfWLApprox.hxx>
0131 
0132 #include <ApproxInt_MultiLineTool.lxx>
0133 
0134 #undef TheMultiLine
0135 #undef TheMultiLine_hxx
0136 #undef TheMultiMPoint
0137 #undef TheMultiMPoint_hxx
0138 #undef ApproxInt_MultiLineTool
0139 #undef ApproxInt_MultiLineTool_hxx
0140 
0141 #endif // _GeomInt_TheMultiLineToolOfWLApprox_HeaderFile