Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Created on: 1997-01-23
0002 // Created by: Laurent BOURESCHE
0003 // Copyright (c) 1997-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 _BRepBlend_SurfRstLineBuilder_HeaderFile
0018 #define _BRepBlend_SurfRstLineBuilder_HeaderFile
0019 
0020 #include <Adaptor3d_Surface.hxx>
0021 #include <math_Vector.hxx>
0022 #include <Blend_Point.hxx>
0023 #include <Blend_Status.hxx>
0024 #include <TopAbs_State.hxx>
0025 
0026 class BRepBlend_Line;
0027 class Adaptor3d_TopolTool;
0028 class Blend_SurfRstFunction;
0029 class Blend_FuncInv;
0030 class Blend_SurfPointFuncInv;
0031 class Blend_SurfCurvFuncInv;
0032 class gp_Pnt2d;
0033 class Adaptor3d_HVertex;
0034 class IntSurf_Transition;
0035 class BRepBlend_Extremity;
0036 
0037 //! This  class processes data  resulting  from
0038 //! Blend_CSWalking  taking  in consideration the Surface
0039 //! supporting  the curve to detect the breakpoint.
0040 //!
0041 //! The criteria of  distribution  of  points on  the  line are  detailed
0042 //! because  it  is  to  be  used  in  the  calculatuon of values approached
0043 //! by an approximation of functions continued  basing on
0044 //! Blend_SurfRstFunction.
0045 //!
0046 //! Thus this pseudo path necessitates 3 criteria of regrouping :
0047 //!
0048 //! 1) exit of the domain of  the curve
0049 //!
0050 //! 2) exit of the domain of  the  surface
0051 //!
0052 //! 3)  stall as there  is a solution to  the problem
0053 //! surf/surf  within  the  domain of  the surface
0054 //! of  support  of  the   restriction.
0055 //!
0056 //! Construction of a BRepBlend_Line between a surface and
0057 //! a pcurve on surface from an approached
0058 //! starting solution. The output entries of this builder
0059 //! are of the same nature as of the traditional walking
0060 //! but the requirements on the Line are not the same
0061 //! If the determination of validity range is always
0062 //! guaranteed, the criteria of correct repartition of sections
0063 //! before smoothing are not respected. The resulting Line
0064 //! is f(t) oriented.
0065 class BRepBlend_SurfRstLineBuilder 
0066 {
0067 public:
0068 
0069   DEFINE_STANDARD_ALLOC
0070 
0071   
0072   Standard_EXPORT BRepBlend_SurfRstLineBuilder(const Handle(Adaptor3d_Surface)& Surf1, const Handle(Adaptor3d_TopolTool)& Domain1, const Handle(Adaptor3d_Surface)& Surf2, const Handle(Adaptor2d_Curve2d)& Rst, const Handle(Adaptor3d_TopolTool)& Domain2);
0073   
0074   Standard_EXPORT void Perform (Blend_SurfRstFunction& Func, Blend_FuncInv& Finv, Blend_SurfPointFuncInv& FinvP, Blend_SurfCurvFuncInv& FinvC, const Standard_Real Pdep, const Standard_Real Pmax, const Standard_Real MaxStep, const Standard_Real Tol3d, const Standard_Real Tol2d, const Standard_Real TolGuide, const math_Vector& Soldep, const Standard_Real Fleche, const Standard_Boolean Appro = Standard_False);
0075   
0076   Standard_EXPORT Standard_Boolean PerformFirstSection (Blend_SurfRstFunction& Func, Blend_FuncInv& Finv, Blend_SurfPointFuncInv& FinvP, Blend_SurfCurvFuncInv& FinvC, const Standard_Real Pdep, const Standard_Real Pmax, const math_Vector& Soldep, const Standard_Real Tol3d, const Standard_Real Tol2d, const Standard_Real TolGuide, const Standard_Boolean RecRst, const Standard_Boolean RecP, const Standard_Boolean RecS, Standard_Real& Psol, math_Vector& ParSol);
0077   
0078   Standard_EXPORT Standard_Boolean Complete (Blend_SurfRstFunction& Func, Blend_FuncInv& Finv, Blend_SurfPointFuncInv& FinvP, Blend_SurfCurvFuncInv& FinvC, const Standard_Real Pmin);
0079   
0080   Standard_EXPORT Standard_Integer ArcToRecadre (const math_Vector& Sol, const Standard_Integer PrevIndex, gp_Pnt2d& pt2d, gp_Pnt2d& lastpt2d, Standard_Real& ponarc);
0081   
0082     Standard_Boolean IsDone() const;
0083   
0084     const Handle(BRepBlend_Line)& Line() const;
0085   
0086     Standard_Boolean DecrochStart() const;
0087   
0088     Standard_Boolean DecrochEnd() const;
0089 
0090 
0091 
0092 
0093 protected:
0094 
0095 
0096 
0097 
0098 
0099 private:
0100 
0101   
0102   Standard_EXPORT void InternalPerform (Blend_SurfRstFunction& Func, Blend_FuncInv& Finv, Blend_SurfPointFuncInv& FinvP, Blend_SurfCurvFuncInv& FinvC, const Standard_Real Bound);
0103   
0104   Standard_EXPORT Standard_Boolean Recadre (Blend_SurfCurvFuncInv& FinvC, math_Vector& Solinv, Handle(Adaptor2d_Curve2d)& Arc, Standard_Boolean& IsVtx, Handle(Adaptor3d_HVertex)& Vtx);
0105   
0106   Standard_EXPORT Standard_Boolean Recadre (Blend_SurfRstFunction& Func, Blend_FuncInv& Finv, math_Vector& Solinv, Standard_Boolean& IsVtx, Handle(Adaptor3d_HVertex)& Vtx);
0107   
0108   Standard_EXPORT Standard_Boolean Recadre (Blend_SurfPointFuncInv& FinvP, math_Vector& Solinv, Standard_Boolean& IsVtx, Handle(Adaptor3d_HVertex)& Vtx);
0109   
0110   Standard_EXPORT void Transition (const Standard_Boolean OnFirst, const Handle(Adaptor2d_Curve2d)& Arc, const Standard_Real Param, IntSurf_Transition& TLine, IntSurf_Transition& TArc);
0111   
0112   Standard_EXPORT void MakeExtremity (BRepBlend_Extremity& Extrem, const Standard_Boolean OnFirst, const Handle(Adaptor2d_Curve2d)& Arc, const Standard_Real Param, const Standard_Boolean IsVtx, const Handle(Adaptor3d_HVertex)& Vtx);
0113   
0114   Standard_EXPORT Blend_Status CheckDeflectionOnSurf (const Blend_Point& CurPoint);
0115   
0116   Standard_EXPORT Blend_Status CheckDeflectionOnRst (const Blend_Point& CurPoint);
0117   
0118   Standard_EXPORT Blend_Status TestArret (Blend_SurfRstFunction& Func, const Standard_Boolean TestDeflection, const Blend_Status State);
0119   
0120   Standard_EXPORT Standard_Boolean CheckInside (Blend_SurfRstFunction& Func, TopAbs_State& SituOnC, TopAbs_State& SituOnS, Standard_Boolean& Decroch);
0121 
0122 
0123   Standard_Boolean done;
0124   Handle(BRepBlend_Line) line;
0125   math_Vector sol;
0126   Handle(Adaptor3d_Surface) surf1;
0127   Handle(Adaptor3d_TopolTool) domain1;
0128   Handle(Adaptor3d_Surface) surf2;
0129   Handle(Adaptor2d_Curve2d) rst;
0130   Handle(Adaptor3d_TopolTool) domain2;
0131   Standard_Real tolpoint3d;
0132   Standard_Real tolpoint2d;
0133   Standard_Real tolgui;
0134   Standard_Real pasmax;
0135   Standard_Real fleche;
0136   Standard_Real param;
0137   Blend_Point previousP;
0138   Standard_Boolean rebrou;
0139   Standard_Boolean iscomplete;
0140   Standard_Boolean comptra;
0141   Standard_Real sens;
0142   Standard_Boolean decrochdeb;
0143   Standard_Boolean decrochfin;
0144 
0145 
0146 };
0147 
0148 
0149 #include <BRepBlend_SurfRstLineBuilder.lxx>
0150 
0151 
0152 
0153 
0154 
0155 #endif // _BRepBlend_SurfRstLineBuilder_HeaderFile