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;
26 class Prs3d_WFShape : Prs3d_Root
38 virtual void Add (const Handle(Prs3d_Presentation)& thePrs,
39 const Handle(BRepAdaptor_HSurface)& theFace,
40 const Standard_Boolean theToDrawUIso,
41 const Standard_Boolean theToDrawVIso,
42 const Quantity_Length theDeflection,
43 const Standard_Integer theNBUiso,
44 const Standard_Integer theNBViso,
45 const Handle(Prs3d_Drawer)& theDrawer,
46 Prs3d_NListOfSequenceOfPnt& theCurves) const = 0;
48 virtual Standard_Boolean Match (const Quantity_Length theX,
49 const Quantity_Length theY,
50 const Quantity_Length theZ,
51 const Quantity_Length theDistance,
52 const Handle(BRepAdaptor_HSurface)& theFace,
53 const Handle(Prs3d_Drawer)& theDrawer) const = 0;
59 virtual void Add (const Handle(Prs3d_Presentation)& thePrs,
60 Adaptor3d_Curve& theCurve,
61 const Quantity_Length theDeflection,
62 const Handle(Prs3d_Drawer)& theDrawer,
63 TColgp_SequenceOfPnt& thePoints,
64 const Standard_Boolean theToDrawCurve) const = 0;
66 virtual Standard_Boolean Match (const Quantity_Length theX,
67 const Quantity_Length theY,
68 const Quantity_Length theZ,
69 const Quantity_Length theDistance,
70 const Adaptor3d_Curve& theCurve,
71 const Handle(Prs3d_Drawer)& theDrawer) const = 0;
74 inline Prs3d_WFShape (const Face& theFace,
75 const Curve& theCurve)
76 : myFaceAlgo (theFace),
77 myCurveAlgo (theCurve) {}
81 //! Add shape to presentation
82 Standard_EXPORT void Add (const Handle (Prs3d_Presentation)& thePresentation,
83 const TopoDS_Shape& theShape,
84 const Handle (Prs3d_Drawer)& theDrawer);
86 Standard_EXPORT Handle(TopTools_HSequenceOfShape) PickCurve
87 (const Quantity_Length theX,
88 const Quantity_Length theY,
89 const Quantity_Length theZ,
90 const Quantity_Length theDistance,
91 const TopoDS_Shape& theShape,
92 const Handle (Prs3d_Drawer)& theDrawer);
94 Standard_EXPORT Handle(TopTools_HSequenceOfShape) PickPatch
95 (const Quantity_Length theX,
96 const Quantity_Length theY,
97 const Quantity_Length theZ,
98 const Quantity_Length theDistance,
99 const TopoDS_Shape& theShape,
100 const Handle(Prs3d_Drawer)& theDrawer);
104 static Standard_Boolean AddPolygon (const TopoDS_Edge& theEdge,
105 TColgp_SequenceOfPnt& thePoints);
109 const Face& myFaceAlgo;
110 const Curve& myCurveAlgo;
114 Prs3d_WFShape (const Prs3d_WFShape& );
115 Prs3d_WFShape& operator= (const Prs3d_WFShape& );
119 #endif // _Prs3d_WFShape_H__