Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:04:09

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