1 // Created on: 1997-04-14
2 // Created by: Christian CAILLET
3 // Copyright (c) 1997-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _IGESSelect_SelectBasicGeom_HeaderFile
18 #define _IGESSelect_SelectBasicGeom_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
23 #include <Standard_Integer.hxx>
24 #include <IFSelect_SelectExplore.hxx>
25 #include <Standard_Boolean.hxx>
26 class Standard_Transient;
27 class Interface_Graph;
28 class Interface_EntityIterator;
29 class TCollection_AsciiString;
30 class IGESData_IGESEntity;
33 class IGESSelect_SelectBasicGeom;
34 DEFINE_STANDARD_HANDLE(IGESSelect_SelectBasicGeom, IFSelect_SelectExplore)
36 //! This selection returns the basic geometric elements
37 //! contained in an IGES Entity
38 //! Intended to run a "quick" transfer. I.E. :
39 //! - for a Group, considers its Elements
40 //! - for a Trimmed or Bounded Surface or a Face (BREP),
41 //! considers the 3D curves of each of its loops
42 //! - for a Plane (108), considers its Bounding Curve
43 //! - for a Curve itself, takes it
45 //! Also, FREE surfaces are taken, because curve 3d is known for
46 //! them. (the ideal should be to have their natural bounds)
48 //! If <curvesonly> is set, ONLY curves-3d are returned
49 class IGESSelect_SelectBasicGeom : public IFSelect_SelectExplore
55 //! Creates a SelectBasicGeom, which allways works recursively
56 //! mode = -1 : Returns Surfaces (without trimming)
57 //! mode = +1 : Returns Curves 3D (free or bound of surface)
58 //! mode = +2 : Returns Basic Curves 3D : as 1 but CompositeCurves
59 //! are returned in detail
61 Standard_EXPORT IGESSelect_SelectBasicGeom(const Standard_Integer mode);
63 Standard_EXPORT Standard_Boolean CurvesOnly() const;
65 //! Explores an entity, to take its contained Curves 3d
67 Standard_EXPORT Standard_Boolean Explore (const Standard_Integer level, const Handle(Standard_Transient)& ent, const Interface_Graph& G, Interface_EntityIterator& explored) const Standard_OVERRIDE;
69 //! Returns a text defining the criterium : "Curves 3d" or
71 Standard_EXPORT TCollection_AsciiString ExploreLabel() const Standard_OVERRIDE;
73 //! This method can be called from everywhere to get the curves
74 //! as sub-elements of a given curve :
75 //! CompositeCurve : explored lists its subs + returns True
76 //! Any Curve : explored is not filled but returned is True
77 //! Other : returned is False
78 Standard_EXPORT static Standard_Boolean SubCurves (const Handle(IGESData_IGESEntity)& ent, Interface_EntityIterator& explored);
83 DEFINE_STANDARD_RTTIEXT(IGESSelect_SelectBasicGeom,IFSelect_SelectExplore)
93 Standard_Integer thegeom;
104 #endif // _IGESSelect_SelectBasicGeom_HeaderFile