Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:03:23

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 <TColStd_Array1OfReal.hxx>
0025 #include <TColStd_Array1OfInteger.hxx>
0026 #include <Standard_Integer.hxx>
0027 #include <Geom2dHatch_Hatcher.hxx>
0028 #include <NCollection_IndexedDataMap.hxx>
0029 class TopoDS_Face;
0030 class DBRep_Face;
0031 
0032 //! Creation of isoparametric curves.
0033 class DBRep_IsoBuilder  : public Geom2dHatch_Hatcher
0034 {
0035 public:
0036 
0037   DEFINE_STANDARD_ALLOC
0038 
0039   
0040   //! Creates the builder.
0041   Standard_EXPORT DBRep_IsoBuilder(const TopoDS_Face& TopologicalFace, const Standard_Real Infinite, const Standard_Integer NbIsos);
0042   
0043   //! Returns the total number of domains.
0044   Standard_Integer NbDomains() const
0045   {
0046     return myNbDom;
0047   }
0048   
0049   //! Loading of the isoparametric curves in the
0050   //! Data Structure of a drawable face.
0051   Standard_EXPORT void LoadIsos (const Handle(DBRep_Face)& Face) const;
0052 
0053 protected:
0054 
0055   typedef NCollection_IndexedDataMap
0056     <TopoDS_Shape, Handle(Geom2d_Curve)>
0057       DataMapOfEdgePCurve;
0058 
0059   //! Adds to the hatcher the 2D segments connecting the p-curves
0060   //! of the neighboring edges to close the 2D gaps which are
0061   //! closed in 3D by the tolerance of vertices shared between edges.
0062   //! It will allow trimming correctly the iso-lines passing through
0063   //! such gaps.
0064   //! The method also trims the intersecting 2D curves of the face,
0065   //! forbidding the iso-lines beyond the face boundaries.
0066   Standard_EXPORT void FillGaps(const TopoDS_Face& theFace,
0067                                 DataMapOfEdgePCurve& theEdgePCurveMap);
0068 
0069 
0070 private:
0071 
0072 
0073 
0074   Standard_Real myInfinite;
0075   Standard_Real myUMin;
0076   Standard_Real myUMax;
0077   Standard_Real myVMin;
0078   Standard_Real myVMax;
0079   TColStd_Array1OfReal myUPrm;
0080   TColStd_Array1OfInteger myUInd;
0081   TColStd_Array1OfReal myVPrm;
0082   TColStd_Array1OfInteger myVInd;
0083   Standard_Integer myNbDom;
0084 
0085 
0086 };
0087 
0088 
0089 #endif // _DBRep_IsoBuilder_HeaderFile