Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:04:57

0001 // Created on: 1999-05-14
0002 // Created by: Pavel DURANDIN
0003 // Copyright (c) 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 _ShapeUpgrade_ShapeConvertToBezier_HeaderFile
0018 #define _ShapeUpgrade_ShapeConvertToBezier_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <Standard_Integer.hxx>
0025 #include <ShapeUpgrade_ShapeDivide.hxx>
0026 class TopoDS_Shape;
0027 class ShapeUpgrade_FaceDivide;
0028 class Message_Msg;
0029 
0030 
0031 //! API class for performing conversion of 3D, 2D curves to bezier curves
0032 //! and surfaces to bezier based surfaces (
0033 //! bezier surface,
0034 //! surface of revolution based on bezier curve,
0035 //! offset surface based on any previous type).
0036 class ShapeUpgrade_ShapeConvertToBezier  : public ShapeUpgrade_ShapeDivide
0037 {
0038 public:
0039 
0040   DEFINE_STANDARD_ALLOC
0041 
0042   
0043   //! Empty constructor.
0044   Standard_EXPORT ShapeUpgrade_ShapeConvertToBezier();
0045   
0046   //! Initialize by a Shape.
0047   Standard_EXPORT ShapeUpgrade_ShapeConvertToBezier(const TopoDS_Shape& S);
0048   
0049   //! Sets mode for conversion 2D curves to bezier.
0050     void Set2dConversion (const Standard_Boolean mode);
0051   
0052   //! Returns the 2D conversion mode.
0053     Standard_Boolean Get2dConversion() const;
0054   
0055   //! Sets mode for conversion 3d curves to bezier.
0056     void Set3dConversion (const Standard_Boolean mode);
0057   
0058   //! Returns the 3D conversion mode.
0059     Standard_Boolean Get3dConversion() const;
0060   
0061   //! Sets mode for conversion surfaces curves to
0062   //! bezier basis.
0063     void SetSurfaceConversion (const Standard_Boolean mode);
0064   
0065   //! Returns the surface conversion mode.
0066     Standard_Boolean GetSurfaceConversion() const;
0067   
0068   //! Sets mode for conversion Geom_Line to bezier.
0069     void Set3dLineConversion (const Standard_Boolean mode);
0070   
0071   //! Returns the Geom_Line conversion mode.
0072     Standard_Boolean Get3dLineConversion() const;
0073   
0074   //! Sets mode for conversion Geom_Circle to bezier.
0075     void Set3dCircleConversion (const Standard_Boolean mode);
0076   
0077   //! Returns the Geom_Circle conversion mode.
0078     Standard_Boolean Get3dCircleConversion() const;
0079   
0080   //! Sets mode for conversion Geom_Conic to bezier.
0081     void Set3dConicConversion (const Standard_Boolean mode);
0082   
0083   //! Returns the Geom_Conic conversion mode.
0084     Standard_Boolean Get3dConicConversion() const;
0085   
0086   //! Sets mode for conversion Geom_Plane to Bezier
0087     void SetPlaneMode (const Standard_Boolean mode);
0088   
0089   //! Returns the Geom_Pline conversion mode.
0090     Standard_Boolean GetPlaneMode() const;
0091   
0092   //! Sets mode for conversion Geom_SurfaceOfRevolution to Bezier
0093     void SetRevolutionMode (const Standard_Boolean mode);
0094   
0095   //! Returns the Geom_SurfaceOfRevolution conversion mode.
0096     Standard_Boolean GetRevolutionMode() const;
0097   
0098   //! Sets mode for conversion Geom_SurfaceOfLinearExtrusion to Bezier
0099     void SetExtrusionMode (const Standard_Boolean mode);
0100   
0101   //! Returns the Geom_SurfaceOfLinearExtrusion conversion mode.
0102     Standard_Boolean GetExtrusionMode() const;
0103   
0104   //! Sets mode for conversion Geom_BSplineSurface to Bezier
0105     void SetBSplineMode (const Standard_Boolean mode);
0106   
0107   //! Returns the Geom_BSplineSurface conversion mode.
0108     Standard_Boolean GetBSplineMode() const;
0109   
0110   //! Performs converting and computes the resulting shape
0111   Standard_EXPORT virtual Standard_Boolean Perform (const Standard_Boolean newContext = Standard_True) Standard_OVERRIDE;
0112 
0113 
0114 
0115 
0116 protected:
0117 
0118   
0119   //! Returns the tool for dividing faces.
0120   Standard_EXPORT virtual Handle(ShapeUpgrade_FaceDivide) GetSplitFaceTool() const Standard_OVERRIDE;
0121   
0122   Standard_EXPORT virtual Message_Msg GetFaceMsg() const Standard_OVERRIDE;
0123   
0124   Standard_EXPORT virtual Message_Msg GetWireMsg() const Standard_OVERRIDE;
0125   
0126   //! Returns a message decsribing modification of a shape.
0127   Standard_EXPORT virtual Message_Msg GetEdgeMsg() const Standard_OVERRIDE;
0128 
0129 
0130 
0131 
0132 private:
0133 
0134 
0135 
0136   Standard_Boolean my2dMode;
0137   Standard_Boolean my3dMode;
0138   Standard_Boolean mySurfaceMode;
0139   Standard_Boolean my3dLineMode;
0140   Standard_Boolean my3dCircleMode;
0141   Standard_Boolean my3dConicMode;
0142   Standard_Boolean myPlaneMode;
0143   Standard_Boolean myRevolutionMode;
0144   Standard_Boolean myExtrusionMode;
0145   Standard_Boolean myBSplineMode;
0146   Standard_Integer myLevel;
0147 
0148 
0149 };
0150 
0151 
0152 #include <ShapeUpgrade_ShapeConvertToBezier.lxx>
0153 
0154 
0155 
0156 
0157 
0158 #endif // _ShapeUpgrade_ShapeConvertToBezier_HeaderFile