Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Created on: 1995-07-02
0002 // Created by: Laurent BUCHARD
0003 // Copyright (c) 1995-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_HContTool_HeaderFile
0018 #define _Contap_HContTool_HeaderFile
0019 
0020 #include <Adaptor2d_Curve2d.hxx>
0021 #include <Adaptor3d_Surface.hxx>
0022 
0023 class gp_Pnt2d;
0024 class Adaptor3d_HVertex;
0025 class gp_Pnt;
0026 
0027 
0028 //! Tool for the intersection between 2 surfaces.
0029 //! Regroupe pour l instant les methodes hors Adaptor3d...
0030 class Contap_HContTool 
0031 {
0032 public:
0033 
0034   DEFINE_STANDARD_ALLOC
0035 
0036   
0037   Standard_EXPORT static Standard_Integer NbSamplesU (const Handle(Adaptor3d_Surface)& S, const Standard_Real u1, const Standard_Real u2);
0038   
0039   Standard_EXPORT static Standard_Integer NbSamplesV (const Handle(Adaptor3d_Surface)& S, const Standard_Real v1, const Standard_Real v2);
0040   
0041   Standard_EXPORT static Standard_Integer NbSamplePoints (const Handle(Adaptor3d_Surface)& S);
0042   
0043   Standard_EXPORT static void SamplePoint (const Handle(Adaptor3d_Surface)& S, const Standard_Integer Index, Standard_Real& U, Standard_Real& V);
0044   
0045   //! Returns True if all the intersection point and edges
0046   //! are known on the Arc.
0047   //! The intersection point are given as vertices.
0048   //! The intersection edges are given as intervals between
0049   //! two vertices.
0050   Standard_EXPORT static Standard_Boolean HasBeenSeen (const Handle(Adaptor2d_Curve2d)& C);
0051   
0052   //! returns the number of points which is used to make
0053   //! a sample on the arc. this number is a function of
0054   //! the Surface and the CurveOnSurface complexity.
0055   Standard_EXPORT static Standard_Integer NbSamplesOnArc (const Handle(Adaptor2d_Curve2d)& A);
0056   
0057   //! Returns the parametric limits on the arc C.
0058   //! These limits must be finite : they are either
0059   //! the real limits of the arc, for a finite arc,
0060   //! or a bounding box for an infinite arc.
0061   Standard_EXPORT static void Bounds (const Handle(Adaptor2d_Curve2d)& C, Standard_Real& Ufirst, Standard_Real& Ulast);
0062   
0063   //! Projects the point P on the arc C.
0064   //! If the methods returns Standard_True, the projection is
0065   //! successful, and Paramproj is the parameter on the arc
0066   //! of the projected point, Ptproj is the projected Point.
0067   //! If the method returns Standard_False, Param proj and Ptproj
0068   //! are not significant.
0069   Standard_EXPORT static Standard_Boolean Project (const Handle(Adaptor2d_Curve2d)& C, const gp_Pnt2d& P, Standard_Real& Paramproj, gp_Pnt2d& Ptproj);
0070   
0071   //! Returns the parametric tolerance used to consider
0072   //! that the vertex and another point meet, i-e
0073   //! if Abs(parameter(Vertex) - parameter(OtherPnt))<=
0074   //! Tolerance, the points are "merged".
0075   Standard_EXPORT static Standard_Real Tolerance (const Handle(Adaptor3d_HVertex)& V, const Handle(Adaptor2d_Curve2d)& C);
0076   
0077   //! Returns the parameter of the vertex V on the arc A.
0078   Standard_EXPORT static Standard_Real Parameter (const Handle(Adaptor3d_HVertex)& V, const Handle(Adaptor2d_Curve2d)& C);
0079   
0080   //! Returns the number of intersection points on the arc A.
0081   Standard_EXPORT static Standard_Integer NbPoints (const Handle(Adaptor2d_Curve2d)& C);
0082   
0083   //! Returns the value (Pt), the tolerance (Tol), and
0084   //! the parameter (U) on the arc A , of the intersection
0085   //! point of range Index.
0086   Standard_EXPORT static void Value (const Handle(Adaptor2d_Curve2d)& C, const Standard_Integer Index, gp_Pnt& Pt, Standard_Real& Tol, Standard_Real& U);
0087   
0088   //! Returns True if the intersection point of range Index
0089   //! corresponds with a vertex on the arc A.
0090   Standard_EXPORT static Standard_Boolean IsVertex (const Handle(Adaptor2d_Curve2d)& C, const Standard_Integer Index);
0091   
0092   //! When IsVertex returns True, this method returns the
0093   //! vertex on the arc A.
0094   Standard_EXPORT static void Vertex (const Handle(Adaptor2d_Curve2d)& C, const Standard_Integer Index, Handle(Adaptor3d_HVertex)& V);
0095   
0096   //! returns the number of part of A solution of the
0097   //! of intersection problem.
0098   Standard_EXPORT static Standard_Integer NbSegments (const Handle(Adaptor2d_Curve2d)& C);
0099   
0100   //! Returns True when the segment of range Index is not
0101   //! open at the left side. In that case, IndFirst is the
0102   //! range in the list intersection points (see NbPoints)
0103   //! of the one which defines the left bound of the segment.
0104   //! Otherwise, the method has to return False, and IndFirst
0105   //! has no meaning.
0106   Standard_EXPORT static Standard_Boolean HasFirstPoint (const Handle(Adaptor2d_Curve2d)& C, const Standard_Integer Index, Standard_Integer& IndFirst);
0107   
0108   //! Returns True when the segment of range Index is not
0109   //! open at the right side. In that case, IndLast is the
0110   //! range in the list intersection points (see NbPoints)
0111   //! of the one which defines the right bound of the segment.
0112   //! Otherwise, the method has to return False, and IndLast
0113   //! has no meaning.
0114   Standard_EXPORT static Standard_Boolean HasLastPoint (const Handle(Adaptor2d_Curve2d)& C, const Standard_Integer Index, Standard_Integer& IndLast);
0115   
0116   //! Returns True when the whole restriction is solution
0117   //! of the intersection problem.
0118   Standard_EXPORT static Standard_Boolean IsAllSolution (const Handle(Adaptor2d_Curve2d)& C);
0119 
0120 
0121 
0122 
0123 protected:
0124 
0125 
0126 
0127 
0128 
0129 private:
0130 
0131 
0132 
0133 
0134 
0135 };
0136 
0137 
0138 
0139 
0140 
0141 
0142 
0143 #endif // _Contap_HContTool_HeaderFile