Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Created on: 1993-04-07
0002 // Created by: Laurent BUCHARD
0003 // Copyright (c) 1993-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 _IntCurveSurface_Intersection_HeaderFile
0018 #define _IntCurveSurface_Intersection_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <Standard_Boolean.hxx>
0025 #include <IntCurveSurface_SequenceOfPnt.hxx>
0026 #include <IntCurveSurface_SequenceOfSeg.hxx>
0027 class IntCurveSurface_IntersectionPoint;
0028 class IntCurveSurface_IntersectionSegment;
0029 
0030 
0031 
0032 class IntCurveSurface_Intersection 
0033 {
0034 public:
0035 
0036   DEFINE_STANDARD_ALLOC
0037 
0038   
0039   //! returns the <done> field.
0040   Standard_EXPORT Standard_Boolean IsDone() const;
0041   
0042   //! returns the number of IntersectionPoint
0043   //! if IsDone returns True.
0044   //! else NotDone is raised.
0045   Standard_EXPORT Standard_Integer NbPoints() const;
0046   
0047   //! returns the IntersectionPoint of range <Index>
0048   //! raises NotDone if the computation has failed or if
0049   //! the computation has not been done
0050   //! raises OutOfRange if Index is not in the range <1..NbPoints>
0051   Standard_EXPORT const IntCurveSurface_IntersectionPoint& Point (const Standard_Integer Index) const;
0052   
0053   //! returns the number of IntersectionSegment
0054   //! if IsDone returns True.
0055   //! else NotDone is raised.
0056   Standard_EXPORT Standard_Integer NbSegments() const;
0057   
0058   //! returns the IntersectionSegment of range <Index>
0059   //! raises NotDone if the computation has failed or if
0060   //! the computation has not been done
0061   //! raises OutOfRange if Index is not in the range <1..NbSegment>
0062   Standard_EXPORT const IntCurveSurface_IntersectionSegment& Segment (const Standard_Integer Index) const;
0063 
0064   //! Returns true if curve is parallel or belongs surface
0065   //! This case is recognized only for some pairs 
0066   //! of analytical curves and surfaces (plane - line, ...)
0067   Standard_EXPORT Standard_Boolean IsParallel() const;
0068 
0069   //! Dump all the fields.
0070   Standard_EXPORT void Dump() const;
0071 
0072 protected:
0073   
0074   //! Empty Constructor;
0075   Standard_EXPORT IntCurveSurface_Intersection();
0076   
0077   //! Destructor is protected, for safe inheritance
0078   ~IntCurveSurface_Intersection() {}
0079 
0080   //! Internal method
0081   //! copy the <Inter> fields to <me>
0082   Standard_EXPORT void SetValues (const IntCurveSurface_Intersection& Inter);
0083   
0084   //! Internal method
0085   //! Append the IntersectionPoints and
0086   //! IntersectionSegments of <Inter> to <me>.
0087   Standard_EXPORT void Append (const IntCurveSurface_Intersection& Inter, const Standard_Real FirstParamOnCurve, const Standard_Real LastParamOnCurve);
0088   
0089   //! Internal method
0090   //! Append the IntersectionPoints of <Inter> to <me>
0091   Standard_EXPORT void Append (const IntCurveSurface_IntersectionPoint& Pt);
0092   
0093   //! Internal method
0094   //! Append the IntersectionPoints of <Inter> to <me>
0095   Standard_EXPORT void Append (const IntCurveSurface_IntersectionSegment& Seg);
0096   
0097   //! Internal method
0098   //! Reset all the fields of <me>
0099   //! Clear the sequences of IntersectionPoints and Segments
0100   //! Set the field <done> to Standard_False.
0101   Standard_EXPORT void ResetFields();
0102 
0103 
0104   Standard_Boolean done;
0105   Standard_Boolean myIsParallel; //Curve is "parallel" surface
0106   //This case is recognized only for some pairs 
0107   //of analytical curves and surfaces (plane - line, ...)
0108 
0109 
0110 private:
0111 
0112 
0113 
0114   IntCurveSurface_SequenceOfPnt lpnt;
0115   IntCurveSurface_SequenceOfSeg lseg;
0116 
0117 
0118 };
0119 
0120 
0121 
0122 
0123 
0124 
0125 
0126 #endif // _IntCurveSurface_Intersection_HeaderFile