Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-12 09:16:57

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 //! Definition of a vertex on the contour line.
0030 //! Most of the time, such a point is an intersection
0031 //! between the contour and a restriction of the surface.
0032 //! When it is not the method IsOnArc return False.
0033 //! Such a point is contains geometrical information (see
0034 //! the Value method) and logical information.
0035 class Contap_Point
0036 {
0037 public:
0038   DEFINE_STANDARD_ALLOC
0039 
0040   //! Empty constructor.
0041   Standard_EXPORT Contap_Point();
0042 
0043   //! Creates a point.
0044   Standard_EXPORT Contap_Point(const gp_Pnt& Pt, const double U, const double V);
0045 
0046   //! Sets the values for a point.
0047   void SetValue(const gp_Pnt& Pt, const double U, const double V);
0048 
0049   //! Set the value of the parameter on the intersection line.
0050   void SetParameter(const double Para);
0051 
0052   //! Sets the values of a point which is a vertex on
0053   //! the initial facet of restriction of one
0054   //! of the surface.
0055   void SetVertex(const occ::handle<Adaptor3d_HVertex>& V);
0056 
0057   //! Sets the value of the arc and of the parameter on
0058   //! this arc of the point.
0059   void SetArc(const occ::handle<Adaptor2d_Curve2d>& A,
0060               const double                          Param,
0061               const IntSurf_Transition&             TLine,
0062               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   double ParameterOnLine() const;
0076 
0077   //! Returns the parameters on the surface of the point.
0078   void Parameters(double& U1, double& V1) const;
0079 
0080   //! Returns True when the point is an intersection between
0081   //! the contour and a restriction.
0082   bool IsOnArc() const;
0083 
0084   //! Returns the arc of restriction containing the
0085   //! vertex.
0086   const occ::handle<Adaptor2d_Curve2d>& Arc() const;
0087 
0088   //! Returns the parameter of the point on the
0089   //! arc returned by the method Arc().
0090   double 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   bool 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 occ::handle<Adaptor3d_HVertex>& Vertex() const;
0107 
0108   //! Returns True if the point belongs to several
0109   //! lines.
0110   bool 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   bool IsInternal() const;
0116 
0117 private:
0118   gp_Pnt                         pt;
0119   double                         uparam;
0120   double                         vparam;
0121   double                         paraline;
0122   bool                           onarc;
0123   occ::handle<Adaptor2d_Curve2d> arc;
0124   IntSurf_Transition             traline;
0125   IntSurf_Transition             traarc;
0126   double                         prmarc;
0127   bool                           isvtx;
0128   occ::handle<Adaptor3d_HVertex> vtx;
0129   bool                           ismult;
0130   bool                           myInternal;
0131 };
0132 
0133 #include <Contap_Point.lxx>
0134 
0135 #endif // _Contap_Point_HeaderFile