Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-28 09:19:49

0001 // Created on: 1994-03-25
0002 // Created by: Jean Marc LACHAUME
0003 // Copyright (c) 1994-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 _DBRep_IsoBuilder_HeaderFile
0018 #define _DBRep_IsoBuilder_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <NCollection_Array1.hxx>
0025 #include <Standard_Integer.hxx>
0026 #include <Geom2dHatch_Hatcher.hxx>
0027 #include <NCollection_IndexedDataMap.hxx>
0028 class TopoDS_Face;
0029 class DBRep_Face;
0030 
0031 //! Creation of isoparametric curves.
0032 class DBRep_IsoBuilder : public Geom2dHatch_Hatcher
0033 {
0034 public:
0035   DEFINE_STANDARD_ALLOC
0036 
0037   //! Creates the builder.
0038   Standard_EXPORT DBRep_IsoBuilder(const TopoDS_Face& TopologicalFace,
0039                                    const double       Infinite,
0040                                    const int          NbIsos);
0041 
0042   //! Returns the total number of domains.
0043   int NbDomains() const { return myNbDom; }
0044 
0045   //! Loading of the isoparametric curves in the
0046   //! Data Structure of a drawable face.
0047   Standard_EXPORT void LoadIsos(const occ::handle<DBRep_Face>& Face) const;
0048 
0049 protected:
0050   typedef NCollection_IndexedDataMap<TopoDS_Shape, occ::handle<Geom2d_Curve>> DataMapOfEdgePCurve;
0051 
0052   //! Adds to the hatcher the 2D segments connecting the p-curves
0053   //! of the neighboring edges to close the 2D gaps which are
0054   //! closed in 3D by the tolerance of vertices shared between edges.
0055   //! It will allow trimming correctly the iso-lines passing through
0056   //! such gaps.
0057   //! The method also trims the intersecting 2D curves of the face,
0058   //! forbidding the iso-lines beyond the face boundaries.
0059   Standard_EXPORT void FillGaps(const TopoDS_Face& theFace, DataMapOfEdgePCurve& theEdgePCurveMap);
0060 
0061 private:
0062   double                     myInfinite;
0063   double                     myUMin;
0064   double                     myUMax;
0065   double                     myVMin;
0066   double                     myVMax;
0067   NCollection_Array1<double> myUPrm;
0068   NCollection_Array1<int>    myUInd;
0069   NCollection_Array1<double> myVPrm;
0070   NCollection_Array1<int>    myVInd;
0071   int                        myNbDom;
0072 };
0073 
0074 #endif // _DBRep_IsoBuilder_HeaderFile