1 // Copyright (c) 2013 OPEN CASCADE SAS
3 // The content of this file is subject to the Open CASCADE Technology Public
4 // License Version 6.5 (the "License"). You may not use the content of this file
5 // except in compliance with the License. Please obtain a copy of the License
6 // at http://www.opencascade.org and read it completely before using this file.
8 // The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
9 // main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
11 // The Original Code and all software distributed under the License is
12 // distributed on an "AS IS" basis, without warranty of any kind, and the
13 // Initial Developer hereby disclaims all such warranties, including without
14 // limitation, any warranties of merchantability, fitness for a particular
15 // purpose or non-infringement. Please see the License for the specific terms
16 // and conditions governing the rights and limitations under the License.
18 #ifndef _Prs3d_WFShape_H__
19 #define _Prs3d_WFShape_H__
21 #include <Prs3d_Root.hxx>
22 #include <Prs3d_NListOfSequenceOfPnt.hxx>
23 #include <TopTools_HSequenceOfShape.hxx>
24 #include <Quantity_Length.hxx>
26 class Adaptor3d_Curve;
29 class TColgp_SequenceOfPnt;
30 class Handle(BRepAdaptor_HSurface);
31 class Handle(Prs3d_Drawer);
33 class Prs3d_WFShape : Prs3d_Root
45 virtual void Add (const Handle(Prs3d_Presentation)& thePrs,
46 const Handle(BRepAdaptor_HSurface)& theFace,
47 const Standard_Boolean theToDrawUIso,
48 const Standard_Boolean theToDrawVIso,
49 const Quantity_Length theDeflection,
50 const Standard_Integer theNBUiso,
51 const Standard_Integer theNBViso,
52 const Handle(Prs3d_Drawer)& theDrawer,
53 Prs3d_NListOfSequenceOfPnt& theCurves) const = 0;
55 virtual Standard_Boolean Match (const Quantity_Length theX,
56 const Quantity_Length theY,
57 const Quantity_Length theZ,
58 const Quantity_Length theDistance,
59 const Handle(BRepAdaptor_HSurface)& theFace,
60 const Handle(Prs3d_Drawer)& theDrawer) const = 0;
66 virtual void Add (const Handle(Prs3d_Presentation)& thePrs,
67 Adaptor3d_Curve& theCurve,
68 const Quantity_Length theDeflection,
69 const Handle(Prs3d_Drawer)& theDrawer,
70 TColgp_SequenceOfPnt& thePoints,
71 const Standard_Boolean theToDrawCurve) const = 0;
73 virtual Standard_Boolean Match (const Quantity_Length theX,
74 const Quantity_Length theY,
75 const Quantity_Length theZ,
76 const Quantity_Length theDistance,
77 const Adaptor3d_Curve& theCurve,
78 const Handle(Prs3d_Drawer)& theDrawer) const = 0;
81 inline Prs3d_WFShape (const Face& theFace,
82 const Curve& theCurve)
83 : myFaceAlgo (theFace),
84 myCurveAlgo (theCurve) {}
88 //! Add shape to presentation
89 Standard_EXPORT void Add (const Handle (Prs3d_Presentation)& thePresentation,
90 const TopoDS_Shape& theShape,
91 const Handle (Prs3d_Drawer)& theDrawer);
93 Standard_EXPORT Handle(TopTools_HSequenceOfShape) PickCurve
94 (const Quantity_Length theX,
95 const Quantity_Length theY,
96 const Quantity_Length theZ,
97 const Quantity_Length theDistance,
98 const TopoDS_Shape& theShape,
99 const Handle (Prs3d_Drawer)& theDrawer);
101 Standard_EXPORT Handle(TopTools_HSequenceOfShape) PickPatch
102 (const Quantity_Length theX,
103 const Quantity_Length theY,
104 const Quantity_Length theZ,
105 const Quantity_Length theDistance,
106 const TopoDS_Shape& theShape,
107 const Handle(Prs3d_Drawer)& theDrawer);
111 static Standard_Boolean AddPolygon (const TopoDS_Edge& theEdge,
112 const Standard_Real theDeflection,
113 TColgp_SequenceOfPnt& thePoints);
117 const Face& myFaceAlgo;
118 const Curve& myCurveAlgo;
122 Prs3d_WFShape (const Prs3d_WFShape& );
123 Prs3d_WFShape& operator= (const Prs3d_WFShape& );
127 #endif // _Prs3d_WFShape_H__