Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Created on: 1993-03-04
0002 // Created by: Jacques GOUSSARD
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 _Contap_Point_HeaderFile
0018 #define _Contap_Point_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <gp_Pnt.hxx>
0025 #include <IntSurf_Transition.hxx>
0026 
0027 class Adaptor3d_HVertex;
0028 
0029 
0030 //! Definition of a vertex on the contour line.
0031 //! Most of the time, such a point is an intersection
0032 //! between the contour and a restriction of the surface.
0033 //! When it is not the method IsOnArc return False.
0034 //! Such a point is contains geometrical information (see
0035 //! the Value method) and logical information.
0036 class Contap_Point 
0037 {
0038 public:
0039 
0040   DEFINE_STANDARD_ALLOC
0041 
0042   
0043   //! Empty constructor.
0044   Standard_EXPORT Contap_Point();
0045   
0046   //! Creates a point.
0047   Standard_EXPORT Contap_Point(const gp_Pnt& Pt, const Standard_Real U, const Standard_Real V);
0048   
0049   //! Sets the values for a point.
0050     void SetValue (const gp_Pnt& Pt, const Standard_Real U, const Standard_Real V);
0051   
0052   //! Set the value of the parameter on the intersection line.
0053     void SetParameter (const Standard_Real Para);
0054   
0055   //! Sets the values of a point which is a vertex on
0056   //! the initial facet of restriction of one
0057   //! of the surface.
0058     void SetVertex (const Handle(Adaptor3d_HVertex)& V);
0059   
0060   //! Sets the value of the arc and of the parameter on
0061   //! this arc of the point.
0062     void SetArc (const Handle(Adaptor2d_Curve2d)& A, const Standard_Real Param, const IntSurf_Transition& TLine, const IntSurf_Transition& TArc);
0063   
0064     void SetMultiple();
0065   
0066     void SetInternal();
0067   
0068   //! Returns the intersection point (geometric information).
0069     const gp_Pnt& Value() const;
0070   
0071   //! This method returns the parameter of the point
0072   //! on the intersection line.
0073   //! If the points does not belong to an intersection line,
0074   //! the value returned does not have any sens.
0075     Standard_Real ParameterOnLine() const;
0076   
0077   //! Returns the parameters on the surface of the point.
0078     void Parameters (Standard_Real& U1, Standard_Real& V1) const;
0079   
0080   //! Returns True when the point is an intersection between
0081   //! the contour and a restriction.
0082     Standard_Boolean IsOnArc() const;
0083   
0084   //! Returns the arc of restriction containing the
0085   //! vertex.
0086     const Handle(Adaptor2d_Curve2d)& Arc() const;
0087   
0088   //! Returns the parameter of the point on the
0089   //! arc returned by the method Arc().
0090     Standard_Real ParameterOnArc() const;
0091   
0092   //! Returns the transition of the point on the contour.
0093     const IntSurf_Transition& TransitionOnLine() const;
0094   
0095   //! Returns the transition of the point on the arc.
0096     const IntSurf_Transition& TransitionOnArc() const;
0097   
0098   //! Returns TRUE if the point is a vertex on the initial
0099   //! restriction facet of the surface.
0100     Standard_Boolean IsVertex() const;
0101   
0102   //! Returns the information about the point when it is
0103   //! on the domain of the patch, i-e when the function
0104   //! IsVertex returns True.
0105   //! Otherwise, an exception is raised.
0106     const Handle(Adaptor3d_HVertex)& Vertex() const;
0107   
0108   //! Returns True if the point belongs to several
0109   //! lines.
0110     Standard_Boolean IsMultiple() const;
0111   
0112   //! Returns True if the point  is an internal one, i.e
0113   //! if the  tangent to the line on  the point  and the
0114   //! eye direction are parallel.
0115     Standard_Boolean IsInternal() const;
0116 
0117 
0118 
0119 
0120 protected:
0121 
0122 
0123 
0124 
0125 
0126 private:
0127 
0128 
0129 
0130   gp_Pnt pt;
0131   Standard_Real uparam;
0132   Standard_Real vparam;
0133   Standard_Real paraline;
0134   Standard_Boolean onarc;
0135   Handle(Adaptor2d_Curve2d) arc;
0136   IntSurf_Transition traline;
0137   IntSurf_Transition traarc;
0138   Standard_Real prmarc;
0139   Standard_Boolean isvtx;
0140   Handle(Adaptor3d_HVertex) vtx;
0141   Standard_Boolean ismult;
0142   Standard_Boolean myInternal;
0143 
0144 
0145 };
0146 
0147 
0148 #include <Contap_Point.lxx>
0149 
0150 
0151 
0152 
0153 
0154 #endif // _Contap_Point_HeaderFile