Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-14 09:13:50

0001 // Created on: 1994-01-25
0002 // Created by: Jacques GOUSSARD
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 _BRepBlend_Extremity_HeaderFile
0018 #define _BRepBlend_Extremity_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <BRepBlend_PointOnRst.hxx>
0025 #include <NCollection_Sequence.hxx>
0026 #include <gp_Pnt.hxx>
0027 #include <gp_Vec.hxx>
0028 #include <Standard_Real.hxx>
0029 #include <Standard_Boolean.hxx>
0030 #include <Standard_Integer.hxx>
0031 class Adaptor3d_HVertex;
0032 class IntSurf_Transition;
0033 class BRepBlend_PointOnRst;
0034 
0035 class BRepBlend_Extremity
0036 {
0037 public:
0038   DEFINE_STANDARD_ALLOC
0039 
0040   Standard_EXPORT BRepBlend_Extremity();
0041 
0042   //! Creates an extremity on a surface
0043   Standard_EXPORT BRepBlend_Extremity(const gp_Pnt& P,
0044                                       const double  U,
0045                                       const double  V,
0046                                       const double  Param,
0047                                       const double  Tol);
0048 
0049   //! Creates an extremity on a surface. This extremity matches
0050   //! the vertex <Vtx>.
0051   Standard_EXPORT BRepBlend_Extremity(const gp_Pnt&                         P,
0052                                       const double                          U,
0053                                       const double                          V,
0054                                       const double                          Param,
0055                                       const double                          Tol,
0056                                       const occ::handle<Adaptor3d_HVertex>& Vtx);
0057 
0058   //! Creates an extremity on a curve
0059   Standard_EXPORT BRepBlend_Extremity(const gp_Pnt& P,
0060                                       const double  W,
0061                                       const double  Param,
0062                                       const double  Tol);
0063 
0064   //! Set the values for an extremity on a surface.
0065   Standard_EXPORT void SetValue(const gp_Pnt& P,
0066                                 const double  U,
0067                                 const double  V,
0068                                 const double  Param,
0069                                 const double  Tol);
0070 
0071   //! Set the values for an extremity on a surface.This
0072   //! extremity matches the vertex <Vtx>.
0073   Standard_EXPORT void SetValue(const gp_Pnt&                         P,
0074                                 const double                          U,
0075                                 const double                          V,
0076                                 const double                          Param,
0077                                 const double                          Tol,
0078                                 const occ::handle<Adaptor3d_HVertex>& Vtx);
0079 
0080   //! Set the values for an extremity on curve.
0081   Standard_EXPORT void SetValue(const gp_Pnt& P,
0082                                 const double  W,
0083                                 const double  Param,
0084                                 const double  Tol);
0085 
0086   //! This method returns the value of the point in 3d space.
0087   const gp_Pnt& Value() const;
0088 
0089   //! Set the tangent vector for an extremity on a
0090   //! surface.
0091   void SetTangent(const gp_Vec& Tangent);
0092 
0093   //! Returns TRUE if the Tangent is stored.
0094   bool HasTangent() const;
0095 
0096   //! This method returns the value of tangent in 3d
0097   //! space.
0098   const gp_Vec& Tangent() const;
0099 
0100   //! This method returns the fuzziness on the point
0101   //! in 3d space.
0102   double Tolerance() const;
0103 
0104   //! Set the values for an extremity on a curve.
0105   Standard_EXPORT void SetVertex(const occ::handle<Adaptor3d_HVertex>& V);
0106 
0107   //! Sets the values of a point which is on the arc
0108   //! A, at parameter Param.
0109   Standard_EXPORT void AddArc(const occ::handle<Adaptor2d_Curve2d>& A,
0110                               const double                          Param,
0111                               const IntSurf_Transition&             TLine,
0112                               const IntSurf_Transition&             TArc);
0113 
0114   //! This method returns the parameters of the point
0115   //! on the concerned surface.
0116   void Parameters(double& U, double& V) const;
0117 
0118   //! Returns true when the point coincide with
0119   //! an existing vertex.
0120   bool IsVertex() const;
0121 
0122   //! Returns the vertex when IsVertex returns true.
0123   const occ::handle<Adaptor3d_HVertex>& Vertex() const;
0124 
0125   //! Returns the number of arc containing the extremity.
0126   //! If the method returns 0, the point is inside the
0127   //! surface.
0128   //! Otherwise, the extremity lies on at least 1 arc,
0129   //! and all the information (arc, parameter, transitions)
0130   //! are given by the point on restriction (PointOnRst)
0131   //! returned by the next method.
0132   int NbPointOnRst() const;
0133 
0134   const BRepBlend_PointOnRst& PointOnRst(const int Index) const;
0135 
0136   double Parameter() const;
0137 
0138   double ParameterOnGuide() const;
0139 
0140 private:
0141   occ::handle<Adaptor3d_HVertex>             vtx;
0142   NCollection_Sequence<BRepBlend_PointOnRst> seqpt;
0143   gp_Pnt                                     pt;
0144   gp_Vec                                     tang;
0145   double                                     param;
0146   double                                     u;
0147   double                                     v;
0148   double                                     tol;
0149   bool                                       isvtx;
0150   bool                                       hastang;
0151 };
0152 
0153 #include <BRepBlend_Extremity.lxx>
0154 
0155 #endif // _BRepBlend_Extremity_HeaderFile