0023638: Data Exchange - Reading IGES file produced invalid shape
[occt.git] / src / XSAlgo / XSAlgo_AlgoContainer.hxx
1 // Created on: 2000-01-19
2 // Created by: data exchange team
3 // Copyright (c) 2000-2014 OPEN CASCADE SAS
4 //
5 // This file is part of Open CASCADE Technology software library.
6 //
7 // This library is free software; you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License version 2.1 as published
9 // by the Free Software Foundation, with special exception defined in the file
10 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 // distribution for complete text of the license and disclaimer of any warranty.
12 //
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
15
16 #ifndef _XSAlgo_AlgoContainer_HeaderFile
17 #define _XSAlgo_AlgoContainer_HeaderFile
18
19 #include <Standard.hxx>
20 #include <Standard_Type.hxx>
21
22 #include <Standard_Transient.hxx>
23 #include <Standard_Integer.hxx>
24 #include <Message_ProgressRange.hxx>
25
26 class ShapeBuild_ReShape;
27 class XSAlgo_ToolContainer;
28 class TopoDS_Shape;
29 class TopoDS_Edge;
30 class TopoDS_Face;
31 class Transfer_TransientProcess;
32 class Transfer_FinderProcess;
33
34 class XSAlgo_AlgoContainer;
35 DEFINE_STANDARD_HANDLE(XSAlgo_AlgoContainer, Standard_Transient)
36
37
38 class XSAlgo_AlgoContainer : public Standard_Transient
39 {
40
41 public:
42
43   
44   //! Empty constructor
45   Standard_EXPORT XSAlgo_AlgoContainer();
46   
47   //! Sets ToolContainer
48     void SetToolContainer (const Handle(XSAlgo_ToolContainer)& TC);
49   
50   //! Returns ToolContainer
51     Handle(XSAlgo_ToolContainer) ToolContainer() const;
52   
53   //! Performs actions necessary for preparing environment
54   //! for transfer. Empty in Open version.
55   Standard_EXPORT virtual void PrepareForTransfer() const;
56   
57   //! Does shape processing with specified tolerances
58   //! @param[in] theShape shape to process
59   //! @param[in] thePrec basic precision and tolerance
60   //! @param[in] theMaxTol maximum allowed tolerance
61   //! @param[in] thePrscfile name of the resource file
62   //! @param[in] thePseq name of the sequence of operators defined in the resource file for Shape Processing
63   //! @param[out] theInfo information to be recorded in the translation map
64   //! @param[in] theProgress progress indicator
65   //! @param[in] theNonManifold flag to proceed with non-manifold topology
66   //! @return the processed shape
67   Standard_EXPORT virtual TopoDS_Shape ProcessShape (const TopoDS_Shape&          theShape,
68                                                      const Standard_Real          thePrec,
69                                                      const Standard_Real          theMaxTol,
70                                                      const Standard_CString       thePrscfile,
71                                                      const Standard_CString       thePseq,
72                                                      Handle(Standard_Transient)&  theInfo,
73                                                      const Message_ProgressRange& theProgress = Message_ProgressRange(),
74                                                      const Standard_Boolean       theNonManifold = Standard_False) const;
75
76   //! Does shape processing with specified tolerances
77   //! @param[in] theShape shape to process
78   //! @param[in] thePrec basic precision and tolerance
79   //! @param[in] theMaxTol maximum allowed tolerance
80   //! @param[in] thePrscfile name of the resource file
81   //! @param[in] thePseq name of the sequence of operators defined in the resource file for Shape Processing
82   //! @param[out] theInfo information to be recorded in the translation map
83   //! @param[in] theReShape tool to record the modifications of input shape
84   //! @param[in] theProgress progress indicator
85   //! @param[in] theNonManifold flag to proceed with non-manifold topology
86   //! @return the processed shape
87   Standard_EXPORT virtual TopoDS_Shape ProcessShape(const TopoDS_Shape&               theShape,
88                                                     const Standard_Real               thePrec,
89                                                     const Standard_Real               theMaxTol,
90                                                     const Standard_CString            thePrscfile,
91                                                     const Standard_CString            thePseq,
92                                                     Handle(Standard_Transient)&       theInfo,
93                                                     const Handle(ShapeBuild_ReShape)& theReShape,
94                                                     const Message_ProgressRange&      theProgress = Message_ProgressRange(),
95                                                     const Standard_Boolean            theNonManifold = Standard_False) const;
96   
97   //! Checks quality of pcurve of the edge on the given face,
98   //! and corrects it if necessary.
99   Standard_EXPORT virtual Standard_Boolean CheckPCurve (const TopoDS_Edge& edge, const TopoDS_Face& face, const Standard_Real preci, const Standard_Boolean isSeam) const;
100   
101   Standard_EXPORT virtual void MergeTransferInfo (const Handle(Transfer_TransientProcess)& TP, const Handle(Standard_Transient)& info, const Standard_Integer startTPitem = 1) const;
102   
103   //! Updates translation map (TP or FP) with information
104   //! resulting from ShapeProcessing
105   //! Parameter startTPitem can be used for optimisation, to
106   //! restrict modifications to entities stored in TP starting
107   //! from item startTPitem
108   Standard_EXPORT virtual void MergeTransferInfo (const Handle(Transfer_FinderProcess)& FP, const Handle(Standard_Transient)& info) const;
109
110
111
112
113   DEFINE_STANDARD_RTTIEXT(XSAlgo_AlgoContainer,Standard_Transient)
114
115 protected:
116
117
118
119
120 private:
121
122
123   Handle(XSAlgo_ToolContainer) myTC;
124
125
126 };
127
128
129 #include <XSAlgo_AlgoContainer.lxx>
130
131
132
133
134
135 #endif // _XSAlgo_AlgoContainer_HeaderFile