1 // Created on: 1995-08-07
2 // Created by: Modelistation
3 // Copyright (c) 1995-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
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.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _StdPrs_WFDeflectionRestrictedFace_HeaderFile
18 #define _StdPrs_WFDeflectionRestrictedFace_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
24 #include <Prs3d_Root.hxx>
25 #include <Prs3d_Drawer.hxx>
26 #include <Standard_Boolean.hxx>
27 #include <Standard_Integer.hxx>
28 #include <Prs3d_NListOfSequenceOfPnt.hxx>
30 class Prs3d_Presentation;
31 class BRepAdaptor_HSurface;
35 //! A framework to provide display of U and V
36 //! isoparameters of faces, while allowing you to impose
37 //! a deflection on them.
38 //! Computes the wireframe presentation of faces with
39 //! restrictions by displaying a given number of U and/or
40 //! V isoparametric curves. The isoparametric curves are
41 //! drawn with respect to a maximal chordial deviation.
42 //! The presentation includes the restriction curves.
43 class StdPrs_WFDeflectionRestrictedFace : public Prs3d_Root
50 //! Defines a display featuring U and V isoparameters.
51 //! Adds the surface aFace to the
52 //! StdPrs_WFRestrictedFace algorithm. This face is
53 //! found in a shape in the presentation object
54 //! aPresentation, and its display attributes - in
55 //! particular, the number of U and V isoparameters - are
56 //! set in the attribute manager aDrawer.
57 //! aFace is BRepAdaptor_HSurface surface created
58 //! from a face in a topological shape. which is passed
59 //! as an argument through the
60 //! BRepAdaptor_HSurface surface created from it.
61 //! This is what allows the topological face to be treated
62 //! as a geometric surface.
63 Standard_EXPORT static void Add (const Handle(Prs3d_Presentation)& aPresentation, const Handle(BRepAdaptor_HSurface)& aFace, const Handle(Prs3d_Drawer)& aDrawer);
65 //! Defines a display featuring U isoparameters
66 //! respectively. Add the surface aFace to the
67 //! StdPrs_WFRestrictedFace algorithm. This face
68 //! is found in a shape in the presentation object
69 //! aPresentation, and its display attributes - in
70 //! particular, the number of U isoparameters -
71 //! are set in the attribute manager aDrawer.
72 //! aFace is BRepAdaptor_HSurface surface
73 //! created from a face in a topological shape. which
74 //! is passed to the function as an argument through
75 //! the BRepAdaptor_HSurface surface created from
76 //! it. This is what allows the topological face to be
77 //! treated as a geometric surface.
78 Standard_EXPORT static void AddUIso (const Handle(Prs3d_Presentation)& aPresentation, const Handle(BRepAdaptor_HSurface)& aFace, const Handle(Prs3d_Drawer)& aDrawer);
80 //! Defines a display featuring V isoparameters
81 //! respectively. Add the surface aFace to the
82 //! StdPrs_WFRestrictedFace algorithm. This face
83 //! is found in a shape in the presentation object
84 //! aPresentation, and its display attributes - in
85 //! particular, the number of V isoparameters -
86 //! are set in the attribute manager aDrawer.
87 //! aFace is BRepAdaptor_HSurface surface
88 //! created from a face in a topological shape. which
89 //! is passed to the function as an argument through
90 //! the BRepAdaptor_HSurface surface created from
91 //! it. This is what allows the topological face to be
92 //! treated as a geometric surface.
93 Standard_EXPORT static void AddVIso (const Handle(Prs3d_Presentation)& aPresentation, const Handle(BRepAdaptor_HSurface)& aFace, const Handle(Prs3d_Drawer)& aDrawer);
95 //! Defines a display of a delection-specified face. The
96 //! display will feature U and V isoparameters.
97 //! Adds the topology aShape to the
98 //! StdPrs_WFRestrictedFace algorithm. This shape is
99 //! found in the presentation object aPresentation, and
100 //! its display attributes - except the number of U and V
101 //! isoparameters - are set in the attribute manager aDrawer.
102 //! The function sets the number of U and V
103 //! isoparameters, NBUiso and NBViso, in the shape. To
104 //! do this, the arguments DrawUIso and DrawVIso must be true.
105 //! aFace is BRepAdaptor_HSurface surface created
106 //! from a face in a topological shape. which is passed
107 //! as an argument through the
108 //! BRepAdaptor_HSurface surface created from it.
109 //! This is what allows the topological face to be treated
110 //! as a geometric surface.
111 //! Curves give a sequence of face curves, it is used if the PrimitiveArray
112 //! visualization approach is activated (it is activated by default).
113 Standard_EXPORT static void Add (const Handle(Prs3d_Presentation)& aPresentation, const Handle(BRepAdaptor_HSurface)& aFace, const Standard_Boolean DrawUIso, const Standard_Boolean DrawVIso, const Standard_Real Deflection, const Standard_Integer NBUiso, const Standard_Integer NBViso, const Handle(Prs3d_Drawer)& aDrawer, Prs3d_NListOfSequenceOfPnt& Curves);
115 Standard_EXPORT static Standard_Boolean Match (const Standard_Real X, const Standard_Real Y, const Standard_Real Z, const Standard_Real aDistance, const Handle(BRepAdaptor_HSurface)& aFace, const Handle(Prs3d_Drawer)& aDrawer);
117 Standard_EXPORT static Standard_Boolean MatchUIso (const Standard_Real X, const Standard_Real Y, const Standard_Real Z, const Standard_Real aDistance, const Handle(BRepAdaptor_HSurface)& aFace, const Handle(Prs3d_Drawer)& aDrawer);
119 Standard_EXPORT static Standard_Boolean MatchVIso (const Standard_Real X, const Standard_Real Y, const Standard_Real Z, const Standard_Real aDistance, const Handle(BRepAdaptor_HSurface)& aFace, const Handle(Prs3d_Drawer)& aDrawer);
121 Standard_EXPORT static Standard_Boolean Match (const Standard_Real X, const Standard_Real Y, const Standard_Real Z, const Standard_Real aDistance, const Handle(BRepAdaptor_HSurface)& aFace, const Handle(Prs3d_Drawer)& aDrawer, const Standard_Boolean DrawUIso, const Standard_Boolean DrawVIso, const Standard_Real aDeflection, const Standard_Integer NBUiso, const Standard_Integer NBViso);
125 #endif // _StdPrs_WFDeflectionRestrictedFace_HeaderFile