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