Back to home page

EIC code displayed by LXR

 
 

    


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 // function : GeomInt_IntSS
0022 // purpose  :
0023 //=======================================================================
0024 inline GeomInt_IntSS::GeomInt_IntSS()
0025     : myNbrestr(0),
0026       myTolReached2d(0.0),
0027       myTolReached3d(0.0),
0028       myTolCheck(1.e-7),
0029       myTolAngCheck(1.e-6)
0030 {
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,
0076                                    const Standard_Real                V1,
0077                                    const Standard_Real                U2,
0078                                    const Standard_Real                V2,
0079                                    const Standard_Boolean             Approx,
0080                                    const Standard_Boolean             ApproxS1,
0081                                    const Standard_Boolean             ApproxS2)
0082 {
0083   myHS1 = HS1;
0084   myHS2 = HS2;
0085   InternalPerform(Tol, Approx, ApproxS1, ApproxS2, Standard_True, U1, V1, U2, V2);
0086 }
0087 
0088 //=======================================================================
0089 // function : IsDone
0090 // purpose  :
0091 //=======================================================================
0092 inline Standard_Boolean GeomInt_IntSS::IsDone() const
0093 {
0094   return myIntersector.IsDone();
0095 }
0096 
0097 //=======================================================================
0098 // function : TolReached2d
0099 // purpose  :
0100 //=======================================================================
0101 inline Standard_Real GeomInt_IntSS::TolReached2d() const
0102 {
0103   return myTolReached2d;
0104 }
0105 
0106 //=======================================================================
0107 // function : TolReached3d
0108 // purpose  :
0109 //=======================================================================
0110 inline Standard_Real GeomInt_IntSS::TolReached3d() const
0111 {
0112   return myTolReached3d;
0113 }
0114 
0115 //=======================================================================
0116 // function : NbLines
0117 // purpose  :
0118 //=======================================================================
0119 inline Standard_Integer GeomInt_IntSS::NbLines() const
0120 {
0121   return sline.Length() - myNbrestr;
0122 }
0123 
0124 //=======================================================================
0125 // function : NbBoundaries
0126 // purpose  :
0127 //=======================================================================
0128 inline Standard_Integer GeomInt_IntSS::NbBoundaries() const
0129 {
0130   StdFail_NotDone_Raise_if(!myIntersector.IsDone(), "GeomInt_IntSS::NbBoundaries() - no result");
0131   return myNbrestr;
0132 }
0133 
0134 //=======================================================================
0135 // function : NbPoints
0136 // purpose  :
0137 //=======================================================================
0138 inline Standard_Integer GeomInt_IntSS::NbPoints() const
0139 {
0140   return myIntersector.NbPnts();
0141 }
0142 
0143 //=======================================================================
0144 // function : Point
0145 // purpose  :
0146 //=======================================================================
0147 inline gp_Pnt GeomInt_IntSS::Point(const Standard_Integer Index) const
0148 {
0149   return myIntersector.Point(Index).Value();
0150 }