Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-26 09:03:17

0001 // Created on: 1995-02-07
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 #ifndef _GeomInt_LineConstructor_HeaderFile
0018 #define _GeomInt_LineConstructor_HeaderFile
0019 
0020 #include <GeomAdaptor_Surface.hxx>
0021 #include <NCollection_Sequence.hxx>
0022 
0023 class Adaptor3d_TopolTool;
0024 class IntPatch_Line;
0025 
0026 //! Splits given Line.
0027 class GeomInt_LineConstructor
0028 {
0029 public:
0030   DEFINE_STANDARD_ALLOC
0031 
0032   //! Empty constructor
0033   GeomInt_LineConstructor();
0034 
0035   //! Initializes me by two surfaces and corresponding
0036   //! tools which represent boundaries of surfaces
0037   void Load(const occ::handle<Adaptor3d_TopolTool>& D1,
0038             const occ::handle<Adaptor3d_TopolTool>& D2,
0039             const occ::handle<GeomAdaptor_Surface>& S1,
0040             const occ::handle<GeomAdaptor_Surface>& S2);
0041 
0042   //! Splits line
0043   Standard_EXPORT void Perform(const occ::handle<IntPatch_Line>& L);
0044 
0045   //! Returns True if splitting was successful
0046   bool IsDone() const;
0047 
0048   //! Returns number of splits
0049   int NbParts() const;
0050 
0051   //! Return first and last parameters
0052   //! for given index of split
0053   void Part(const int I, double& WFirst, double& WLast) const;
0054 
0055 protected:
0056   Standard_EXPORT void TreatCircle(const occ::handle<IntPatch_Line>& aLine, const double aTol);
0057 
0058 private:
0059   bool                             done;
0060   NCollection_Sequence<double>     seqp;
0061   occ::handle<Adaptor3d_TopolTool> myDom1;
0062   occ::handle<Adaptor3d_TopolTool> myDom2;
0063   occ::handle<GeomAdaptor_Surface> myHS1;
0064   occ::handle<GeomAdaptor_Surface> myHS2;
0065 };
0066 
0067 #include <GeomInt_LineConstructor.lxx>
0068 
0069 #endif // _GeomInt_LineConstructor_HeaderFile