Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2024-11-15 09:46:22

0001 // Created on: 1995-04-25
0002 // Created by: Modelistation
0003 // Copyright (c) 1995-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 _ChFi3d_FilBuilder_HeaderFile
0018 #define _ChFi3d_FilBuilder_HeaderFile
0019 
0020 #include <BRepAdaptor_Surface.hxx>
0021 #include <BlendFunc_SectionShape.hxx>
0022 #include <ChFi3d_Builder.hxx>
0023 #include <ChFi3d_FilletShape.hxx>
0024 #include <ChFiDS_ListOfStripe.hxx>
0025 #include <ChFiDS_ElSpine.hxx>
0026 #include <ChFiDS_SecHArray1.hxx>
0027 #include <ChFiDS_SequenceOfSurfData.hxx>
0028 #include <math_Vector.hxx>
0029 #include <TopAbs_Orientation.hxx>
0030 #include <TopAbs_State.hxx>
0031 
0032 class Adaptor3d_TopolTool;
0033 class BRepBlend_Line;
0034 class gp_XY;
0035 class ChFiDS_SurfData;
0036 class ChFiDS_Spine;
0037 class ChFiDS_Stripe;
0038 class Law_Function;
0039 class TopoDS_Edge;
0040 class TopoDS_Shape;
0041 class TopoDS_Vertex;
0042 
0043 //! Tool  of  construction of  fillets 3d on  edges (on a solid).
0044 class ChFi3d_FilBuilder  : public ChFi3d_Builder
0045 {
0046 public:
0047 
0048   DEFINE_STANDARD_ALLOC
0049 
0050   
0051   Standard_EXPORT ChFi3d_FilBuilder(const TopoDS_Shape& S, const ChFi3d_FilletShape FShape = ChFi3d_Rational, const Standard_Real Ta = 1.0e-2);
0052   
0053   //! Sets the type of fillet surface.
0054   Standard_EXPORT void SetFilletShape (const ChFi3d_FilletShape FShape);
0055   
0056   //! Returns the type of fillet surface.
0057   Standard_EXPORT ChFi3d_FilletShape GetFilletShape() const;
0058   
0059   //! initialisation of  a contour with the first edge
0060   //! (the following are found  by propagation).
0061   //! Attention, you  need  to start  with  SetRadius.
0062   Standard_EXPORT void Add (const TopoDS_Edge& E);
0063   
0064   //! initialisation of the constant vector the corresponding  1st  edge.
0065   Standard_EXPORT void Add (const Standard_Real Radius, const TopoDS_Edge& E);
0066   
0067   //! Set the radius of the contour of index IC.
0068   Standard_EXPORT void SetRadius (const Handle(Law_Function)& C, const Standard_Integer IC, const Standard_Integer IinC);
0069   
0070   //! Returns true the contour is flagged as edge constant.
0071   Standard_EXPORT Standard_Boolean IsConstant (const Standard_Integer IC);
0072   
0073   //! Returns the vector if the contour is flagged as edge
0074   //! constant.
0075   Standard_EXPORT Standard_Real Radius (const Standard_Integer IC);
0076   
0077   //! Reset all vectors of contour IC.
0078   Standard_EXPORT void ResetContour (const Standard_Integer IC);
0079   
0080   //! Set a constant on edge E of  the contour of
0081   //! index IC. Since  then  E is flagged as constant.
0082   Standard_EXPORT void SetRadius (const Standard_Real Radius, const Standard_Integer IC, const TopoDS_Edge& E);
0083   
0084   //! Extracts the flag constant and the vector of edge E.
0085   Standard_EXPORT void UnSet (const Standard_Integer IC, const TopoDS_Edge& E);
0086   
0087   //! Set a vector on vertex  V of  the contour of index IC.
0088   Standard_EXPORT void SetRadius (const Standard_Real Radius, const Standard_Integer IC, const TopoDS_Vertex& V);
0089   
0090   //! Extracts the vector of  the vertex V.
0091   Standard_EXPORT void UnSet (const Standard_Integer IC, const TopoDS_Vertex& V);
0092   
0093   //! Set  a vertex on the point of parametre U in the edge IinC
0094   //! of  the contour of index IC
0095   Standard_EXPORT void SetRadius (const gp_XY& UandR, const Standard_Integer IC, const Standard_Integer IinC);
0096   
0097   //! Returns true E is flagged as edge constant.
0098   Standard_EXPORT Standard_Boolean IsConstant (const Standard_Integer IC, const TopoDS_Edge& E);
0099   
0100   //! Returns the vector if E is flagged as edge constant.
0101   Standard_EXPORT Standard_Real Radius (const Standard_Integer IC, const TopoDS_Edge& E);
0102   
0103   //! Returns in First and Last  les extremities of  the
0104   //! part of variable  vector framing E, returns
0105   //! False  if  E is flagged as edge constant.
0106   Standard_EXPORT Standard_Boolean GetBounds (const Standard_Integer IC, const TopoDS_Edge& E, Standard_Real& First, Standard_Real& Last);
0107   
0108   //! Returns the rule of  elementary  evolution of  the
0109   //! part to  variable vector framing E, returns a
0110   //! rule zero if E is flagged as edge constant.
0111   Standard_EXPORT Handle(Law_Function) GetLaw (const Standard_Integer IC, const TopoDS_Edge& E);
0112   
0113   //! Sets the rule of elementary evolution of  the
0114   //! part to variable  vector framing E.
0115   Standard_EXPORT void SetLaw (const Standard_Integer IC, const TopoDS_Edge& E, const Handle(Law_Function)& L);
0116   
0117   Standard_EXPORT void Simulate (const Standard_Integer IC);
0118   
0119   Standard_EXPORT Standard_Integer NbSurf (const Standard_Integer IC) const;
0120   
0121   Standard_EXPORT Handle(ChFiDS_SecHArray1) Sect (const Standard_Integer IC, const Standard_Integer IS) const;
0122 
0123 
0124 
0125 
0126 protected:
0127 
0128   
0129   Standard_EXPORT void SimulKPart (const Handle(ChFiDS_SurfData)& SD) const Standard_OVERRIDE;
0130   
0131   Standard_EXPORT Standard_Boolean SimulSurf (Handle(ChFiDS_SurfData)& 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_Surface)& S2, const Handle(Adaptor3d_TopolTool)& I2, 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;
0132   
0133   Standard_EXPORT virtual void SimulSurf (Handle(ChFiDS_SurfData)& 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 Handle(BRepAdaptor_Surface)& S2, const Handle(Adaptor3d_TopolTool)& I2, const TopAbs_Orientation Or2, 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;
0134   
0135   Standard_EXPORT virtual void SimulSurf (Handle(ChFiDS_SurfData)& 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 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 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;
0136   
0137   Standard_EXPORT virtual void SimulSurf (Handle(ChFiDS_SurfData)& 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 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;
0138   
0139   Standard_EXPORT Standard_Boolean PerformFirstSection (const Handle(ChFiDS_Spine)& S, const Handle(ChFiDS_ElSpine)& HGuide, const Standard_Integer Choix, Handle(BRepAdaptor_Surface)& S1, Handle(BRepAdaptor_Surface)& S2, const Handle(Adaptor3d_TopolTool)& I1, const Handle(Adaptor3d_TopolTool)& I2, const Standard_Real Par, math_Vector& SolDep, TopAbs_State& Pos1, TopAbs_State& Pos2) const Standard_OVERRIDE;
0140   
0141   //! Method calculates the elements of construction of  the
0142   //! fillet (constant or evolutive).
0143   Standard_EXPORT 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;
0144   
0145   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;
0146   
0147   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;
0148   
0149   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;
0150   
0151   //! Method to split an singular SurfData  in  several  non
0152   //! singular  SurfData..
0153   Standard_EXPORT void SplitSurf (ChFiDS_SequenceOfSurfData& SeqData, const Handle(BRepBlend_Line)& line);
0154   
0155   Standard_EXPORT void PerformTwoCorner (const Standard_Integer Index) Standard_OVERRIDE;
0156   
0157   Standard_EXPORT void PerformThreeCorner (const Standard_Integer Index) Standard_OVERRIDE;
0158   
0159   Standard_EXPORT void ExtentOneCorner (const TopoDS_Vertex& V, const Handle(ChFiDS_Stripe)& S) Standard_OVERRIDE;
0160   
0161   Standard_EXPORT void ExtentTwoCorner (const TopoDS_Vertex& V, const ChFiDS_ListOfStripe& LS) Standard_OVERRIDE;
0162   
0163   Standard_EXPORT void ExtentThreeCorner (const TopoDS_Vertex& V, const ChFiDS_ListOfStripe& LS) Standard_OVERRIDE;
0164   
0165   Standard_EXPORT void SetRegul() Standard_OVERRIDE;
0166 
0167 
0168 
0169 
0170 private:
0171 
0172 
0173 
0174   BlendFunc_SectionShape myShape;
0175 
0176 
0177 };
0178 
0179 
0180 
0181 
0182 
0183 
0184 
0185 #endif // _ChFi3d_FilBuilder_HeaderFile