Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Created on: 1993-12-06
0002 // Created by: Jacques GOUSSARD
0003 // Copyright (c) 1993-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_Walking_HeaderFile
0018 #define _BRepBlend_Walking_HeaderFile
0019 
0020 #include <Adaptor3d_Surface.hxx>
0021 #include <Blend_Point.hxx>
0022 #include <Blend_SequenceOfPoint.hxx>
0023 #include <Blend_Status.hxx>
0024 #include <BRepBlend_SequenceOfPointOnRst.hxx>
0025 #include <ChFiDS_ElSpine.hxx>
0026 #include <math_Vector.hxx>
0027 #include <TopAbs_State.hxx>
0028 
0029 class BRepBlend_Line;
0030 class Adaptor3d_TopolTool;
0031 class StdFail_NotDone;
0032 class Adaptor3d_HVertex;
0033 class BRepBlend_HCurve2dTool;
0034 class Adaptor3d_HSurfaceTool;
0035 class BRepBlend_HCurveTool;
0036 class BRepBlend_BlendTool;
0037 class BRepBlend_PointOnRst;
0038 class BRepBlend_Extremity;
0039 class Blend_Point;
0040 class Blend_Function;
0041 class Blend_FuncInv;
0042 class gp_Pnt;
0043 class gp_Pnt2d;
0044 class IntSurf_Transition;
0045 
0046 class BRepBlend_Walking 
0047 {
0048 public:
0049 
0050   DEFINE_STANDARD_ALLOC
0051 
0052   
0053   Standard_EXPORT BRepBlend_Walking(const Handle(Adaptor3d_Surface)& Surf1, const Handle(Adaptor3d_Surface)& Surf2, const Handle(Adaptor3d_TopolTool)& Domain1, const Handle(Adaptor3d_TopolTool)& Domain2, const Handle(ChFiDS_ElSpine)& HGuide);
0054   
0055   //! To define different domains for control and clipping.
0056   Standard_EXPORT void SetDomainsToRecadre (const Handle(Adaptor3d_TopolTool)& RecDomain1, const Handle(Adaptor3d_TopolTool)& RecDomain2);
0057   
0058   //! To define singular points computed before walking.
0059   Standard_EXPORT void AddSingularPoint (const Blend_Point& P);
0060   
0061   Standard_EXPORT void Perform (Blend_Function& F, Blend_FuncInv& FInv, 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);
0062   
0063   Standard_EXPORT Standard_Boolean PerformFirstSection (Blend_Function& F, const Standard_Real Pdep, math_Vector& ParDep, const Standard_Real Tol3d, const Standard_Real TolGuide, TopAbs_State& Pos1, TopAbs_State& Pos2);
0064   
0065   Standard_EXPORT Standard_Boolean PerformFirstSection (Blend_Function& F, Blend_FuncInv& FInv, const Standard_Real Pdep, const Standard_Real Pmax, const math_Vector& ParDep, const Standard_Real Tol3d, const Standard_Real TolGuide, const Standard_Boolean RecOnS1, const Standard_Boolean RecOnS2, Standard_Real& Psol, math_Vector& ParSol);
0066   
0067   Standard_EXPORT Standard_Boolean Continu (Blend_Function& F, Blend_FuncInv& FInv, const Standard_Real P);
0068   
0069   Standard_EXPORT Standard_Boolean Continu (Blend_Function& F, Blend_FuncInv& FInv, const Standard_Real P, const Standard_Boolean OnS1);
0070   
0071   Standard_EXPORT Standard_Boolean Complete (Blend_Function& F, Blend_FuncInv& FInv, const Standard_Real Pmin);
0072   
0073   Standard_EXPORT void ClassificationOnS1 (const Standard_Boolean C);
0074   
0075   Standard_EXPORT void ClassificationOnS2 (const Standard_Boolean C);
0076   
0077   Standard_EXPORT void Check2d (const Standard_Boolean C);
0078   
0079   Standard_EXPORT void Check (const Standard_Boolean C);
0080   
0081     Standard_Boolean TwistOnS1() const;
0082   
0083     Standard_Boolean TwistOnS2() const;
0084   
0085     Standard_Boolean IsDone() const;
0086   
0087     const Handle(BRepBlend_Line)& Line() const;
0088 
0089 
0090 
0091 
0092 protected:
0093 
0094 
0095 
0096 
0097 
0098 private:
0099 
0100   
0101   Standard_EXPORT void InternalPerform (Blend_Function& F, Blend_FuncInv& FInv, const Standard_Real Bound);
0102   
0103   Standard_EXPORT Standard_Boolean CorrectExtremityOnOneRst (const Standard_Integer IndexOfRst, const Standard_Real theU, const Standard_Real theV, const Standard_Real theParam, const gp_Pnt& thePntOnRst, Standard_Real& NewU, Standard_Real& NewV, gp_Pnt& NewPoint, Standard_Real& NewParam) const;
0104   
0105   Standard_EXPORT Standard_Integer ArcToRecadre (const Standard_Boolean OnFirst, const math_Vector& Sol, const Standard_Integer PrevIndex, gp_Pnt2d& lpt2d, gp_Pnt2d& pt2d, Standard_Real& ponarc);
0106   
0107   Standard_EXPORT Standard_Boolean Recadre (Blend_FuncInv& FInv, const Standard_Boolean OnFirst, const math_Vector& Sol, math_Vector& Solrst, Standard_Integer& Indexsol, Standard_Boolean& IsVtx, Handle(Adaptor3d_HVertex)& Vtx, const Standard_Real Extrap = 0.0);
0108   
0109   Standard_EXPORT void Transition (const Standard_Boolean OnFirst, const Handle(Adaptor2d_Curve2d)& A, const Standard_Real Param, IntSurf_Transition& TLine, IntSurf_Transition& TArc);
0110   
0111   Standard_EXPORT void MakeExtremity (BRepBlend_Extremity& Extrem, const Standard_Boolean OnFirst, const Standard_Integer Index, const Standard_Real Param, const Standard_Boolean IsVtx, const Handle(Adaptor3d_HVertex)& Vtx);
0112   
0113   Standard_EXPORT void MakeSingularExtremity (BRepBlend_Extremity& Extrem, const Standard_Boolean OnFirst, const Handle(Adaptor3d_HVertex)& Vtx);
0114   
0115   Standard_EXPORT Blend_Status CheckDeflection (const Standard_Boolean OnFirst, const Blend_Point& CurPoint);
0116   
0117   Standard_EXPORT Blend_Status TestArret (Blend_Function& F, const Blend_Status State, const Standard_Boolean TestDeflection = Standard_True, const Standard_Boolean TestSolution = Standard_True, const Standard_Boolean TestLengthStep = Standard_False);
0118 
0119 
0120   Blend_Point previousP;
0121   Handle(BRepBlend_Line) line;
0122   math_Vector sol;
0123   Blend_SequenceOfPoint jalons;
0124   Handle(Adaptor3d_Surface) surf1;
0125   Handle(Adaptor3d_Surface) surf2;
0126   Handle(Adaptor3d_TopolTool) domain1;
0127   Handle(Adaptor3d_TopolTool) domain2;
0128   Handle(Adaptor3d_TopolTool) recdomain1;
0129   Handle(Adaptor3d_TopolTool) recdomain2;
0130   Handle(ChFiDS_ElSpine) hguide;
0131   Standard_Boolean ToCorrectOnRst1;
0132   Standard_Boolean ToCorrectOnRst2;
0133   Standard_Real CorrectedParam;
0134   Standard_Real tolpoint3d;
0135   Standard_Real tolgui;
0136   Standard_Real pasmax;
0137   Standard_Real fleche;
0138   Standard_Real param;
0139   Standard_Real sens;
0140   Standard_Boolean done;
0141   Standard_Boolean rebrou;
0142   Standard_Boolean iscomplete;
0143   Standard_Boolean comptra;
0144   Standard_Boolean clasonS1;
0145   Standard_Boolean clasonS2;
0146   Standard_Boolean check2d;
0147   Standard_Boolean check;
0148   Standard_Boolean twistflag1;
0149   Standard_Boolean twistflag2;
0150 
0151 
0152 };
0153 
0154 #define TheVertex Handle(Adaptor3d_HVertex)
0155 #define TheVertex_hxx <Adaptor3d_HVertex.hxx>
0156 #define TheArc Handle(Adaptor2d_Curve2d)
0157 #define TheArc_hxx <Adaptor2d_Curve2d.hxx>
0158 #define TheSurface Handle(Adaptor3d_Surface)
0159 #define TheSurface_hxx <Adaptor3d_Surface.hxx>
0160 #define TheCurve Handle(Adaptor3d_Curve)
0161 #define TheCurve_hxx <Adaptor3d_Curve.hxx>
0162 #define TheVertexTool Standard_Integer
0163 #define TheVertexTool_hxx <Standard_Integer.hxx>
0164 #define TheArcTool BRepBlend_HCurve2dTool
0165 #define TheArcTool_hxx <BRepBlend_HCurve2dTool.hxx>
0166 #define TheSurfaceTool Adaptor3d_HSurfaceTool
0167 #define TheSurfaceTool_hxx <Adaptor3d_HSurfaceTool.hxx>
0168 #define TheCurveTool BRepBlend_HCurveTool
0169 #define TheCurveTool_hxx <BRepBlend_HCurveTool.hxx>
0170 #define Handle_TheTopolTool Handle(Adaptor3d_TopolTool)
0171 #define TheTopolTool Adaptor3d_TopolTool
0172 #define TheTopolTool_hxx <Adaptor3d_TopolTool.hxx>
0173 #define TheBlendTool BRepBlend_BlendTool
0174 #define TheBlendTool_hxx <BRepBlend_BlendTool.hxx>
0175 #define ThePointOnRst BRepBlend_PointOnRst
0176 #define ThePointOnRst_hxx <BRepBlend_PointOnRst.hxx>
0177 #define TheSeqPointOnRst BRepBlend_SequenceOfPointOnRst
0178 #define TheSeqPointOnRst_hxx <BRepBlend_SequenceOfPointOnRst.hxx>
0179 #define TheExtremity BRepBlend_Extremity
0180 #define TheExtremity_hxx <BRepBlend_Extremity.hxx>
0181 #define Handle_TheLine Handle(BRepBlend_Line)
0182 #define TheLine BRepBlend_Line
0183 #define TheLine_hxx <BRepBlend_Line.hxx>
0184 #define Blend_Walking BRepBlend_Walking
0185 #define Blend_Walking_hxx <BRepBlend_Walking.hxx>
0186 
0187 #include <Blend_Walking.lxx>
0188 
0189 #undef TheVertex
0190 #undef TheVertex_hxx
0191 #undef TheArc
0192 #undef TheArc_hxx
0193 #undef TheSurface
0194 #undef TheSurface_hxx
0195 #undef TheCurve
0196 #undef TheCurve_hxx
0197 #undef TheVertexTool
0198 #undef TheVertexTool_hxx
0199 #undef TheArcTool
0200 #undef TheArcTool_hxx
0201 #undef TheSurfaceTool
0202 #undef TheSurfaceTool_hxx
0203 #undef TheCurveTool
0204 #undef TheCurveTool_hxx
0205 #undef Handle_TheTopolTool
0206 #undef TheTopolTool
0207 #undef TheTopolTool_hxx
0208 #undef TheBlendTool
0209 #undef TheBlendTool_hxx
0210 #undef ThePointOnRst
0211 #undef ThePointOnRst_hxx
0212 #undef TheSeqPointOnRst
0213 #undef TheSeqPointOnRst_hxx
0214 #undef TheExtremity
0215 #undef TheExtremity_hxx
0216 #undef Handle_TheLine
0217 #undef TheLine
0218 #undef TheLine_hxx
0219 #undef Blend_Walking
0220 #undef Blend_Walking_hxx
0221 
0222 
0223 
0224 
0225 #endif // _BRepBlend_Walking_HeaderFile