Back to home page

EIC code displayed by LXR

 
 

    


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

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