Salome HOME
channel algorithm has been implemented with rounding of corners (fillet)
[modules/hydro.git] / src / HYDROData / HYDROData_Pipes.h
1
2 #ifndef HYDROData_Pipes_HeaderFile
3 #define HYDROData_Pipes_HeaderFile
4
5 #include <TopoDS_Vertex.hxx>
6 #include <TopoDS_Wire.hxx>
7 #include <gp_Pnt.hxx>
8 #include <TopTools_ListOfShape.hxx>
9
10 class BRepOffsetAPI_MakePipeShell;
11
12 class HYDROData_Canal3dAnd2d
13 {
14 public:
15   HYDROData_Canal3dAnd2d( const TopoDS_Wire& Profile,
16                           const TopoDS_Wire& Guideline );
17   
18   Standard_Boolean Create3dPresentation();
19
20   Standard_Boolean Create2dPresentation();
21
22   Standard_Boolean ProjectWireOntoXOY(const TopoDS_Wire& aWire,
23                                       TopoDS_Wire& ProjectedWire);
24
25   void Make2dProfile();
26
27   TopoDS_Vertex ProjectVertexOntoXOY(const TopoDS_Vertex& aVertex);
28
29   void SetMiddlePoint2d();
30
31   void SetMiddlePoint3d();
32
33   TopoDS_Wire SetTransformedProfile(const TopoDS_Wire& aProfile,
34                                     const TopoDS_Wire& aGuideline,
35                                     const gp_Pnt& aMiddlePoint);
36
37   TopoDS_Wire GetBank(const TopoDS_Vertex& aFreeVertex);
38
39   //Queries
40   TopoDS_Shape Get3dPresentation();
41   TopoDS_Shape Get2dPresentation();
42   TopoDS_Wire GetLeftBank();
43   TopoDS_Wire GetRightBank();
44   TopoDS_Wire GetInlet();
45   TopoDS_Wire GetOutlet();
46
47   void MakeSharpVertexList();
48
49   Standard_Boolean MakeFillet();
50
51 private:
52
53   TopoDS_Wire myProfile;
54   TopoDS_Wire myGuideline;
55   TopoDS_Vertex myLeftVertex;
56   TopoDS_Vertex myRightVertex;
57   TopoDS_Vertex myLeftVertex2d;
58   TopoDS_Vertex myRightVertex2d;
59   gp_Pnt myMiddlePoint2d;
60   gp_Pnt myMiddlePoint3d;
61
62   TopoDS_Wire myProjectedProfile;
63   TopoDS_Wire myProjectedGuideline, myOriginalGuideline;
64   TopoDS_Wire myTransformedProfile3d;
65   TopoDS_Wire myTransformedProfile2d;
66   BRepOffsetAPI_MakePipeShell* mySweep3d;
67   BRepOffsetAPI_MakePipeShell* mySweep2d;
68
69   TopoDS_Shape myPipe3d;
70   TopoDS_Shape myPipe2d;
71   TopoDS_Wire myInlet;
72   TopoDS_Wire myOutlet;
73   //TopoDS_Shape myLeftBank;
74   //TopoDS_Shape myRightBank;
75
76   Standard_Real myFilletRadius;
77   TopTools_ListOfShape mySharpVertexList;
78   Standard_Real myTolAngular;
79 };
80
81 #endif