Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-11-28 10:20:37

0001 // Created on: 1993-01-09
0002 // Created by: CKY / Contract Toubro-Larsen ( Kiran )
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 _IGESGeom_TrimmedSurface_HeaderFile
0018 #define _IGESGeom_TrimmedSurface_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 
0022 #include <Standard_Integer.hxx>
0023 #include <IGESGeom_CurveOnSurface.hxx>
0024 #include <NCollection_Array1.hxx>
0025 #include <NCollection_HArray1.hxx>
0026 #include <IGESData_IGESEntity.hxx>
0027 class IGESGeom_CurveOnSurface;
0028 
0029 //! defines IGESTrimmedSurface, Type <144> Form <0>
0030 //! in package IGESGeom
0031 //! A simple closed curve in Euclidean plane divides the
0032 //! plane in to two disjoint, open connected components; one
0033 //! bounded, one unbounded. The bounded one is called the
0034 //! interior region to the curve. Unbounded component is called
0035 //! exterior region to the curve. The domain of the trimmed
0036 //! surface is defined as the interior of the outer boundaries
0037 //! and exterior of the inner boundaries and includes the
0038 //! boundary curves.
0039 class IGESGeom_TrimmedSurface : public IGESData_IGESEntity
0040 {
0041 
0042 public:
0043   Standard_EXPORT IGESGeom_TrimmedSurface();
0044 
0045   //! This method is used to set the fields of the class
0046   //! TrimmedSurface
0047   //! - aSurface  : Surface to be trimmed
0048   //! - aFlag     : Outer boundary type
0049   //! False = The outer boundary is the boundary of
0050   //! rectangle D which is the domain of the
0051   //! surface to be trimmed
0052   //! True  = otherwise
0053   //! - anOuter   : Closed curve which constitutes outer boundary
0054   //! - allInners : Array of closed curves which constitute the
0055   //! inner boundary
0056   Standard_EXPORT void Init(
0057     const occ::handle<IGESData_IGESEntity>&                                       aSurface,
0058     const int                                                                     aFlag,
0059     const occ::handle<IGESGeom_CurveOnSurface>&                                   anOuter,
0060     const occ::handle<NCollection_HArray1<occ::handle<IGESGeom_CurveOnSurface>>>& allInners);
0061 
0062   //! returns the surface to be trimmed
0063   Standard_EXPORT occ::handle<IGESData_IGESEntity> Surface() const;
0064 
0065   //! returns True if outer contour exists
0066   Standard_EXPORT bool HasOuterContour() const;
0067 
0068   //! returns the outer contour of the trimmed surface
0069   Standard_EXPORT occ::handle<IGESGeom_CurveOnSurface> OuterContour() const;
0070 
0071   //! returns the outer contour type of the trimmed surface
0072   //! 0  : The outer boundary is the boundary of D
0073   //! 1  : otherwise
0074   Standard_EXPORT int OuterBoundaryType() const;
0075 
0076   //! returns the number of inner boundaries
0077   Standard_EXPORT int NbInnerContours() const;
0078 
0079   //! returns the Index'th inner contour
0080   //! raises exception if Index <= 0 or Index > NbInnerContours()
0081   Standard_EXPORT occ::handle<IGESGeom_CurveOnSurface> InnerContour(const int Index) const;
0082 
0083   DEFINE_STANDARD_RTTIEXT(IGESGeom_TrimmedSurface, IGESData_IGESEntity)
0084 
0085 private:
0086   occ::handle<IGESData_IGESEntity>                                       theSurface;
0087   int                                                                    theFlag;
0088   occ::handle<IGESGeom_CurveOnSurface>                                   theOuterCurve;
0089   occ::handle<NCollection_HArray1<occ::handle<IGESGeom_CurveOnSurface>>> theInnerCurves;
0090 };
0091 
0092 #endif // _IGESGeom_TrimmedSurface_HeaderFile