1 // Created on: 2000-01-25
2 // Created by: Peter KURNEV
3 // Copyright (c) 2000-2014 OPEN CASCADE SAS
5 // This file is part of Open CASCADE Technology software library.
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.
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
16 #ifndef _TopOpeBRepBuild_CorrectFace2d_HeaderFile
17 #define _TopOpeBRepBuild_CorrectFace2d_HeaderFile
19 #include <Standard.hxx>
20 #include <Standard_DefineAlloc.hxx>
21 #include <Standard_Handle.hxx>
23 #include <TopoDS_Face.hxx>
24 #include <Standard_Boolean.hxx>
25 #include <Standard_Integer.hxx>
26 #include <Standard_Real.hxx>
27 #include <TopoDS_Wire.hxx>
28 #include <TopTools_ListOfShape.hxx>
29 #include <TopTools_IndexedMapOfOrientedShape.hxx>
30 #include <Standard_Address.hxx>
31 #include <TopTools_IndexedDataMapOfShapeShape.hxx>
43 class TopOpeBRepBuild_CorrectFace2d
50 Standard_EXPORT TopOpeBRepBuild_CorrectFace2d();
52 Standard_EXPORT TopOpeBRepBuild_CorrectFace2d(const TopoDS_Face& aFace, const TopTools_IndexedMapOfOrientedShape& anAvoidMap, TopTools_IndexedDataMapOfShapeShape& aMap);
54 Standard_EXPORT const TopoDS_Face& Face() const;
56 Standard_EXPORT void Perform();
58 Standard_EXPORT Standard_Boolean IsDone() const;
60 Standard_EXPORT Standard_Integer ErrorStatus() const;
62 Standard_EXPORT const TopoDS_Face& CorrectedFace() const;
64 Standard_EXPORT void SetMapOfTrans2dInfo (TopTools_IndexedDataMapOfShapeShape& aMap);
66 Standard_EXPORT TopTools_IndexedDataMapOfShapeShape& MapOfTrans2dInfo();
68 Standard_EXPORT static void GetP2dFL (const TopoDS_Face& aFace, const TopoDS_Edge& anEdge, gp_Pnt2d& P2dF, gp_Pnt2d& P2dL);
70 Standard_EXPORT static void CheckList (const TopoDS_Face& aFace, TopTools_ListOfShape& aHeadList);
84 Standard_EXPORT void CheckFace();
86 Standard_EXPORT Standard_Integer MakeRightWire();
88 Standard_EXPORT void MakeHeadList (const TopoDS_Shape& aFirstEdge, TopTools_ListOfShape& aHeadList) const;
90 Standard_EXPORT void TranslateCurve2d (const TopoDS_Edge& anEdge, const TopoDS_Face& aFace, const gp_Vec2d& aTranslateVec, Handle(Geom2d_Curve)& aCurve2d);
92 Standard_EXPORT Standard_Integer OuterWire (TopoDS_Wire& anOuterWire) const;
94 Standard_EXPORT void BndBoxWire (const TopoDS_Wire& aWire, Bnd_Box2d& aB2d) const;
96 Standard_EXPORT void MoveWire2d (TopoDS_Wire& aWire, const gp_Vec2d& aTrV);
98 Standard_EXPORT void MoveWires2d (TopoDS_Wire& aWire);
100 Standard_EXPORT void UpdateEdge (const TopoDS_Edge& E, const Handle(Geom2d_Curve)& C, const TopoDS_Face& F, const Standard_Real Tol);
102 Standard_EXPORT void UpdateEdge (const TopoDS_Edge& E, const Handle(Geom2d_Curve)& C1, const Handle(Geom2d_Curve)& C2, const TopoDS_Face& F, const Standard_Real Tol);
104 Standard_EXPORT void BuildCopyData (const TopoDS_Face& F, const TopTools_IndexedMapOfOrientedShape& anAvoidMap, TopoDS_Face& aCopyFace, TopTools_IndexedMapOfOrientedShape& aCopyAvoidMap, const Standard_Boolean aNeedToUsePMap);
106 Standard_EXPORT Standard_Integer ConnectWire (TopoDS_Face& aCopyFace, const TopTools_IndexedMapOfOrientedShape& aCopyAvoidMap, const Standard_Boolean aTryToConnectFlag);
110 TopoDS_Face myCorrectedFace;
111 Standard_Boolean myIsDone;
112 Standard_Integer myErrorStatus;
113 Standard_Real myFaceTolerance;
114 TopoDS_Wire myCurrentWire;
115 TopTools_ListOfShape myOrderedWireList;
116 TopTools_IndexedMapOfOrientedShape myAvoidMap;
117 Standard_Address myMap;
118 TopoDS_Face myCopyFace;
119 TopTools_IndexedMapOfOrientedShape myCopyAvoidMap;
120 TopTools_IndexedDataMapOfShapeShape myEdMapInversed;
131 #endif // _TopOpeBRepBuild_CorrectFace2d_HeaderFile