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_RstRstLineBuilder_HeaderFile
0018 #define _BRepBlend_RstRstLineBuilder_HeaderFile
0019 
0020 #include <Adaptor3d_Surface.hxx>
0021 #include <math_Vector.hxx>
0022 #include <Blend_Point.hxx>
0023 #include <Blend_DecrochStatus.hxx>
0024 #include <Blend_Status.hxx>
0025 #include <TopAbs_State.hxx>
0026 
0027 class BRepBlend_Line;
0028 class Adaptor3d_TopolTool;
0029 class Blend_RstRstFunction;
0030 class Blend_SurfCurvFuncInv;
0031 class Blend_CurvPointFuncInv;
0032 class Adaptor3d_HVertex;
0033 class IntSurf_Transition;
0034 class BRepBlend_Extremity;
0035 
0036 
0037 //! This  class processes the  data  resulting from
0038 //! Blend_CSWalking  but  it  takes  in  consideration the Surface
0039 //! supporting  the  curve to detect the  breakpoint.
0040 //!
0041 //! As  a  result, the  criteria of distribution of
0042 //! points on  the line become  more flexible  because  it
0043 //! should  calculate values  approached
0044 //! by an approximation of continued  functions based on the
0045 //! Blend_RstRstFunction.
0046 //!
0047 //! Thus this pseudo path necessitates 3 criteria  of
0048 //! regrouping :
0049 //!
0050 //! 1) exit of  the domain of  the  curve
0051 //!
0052 //! 2) exit of  the domain of  the surface
0053 //!
0054 //! 3) stall as there  is a solution of problem
0055 //! surf/surf  within the domain  of the  surface
0056 //! of support of the restriction.
0057 //!
0058 //! Construction of a BRepBlend_Line between two pcurves
0059 //! from an approached starting solution. The output
0060 //! entries of this builder are of the same nature
0061 //! as of a traditional walking, but the requirements
0062 //! to the Line are not the same. If the determination of validity range is always
0063 //! guaranteed, the criteria of correct repartition of sections
0064 //! before smoothing are not respected. The resulting Line
0065 //! is f(t) oriented.
0066 class BRepBlend_RstRstLineBuilder 
0067 {
0068 public:
0069 
0070   DEFINE_STANDARD_ALLOC
0071 
0072   
0073   Standard_EXPORT BRepBlend_RstRstLineBuilder(const Handle(Adaptor3d_Surface)& Surf1, const Handle(Adaptor2d_Curve2d)& Rst1, const Handle(Adaptor3d_TopolTool)& Domain1, const Handle(Adaptor3d_Surface)& Surf2, const Handle(Adaptor2d_Curve2d)& Rst2, const Handle(Adaptor3d_TopolTool)& Domain2);
0074   
0075   Standard_EXPORT void Perform (Blend_RstRstFunction& Func, Blend_SurfCurvFuncInv& Finv1, Blend_CurvPointFuncInv& FinvP1, Blend_SurfCurvFuncInv& Finv2, Blend_CurvPointFuncInv& FinvP2, const Standard_Real Pdep, const Standard_Real Pmax, const Standard_Real MaxStep, const Standard_Real Tol3d, const Standard_Real TolGuide, const math_Vector& Soldep, const Standard_Real Fleche, const Standard_Boolean Appro = Standard_False);
0076   
0077   Standard_EXPORT Standard_Boolean PerformFirstSection (Blend_RstRstFunction& Func, Blend_SurfCurvFuncInv& Finv1, Blend_CurvPointFuncInv& FinvP1, Blend_SurfCurvFuncInv& Finv2, Blend_CurvPointFuncInv& FinvP2, const Standard_Real Pdep, const Standard_Real Pmax, const math_Vector& Soldep, const Standard_Real Tol3d, const Standard_Real TolGuide, const Standard_Boolean RecRst1, const Standard_Boolean RecP1, const Standard_Boolean RecRst2, const Standard_Boolean RecP2, Standard_Real& Psol, math_Vector& ParSol);
0078   
0079   Standard_EXPORT Standard_Boolean Complete (Blend_RstRstFunction& Func, Blend_SurfCurvFuncInv& Finv1, Blend_CurvPointFuncInv& FinvP1, Blend_SurfCurvFuncInv& Finv2, Blend_CurvPointFuncInv& FinvP2, const Standard_Real Pmin);
0080   
0081     Standard_Boolean IsDone() const;
0082   
0083     const Handle(BRepBlend_Line)& Line() const;
0084   
0085     Standard_Boolean Decroch1Start() const;
0086   
0087     Standard_Boolean Decroch1End() const;
0088   
0089     Standard_Boolean Decroch2Start() const;
0090   
0091     Standard_Boolean Decroch2End() const;
0092 
0093 
0094 
0095 
0096 protected:
0097 
0098 
0099 
0100 
0101 
0102 private:
0103 
0104   
0105   Standard_EXPORT void InternalPerform (Blend_RstRstFunction& Func, Blend_SurfCurvFuncInv& Finv1, Blend_CurvPointFuncInv& FinvP1, Blend_SurfCurvFuncInv& Finv2, Blend_CurvPointFuncInv& FinvP2, const Standard_Real Bound);
0106   
0107   Standard_EXPORT Standard_Boolean Recadre1 (Blend_RstRstFunction& Func, Blend_SurfCurvFuncInv& Finv, math_Vector& Solinv, Standard_Boolean& IsVtx, Handle(Adaptor3d_HVertex)& Vtx);
0108   
0109   Standard_EXPORT Standard_Boolean Recadre2 (Blend_RstRstFunction& Func, Blend_SurfCurvFuncInv& Finv, math_Vector& Solinv, Standard_Boolean& IsVtx, Handle(Adaptor3d_HVertex)& Vtx);
0110   
0111   Standard_EXPORT Standard_Boolean Recadre1 (Blend_CurvPointFuncInv& FinvP, math_Vector& Solinv, Standard_Boolean& IsVtx, Handle(Adaptor3d_HVertex)& Vtx);
0112   
0113   Standard_EXPORT Standard_Boolean Recadre2 (Blend_CurvPointFuncInv& FinvP, math_Vector& Solinv, Standard_Boolean& IsVtx, Handle(Adaptor3d_HVertex)& Vtx);
0114   
0115   Standard_EXPORT void Transition (const Standard_Boolean OnFirst, const Handle(Adaptor2d_Curve2d)& Arc, const Standard_Real Param, IntSurf_Transition& TLine, IntSurf_Transition& TArc);
0116   
0117   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);
0118   
0119   Standard_EXPORT Blend_Status CheckDeflectionOnRst1 (const Blend_Point& CurPoint);
0120   
0121   Standard_EXPORT Blend_Status CheckDeflectionOnRst2 (const Blend_Point& CurPoint);
0122   
0123   Standard_EXPORT Blend_Status TestArret (Blend_RstRstFunction& Func, const Standard_Boolean TestDeflection, const Blend_Status State);
0124   
0125   Standard_EXPORT Standard_Boolean CheckInside (Blend_RstRstFunction& Func, TopAbs_State& SituOnC1, TopAbs_State& SituOnC2, Blend_DecrochStatus& Decroch);
0126 
0127 
0128   Standard_Boolean done;
0129   Handle(BRepBlend_Line) line;
0130   math_Vector sol;
0131   Handle(Adaptor3d_Surface) surf1;
0132   Handle(Adaptor3d_TopolTool) domain1;
0133   Handle(Adaptor3d_Surface) surf2;
0134   Handle(Adaptor3d_TopolTool) domain2;
0135   Handle(Adaptor2d_Curve2d) rst1;
0136   Handle(Adaptor2d_Curve2d) rst2;
0137   Standard_Real tolpoint3d;
0138   Standard_Real tolgui;
0139   Standard_Real pasmax;
0140   Standard_Real fleche;
0141   Standard_Real param;
0142   Blend_Point previousP;
0143   Standard_Boolean rebrou;
0144   Standard_Boolean iscomplete;
0145   Standard_Boolean comptra;
0146   Standard_Real sens;
0147   Blend_DecrochStatus decrochdeb;
0148   Blend_DecrochStatus decrochfin;
0149 
0150 
0151 };
0152 
0153 
0154 #include <BRepBlend_RstRstLineBuilder.lxx>
0155 
0156 
0157 
0158 
0159 
0160 #endif // _BRepBlend_RstRstLineBuilder_HeaderFile