Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Created on: 1997-04-14
0002 // Created by: Christian CAILLET
0003 // Copyright (c) 1997-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 _IGESSelect_SelectBasicGeom_HeaderFile
0018 #define _IGESSelect_SelectBasicGeom_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022 
0023 #include <Standard_Integer.hxx>
0024 #include <IFSelect_SelectExplore.hxx>
0025 class Standard_Transient;
0026 class Interface_Graph;
0027 class Interface_EntityIterator;
0028 class TCollection_AsciiString;
0029 class IGESData_IGESEntity;
0030 
0031 
0032 class IGESSelect_SelectBasicGeom;
0033 DEFINE_STANDARD_HANDLE(IGESSelect_SelectBasicGeom, IFSelect_SelectExplore)
0034 
0035 //! This selection returns the basic geometric elements
0036 //! contained in an IGES Entity
0037 //! Intended to run a "quick" transfer. I.E. :
0038 //! - for a Group, considers its Elements
0039 //! - for a Trimmed or Bounded Surface or a Face (BREP),
0040 //! considers the 3D curves of each of its loops
0041 //! - for a Plane (108), considers its Bounding Curve
0042 //! - for a Curve itself, takes it
0043 //!
0044 //! Also, FREE surfaces are taken, because curve 3d is known for
0045 //! them. (the ideal should be to have their natural bounds)
0046 //!
0047 //! If <curvesonly> is set, ONLY curves-3d are returned
0048 class IGESSelect_SelectBasicGeom : public IFSelect_SelectExplore
0049 {
0050 
0051 public:
0052 
0053   
0054   //! Creates a SelectBasicGeom, which always works recursively
0055   //! mode = -1 : Returns Surfaces (without trimming)
0056   //! mode = +1 : Returns Curves 3D (free or bound of surface)
0057   //! mode = +2 : Returns Basic Curves 3D : as 1 but CompositeCurves
0058   //! are returned in detail
0059   //! mode = 0  : both
0060   Standard_EXPORT IGESSelect_SelectBasicGeom(const Standard_Integer mode);
0061   
0062   Standard_EXPORT Standard_Boolean CurvesOnly() const;
0063   
0064   //! Explores an entity, to take its contained Curves 3d
0065   //! Works recursively
0066   Standard_EXPORT Standard_Boolean Explore (const Standard_Integer level, const Handle(Standard_Transient)& ent, const Interface_Graph& G, Interface_EntityIterator& explored) const Standard_OVERRIDE;
0067   
0068   //! Returns a text defining the criterium : "Curves 3d" or
0069   //! "Basic Geometry"
0070   Standard_EXPORT TCollection_AsciiString ExploreLabel() const Standard_OVERRIDE;
0071   
0072   //! This method can be called from everywhere to get the curves
0073   //! as sub-elements of a given curve :
0074   //! CompositeCurve : explored lists its subs + returns True
0075   //! Any Curve : explored is not filled but returned is True
0076   //! Other : returned is False
0077   Standard_EXPORT static Standard_Boolean SubCurves (const Handle(IGESData_IGESEntity)& ent, Interface_EntityIterator& explored);
0078 
0079 
0080 
0081 
0082   DEFINE_STANDARD_RTTIEXT(IGESSelect_SelectBasicGeom,IFSelect_SelectExplore)
0083 
0084 protected:
0085 
0086 
0087 
0088 
0089 private:
0090 
0091 
0092   Standard_Integer thegeom;
0093 
0094 
0095 };
0096 
0097 
0098 
0099 
0100 
0101 
0102 
0103 #endif // _IGESSelect_SelectBasicGeom_HeaderFile