42cf5bc1 |
1 | // Created on: 1996-07-26 |
2 | // Created by: s: Maria PUMBORIOS |
3 | // Copyright (c) 1996-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 _FilletSurf_InternalBuilder_HeaderFile |
18 | #define _FilletSurf_InternalBuilder_HeaderFile |
19 | |
c22b52d6 |
20 | #include <BRepAdaptor_Curve2d.hxx> |
21 | #include <BRepAdaptor_Surface.hxx> |
22 | #include <ChFiDS_ElSpine.hxx> |
42cf5bc1 |
23 | #include <ChFi3d_FilBuilder.hxx> |
24 | #include <ChFi3d_FilletShape.hxx> |
42cf5bc1 |
25 | #include <TopTools_ListOfShape.hxx> |
42cf5bc1 |
26 | #include <ChFiDS_SequenceOfSurfData.hxx> |
27 | #include <math_Vector.hxx> |
28 | #include <TopAbs_Orientation.hxx> |
29 | #include <FilletSurf_StatusType.hxx> |
c22b52d6 |
30 | |
42cf5bc1 |
31 | class Adaptor3d_TopolTool; |
c22b52d6 |
32 | class ChFiDS_Spine; |
42cf5bc1 |
33 | class Geom_Surface; |
42cf5bc1 |
34 | class Geom_Curve; |
35 | class Geom2d_Curve; |
36 | class Geom_TrimmedCurve; |
c22b52d6 |
37 | class TopoDS_Shape; |
38 | class TopoDS_Face; |
42cf5bc1 |
39 | |
40 | //! This class is private. It is used by the class Builder |
41 | //! from FilletSurf. It computes geometric information about fillets. |
42 | class FilletSurf_InternalBuilder : public ChFi3d_FilBuilder |
43 | { |
44 | public: |
45 | |
46 | DEFINE_STANDARD_ALLOC |
47 | |
48 | |
49 | Standard_EXPORT FilletSurf_InternalBuilder(const TopoDS_Shape& S, const ChFi3d_FilletShape FShape = ChFi3d_Polynomial, const Standard_Real Ta = 1.0e-2, const Standard_Real Tapp3d = 1.0e-4, const Standard_Real Tapp2d = 1.0e-5); |
50 | |
51 | //! Initializes the contour with a list of Edges |
52 | //! 0 : no problem |
53 | //! 1 : empty list |
54 | //! 2 : the edges are not G1 |
55 | //! 3 : two connected faces on a same support are not G1 |
56 | //! 4 : the edge is not on shape |
57 | //! 5 : NotSharpEdge: the edge is not sharp |
58 | Standard_EXPORT Standard_Integer Add (const TopTools_ListOfShape& E, const Standard_Real R); |
59 | |
60 | Standard_EXPORT void Perform(); |
61 | |
62 | Standard_EXPORT Standard_Boolean Done() const; |
63 | |
64 | //! gives the number of NUBS surfaces of the Fillet. |
65 | Standard_EXPORT Standard_Integer NbSurface() const; |
66 | |
67 | //! gives the NUBS surface of index Index. |
68 | Standard_EXPORT const Handle(Geom_Surface)& SurfaceFillet (const Standard_Integer Index) const; |
69 | |
70 | //! gives the 3d tolerance reached during approximation |
71 | //! of the surface of index Index |
72 | Standard_EXPORT Standard_Real TolApp3d (const Standard_Integer Index) const; |
73 | |
74 | //! gives the first support face relative to SurfaceFillet(Index); |
75 | Standard_EXPORT const TopoDS_Face& SupportFace1 (const Standard_Integer Index) const; |
76 | |
77 | //! gives the second support face relative to SurfaceFillet(Index); |
78 | Standard_EXPORT const TopoDS_Face& SupportFace2 (const Standard_Integer Index) const; |
79 | |
80 | //! gives the 3d curve of SurfaceFillet(Index) on SupportFace1(Index) |
81 | Standard_EXPORT const Handle(Geom_Curve)& CurveOnFace1 (const Standard_Integer Index) const; |
82 | |
83 | //! gives the 3d curve of SurfaceFillet(Index) on SupportFace2(Index) |
84 | Standard_EXPORT const Handle(Geom_Curve)& CurveOnFace2 (const Standard_Integer Index) const; |
85 | |
86 | //! gives the PCurve associated to CurvOnSup1(Index) on the support face |
87 | Standard_EXPORT const Handle(Geom2d_Curve)& PCurveOnFace1 (const Standard_Integer Index) const; |
88 | |
89 | //! gives the PCurve associated to CurveOnFace1(Index) on the Fillet |
90 | Standard_EXPORT const Handle(Geom2d_Curve)& PCurve1OnFillet (const Standard_Integer Index) const; |
91 | |
92 | //! gives the PCurve associated to CurveOnSup2(Index) on the support face |
93 | Standard_EXPORT const Handle(Geom2d_Curve)& PCurveOnFace2 (const Standard_Integer Index) const; |
94 | |
95 | //! gives the PCurve associated to CurveOnSup2(Index) on the fillet |
96 | Standard_EXPORT const Handle(Geom2d_Curve)& PCurve2OnFillet (const Standard_Integer Index) const; |
97 | |
98 | //! gives the parameter of the fillet on the first edge. |
99 | Standard_EXPORT Standard_Real FirstParameter() const; |
100 | |
101 | //! gives the parameter of the fillet on the last edge |
102 | Standard_EXPORT Standard_Real LastParameter() const; |
103 | |
104 | Standard_EXPORT FilletSurf_StatusType StartSectionStatus() const; |
105 | |
106 | Standard_EXPORT FilletSurf_StatusType EndSectionStatus() const; |
107 | |
108 | Standard_EXPORT void Simulate(); |
109 | |
110 | Standard_EXPORT Standard_Integer NbSection (const Standard_Integer IndexSurf) const; |
111 | |
112 | Standard_EXPORT void Section (const Standard_Integer IndexSurf, const Standard_Integer IndexSec, Handle(Geom_TrimmedCurve)& Circ) const; |
113 | |
114 | |
115 | |
116 | |
117 | protected: |
118 | |
119 | |
120 | //! This method calculates the elements of construction of the |
121 | //! fillet (constant or evolutive). |
c22b52d6 |
122 | Standard_EXPORT virtual Standard_Boolean PerformSurf (ChFiDS_SequenceOfSurfData& SeqData, const Handle(ChFiDS_ElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, const Handle(BRepAdaptor_Surface)& S1, const Handle(Adaptor3d_TopolTool)& I1, const Handle(BRepAdaptor_Surface)& S2, const Handle(Adaptor3d_TopolTool)& I2, const Standard_Real MaxStep, const Standard_Real Fleche, const Standard_Real TolGuide, Standard_Real& First, Standard_Real& Last, const Standard_Boolean Inside, const Standard_Boolean Appro, const Standard_Boolean Forward, const Standard_Boolean RecOnS1, const Standard_Boolean RecOnS2, const math_Vector& Soldep, Standard_Integer& Intf, Standard_Integer& Intl) Standard_OVERRIDE; |
42cf5bc1 |
123 | |
c22b52d6 |
124 | Standard_EXPORT virtual void PerformSurf (ChFiDS_SequenceOfSurfData& SeqData, const Handle(ChFiDS_ElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, const Handle(BRepAdaptor_Surface)& S1, const Handle(Adaptor3d_TopolTool)& I1, const Handle(BRepAdaptor_Curve2d)& PC1, const Handle(BRepAdaptor_Surface)& Sref1, const Handle(BRepAdaptor_Curve2d)& PCref1, Standard_Boolean& Decroch1, const Handle(BRepAdaptor_Surface)& S2, const Handle(Adaptor3d_TopolTool)& I2, const TopAbs_Orientation Or2, const Standard_Real MaxStep, const Standard_Real Fleche, const Standard_Real TolGuide, Standard_Real& First, Standard_Real& Last, const Standard_Boolean Inside, const Standard_Boolean Appro, const Standard_Boolean Forward, const Standard_Boolean RecP, const Standard_Boolean RecS, const Standard_Boolean RecRst, const math_Vector& Soldep) Standard_OVERRIDE; |
42cf5bc1 |
125 | |
c22b52d6 |
126 | Standard_EXPORT virtual void PerformSurf (ChFiDS_SequenceOfSurfData& SeqData, const Handle(ChFiDS_ElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, const Handle(BRepAdaptor_Surface)& S1, const Handle(Adaptor3d_TopolTool)& I1, const TopAbs_Orientation Or1, const Handle(BRepAdaptor_Surface)& S2, const Handle(Adaptor3d_TopolTool)& I2, const Handle(BRepAdaptor_Curve2d)& PC2, const Handle(BRepAdaptor_Surface)& Sref2, const Handle(BRepAdaptor_Curve2d)& PCref2, Standard_Boolean& Decroch2, const Standard_Real MaxStep, const Standard_Real Fleche, const Standard_Real TolGuide, Standard_Real& First, Standard_Real& Last, const Standard_Boolean Inside, const Standard_Boolean Appro, const Standard_Boolean Forward, const Standard_Boolean RecP, const Standard_Boolean RecS, const Standard_Boolean RecRst, const math_Vector& Soldep) Standard_OVERRIDE; |
42cf5bc1 |
127 | |
c22b52d6 |
128 | Standard_EXPORT virtual void PerformSurf (ChFiDS_SequenceOfSurfData& Data, const Handle(ChFiDS_ElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, const Handle(BRepAdaptor_Surface)& S1, const Handle(Adaptor3d_TopolTool)& I1, const Handle(BRepAdaptor_Curve2d)& PC1, const Handle(BRepAdaptor_Surface)& Sref1, const Handle(BRepAdaptor_Curve2d)& PCref1, Standard_Boolean& Decroch1, const TopAbs_Orientation Or1, const Handle(BRepAdaptor_Surface)& S2, const Handle(Adaptor3d_TopolTool)& I2, const Handle(BRepAdaptor_Curve2d)& PC2, const Handle(BRepAdaptor_Surface)& Sref2, const Handle(BRepAdaptor_Curve2d)& PCref2, Standard_Boolean& Decroch2, const TopAbs_Orientation Or2, const Standard_Real MaxStep, const Standard_Real Fleche, const Standard_Real TolGuide, Standard_Real& First, Standard_Real& Last, const Standard_Boolean Inside, const Standard_Boolean Appro, const Standard_Boolean Forward, const Standard_Boolean RecP1, const Standard_Boolean RecRst1, const Standard_Boolean RecP2, const Standard_Boolean RecRst2, const math_Vector& Soldep) Standard_OVERRIDE; |
42cf5bc1 |
129 | |
130 | |
131 | |
132 | |
133 | private: |
134 | |
135 | |
136 | |
137 | |
138 | |
139 | }; |
140 | |
141 | |
142 | |
143 | |
144 | |
145 | |
146 | |
147 | #endif // _FilletSurf_InternalBuilder_HeaderFile |