42cf5bc1 |
1 | // Created on: 1993-04-07 |
2 | // Created by: Laurent BUCHARD |
3 | // Copyright (c) 1993-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 _IntCurveSurface_TheHCurveTool_HeaderFile |
18 | #define _IntCurveSurface_TheHCurveTool_HeaderFile |
19 | |
20 | #include <Standard.hxx> |
21 | #include <Standard_DefineAlloc.hxx> |
22 | #include <Standard_Handle.hxx> |
23 | |
24 | #include <Standard_Real.hxx> |
25 | #include <GeomAbs_Shape.hxx> |
26 | #include <Standard_Integer.hxx> |
27 | #include <TColStd_Array1OfReal.hxx> |
28 | #include <Standard_Boolean.hxx> |
29 | #include <gp_Pnt.hxx> |
30 | #include <gp_Vec.hxx> |
31 | #include <GeomAbs_CurveType.hxx> |
32 | #include <gp_Lin.hxx> |
33 | #include <gp_Circ.hxx> |
34 | #include <gp_Elips.hxx> |
35 | #include <gp_Hypr.hxx> |
36 | #include <gp_Parab.hxx> |
37 | #include <TColStd_HArray1OfReal.hxx> |
38 | class Standard_OutOfRange; |
39 | class Standard_NoSuchObject; |
40 | class Standard_DomainError; |
41 | class Adaptor3d_HCurve; |
42 | class gp_Pnt; |
43 | class gp_Vec; |
44 | class Geom_BezierCurve; |
45 | class Geom_BSplineCurve; |
46 | |
47 | |
48 | |
49 | class IntCurveSurface_TheHCurveTool |
50 | { |
51 | public: |
52 | |
53 | DEFINE_STANDARD_ALLOC |
54 | |
55 | |
56 | static Standard_Real FirstParameter (const Handle(Adaptor3d_HCurve)& C); |
57 | |
58 | static Standard_Real LastParameter (const Handle(Adaptor3d_HCurve)& C); |
59 | |
60 | static GeomAbs_Shape Continuity (const Handle(Adaptor3d_HCurve)& C); |
61 | |
62 | static Standard_Integer NbIntervals (const Handle(Adaptor3d_HCurve)& C, const GeomAbs_Shape S); |
63 | |
64 | static void Intervals (const Handle(Adaptor3d_HCurve)& C, TColStd_Array1OfReal& T, const GeomAbs_Shape S); |
65 | |
66 | static Standard_Boolean IsClosed (const Handle(Adaptor3d_HCurve)& C); |
67 | |
68 | static Standard_Boolean IsPeriodic (const Handle(Adaptor3d_HCurve)& C); |
69 | |
70 | static Standard_Real Period (const Handle(Adaptor3d_HCurve)& C); |
71 | |
72 | static gp_Pnt Value (const Handle(Adaptor3d_HCurve)& C, const Standard_Real U); |
73 | |
74 | static void D0 (const Handle(Adaptor3d_HCurve)& C, const Standard_Real U, gp_Pnt& P); |
75 | |
76 | static void D1 (const Handle(Adaptor3d_HCurve)& C, const Standard_Real U, gp_Pnt& P, gp_Vec& V); |
77 | |
78 | static void D2 (const Handle(Adaptor3d_HCurve)& C, const Standard_Real U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2); |
79 | |
80 | static void D3 (const Handle(Adaptor3d_HCurve)& C, const Standard_Real U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2, gp_Vec& V3); |
81 | |
82 | static gp_Vec DN (const Handle(Adaptor3d_HCurve)& C, const Standard_Real U, const Standard_Integer N); |
83 | |
84 | static Standard_Real Resolution (const Handle(Adaptor3d_HCurve)& C, const Standard_Real R3d); |
85 | |
86 | static GeomAbs_CurveType GetType (const Handle(Adaptor3d_HCurve)& C); |
87 | |
88 | static gp_Lin Line (const Handle(Adaptor3d_HCurve)& C); |
89 | |
90 | static gp_Circ Circle (const Handle(Adaptor3d_HCurve)& C); |
91 | |
92 | static gp_Elips Ellipse (const Handle(Adaptor3d_HCurve)& C); |
93 | |
94 | static gp_Hypr Hyperbola (const Handle(Adaptor3d_HCurve)& C); |
95 | |
96 | static gp_Parab Parabola (const Handle(Adaptor3d_HCurve)& C); |
97 | |
98 | static Handle(Geom_BezierCurve) Bezier (const Handle(Adaptor3d_HCurve)& C); |
99 | |
100 | static Handle(Geom_BSplineCurve) BSpline (const Handle(Adaptor3d_HCurve)& C); |
101 | |
102 | Standard_EXPORT static Standard_Integer NbSamples (const Handle(Adaptor3d_HCurve)& C, const Standard_Real U0, const Standard_Real U1); |
103 | |
104 | Standard_EXPORT static void SamplePars (const Handle(Adaptor3d_HCurve)& C, const Standard_Real U0, const Standard_Real U1, const Standard_Real Defl, const Standard_Integer NbMin, Handle(TColStd_HArray1OfReal)& Pars); |
105 | |
106 | |
107 | |
108 | |
109 | protected: |
110 | |
111 | |
112 | |
113 | |
114 | |
115 | private: |
116 | |
117 | |
118 | |
119 | |
120 | |
121 | }; |
122 | |
123 | #define CurveGen Handle(Adaptor3d_HCurve) |
124 | #define CurveGen_hxx <Adaptor3d_HCurve.hxx> |
125 | #define IntCurveSurface_HCurveTool IntCurveSurface_TheHCurveTool |
126 | #define IntCurveSurface_HCurveTool_hxx <IntCurveSurface_TheHCurveTool.hxx> |
127 | |
128 | #include <IntCurveSurface_HCurveTool.lxx> |
129 | |
130 | #undef CurveGen |
131 | #undef CurveGen_hxx |
132 | #undef IntCurveSurface_HCurveTool |
133 | #undef IntCurveSurface_HCurveTool_hxx |
134 | |
135 | |
136 | |
137 | |
138 | #endif // _IntCurveSurface_TheHCurveTool_HeaderFile |