Warning, /include/opencascade/GeomInt_IntSS.lxx is written in an unsupported language. File is not indexed.
0001 // Created on: 1995-01-27
0002 // Created by: Jacques GOUSSARD
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 #include <IntPatch_Point.hxx>
0018 #include <Geom_Surface.hxx>
0019
0020
0021 //=======================================================================
0022 //function : GeomInt_IntSS
0023 //purpose :
0024 //=======================================================================
0025 inline GeomInt_IntSS::GeomInt_IntSS ()
0026 : myNbrestr(0),
0027 myTolReached2d(0.0),
0028 myTolReached3d(0.0),
0029 myTolCheck(1.e-7),
0030 myTolAngCheck(1.e-6)
0031 {}
0032
0033 //=======================================================================
0034 //function : GeomInt_IntSS
0035 //purpose :
0036 //=======================================================================
0037 inline GeomInt_IntSS::GeomInt_IntSS (const Handle(Geom_Surface)& S1,
0038 const Handle(Geom_Surface)& S2,
0039 const Standard_Real Tol,
0040 const Standard_Boolean Approx,
0041 const Standard_Boolean ApproxS1,
0042 const Standard_Boolean ApproxS2)
0043 : myNbrestr(0),
0044 myTolReached2d(0.0),
0045 myTolReached3d(0.0),
0046 myTolCheck(1.e-7),
0047 myTolAngCheck(1.e-6)
0048 {
0049 Perform(S1,S2,Tol,Approx,ApproxS1,ApproxS2);
0050 }
0051
0052 //=======================================================================
0053 //function : Perform
0054 //purpose : Intersection of Adapted surfaces
0055 //=======================================================================
0056 inline void GeomInt_IntSS::Perform(const Handle(GeomAdaptor_Surface)& HS1,
0057 const Handle(GeomAdaptor_Surface)& HS2,
0058 const Standard_Real Tol,
0059 const Standard_Boolean Approx,
0060 const Standard_Boolean ApproxS1,
0061 const Standard_Boolean ApproxS2)
0062 {
0063 myHS1 = HS1;
0064 myHS2 = HS2;
0065 InternalPerform(Tol,Approx,ApproxS1,ApproxS2,Standard_False,0.,0.,0.,0.);
0066 }
0067
0068 //=======================================================================
0069 //function : Perform
0070 //purpose : Intersection of Adapted surfaces with a Starting Point
0071 //=======================================================================
0072 inline void GeomInt_IntSS::Perform(const Handle(GeomAdaptor_Surface)& HS1,
0073 const Handle(GeomAdaptor_Surface)& HS2,
0074 const Standard_Real Tol,
0075 const Standard_Real U1, const Standard_Real V1,
0076 const Standard_Real U2, const Standard_Real V2,
0077 const Standard_Boolean Approx,
0078 const Standard_Boolean ApproxS1,
0079 const Standard_Boolean ApproxS2)
0080 {
0081 myHS1 = HS1;
0082 myHS2 = HS2;
0083 InternalPerform(Tol,Approx,ApproxS1,ApproxS2,Standard_True,U1,V1,U2,V2);
0084 }
0085
0086 //=======================================================================
0087 //function : IsDone
0088 //purpose :
0089 //=======================================================================
0090 inline Standard_Boolean GeomInt_IntSS::IsDone () const
0091 {
0092 return myIntersector.IsDone();
0093 }
0094
0095 //=======================================================================
0096 //function : TolReached2d
0097 //purpose :
0098 //=======================================================================
0099 inline Standard_Real GeomInt_IntSS::TolReached2d () const
0100 {
0101 return myTolReached2d;
0102 }
0103
0104 //=======================================================================
0105 //function : TolReached3d
0106 //purpose :
0107 //=======================================================================
0108 inline Standard_Real GeomInt_IntSS::TolReached3d () const
0109 {
0110 return myTolReached3d;
0111 }
0112
0113 //=======================================================================
0114 //function : NbLines
0115 //purpose :
0116 //=======================================================================
0117 inline Standard_Integer GeomInt_IntSS::NbLines () const
0118 {
0119 return sline.Length()-myNbrestr;
0120 }
0121
0122 //=======================================================================
0123 //function : NbBoundaries
0124 //purpose :
0125 //=======================================================================
0126 inline Standard_Integer GeomInt_IntSS::NbBoundaries () const
0127 {
0128 StdFail_NotDone_Raise_if (!myIntersector.IsDone(), "GeomInt_IntSS::NbBoundaries() - no result");
0129 return myNbrestr;
0130 }
0131
0132 //=======================================================================
0133 //function : NbPoints
0134 //purpose :
0135 //=======================================================================
0136 inline Standard_Integer GeomInt_IntSS::NbPoints () const
0137 {
0138 return myIntersector.NbPnts();
0139 }
0140
0141 //=======================================================================
0142 //function : Point
0143 //purpose :
0144 //=======================================================================
0145 inline gp_Pnt GeomInt_IntSS::Point (const Standard_Integer Index) const
0146 {
0147 return myIntersector.Point(Index).Value();
0148 }