Skip to content

Commit

Permalink
Coding - Refactor Blend to remove gxx files #217
Browse files Browse the repository at this point in the history
Refactor Blend and BRepBlend files by renaming and removing obsolete Walking implementations
  • Loading branch information
dpasukhi committed Dec 28, 2024
1 parent fe92094 commit ad315a4
Show file tree
Hide file tree
Showing 20 changed files with 3,980 additions and 4,103 deletions.
1,139 changes: 1,139 additions & 0 deletions src/BRepBlend/BRepBlend_CSWalking.cxx

Large diffs are not rendered by default.

183 changes: 64 additions & 119 deletions src/BRepBlend/BRepBlend_CSWalking.hxx
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// Created on: 1993-12-06
// Created by: Jacques GOUSSARD
// Copyright (c) 1993-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
// Copyright (c) 1999-2024 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
Expand All @@ -19,11 +17,11 @@

#include <Adaptor3d_Curve.hxx>
#include <Adaptor3d_Surface.hxx>
#include <TColStd_HArray1OfReal.hxx>
#include <Blend_Point.hxx>
#include <BRepBlend_SequenceOfPointOnRst.hxx>
#include <math_Vector.hxx>
#include <Blend_Point.hxx>
#include <Blend_Status.hxx>
#include <TColStd_HArray1OfReal.hxx>
#include <math_Vector.hxx>

class BRepBlend_Line;
class Adaptor3d_TopolTool;
Expand All @@ -42,127 +40,74 @@ class gp_Pnt2d;
class gp_Vec;
class gp_Vec2d;

class BRepBlend_CSWalking
class BRepBlend_CSWalking
{
public:

DEFINE_STANDARD_ALLOC


Standard_EXPORT BRepBlend_CSWalking(const Handle(Adaptor3d_Curve)& Curv, const Handle(Adaptor3d_Surface)& Surf, const Handle(Adaptor3d_TopolTool)& Domain);

Standard_EXPORT void Perform (Blend_CSFunction& F, 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);

Standard_EXPORT Standard_Boolean Complete (Blend_CSFunction& F, const Standard_Real Pmin);

Standard_Boolean IsDone() const;

const Handle(BRepBlend_Line)& Line() const;

private:


Standard_EXPORT void InternalPerform (Blend_CSFunction& F, math_Vector& Sol, const Standard_Real Bound);

Standard_EXPORT void Transition (const Handle(Adaptor2d_Curve2d)& A, const Standard_Real Param, IntSurf_Transition& TLine, IntSurf_Transition& TArc);

Standard_EXPORT void MakeExtremity (BRepBlend_Extremity& Extrem, const Standard_Integer Index, const Standard_Real Param, const Standard_Boolean IsVtx, const Handle(Adaptor3d_HVertex)& Vtx);

Standard_EXPORT Blend_Status CheckDeflectionOnSurf (const gp_Pnt& Psurf, const gp_Pnt2d& Ponsurf, const gp_Vec& Tgsurf, const gp_Vec2d& Tgonsurf);

Standard_EXPORT Blend_Status CheckDeflectionOnCurv (const gp_Pnt& Pcurv, const Standard_Real Poncurv, const gp_Vec& Tgcurv);

Standard_EXPORT Blend_Status TestArret (Blend_CSFunction& F, const math_Vector& Sol, const Standard_Boolean TestDeflection, const Blend_Status State);


Standard_Boolean done;
Handle(BRepBlend_Line) line;
Handle(Adaptor3d_Surface) surf;
Handle(Adaptor3d_Curve) curv;
Handle(Adaptor3d_TopolTool) domain;
Standard_Real tolpoint3d;
Standard_Real tolgui;
Standard_Real pasmax;
Standard_Real fleche;
Standard_Real param;
Standard_Real firstparam;
Handle(TColStd_HArray1OfReal) firstsol;
Blend_Point previousP;
Standard_Boolean rebrou;
Standard_Boolean iscomplete;
Standard_Boolean comptra;
Standard_Real sens;

Standard_EXPORT BRepBlend_CSWalking(const Handle(Adaptor3d_Curve)& Curv,
const Handle(Adaptor3d_Surface)& Surf,
const Handle(Adaptor3d_TopolTool)& Domain);

};
Standard_EXPORT void Perform(Blend_CSFunction& F,
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);

