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: s:   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_InternalBuilder_HeaderFile
0018 #define _FilletSurf_InternalBuilder_HeaderFile
0019 
0020 #include <BRepAdaptor_Curve2d.hxx>
0021 #include <ChFi3d_FilBuilder.hxx>
0022 #include <ChFi3d_FilletShape.hxx>
0023 #include <TopTools_ListOfShape.hxx>
0024 #include <ChFiDS_SequenceOfSurfData.hxx>
0025 #include <math_Vector.hxx>
0026 #include <TopAbs_Orientation.hxx>
0027 #include <FilletSurf_StatusType.hxx>
0028 
0029 class Adaptor3d_TopolTool;
0030 class ChFiDS_Spine;
0031 class Geom_Surface;
0032 class Geom_Curve;
0033 class Geom2d_Curve;
0034 class Geom_TrimmedCurve;
0035 class TopoDS_Shape;
0036 class TopoDS_Face;
0037 
0038 //! This class is private. It is  used by the class Builder
0039 //! from FilletSurf. It computes geometric information about fillets.
0040 class FilletSurf_InternalBuilder  : public ChFi3d_FilBuilder
0041 {
0042 public:
0043 
0044   DEFINE_STANDARD_ALLOC
0045 
0046   
0047   Standard_EXPORT FilletSurf_InternalBuilder(const TopoDS_Shape& S, const ChFi3d_FilletShape FShape = ChFi3d_Polynomial, const Standard_Real Ta = 1.0e-2, const Standard_Real Tapp3d = 1.0e-4, const Standard_Real Tapp2d = 1.0e-5);
0048   
0049   //! Initializes the contour with a list of Edges
0050   //! 0 : no problem
0051   //! 1 : empty list
0052   //! 2 : the edges are not G1
0053   //! 3 : two connected faces on a same support are not G1
0054   //! 4 : the  edge   is  not on  shape
0055   //! 5 :  NotSharpEdge: the  edge is not sharp
0056   Standard_EXPORT Standard_Integer Add (const TopTools_ListOfShape& E, const Standard_Real R);
0057   
0058   Standard_EXPORT void Perform();
0059   
0060   Standard_EXPORT Standard_Boolean Done() const;
0061   
0062   //! gives the number of NUBS surfaces  of the Fillet.
0063   Standard_EXPORT Standard_Integer NbSurface() const;
0064   
0065   //! gives the NUBS surface of index Index.
0066   Standard_EXPORT const Handle(Geom_Surface)& SurfaceFillet (const Standard_Integer Index) const;
0067   
0068   //! gives  the  3d  tolerance reached during approximation
0069   //! of the surface of index Index
0070   Standard_EXPORT Standard_Real TolApp3d (const Standard_Integer Index) const;
0071   
0072   //! gives the first support  face relative to SurfaceFillet(Index);
0073   Standard_EXPORT const TopoDS_Face& SupportFace1 (const Standard_Integer Index) const;
0074   
0075   //! gives the second support  face relative to SurfaceFillet(Index);
0076   Standard_EXPORT const TopoDS_Face& SupportFace2 (const Standard_Integer Index) const;
0077   
0078   //! gives  the 3d curve  of SurfaceFillet(Index)  on SupportFace1(Index)
0079   Standard_EXPORT const Handle(Geom_Curve)& CurveOnFace1 (const Standard_Integer Index) const;
0080   
0081   //! gives the     3d  curve of  SurfaceFillet(Index) on SupportFace2(Index)
0082   Standard_EXPORT const Handle(Geom_Curve)& CurveOnFace2 (const Standard_Integer Index) const;
0083   
0084   //! gives the  PCurve associated to CurvOnSup1(Index)  on the support face
0085   Standard_EXPORT const Handle(Geom2d_Curve)& PCurveOnFace1 (const Standard_Integer Index) const;
0086   
0087   //! gives the PCurve associated to CurveOnFace1(Index) on the Fillet
0088   Standard_EXPORT const Handle(Geom2d_Curve)& PCurve1OnFillet (const Standard_Integer Index) const;
0089   
0090   //! gives the PCurve  associated to CurveOnSup2(Index) on  the  support face
0091   Standard_EXPORT const Handle(Geom2d_Curve)& PCurveOnFace2 (const Standard_Integer Index) const;
0092   
0093   //! gives the PCurve  associated to CurveOnSup2(Index) on  the  fillet
0094   Standard_EXPORT const Handle(Geom2d_Curve)& PCurve2OnFillet (const Standard_Integer Index) const;
0095   
0096   //! gives the parameter of the fillet  on the first edge.
0097   Standard_EXPORT Standard_Real FirstParameter() const;
0098   
0099   //! gives the  parameter of the fillet  on the last edge
0100   Standard_EXPORT Standard_Real LastParameter() const;
0101   
0102   Standard_EXPORT FilletSurf_StatusType StartSectionStatus() const;
0103   
0104   Standard_EXPORT FilletSurf_StatusType EndSectionStatus() const;
0105   
0106   Standard_EXPORT void Simulate();
0107   
0108   Standard_EXPORT Standard_Integer NbSection (const Standard_Integer IndexSurf) const;
0109   
0110   Standard_EXPORT void Section (const Standard_Integer IndexSurf, const Standard_Integer IndexSec, Handle(Geom_TrimmedCurve)& Circ) const;
0111 
0112 
0113 
0114 
0115 protected:
0116 
0117   
0118   //! This  method calculates the elements of construction of the
0119   //! fillet (constant or evolutive).
0120   Standard_EXPORT virtual Standard_Boolean PerformSurf (ChFiDS_SequenceOfSurfData& SeqData, const Handle(ChFiDS_ElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, const Handle(BRepAdaptor_Surface)& S1, const Handle(Adaptor3d_TopolTool)& I1, const Handle(BRepAdaptor_Surface)& S2, const Handle(Adaptor3d_TopolTool)& I2, const Standard_Real MaxStep, const Standard_Real Fleche, const Standard_Real TolGuide, Standard_Real& First, Standard_Real& Last, const Standard_Boolean Inside, const Standard_Boolean Appro, const Standard_Boolean Forward, const Standard_Boolean RecOnS1, const Standard_Boolean RecOnS2, const math_Vector& Soldep, Standard_Integer& Intf, Standard_Integer& Intl) Standard_OVERRIDE;
0121   
0122   Standard_EXPORT virtual void PerformSurf (ChFiDS_SequenceOfSurfData& SeqData, const Handle(ChFiDS_ElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, const Handle(BRepAdaptor_Surface)& S1, const Handle(Adaptor3d_TopolTool)& I1, const Handle(BRepAdaptor_Curve2d)& PC1, const Handle(BRepAdaptor_Surface)& Sref1, const Handle(BRepAdaptor_Curve2d)& PCref1, Standard_Boolean& Decroch1, const Handle(BRepAdaptor_Surface)& S2, const Handle(Adaptor3d_TopolTool)& I2, const TopAbs_Orientation Or2, const Standard_Real MaxStep, const Standard_Real Fleche, const Standard_Real TolGuide, Standard_Real& First, Standard_Real& Last, const Standard_Boolean Inside, const Standard_Boolean Appro, const Standard_Boolean Forward, const Standard_Boolean RecP, const Standard_Boolean RecS, const Standard_Boolean RecRst, const math_Vector& Soldep) Standard_OVERRIDE;
0123   
0124   Standard_EXPORT virtual void PerformSurf (ChFiDS_SequenceOfSurfData& SeqData, const Handle(ChFiDS_ElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, const Handle(BRepAdaptor_Surface)& S1, const Handle(Adaptor3d_TopolTool)& I1, const TopAbs_Orientation Or1, const Handle(BRepAdaptor_Surface)& S2, const Handle(Adaptor3d_TopolTool)& I2, const Handle(BRepAdaptor_Curve2d)& PC2, const Handle(BRepAdaptor_Surface)& Sref2, const Handle(BRepAdaptor_Curve2d)& PCref2, Standard_Boolean& Decroch2, const Standard_Real MaxStep, const Standard_Real Fleche, const Standard_Real TolGuide, Standard_Real& First, Standard_Real& Last, const Standard_Boolean Inside, const Standard_Boolean Appro, const Standard_Boolean Forward, const Standard_Boolean RecP, const Standard_Boolean RecS, const Standard_Boolean RecRst, const math_Vector& Soldep) Standard_OVERRIDE;
0125   
0126   Standard_EXPORT virtual void PerformSurf (ChFiDS_SequenceOfSurfData& Data, const Handle(ChFiDS_ElSpine)& Guide, const Handle(ChFiDS_Spine)& Spine, const Standard_Integer Choix, const Handle(BRepAdaptor_Surface)& S1, const Handle(Adaptor3d_TopolTool)& I1, const Handle(BRepAdaptor_Curve2d)& PC1, const Handle(BRepAdaptor_Surface)& Sref1, const Handle(BRepAdaptor_Curve2d)& PCref1, Standard_Boolean& Decroch1, const TopAbs_Orientation Or1, const Handle(BRepAdaptor_Surface)& S2, const Handle(Adaptor3d_TopolTool)& I2, const Handle(BRepAdaptor_Curve2d)& PC2, const Handle(BRepAdaptor_Surface)& Sref2, const Handle(BRepAdaptor_Curve2d)& PCref2, Standard_Boolean& Decroch2, const TopAbs_Orientation Or2, const Standard_Real MaxStep, const Standard_Real Fleche, const Standard_Real TolGuide, Standard_Real& First, Standard_Real& Last, const Standard_Boolean Inside, const Standard_Boolean Appro, const Standard_Boolean Forward, const Standard_Boolean RecP1, const Standard_Boolean RecRst1, const Standard_Boolean RecP2, const Standard_Boolean RecRst2, const math_Vector& Soldep) Standard_OVERRIDE;
0127 
0128 
0129 
0130 
0131 private:
0132 
0133 
0134 
0135 
0136 
0137 };
0138 
0139 
0140 
0141 
0142 
0143 
0144 
0145 #endif // _FilletSurf_InternalBuilder_HeaderFile