0033661: Data Exchange, Step Import - Tessellated GDTs are not imported
[occt.git] / src / TopExp / TopExp.hxx
CommitLineData
42cf5bc1 1// Created on: 1990-12-20
2// Created by: Remi Lequette
3// Copyright (c) 1990-1999 Matra Datavision
4// Copyright (c) 1999-2014 OPEN CASCADE SAS
5//
6// This file is part of Open CASCADE Technology software library.
7//
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.
13//
14// Alternatively, this file may be used under the terms of Open CASCADE
15// commercial license or contractual agreement.
16
17#ifndef _TopExp_HeaderFile
18#define _TopExp_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_DefineAlloc.hxx>
22#include <Standard_Handle.hxx>
23
42cf5bc1 24#include <TopTools_IndexedMapOfShape.hxx>
25#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
1155d05a 26#include <TopTools_MapOfShape.hxx>
33a4d46b 27#include <TopoDS_Vertex.hxx>
42cf5bc1 28#include <Standard_Boolean.hxx>
33a4d46b 29
42cf5bc1 30class TopoDS_Shape;
42cf5bc1 31class TopoDS_Edge;
32class TopoDS_Wire;
42cf5bc1 33
34
35//! This package provides basic tools to explore the
36//! topological data structures.
37//!
38//! * Explorer : A tool to find all sub-shapes of a given
39//! type. e.g. all faces of a solid.
40//!
41//! * Package methods to map sub-shapes of a shape.
42//!
43//! Level : Public
44//! All methods of all classes will be public.
45class TopExp
46{
47public:
48
49 DEFINE_STANDARD_ALLOC
50
51
52 //! Tool to explore a topological data structure.
53 //! Stores in the map <M> all the sub-shapes of <S>
54 //! of type <T>.
55 //!
56 //! Warning: The map is not cleared at first.
57 Standard_EXPORT static void MapShapes (const TopoDS_Shape& S, const TopAbs_ShapeEnum T, TopTools_IndexedMapOfShape& M);
58
59 //! Stores in the map <M> all the sub-shapes of <S>.
9592ae24 60 //! - If cumOri is true, the function composes all
61 //! sub-shapes with the orientation of S.
62 //! - If cumLoc is true, the function multiplies all
63 //! sub-shapes by the location of S, i.e. it applies to
64 //! each sub-shape the transformation that is associated with S.
65 Standard_EXPORT static void MapShapes (const TopoDS_Shape& S, TopTools_IndexedMapOfShape& M,
66 const Standard_Boolean cumOri = Standard_True, const Standard_Boolean cumLoc = Standard_True);
1155d05a 67
68 //! Stores in the map <M> all the sub-shapes of <S>.
9592ae24 69 //! - If cumOri is true, the function composes all
70 //! sub-shapes with the orientation of S.
71 //! - If cumLoc is true, the function multiplies all
72 //! sub-shapes by the location of S, i.e. it applies to
73 //! each sub-shape the transformation that is associated with S.
74 Standard_EXPORT static void MapShapes (const TopoDS_Shape& S, TopTools_MapOfShape& M,
75 const Standard_Boolean cumOri = Standard_True, const Standard_Boolean cumLoc = Standard_True);
1155d05a 76
42cf5bc1 77 //! Stores in the map <M> all the subshape of <S> of
78 //! type <TS> for each one append to the list all
79 //! the ancestors of type <TA>. For example map all
80 //! the edges and bind the list of faces.
81 //! Warning: The map is not cleared at first.
82 Standard_EXPORT static void MapShapesAndAncestors (const TopoDS_Shape& S, const TopAbs_ShapeEnum TS, const TopAbs_ShapeEnum TA, TopTools_IndexedDataMapOfShapeListOfShape& M);
83
f1191d30 84 //! Stores in the map <M> all the subshape of <S> of
85 //! type <TS> for each one append to the list all
86 //! unique ancestors of type <TA>. For example map all
87 //! the edges and bind the list of faces.
88 //! useOrientation = True : taking account the ancestor orientation
89 //! Warning: The map is not cleared at first.
90 Standard_EXPORT static void MapShapesAndUniqueAncestors (const TopoDS_Shape& S, const TopAbs_ShapeEnum TS, const TopAbs_ShapeEnum TA, TopTools_IndexedDataMapOfShapeListOfShape& M,
91 const Standard_Boolean useOrientation = Standard_False);
92
42cf5bc1 93 //! Returns the Vertex of orientation FORWARD in E. If
94 //! there is none returns a Null Shape.
95 //! CumOri = True : taking account the edge orientation
96 Standard_EXPORT static TopoDS_Vertex FirstVertex (const TopoDS_Edge& E, const Standard_Boolean CumOri = Standard_False);
97
98 //! Returns the Vertex of orientation REVERSED in E. If
99 //! there is none returns a Null Shape.
100 //! CumOri = True : taking account the edge orientation
101 Standard_EXPORT static TopoDS_Vertex LastVertex (const TopoDS_Edge& E, const Standard_Boolean CumOri = Standard_False);
102
103 //! Returns in Vfirst, Vlast the FORWARD and REVERSED
104 //! vertices of the edge <E>. May be null shapes.
105 //! CumOri = True : taking account the edge orientation
106 Standard_EXPORT static void Vertices (const TopoDS_Edge& E, TopoDS_Vertex& Vfirst, TopoDS_Vertex& Vlast, const Standard_Boolean CumOri = Standard_False);
107
108 //! Returns in Vfirst, Vlast the first and last
109 //! vertices of the open wire <W>. May be null shapes.
110 //! if <W> is closed Vfirst and Vlast are a same
111 //! vertex on <W>.
112 //! if <W> is no manifold. VFirst and VLast are null
113 //! shapes.
114 Standard_EXPORT static void Vertices (const TopoDS_Wire& W, TopoDS_Vertex& Vfirst, TopoDS_Vertex& Vlast);
115
116 //! Finds the vertex <V> common to the two edges
117 //! <E1,E2>, returns True if this vertex exists.
118 //!
119 //! Warning: <V> has sense only if the value <True> is returned
120 Standard_EXPORT static Standard_Boolean CommonVertex (const TopoDS_Edge& E1, const TopoDS_Edge& E2, TopoDS_Vertex& V);
121
42cf5bc1 122};
123
42cf5bc1 124#endif // _TopExp_HeaderFile