Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/opencascade/AppDef_MyLineTool.hxx was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // Created on: 1993-01-20
0002 // Created by: Laurent PAINNOT
0003 // Copyright (c) 1993-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 _AppDef_MyLineTool_HeaderFile
0018 #define _AppDef_MyLineTool_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 
0023 #include <Standard_Integer.hxx>
0024 #include <gp_Pnt.hxx>
0025 #include <NCollection_Array1.hxx>
0026 #include <gp_Pnt2d.hxx>
0027 #include <gp_Vec.hxx>
0028 #include <gp_Vec2d.hxx>
0029 #include <Approx_Status.hxx>
0030 class AppDef_MultiLine;
0031 
0032 //! Example of MultiLine tool corresponding to the tools of the packages AppParCurves and Approx.
0033 //! For Approx, the tool will not add points if the algorithms want some.
0034 class AppDef_MyLineTool
0035 {
0036 public:
0037   DEFINE_STANDARD_ALLOC
0038 
0039   //! Returns the first index of multipoints of the MultiLine.
0040   Standard_EXPORT static int FirstPoint(const AppDef_MultiLine& ML);
0041 
0042   //! Returns the last index of multipoints of the MultiLine.
0043   Standard_EXPORT static int LastPoint(const AppDef_MultiLine& ML);
0044 
0045   //! Returns the number of 2d points of a MultiLine.
0046   Standard_EXPORT static int NbP2d(const AppDef_MultiLine& ML);
0047 
0048   //! Returns the number of 3d points of a MultiLine.
0049   Standard_EXPORT static int NbP3d(const AppDef_MultiLine& ML);
0050 
0051   //! returns the 3d points of the multipoint <MPointIndex>
0052   //! when only 3d points exist.
0053   Standard_EXPORT static void Value(const AppDef_MultiLine&     ML,
0054                                     const int                   MPointIndex,
0055                                     NCollection_Array1<gp_Pnt>& tabPt);
0056 
0057   //! returns the 2d points of the multipoint <MPointIndex>
0058   //! when only 2d points exist.
0059   Standard_EXPORT static void Value(const AppDef_MultiLine&       ML,
0060                                     const int                     MPointIndex,
0061                                     NCollection_Array1<gp_Pnt2d>& tabPt2d);
0062 
0063   //! returns the 3d and 2d points of the multipoint
0064   //! <MPointIndex>.
0065   Standard_EXPORT static void Value(const AppDef_MultiLine&       ML,
0066                                     const int                     MPointIndex,
0067                                     NCollection_Array1<gp_Pnt>&   tabPt,
0068                                     NCollection_Array1<gp_Pnt2d>& tabPt2d);
0069 
0070   //! returns the 3d points of the multipoint <MPointIndex>
0071   //! when only 3d points exist.
0072   Standard_EXPORT static bool Tangency(const AppDef_MultiLine&     ML,
0073                                        const int                   MPointIndex,
0074                                        NCollection_Array1<gp_Vec>& tabV);
0075 
0076   //! returns the 2d tangency points of the multipoint
0077   //! <MPointIndex> only when 2d points exist.
0078   Standard_EXPORT static bool Tangency(const AppDef_MultiLine&       ML,
0079                                        const int                     MPointIndex,
0080                                        NCollection_Array1<gp_Vec2d>& tabV2d);
0081 
0082   //! returns the 3d and 2d points of the multipoint
0083   //! <MPointIndex>.
0084   Standard_EXPORT static bool Tangency(const AppDef_MultiLine&       ML,
0085                                        const int                     MPointIndex,
0086                                        NCollection_Array1<gp_Vec>&   tabV,
0087                                        NCollection_Array1<gp_Vec2d>& tabV2d);
0088 
0089   //! returns the 3d curvatures of the multipoint <MPointIndex>
0090   //! when only 3d points exist.
0091   Standard_EXPORT static bool Curvature(const AppDef_MultiLine&     ML,
0092                                         const int                   MPointIndex,
0093                                         NCollection_Array1<gp_Vec>& tabV);
0094 
0095   //! returns the 2d curvatures of the multipoint
0096   //! <MPointIndex> only when 2d points exist.
0097   Standard_EXPORT static bool Curvature(const AppDef_MultiLine&       ML,
0098                                         const int                     MPointIndex,
0099                                         NCollection_Array1<gp_Vec2d>& tabV2d);
0100 
0101   //! returns the 3d and 2d curvatures of the multipoint
0102   //! <MPointIndex>.
0103   Standard_EXPORT static bool Curvature(const AppDef_MultiLine&       ML,
0104                                         const int                     MPointIndex,
0105                                         NCollection_Array1<gp_Vec>&   tabV,
0106                                         NCollection_Array1<gp_Vec2d>& tabV2d);
0107 
0108   //! returns NoPointsAdded
0109   Standard_EXPORT static Approx_Status WhatStatus(const AppDef_MultiLine& ML,
0110                                                   const int               I1,
0111                                                   const int               I2);
0112 
0113   //! Is never called in the algorithms.
0114   //! Nothing is done.
0115   Standard_EXPORT static AppDef_MultiLine MakeMLBetween(const AppDef_MultiLine& ML,
0116                                                         const int               I1,
0117                                                         const int               I2,
0118                                                         const int               NbPMin);
0119 
0120   //! Is never called in the algorithms.
0121   //! Nothing is done.
0122   Standard_EXPORT static bool MakeMLOneMorePoint(const AppDef_MultiLine& ML,
0123                                                  const int               I1,
0124                                                  const int               I2,
0125                                                  const int               indbad,
0126                                                  AppDef_MultiLine&       OtherLine);
0127 };
0128 
0129 #endif // _AppDef_MyLineTool_HeaderFile