Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:03:09

0001 // Created on: 1994-12-09
0002 // Created by: Jacques GOUSSARD
0003 // Copyright (c) 1994-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _BRepBuilderAPI_NurbsConvert_HeaderFile
0018 #define _BRepBuilderAPI_NurbsConvert_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 
0023 #include <BRepBuilderAPI_ModifyShape.hxx>
0024 #include <TopTools_DataMapOfShapeShape.hxx>
0025 #include <BRepTools_ReShape.hxx>
0026 
0027 class TopoDS_Shape;
0028 
0029 
0030 //! Conversion of the complete geometry of a shape
0031 //! (all 3D analytical representation of surfaces and curves)
0032 //! into NURBS geometry (execpt for Planes). For example,
0033 //! all curves supporting edges of the basis shape are converted
0034 //! into BSpline curves, and all surfaces supporting its faces are
0035 //! converted into BSpline surfaces.
0036 class BRepBuilderAPI_NurbsConvert  : public BRepBuilderAPI_ModifyShape
0037 {
0038 public:
0039 
0040   DEFINE_STANDARD_ALLOC
0041 
0042   
0043   //! Constructs a framework for converting the geometry of a
0044   //! shape into NURBS geometry. Use the function Perform
0045   //! to define the shape to convert.
0046   Standard_EXPORT BRepBuilderAPI_NurbsConvert();
0047   
0048   //! Builds a new shape by converting the geometry of the
0049   //! shape S into NURBS geometry. Specifically, all curves
0050   //! supporting edges of S are converted into BSpline
0051   //! curves, and all surfaces supporting its faces are
0052   //! converted into BSpline surfaces.
0053   //! Use the function Shape to access the new shape.
0054   //! Note: the constructed framework can be reused to
0055   //! convert other shapes. You specify these with the
0056   //! function Perform.
0057   Standard_EXPORT BRepBuilderAPI_NurbsConvert(const TopoDS_Shape& S, const Standard_Boolean Copy = Standard_False);
0058   
0059   //! Builds a new shape by converting the geometry of the
0060   //! shape S into NURBS geometry.
0061   //! Specifically, all curves supporting edges of S are
0062   //! converted into BSpline curves, and all surfaces
0063   //! supporting its faces are converted into BSpline surfaces.
0064   //! Use the function Shape to access the new shape.
0065   //! Note: this framework can be reused to convert other
0066   //! shapes: you specify them by calling the function Perform again.
0067   Standard_EXPORT void Perform (const TopoDS_Shape& S, const Standard_Boolean Copy = Standard_False);
0068 
0069 
0070   //! Returns the list  of shapes modified from the shape
0071   //! <S>.
0072   Standard_EXPORT virtual const TopTools_ListOfShape& Modified (const TopoDS_Shape& S);
0073   
0074   //! Returns the modified shape corresponding to <S>.
0075   //! S can correspond to the entire initial shape or to its subshape.
0076   //! Exceptions
0077   //! Standard_NoSuchObject if S is not the initial shape or
0078   //! a subshape of the initial shape to which the
0079   //! transformation has been applied. 
0080   Standard_EXPORT virtual TopoDS_Shape ModifiedShape (const TopoDS_Shape& S) const;
0081 
0082 
0083 protected:
0084 
0085 
0086 
0087 
0088 
0089 private:
0090 
0091   Standard_EXPORT void CorrectVertexTol();
0092 
0093   TopTools_DataMapOfShapeShape myVtxToReplace;
0094   BRepTools_ReShape mySubs;
0095 
0096 };
0097 
0098 
0099 
0100 
0101 
0102 
0103 
0104 #endif // _BRepBuilderAPI_NurbsConvert_HeaderFile