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 TColgp_SequenceOfPnt;
26 class Handle(BRepAdaptor_HSurface);
27 class Handle(Prs3d_Drawer);
29 class Prs3d_WFShape : Prs3d_Root
41 virtual void Add (const Handle(Prs3d_Presentation)& thePrs,
42 const Handle(BRepAdaptor_HSurface)& theFace,
43 const Standard_Boolean theToDrawUIso,
44 const Standard_Boolean theToDrawVIso,
45 const Quantity_Length theDeflection,
46 const Standard_Integer theNBUiso,
47 const Standard_Integer theNBViso,
48 const Handle(Prs3d_Drawer)& theDrawer,
49 Prs3d_NListOfSequenceOfPnt& theCurves) const = 0;
51 virtual Standard_Boolean Match (const Quantity_Length theX,
52 const Quantity_Length theY,
53 const Quantity_Length theZ,
54 const Quantity_Length theDistance,
55 const Handle(BRepAdaptor_HSurface)& theFace,
56 const Handle(Prs3d_Drawer)& theDrawer) const = 0;
62 virtual void Add (const Handle(Prs3d_Presentation)& thePrs,
63 Adaptor3d_Curve& theCurve,
64 const Quantity_Length theDeflection,
65 const Handle(Prs3d_Drawer)& theDrawer,
66 TColgp_SequenceOfPnt& thePoints,
67 const Standard_Boolean theToDrawCurve) const = 0;
69 virtual Standard_Boolean Match (const Quantity_Length theX,
70 const Quantity_Length theY,
71 const Quantity_Length theZ,
72 const Quantity_Length theDistance,
73 const Adaptor3d_Curve& theCurve,
74 const Handle(Prs3d_Drawer)& theDrawer) const = 0;
77 inline Prs3d_WFShape (const Face& theFace,
78 const Curve& theCurve)
79 : myFaceAlgo (theFace),
80 myCurveAlgo (theCurve) {}
84 //! Add shape to presentation
85 Standard_EXPORT void Add (const Handle (Prs3d_Presentation)& thePresentation,
86 const TopoDS_Shape& theShape,
87 const Handle (Prs3d_Drawer)& theDrawer);
89 Standard_EXPORT Handle(TopTools_HSequenceOfShape) PickCurve
90 (const Quantity_Length theX,
91 const Quantity_Length theY,
92 const Quantity_Length theZ,
93 const Quantity_Length theDistance,
94 const TopoDS_Shape& theShape,
95 const Handle (Prs3d_Drawer)& theDrawer);
97 Standard_EXPORT Handle(TopTools_HSequenceOfShape) PickPatch
98 (const Quantity_Length theX,
99 const Quantity_Length theY,
100 const Quantity_Length theZ,
101 const Quantity_Length theDistance,
102 const TopoDS_Shape& theShape,
103 const Handle(Prs3d_Drawer)& theDrawer);
107 static Standard_Boolean AddPolygon (const TopoDS_Edge& theEdge,
108 TColgp_SequenceOfPnt& thePoints);
112 const Face& myFaceAlgo;
113 const Curve& myCurveAlgo;
117 Prs3d_WFShape (const Prs3d_WFShape& );
118 Prs3d_WFShape& operator= (const Prs3d_WFShape& );
122 #endif // _Prs3d_WFShape_H__