Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Created on: 1999-06-17
0002 // Created by: data exchange team
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 _ShapeCustom_ConvertToBSpline_HeaderFile
0018 #define _ShapeCustom_ConvertToBSpline_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022 
0023 #include <ShapeCustom_Modification.hxx>
0024 #include <GeomAbs_Shape.hxx>
0025 class TopoDS_Face;
0026 class Geom_Surface;
0027 class TopLoc_Location;
0028 class TopoDS_Edge;
0029 class Geom_Curve;
0030 class TopoDS_Vertex;
0031 class gp_Pnt;
0032 class Geom2d_Curve;
0033 
0034 
0035 class ShapeCustom_ConvertToBSpline;
0036 DEFINE_STANDARD_HANDLE(ShapeCustom_ConvertToBSpline, ShapeCustom_Modification)
0037 
0038 //! implement a modification for BRepTools
0039 //! Modifier algorithm. Converts Surface of
0040 //! Linear Exctrusion, Revolution and Offset
0041 //! surfaces into BSpline Surface according to
0042 //! flags.
0043 class ShapeCustom_ConvertToBSpline : public ShapeCustom_Modification
0044 {
0045 
0046 public:
0047 
0048   
0049   Standard_EXPORT ShapeCustom_ConvertToBSpline();
0050   
0051   //! Sets mode for conversion of Surfaces of Linear
0052   //! extrusion.
0053   Standard_EXPORT void SetExtrusionMode (const Standard_Boolean extrMode);
0054   
0055   //! Sets mode for conversion of Surfaces of Revolution.
0056   Standard_EXPORT void SetRevolutionMode (const Standard_Boolean revolMode);
0057   
0058   //! Sets mode for conversion of Offset surfaces.
0059   Standard_EXPORT void SetOffsetMode (const Standard_Boolean offsetMode);
0060   
0061   //! Sets mode for conversion of Plane surfaces.
0062   Standard_EXPORT void SetPlaneMode (const Standard_Boolean planeMode);
0063   
0064   //! Returns Standard_True if the face <F> has  been
0065   //! modified. In this case, <S> is the new geometric
0066   //! support of the face, <L> the new location,  <Tol>
0067   //! the new tolerance.  Otherwise, returns
0068   //! Standard_False, and <S>, <L>, <Tol> are  not
0069   //! significant.
0070   Standard_EXPORT Standard_Boolean NewSurface (const TopoDS_Face& F, Handle(Geom_Surface)& S, TopLoc_Location& L, Standard_Real& Tol, Standard_Boolean& RevWires, Standard_Boolean& RevFace) Standard_OVERRIDE;
0071   
0072   //! Returns Standard_True  if  the edge  <E> has  been
0073   //! modified.  In this case,  <C> is the new geometric
0074   //! support of the  edge, <L> the  new location, <Tol>
0075   //! the         new    tolerance.   Otherwise, returns
0076   //! Standard_False,    and  <C>,  <L>,   <Tol> are not
0077   //! significant.
0078   Standard_EXPORT Standard_Boolean NewCurve (const TopoDS_Edge& E, Handle(Geom_Curve)& C, TopLoc_Location& L, Standard_Real& Tol) Standard_OVERRIDE;
0079   
0080   //! Returns  Standard_True if the  vertex <V> has been
0081   //! modified.  In this  case, <P> is the new geometric
0082   //! support of the vertex,   <Tol> the new  tolerance.
0083   //! Otherwise, returns Standard_False, and <P>,  <Tol>
0084   //! are not significant.
0085   Standard_EXPORT Standard_Boolean NewPoint (const TopoDS_Vertex& V, gp_Pnt& P, Standard_Real& Tol) Standard_OVERRIDE;
0086   
0087   //! Returns Standard_True if  the edge  <E> has a  new
0088   //! curve on surface on the face <F>.In this case, <C>
0089   //! is the new geometric support of  the edge, <L> the
0090   //! new location, <Tol> the new tolerance.
0091   //!
0092   //! Otherwise, returns  Standard_False, and <C>,  <L>,
0093   //! <Tol> are not significant.
0094   //!
0095   //! <NewE> is the new  edge created from  <E>.  <NewF>
0096   //! is the new face created from <F>. They may be useful.
0097   Standard_EXPORT Standard_Boolean NewCurve2d (const TopoDS_Edge& E, const TopoDS_Face& F, const TopoDS_Edge& NewE, const TopoDS_Face& NewF, Handle(Geom2d_Curve)& C, Standard_Real& Tol) Standard_OVERRIDE;
0098   
0099   //! Returns Standard_True if the Vertex  <V> has a new
0100   //! parameter on the  edge <E>. In  this case,  <P> is
0101   //! the parameter,    <Tol>  the     new    tolerance.
0102   //! Otherwise, returns Standard_False, and <P>,  <Tol>
0103   //! are not significant.
0104   Standard_EXPORT Standard_Boolean NewParameter (const TopoDS_Vertex& V, const TopoDS_Edge& E, Standard_Real& P, Standard_Real& Tol) Standard_OVERRIDE;
0105   
0106   //! Returns the  continuity of  <NewE> between <NewF1>
0107   //! and <NewF2>.
0108   //!
0109   //! <NewE> is the new  edge created from <E>.  <NewF1>
0110   //! (resp. <NewF2>) is the new  face created from <F1>
0111   //! (resp. <F2>).
0112   Standard_EXPORT GeomAbs_Shape Continuity (const TopoDS_Edge& E, const TopoDS_Face& F1, const TopoDS_Face& F2, const TopoDS_Edge& NewE, const TopoDS_Face& NewF1, const TopoDS_Face& NewF2) Standard_OVERRIDE;
0113 
0114 
0115 
0116 
0117   DEFINE_STANDARD_RTTIEXT(ShapeCustom_ConvertToBSpline,ShapeCustom_Modification)
0118 
0119 protected:
0120 
0121 
0122 
0123 
0124 private:
0125 
0126   
0127   Standard_EXPORT Standard_Boolean IsToConvert (const Handle(Geom_Surface)& S, Handle(Geom_Surface)& SS) const;
0128 
0129   Standard_Boolean myExtrMode;
0130   Standard_Boolean myRevolMode;
0131   Standard_Boolean myOffsetMode;
0132   Standard_Boolean myPlaneMode;
0133 
0134 
0135 };
0136 
0137 
0138 
0139 
0140 
0141 
0142 
0143 #endif // _ShapeCustom_ConvertToBSpline_HeaderFile