Back to home page

EIC code displayed by LXR

 
 

    


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

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 //! This selection returns the basic geometric elements
0032 //! contained in an IGES Entity
0033 //! Intended to run a "quick" transfer. I.E. :
0034 //! - for a Group, considers its Elements
0035 //! - for a Trimmed or Bounded Surface or a Face (BREP),
0036 //! considers the 3D curves of each of its loops
0037 //! - for a Plane (108), considers its Bounding Curve
0038 //! - for a Curve itself, takes it
0039 //!
0040 //! Also, FREE surfaces are taken, because curve 3d is known for
0041 //! them. (the ideal should be to have their natural bounds)
0042 //!
0043 //! If <curvesonly> is set, ONLY curves-3d are returned
0044 class IGESSelect_SelectBasicGeom : public IFSelect_SelectExplore
0045 {
0046 
0047 public:
0048   //! Creates a SelectBasicGeom, which always works recursively
0049   //! mode = -1 : Returns Surfaces (without trimming)
0050   //! mode = +1 : Returns Curves 3D (free or bound of surface)
0051   //! mode = +2 : Returns Basic Curves 3D : as 1 but CompositeCurves
0052   //! are returned in detail
0053   //! mode = 0  : both
0054   Standard_EXPORT IGESSelect_SelectBasicGeom(const int mode);
0055 
0056   Standard_EXPORT bool CurvesOnly() const;
0057 
0058   //! Explores an entity, to take its contained Curves 3d
0059   //! Works recursively
0060   Standard_EXPORT bool Explore(const int                              level,
0061                                const occ::handle<Standard_Transient>& ent,
0062                                const Interface_Graph&                 G,
0063                                Interface_EntityIterator&              explored) const override;
0064 
0065   //! Returns a text defining the criterium : "Curves 3d" or
0066   //! "Basic Geometry"
0067   Standard_EXPORT TCollection_AsciiString ExploreLabel() const override;
0068 
0069   //! This method can be called from everywhere to get the curves
0070   //! as sub-elements of a given curve :
0071   //! CompositeCurve : explored lists its subs + returns True
0072   //! Any Curve : explored is not filled but returned is True
0073   //! Other : returned is False
0074   Standard_EXPORT static bool SubCurves(const occ::handle<IGESData_IGESEntity>& ent,
0075                                         Interface_EntityIterator&               explored);
0076 
0077   DEFINE_STANDARD_RTTIEXT(IGESSelect_SelectBasicGeom, IFSelect_SelectExplore)
0078 
0079 private:
0080   int thegeom;
0081 };
0082 
0083 #endif // _IGESSelect_SelectBasicGeom_HeaderFile