Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Created on: 1996-07-26
0002 // Created by: Maria PUMBORIOS
0003 // Copyright (c) 1996-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 _FilletSurf_Builder_HeaderFile
0018 #define _FilletSurf_Builder_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <FilletSurf_InternalBuilder.hxx>
0025 #include <FilletSurf_StatusDone.hxx>
0026 #include <FilletSurf_ErrorTypeStatus.hxx>
0027 #include <TopTools_ListOfShape.hxx>
0028 #include <Standard_Real.hxx>
0029 #include <Standard_Integer.hxx>
0030 #include <FilletSurf_StatusType.hxx>
0031 class TopoDS_Shape;
0032 class Geom_Surface;
0033 class TopoDS_Face;
0034 class Geom_Curve;
0035 class Geom2d_Curve;
0036 class Geom_TrimmedCurve;
0037 
0038 
0039 //! API giving the  following  geometric information about fillets
0040 //! list of corresponding NUBS surfaces
0041 //! for each surface:
0042 //! the 2  support faces
0043 //! on each face: the 3d curve and the corresponding 2d curve
0044 //! the 2d curves on the fillet
0045 //! status of start and end section of the fillet
0046 //! first and last parameter on edge of the fillet.
0047 class FilletSurf_Builder 
0048 {
0049 public:
0050 
0051   DEFINE_STANDARD_ALLOC
0052 
0053   
0054   //! initialize  of the information  necessary for  the
0055   //! computation of  the fillet on the
0056   //! Shape S from a list of edges E and a radius R.
0057   //!
0058   //! Ta is the angular tolerance
0059   //! Tapp3d is the 3d approximation tolerance
0060   //! Tapp2d is the 2d approximation tolerance
0061   Standard_EXPORT FilletSurf_Builder(const TopoDS_Shape& S, const TopTools_ListOfShape& E, const Standard_Real R, const Standard_Real Ta = 1.0e-2, const Standard_Real Tapp3d = 1.0e-4, const Standard_Real Tapp2d = 1.0e-5);
0062   
0063   //! ---Purpose computation  of the fillet (list of NUBS)
0064   Standard_EXPORT void Perform();
0065   
0066   Standard_EXPORT void Simulate();
0067   
0068   //! gives the status about the computation of the fillet
0069   //! returns:
0070   //! IsOK :no problem during the computation
0071   //! IsNotOk: no result is produced
0072   //! IsPartial: the result is partial
0073   Standard_EXPORT FilletSurf_StatusDone IsDone() const;
0074   
0075   //! gives    information     about   error   status     if
0076   //! IsDone=IsNotOk
0077   //! returns
0078   //! EdgeNotG1: the edges are not G1
0079   //! FacesNotG1 : two connected faces on a same support are
0080   //! not  G1
0081   //! EdgeNotOnShape: the  edge   is  not on  shape
0082   //! NotSharpEdge: the  edge is not sharp
0083   //! PbFilletCompute: problem during the computation of the fillet
0084   Standard_EXPORT FilletSurf_ErrorTypeStatus StatusError() const;
0085   
0086   //! gives the number of NUBS surfaces  of the Fillet.
0087   Standard_EXPORT Standard_Integer NbSurface() const;
0088   
0089   //! gives the NUBS surface of index Index.
0090   Standard_EXPORT const Handle(Geom_Surface)& SurfaceFillet (const Standard_Integer Index) const;
0091   
0092   //! gives  the  3d  tolerance reached during approximation
0093   //! of surface of index Index
0094   Standard_EXPORT Standard_Real TolApp3d (const Standard_Integer Index) const;
0095   
0096   //! gives the first support  face relative to SurfaceFillet(Index);
0097   Standard_EXPORT const TopoDS_Face& SupportFace1 (const Standard_Integer Index) const;
0098   
0099   //! gives the second support  face relative to SurfaceFillet(Index);
0100   Standard_EXPORT const TopoDS_Face& SupportFace2 (const Standard_Integer Index) const;
0101   
0102   //! gives  the 3d curve  of SurfaceFillet(Index)  on SupportFace1(Index)
0103   Standard_EXPORT const Handle(Geom_Curve)& CurveOnFace1 (const Standard_Integer Index) const;
0104   
0105   //! gives the     3d  curve of  SurfaceFillet(Index) on SupportFace2(Index)
0106   Standard_EXPORT const Handle(Geom_Curve)& CurveOnFace2 (const Standard_Integer Index) const;
0107   
0108   //! gives the  PCurve associated to CurvOnSup1(Index)  on the support face
0109   Standard_EXPORT const Handle(Geom2d_Curve)& PCurveOnFace1 (const Standard_Integer Index) const;
0110   
0111   //! gives the PCurve associated to CurveOnFace1(Index) on the Fillet
0112   Standard_EXPORT const Handle(Geom2d_Curve)& PCurve1OnFillet (const Standard_Integer Index) const;
0113   
0114   //! gives the PCurve  associated to CurveOnSup2(Index) on  the  support face
0115   Standard_EXPORT const Handle(Geom2d_Curve)& PCurveOnFace2 (const Standard_Integer Index) const;
0116   
0117   //! gives the PCurve  associated to CurveOnSup2(Index) on  the  fillet
0118   Standard_EXPORT const Handle(Geom2d_Curve)& PCurve2OnFillet (const Standard_Integer Index) const;
0119   
0120   //! gives the parameter of the fillet  on the first edge.
0121   Standard_EXPORT Standard_Real FirstParameter() const;
0122   
0123   //! gives the  parameter of the fillet  on the last edge
0124   Standard_EXPORT Standard_Real LastParameter() const;
0125   
0126   Standard_EXPORT FilletSurf_StatusType StartSectionStatus() const;
0127   
0128   Standard_EXPORT FilletSurf_StatusType EndSectionStatus() const;
0129   
0130   Standard_EXPORT Standard_Integer NbSection (const Standard_Integer IndexSurf) const;
0131   
0132   Standard_EXPORT void Section (const Standard_Integer IndexSurf, const Standard_Integer IndexSec, Handle(Geom_TrimmedCurve)& Circ) const;
0133 
0134 
0135 
0136 
0137 protected:
0138 
0139 
0140 
0141 
0142 
0143 private:
0144 
0145 
0146 
0147   FilletSurf_InternalBuilder myIntBuild;
0148   FilletSurf_StatusDone myisdone;
0149   FilletSurf_ErrorTypeStatus myerrorstatus;
0150 
0151 
0152 };
0153 
0154 
0155 
0156 
0157 
0158 
0159 
0160 #endif // _FilletSurf_Builder_HeaderFile