42cf5bc1 |
1 | // Created on: 1995-08-04 |
2 | // Created by: Modelistation |
3 | // Copyright (c) 1995-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 _StdPrs_Curve_HeaderFile |
18 | #define _StdPrs_Curve_HeaderFile |
19 | |
20 | #include <Standard.hxx> |
21 | #include <Standard_DefineAlloc.hxx> |
22 | #include <Standard_Handle.hxx> |
23 | |
24 | #include <Prs3d_Root.hxx> |
25 | #include <Prs3d_Drawer.hxx> |
26 | #include <Standard_Boolean.hxx> |
27 | #include <Standard_Real.hxx> |
28 | #include <Quantity_Length.hxx> |
29 | #include <TColgp_SequenceOfPnt.hxx> |
30 | #include <Standard_Integer.hxx> |
31 | class Prs3d_Presentation; |
32 | class Adaptor3d_Curve; |
33 | |
34 | |
35 | //! A framework to define display of lines, arcs of circles |
36 | //! and conic sections. |
37 | //! This is done with a fixed number of points, which can be modified. |
38 | class StdPrs_Curve : public Prs3d_Root |
39 | { |
40 | public: |
41 | |
42 | DEFINE_STANDARD_ALLOC |
43 | |
44 | |
45 | //! Adds to the presentation aPresentation the drawing of the curve aCurve. |
46 | //! The aspect is defined by LineAspect in aDrawer. |
47 | //! If drawCurve equals Standard_False the curve will not be displayed, |
48 | //! it is used if the curve is a part of some shape and PrimitiveArray |
49 | //! visualization approach is activated (it is activated by default). |
50 | Standard_EXPORT static void Add (const Handle(Prs3d_Presentation)& aPresentation, const Adaptor3d_Curve& aCurve, const Handle(Prs3d_Drawer)& aDrawer, const Standard_Boolean drawCurve = Standard_True); |
51 | |
52 | //! Adds to the presentation aPresentation the drawing of the curve aCurve. |
53 | //! The aspect is defined by LineAspect in aDrawer. |
54 | //! The drawing will be limited between the points of parameter U1 and U2. |
55 | //! If drawCurve equals Standard_False the curve will not be displayed, |
56 | //! it is used if the curve is a part of some shape and PrimitiveArray |
57 | //! visualization approach is activated (it is activated by default). |
58 | Standard_EXPORT static void Add (const Handle(Prs3d_Presentation)& aPresentation, const Adaptor3d_Curve& aCurve, const Standard_Real U1, const Standard_Real U2, const Handle(Prs3d_Drawer)& aDrawer, const Standard_Boolean drawCurve = Standard_True); |
59 | |
60 | //! adds to the presentation aPresentation the drawing of the curve aCurve. |
61 | //! The aspect is the current aspect. |
62 | //! aDeflection is used in the circle case. |
63 | //! Points give a sequence of curve points. |
64 | //! If drawCurve equals Standard_False the curve will not be displayed, |
65 | //! it is used if the curve is a part of some shape and PrimitiveArray |
66 | //! visualization approach is activated (it is activated by default). |
5ad8c033 |
67 | Standard_EXPORT static void Add (const Handle(Prs3d_Presentation)& aPresentation, const Adaptor3d_Curve& aCurve, const Handle(Prs3d_Drawer)& aDrawer, TColgp_SequenceOfPnt& Points, const Standard_Boolean drawCurve = Standard_True); |
42cf5bc1 |
68 | |
69 | //! adds to the presentation aPresentation the drawing of the curve |
70 | //! aCurve. |
71 | //! The aspect is the current aspect. |
72 | //! The drawing will be limited between the points of parameter |
73 | //! U1 and U2. |
74 | //! aDeflection is used in the circle case. |
75 | //! Points give a sequence of curve points. |
76 | //! If drawCurve equals Standard_False the curve will not be displayed, |
77 | //! it is used if the curve is a part of some shape and PrimitiveArray |
78 | //! visualization approach is activated (it is activated by default). |
5ad8c033 |
79 | Standard_EXPORT static void Add (const Handle(Prs3d_Presentation)& aPresentation, const Adaptor3d_Curve& aCurve, const Standard_Real U1, const Standard_Real U2, TColgp_SequenceOfPnt& Points, const Standard_Integer aNbPoints = 30, const Standard_Boolean drawCurve = Standard_True); |
42cf5bc1 |
80 | |
81 | //! returns true if the distance between the point (X,Y,Z) and the |
82 | //! drawing of the curve is less than aDistance. |
83 | Standard_EXPORT static Standard_Boolean Match (const Quantity_Length X, const Quantity_Length Y, const Quantity_Length Z, const Quantity_Length aDistance, const Adaptor3d_Curve& aCurve, const Handle(Prs3d_Drawer)& aDrawer); |
84 | |
85 | //! returns true if the distance between the point (X,Y,Z) and the |
86 | //! drawing of the curve is less than aDistance. |
87 | Standard_EXPORT static Standard_Boolean Match (const Quantity_Length X, const Quantity_Length Y, const Quantity_Length Z, const Quantity_Length aDistance, const Adaptor3d_Curve& aCurve, const Quantity_Length aDeflection, const Standard_Real aLimit, const Standard_Integer aNbPoints); |
88 | |
89 | //! returns true if the distance between the point (X,Y,Z) and the |
90 | //! drawing of the curve aCurve is less than aDistance. |
91 | //! The drawing is considered between the points |
92 | //! of parameter U1 and U2; |
93 | Standard_EXPORT static Standard_Boolean Match (const Quantity_Length X, const Quantity_Length Y, const Quantity_Length Z, const Quantity_Length aDistance, const Adaptor3d_Curve& aCurve, const Standard_Real U1, const Standard_Real U2, const Handle(Prs3d_Drawer)& aDrawer); |
94 | |
95 | //! returns true if the distance between the point (X,Y,Z) and the |
96 | //! drawing of the curve aCurve is less than aDistance. |
97 | //! The drawing is considered between the points |
98 | //! of parameter U1 and U2; |
99 | Standard_EXPORT static Standard_Boolean Match (const Quantity_Length X, const Quantity_Length Y, const Quantity_Length Z, const Quantity_Length aDistance, const Adaptor3d_Curve& aCurve, const Standard_Real U1, const Standard_Real U2, const Quantity_Length aDeflection, const Standard_Integer aNbPoints); |
100 | |
101 | |
102 | |
103 | |
104 | protected: |
105 | |
106 | |
107 | |
108 | |
109 | |
110 | private: |
111 | |
112 | |
113 | |
114 | |
115 | |
116 | }; |
117 | |
118 | |
119 | |
120 | |
121 | |
122 | |
123 | |
124 | #endif // _StdPrs_Curve_HeaderFile |