#define TheVertex Handle(Adaptor3d_HVertex)
#define TheVertex_hxx <Adaptor3d_HVertex.hxx>
#define TheArc Handle(Adaptor2d_Curve2d)
#define TheArc_hxx <Adaptor2d_Curve2d.hxx>
#define TheSurface Handle(Adaptor3d_Surface)
#define TheSurface_hxx <Adaptor3d_Surface.hxx>
#define TheCurve Handle(Adaptor3d_Curve)
#define TheCurve_hxx <Adaptor3d_Curve.hxx>
#define TheVertexTool Standard_Integer
#define TheVertexTool_hxx <Standard_Integer.hxx>
#define TheArcTool BRepBlend_HCurve2dTool
#define TheArcTool_hxx <BRepBlend_HCurve2dTool.hxx>
#define TheSurfaceTool Adaptor3d_HSurfaceTool
#define TheSurfaceTool_hxx <Adaptor3d_HSurfaceTool.hxx>
#define TheCurveTool BRepBlend_HCurveTool
#define TheCurveTool_hxx <BRepBlend_HCurveTool.hxx>
#define Handle_TheTopolTool Handle(Adaptor3d_TopolTool)
#define TheTopolTool Adaptor3d_TopolTool
#define TheTopolTool_hxx <Adaptor3d_TopolTool.hxx>
#define TheBlendTool BRepBlend_BlendTool
#define TheBlendTool_hxx <BRepBlend_BlendTool.hxx>
#define ThePointOnRst BRepBlend_PointOnRst
#define ThePointOnRst_hxx <BRepBlend_PointOnRst.hxx>
#define TheSeqPointOnRst BRepBlend_SequenceOfPointOnRst
#define TheSeqPointOnRst_hxx <BRepBlend_SequenceOfPointOnRst.hxx>
#define TheExtremity BRepBlend_Extremity
#define TheExtremity_hxx <BRepBlend_Extremity.hxx>
#define Handle_TheLine Handle(BRepBlend_Line)
#define TheLine BRepBlend_Line
#define TheLine_hxx <BRepBlend_Line.hxx>
#define Blend_CSWalking BRepBlend_CSWalking
#define Blend_CSWalking_hxx <BRepBlend_CSWalking.hxx>

#undef TheVertex
#undef TheVertex_hxx
#undef TheArc
#undef TheArc_hxx
#undef TheSurface
#undef TheSurface_hxx
#undef TheCurve
#undef TheCurve_hxx
#undef TheVertexTool
#undef TheVertexTool_hxx
#undef TheArcTool
#undef TheArcTool_hxx
#undef TheSurfaceTool
#undef TheSurfaceTool_hxx
#undef TheCurveTool
#undef TheCurveTool_hxx
#undef Handle_TheTopolTool
#undef TheTopolTool
#undef TheTopolTool_hxx
#undef TheBlendTool
#undef TheBlendTool_hxx
#undef ThePointOnRst
#undef ThePointOnRst_hxx
#undef TheSeqPointOnRst
#undef TheSeqPointOnRst_hxx
#undef TheExtremity
#undef TheExtremity_hxx
#undef Handle_TheLine
#undef TheLine
#undef TheLine_hxx
#undef Blend_CSWalking
#undef Blend_CSWalking_hxx
Standard_EXPORT Standard_Boolean Complete(Blend_CSFunction& F, const Standard_Real Pmin);

Standard_Boolean IsDone() const;

const Handle(BRepBlend_Line)& Line() const;

private:
Standard_EXPORT void InternalPerform(Blend_CSFunction& F, math_Vector& Sol, const Standard_Real Bound);

Standard_EXPORT void Transition(const Handle(Adaptor2d_Curve2d)& A,
const Standard_Real Param,
IntSurf_Transition& TLine,
IntSurf_Transition& TArc);

Standard_EXPORT void MakeExtremity(BRepBlend_Extremity& Extrem,
const Standard_Integer Index,
const Standard_Real Param,
const Standard_Boolean IsVtx,
const Handle(Adaptor3d_HVertex)& Vtx);

Standard_EXPORT Blend_Status CheckDeflectionOnSurf(const gp_Pnt& Psurf,
const gp_Pnt2d& Ponsurf,
const gp_Vec& Tgsurf,
const gp_Vec2d& Tgonsurf);

Standard_EXPORT Blend_Status CheckDeflectionOnCurv(const gp_Pnt& Pcurv, const Standard_Real Poncurv, const gp_Vec& Tgcurv);

Standard_EXPORT Blend_Status TestArret(Blend_CSFunction& F,
const math_Vector& Sol,
const Standard_Boolean TestDeflection,
const Blend_Status State);

Standard_Boolean done;
Handle(BRepBlend_Line) line;
Handle(Adaptor3d_Surface) surf;
Handle(Adaptor3d_Curve) curv;
Handle(Adaptor3d_TopolTool) domain;
Standard_Real tolpoint3d;
Standard_Real tolgui;
Standard_Real pasmax;
Standard_Real fleche;
Standard_Real param;
Standard_Real firstparam;
Handle(TColStd_HArray1OfReal) firstsol;
Blend_Point previousP;
Standard_Boolean rebrou;
Standard_Boolean iscomplete;
Standard_Boolean comptra;
Standard_Real sens;
};

#endif // _BRepBlend_CSWalking_HeaderFile
73 changes: 0 additions & 73 deletions src/BRepBlend/BRepBlend_CSWalking_0.cxx

This file was deleted.

Loading

0 comments on commit ad315a4

Please sign in to comment.