42cf5bc1 |
1 | // Created on: 1997-12-15 |
2 | // Created by: Philippe MANGIN |
3 | // Copyright (c) 1997-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 _GeomFill_SectionPlacement_HeaderFile |
18 | #define _GeomFill_SectionPlacement_HeaderFile |
19 | |
20 | #include <Standard.hxx> |
21 | #include <Standard_DefineAlloc.hxx> |
22 | #include <Standard_Handle.hxx> |
23 | |
24 | #include <Standard_Boolean.hxx> |
25 | #include <gp_Ax1.hxx> |
26 | #include <Standard_Real.hxx> |
27 | #include <GeomAdaptor_Curve.hxx> |
28 | #include <Extrema_ExtPC.hxx> |
29 | #include <gp_Pnt.hxx> |
30 | class GeomFill_LocationLaw; |
31 | class Geom_Curve; |
32 | class StdFail_NotDone; |
33 | class Geom_Geometry; |
42cf5bc1 |
34 | class gp_Trsf; |
35 | class gp_Mat; |
36 | class gp_Vec; |
37 | |
38 | |
39 | //! To place section in sweep Function |
40 | class GeomFill_SectionPlacement |
41 | { |
42 | public: |
43 | |
44 | DEFINE_STANDARD_ALLOC |
45 | |
46 | |
47 | Standard_EXPORT GeomFill_SectionPlacement(const Handle(GeomFill_LocationLaw)& L, const Handle(Geom_Geometry)& Section); |
48 | |
49 | //! To change the section Law |
50 | Standard_EXPORT void SetLocation (const Handle(GeomFill_LocationLaw)& L); |
51 | |
52 | Standard_EXPORT void Perform (const Standard_Real Tol); |
53 | |
c22b52d6 |
54 | Standard_EXPORT void Perform (const Handle(Adaptor3d_Curve)& Path, const Standard_Real Tol); |
42cf5bc1 |
55 | |
56 | Standard_EXPORT void Perform (const Standard_Real ParamOnPath, const Standard_Real Tol); |
57 | |
58 | Standard_EXPORT Standard_Boolean IsDone() const; |
59 | |
60 | Standard_EXPORT Standard_Real ParameterOnPath() const; |
61 | |
62 | Standard_EXPORT Standard_Real ParameterOnSection() const; |
63 | |
64 | Standard_EXPORT Standard_Real Distance() const; |
65 | |
66 | Standard_EXPORT Standard_Real Angle() const; |
67 | |
68 | Standard_EXPORT gp_Trsf Transformation (const Standard_Boolean WithTranslation, const Standard_Boolean WithCorrection = Standard_False) const; |
69 | |
21c7c457 |
70 | //! Compute the Section, in the coordinate system given by |
42cf5bc1 |
71 | //! the Location Law. |
21c7c457 |
72 | //! If <WithTranslation> contact between |
42cf5bc1 |
73 | //! <Section> and <Path> is forced. |
74 | Standard_EXPORT Handle(Geom_Curve) Section (const Standard_Boolean WithTranslation) const; |
75 | |
21c7c457 |
76 | //! Compute the Section, in the coordinate system given by |
42cf5bc1 |
77 | //! the Location Law. |
78 | //! To have the Normal to section equal to the Location |
21c7c457 |
79 | //! Law Normal. If <WithTranslation> contact between |
42cf5bc1 |
80 | //! <Section> and <Path> is forced. |
81 | Standard_EXPORT Handle(Geom_Curve) ModifiedSection (const Standard_Boolean WithTranslation) const; |
82 | |
83 | |
84 | |
85 | |
86 | protected: |
87 | |
88 | |
89 | |
90 | |
91 | |
92 | private: |
93 | |
94 | |
95 | Standard_EXPORT void SectionAxis (const gp_Mat& M, gp_Vec& T, gp_Vec& N, gp_Vec& BN) const; |
96 | |
97 | Standard_EXPORT Standard_Boolean Choix (const Standard_Real Dist, const Standard_Real Angle) const; |
98 | |
99 | |
100 | Standard_Boolean done; |
101 | Standard_Boolean isplan; |
102 | gp_Ax1 TheAxe; |
103 | Standard_Real Gabarit; |
104 | Handle(GeomFill_LocationLaw) myLaw; |
105 | GeomAdaptor_Curve myAdpSection; |
106 | Handle(Geom_Curve) mySection; |
107 | Standard_Real SecParam; |
108 | Standard_Real PathParam; |
109 | Standard_Real Dist; |
110 | Standard_Real AngleMax; |
111 | Extrema_ExtPC myExt; |
112 | Standard_Boolean myIsPoint; |
113 | gp_Pnt myPoint; |
114 | |
115 | |
116 | }; |
117 | |
118 | |
119 | |
120 | |
121 | |
122 | |
123 | |
124 | #endif // _GeomFill_SectionPlacement_HeaderFile |