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 
0022 inline GeomInt_IntSS::GeomInt_IntSS()
0023     : myNbrestr(0),
0024       myTolReached2d(0.0),
0025       myTolReached3d(0.0),
0026       myTolCheck(1.e-7),
0027       myTolAngCheck(1.e-6)
0028 {
0029 }
0030 
0031 //=================================================================================================
0032 
0033 inline GeomInt_IntSS::GeomInt_IntSS(const occ::handle<Geom_Surface>& S1,
0034                                     const occ::handle<Geom_Surface>& S2,
0035                                     const double                     Tol,
0036                                     const bool                       Approx,
0037                                     const bool                       ApproxS1,
0038                                     const bool                       ApproxS2)
0039     : myNbrestr(0),
0040       myTolReached2d(0.0),
0041       myTolReached3d(0.0),
0042       myTolCheck(1.e-7),
0043       myTolAngCheck(1.e-6)
0044 {
0045   Perform(S1, S2, Tol, Approx, ApproxS1, ApproxS2);
0046 }
0047 
0048 //=======================================================================
0049 // function : Perform
0050 // purpose  : Intersection of Adapted surfaces
0051 //=======================================================================
0052 inline void GeomInt_IntSS::Perform(const occ::handle<GeomAdaptor_Surface>& HS1,
0053                                    const occ::handle<GeomAdaptor_Surface>& HS2,
0054                                    const double                            Tol,
0055                                    const bool                              Approx,
0056                                    const bool                              ApproxS1,
0057                                    const bool                              ApproxS2)
0058 {
0059   myHS1 = HS1;
0060   myHS2 = HS2;
0061   InternalPerform(Tol, Approx, ApproxS1, ApproxS2, false, 0., 0., 0., 0.);
0062 }
0063 
0064 //=======================================================================
0065 // function : Perform
0066 // purpose  : Intersection of Adapted surfaces with a Starting Point
0067 //=======================================================================
0068 inline void GeomInt_IntSS::Perform(const occ::handle<GeomAdaptor_Surface>& HS1,
0069                                    const occ::handle<GeomAdaptor_Surface>& HS2,
0070                                    const double                            Tol,
0071                                    const double                            U1,
0072                                    const double                            V1,
0073                                    const double                            U2,
0074                                    const double                            V2,
0075                                    const bool                              Approx,
0076                                    const bool                              ApproxS1,
0077                                    const bool                              ApproxS2)
0078 {
0079   myHS1 = HS1;
0080   myHS2 = HS2;
0081   InternalPerform(Tol, Approx, ApproxS1, ApproxS2, true, U1, V1, U2, V2);
0082 }
0083 
0084 //=================================================================================================
0085 
0086 inline bool GeomInt_IntSS::IsDone() const
0087 {
0088   return myIntersector.IsDone();
0089 }
0090 
0091 //=================================================================================================
0092 
0093 inline double GeomInt_IntSS::TolReached2d() const
0094 {
0095   return myTolReached2d;
0096 }
0097 
0098 //=================================================================================================
0099 
0100 inline double GeomInt_IntSS::TolReached3d() const
0101 {
0102   return myTolReached3d;
0103 }
0104 
0105 //=================================================================================================
0106 
0107 inline int GeomInt_IntSS::NbLines() const
0108 {
0109   return sline.Length() - myNbrestr;
0110 }
0111 
0112 //=================================================================================================
0113 
0114 inline int GeomInt_IntSS::NbBoundaries() const
0115 {
0116   StdFail_NotDone_Raise_if(!myIntersector.IsDone(), "GeomInt_IntSS::NbBoundaries() - no result");
0117   return myNbrestr;
0118 }
0119 
0120 //=================================================================================================
0121 
0122 inline int GeomInt_IntSS::NbPoints() const
0123 {
0124   return myIntersector.NbPnts();
0125 }
0126 
0127 //=================================================================================================
0128 
0129 inline gp_Pnt GeomInt_IntSS::Point(const int Index) const
0130 {
0131   return myIntersector.Point(Index).Value();
0132 }