0031668: Visualization - WebGL sample doesn't work on Emscripten 1.39
[occt.git] / src / BRepBuilderAPI / BRepBuilderAPI_NurbsConvert.hxx
1 // Created on: 1994-12-09
2 // Created by: Jacques GOUSSARD
3 // Copyright (c) 1994-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
5 //
6 // This file is part of Open CASCADE Technology software library.
7 //
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.
13 //
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
16
17 #ifndef _BRepBuilderAPI_NurbsConvert_HeaderFile
18 #define _BRepBuilderAPI_NurbsConvert_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
23
24 #include <BRepBuilderAPI_ModifyShape.hxx>
25 #include <Standard_Boolean.hxx>
26 #include <TopTools_DataMapOfShapeShape.hxx>
27 #include <BRepTools_ReShape.hxx>
28
29 class TopoDS_Shape;
30
31
32 //! Conversion of the complete geometry of a shape
33 //! (all 3D analytical representation of surfaces and curves)
34 //! into NURBS geometry (execpt for Planes). For example,
35 //! all curves supporting edges of the basis shape are converted
36 //! into BSpline curves, and all surfaces supporting its faces are
37 //! converted into BSpline surfaces.
38 class BRepBuilderAPI_NurbsConvert  : public BRepBuilderAPI_ModifyShape
39 {
40 public:
41
42   DEFINE_STANDARD_ALLOC
43
44   
45   //! Constructs a framework for converting the geometry of a
46   //! shape into NURBS geometry. Use the function Perform
47   //! to define the shape to convert.
48   Standard_EXPORT BRepBuilderAPI_NurbsConvert();
49   
50   //! Builds a new shape by converting the geometry of the
51   //! shape S into NURBS geometry. Specifically, all curves
52   //! supporting edges of S are converted into BSpline
53   //! curves, and all surfaces supporting its faces are
54   //! converted into BSpline surfaces.
55   //! Use the function Shape to access the new shape.
56   //! Note: the constructed framework can be reused to
57   //! convert other shapes. You specify these with the
58   //! function Perform.
59   Standard_EXPORT BRepBuilderAPI_NurbsConvert(const TopoDS_Shape& S, const Standard_Boolean Copy = Standard_False);
60   
61   //! Builds a new shape by converting the geometry of the
62   //! shape S into NURBS geometry.
63   //! Specifically, all curves supporting edges of S are
64   //! converted into BSpline curves, and all surfaces
65   //! supporting its faces are converted into BSpline surfaces.
66   //! Use the function Shape to access the new shape.
67   //! Note: this framework can be reused to convert other
68   //! shapes: you specify them by calling the function Perform again.
69   Standard_EXPORT void Perform (const TopoDS_Shape& S, const Standard_Boolean Copy = Standard_False);
70
71
72   //! Returns the list  of shapes modified from the shape
73   //! <S>.
74   Standard_EXPORT virtual const TopTools_ListOfShape& Modified (const TopoDS_Shape& S);
75   
76   //! Returns the modified shape corresponding to <S>.
77   //! S can correspond to the entire initial shape or to its subshape.
78   //! Exceptions
79   //! Standard_NoSuchObject if S is not the initial shape or
80   //! a subshape of the initial shape to which the
81   //! transformation has been applied. 
82   Standard_EXPORT virtual TopoDS_Shape ModifiedShape (const TopoDS_Shape& S) const;
83
84
85 protected:
86
87
88
89
90
91 private:
92
93   Standard_EXPORT void CorrectVertexTol();
94
95   TopTools_DataMapOfShapeShape myVtxToReplace;
96   BRepTools_ReShape mySubs;
97
98 };
99
100
101
102
103
104
105
106 #endif // _BRepBuilderAPI_NurbsConvert_HeaderFile