368cdde6 |
1 | // Created on: 1994-11-14 |
2 | // Created by: Bruno DUMORTIER |
3 | // Copyright (c) 1994-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 _BRepFill_MultiLine_HeaderFile |
18 | #define _BRepFill_MultiLine_HeaderFile |
19 | |
20 | #include <AppCont_Function.hxx> |
21 | |
22 | #include <Standard.hxx> |
23 | #include <Standard_DefineAlloc.hxx> |
24 | #include <Standard_Macro.hxx> |
25 | |
26 | #include <TopoDS_Edge.hxx> |
27 | #include <TopoDS_Face.hxx> |
28 | #include <Geom2dAdaptor_Curve.hxx> |
29 | #include <Standard_Boolean.hxx> |
30 | #include <Standard_Integer.hxx> |
31 | #include <GeomAbs_Shape.hxx> |
368cdde6 |
32 | #include <Standard_Real.hxx> |
33 | |
34 | class Standard_DomainError; |
35 | class TopoDS_Face; |
36 | class TopoDS_Edge; |
37 | class Geom2d_Curve; |
38 | class Geom_Curve; |
39 | class gp_Pnt; |
40 | class gp_Pnt2d; |
41 | |
42 | |
43 | //! Class used to compute the 3d curve and the |
44 | //! two 2d curves resulting from the intersection of a |
45 | //! surface of linear extrusion( Bissec, Dz) and the 2 |
46 | //! faces. |
47 | //! This 3 curves will have the same parametrization |
48 | //! as the Bissectrice. |
49 | //! This class is to be send to an approximation |
50 | //! routine. |
51 | class BRepFill_MultiLine : public AppCont_Function |
52 | { |
53 | public: |
54 | DEFINE_STANDARD_ALLOC |
55 | |
56 | Standard_EXPORT BRepFill_MultiLine(); |
57 | |
58 | Standard_EXPORT BRepFill_MultiLine(const TopoDS_Face& Face1, const TopoDS_Face& Face2, const TopoDS_Edge& Edge1, const TopoDS_Edge& Edge2, const Standard_Boolean Inv1, const Standard_Boolean Inv2, const Handle(Geom2d_Curve)& Bissec); |
59 | |
60 | //! Search if the Projection of the Bissectrice on the |
61 | //! faces needs an approximation or not. |
62 | //! Returns true if the approximation is not needed. |
63 | Standard_EXPORT Standard_Boolean IsParticularCase() const; |
64 | |
65 | //! Returns the continuity betwwen the two faces |
66 | //! seShape from GeomAbsparated by myBis. |
67 | Standard_EXPORT GeomAbs_Shape Continuity() const; |
68 | |
69 | //! raises if IsParticularCase is <False>. |
70 | Standard_EXPORT void Curves (Handle(Geom_Curve)& Curve, Handle(Geom2d_Curve)& PCurve1, Handle(Geom2d_Curve)& PCurve2) const; |
71 | |
72 | //! returns the first parameter of the Bissectrice. |
73 | Standard_EXPORT virtual Standard_Real FirstParameter() const; |
74 | |
75 | //! returns the last parameter of the Bissectrice. |
76 | Standard_EXPORT virtual Standard_Real LastParameter() const; |
77 | |
78 | //! Returns the current point on the 3d curve |
79 | Standard_EXPORT gp_Pnt Value (const Standard_Real U) const; |
80 | |
81 | //! returns the current point on the PCurve of the |
82 | //! first face |
83 | Standard_EXPORT gp_Pnt2d ValueOnF1 (const Standard_Real U) const; |
84 | |
85 | //! returns the current point on the PCurve of the |
86 | //! first face |
87 | Standard_EXPORT gp_Pnt2d ValueOnF2 (const Standard_Real U) const; |
88 | |
89 | Standard_EXPORT void Value3dOnF1OnF2 (const Standard_Real U, gp_Pnt& P3d, gp_Pnt2d& PF1, gp_Pnt2d& PF2) const; |
90 | |
91 | //! Returns the point at parameter <theU>. |
92 | Standard_EXPORT virtual Standard_Boolean Value(const Standard_Real theU, |
93 | NCollection_Array1<gp_Pnt2d>& thePnt2d, |
94 | NCollection_Array1<gp_Pnt>& thePnt) const; |
95 | |
96 | //! Returns the derivative at parameter <theU>. |
97 | Standard_EXPORT virtual Standard_Boolean D1(const Standard_Real theU, |
98 | NCollection_Array1<gp_Vec2d>& theVec2d, |
99 | NCollection_Array1<gp_Vec>& theVec) const; |
100 | |
101 | private: |
102 | TopoDS_Face myFace1; |
103 | TopoDS_Face myFace2; |
104 | Geom2dAdaptor_Curve myU1; |
105 | Geom2dAdaptor_Curve myV1; |
106 | Geom2dAdaptor_Curve myU2; |
107 | Geom2dAdaptor_Curve myV2; |
108 | Standard_Boolean myIsoU1; |
109 | Standard_Boolean myIsoU2; |
110 | Geom2dAdaptor_Curve myBis; |
111 | Standard_Integer myKPart; |
112 | GeomAbs_Shape myCont; |
113 | }; |
114 | |
115 | #endif // _BRepFill_MultiLine_HeaderFile |