1 // Copyright (c) 2013-2014 OPEN CASCADE SAS
3 // This file is part of Open CASCADE Technology software library.
5 // This library is free software; you can redistribute it and/or modify it under
6 // the terms of the GNU Lesser General Public License version 2.1 as published
7 // by the Free Software Foundation, with special exception defined in the file
8 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
9 // distribution for complete text of the license and disclaimer of any warranty.
11 // Alternatively, this file may be used under the terms of Open CASCADE
12 // commercial license or contractual agreement.
14 #ifndef _Prs3d_WFShape_H__
15 #define _Prs3d_WFShape_H__
17 #include <Prs3d_Root.hxx>
18 #include <Prs3d_NListOfSequenceOfPnt.hxx>
19 #include <TopTools_HSequenceOfShape.hxx>
20 #include <Quantity_Length.hxx>
22 class Adaptor3d_Curve;
25 class Handle(BRepAdaptor_HSurface);
26 class Handle(Prs3d_Drawer);
28 class Prs3d_WFShape : Prs3d_Root
40 virtual void Add (const Handle(Prs3d_Presentation)& thePrs,
41 const Handle(BRepAdaptor_HSurface)& theFace,
42 const Standard_Boolean theToDrawUIso,
43 const Standard_Boolean theToDrawVIso,
44 const Quantity_Length theDeflection,
45 const Standard_Integer theNBUiso,
46 const Standard_Integer theNBViso,
47 const Handle(Prs3d_Drawer)& theDrawer,
48 Prs3d_NListOfSequenceOfPnt& theCurves) const = 0;
50 virtual Standard_Boolean Match (const Quantity_Length theX,
51 const Quantity_Length theY,
52 const Quantity_Length theZ,
53 const Quantity_Length theDistance,
54 const Handle(BRepAdaptor_HSurface)& theFace,
55 const Handle(Prs3d_Drawer)& theDrawer) const = 0;
61 virtual void Add (const Handle(Prs3d_Presentation)& thePrs,
62 Adaptor3d_Curve& theCurve,
63 const Quantity_Length theDeflection,
64 const Handle(Prs3d_Drawer)& theDrawer,
65 TColgp_SequenceOfPnt& thePoints,
66 const Standard_Boolean theToDrawCurve) const = 0;
68 virtual Standard_Boolean Match (const Quantity_Length theX,
69 const Quantity_Length theY,
70 const Quantity_Length theZ,
71 const Quantity_Length theDistance,
72 const Adaptor3d_Curve& theCurve,
73 const Handle(Prs3d_Drawer)& theDrawer) const = 0;
76 inline Prs3d_WFShape (const Face& theFace,
77 const Curve& theCurve)
78 : myFaceAlgo (theFace),
79 myCurveAlgo (theCurve) {}
83 //! Add shape to presentation
84 Standard_EXPORT void Add (const Handle (Prs3d_Presentation)& thePresentation,
85 const TopoDS_Shape& theShape,
86 const Handle (Prs3d_Drawer)& theDrawer);
88 Standard_EXPORT Handle(TopTools_HSequenceOfShape) PickCurve
89 (const Quantity_Length theX,
90 const Quantity_Length theY,
91 const Quantity_Length theZ,
92 const Quantity_Length theDistance,
93 const TopoDS_Shape& theShape,
94 const Handle (Prs3d_Drawer)& theDrawer);
96 Standard_EXPORT Handle(TopTools_HSequenceOfShape) PickPatch
97 (const Quantity_Length theX,
98 const Quantity_Length theY,
99 const Quantity_Length theZ,
100 const Quantity_Length theDistance,
101 const TopoDS_Shape& theShape,
102 const Handle(Prs3d_Drawer)& theDrawer);
106 static Standard_Boolean AddPolygon (const TopoDS_Edge& theEdge,
107 TColgp_SequenceOfPnt& thePoints);
111 const Face& myFaceAlgo;
112 const Curve& myCurveAlgo;
116 Prs3d_WFShape (const Prs3d_WFShape& );
117 Prs3d_WFShape& operator= (const Prs3d_WFShape& );
121 #endif // _Prs3d_WFShape_H__