mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
0028966: Coding Rules - remove Adaptor2d_HCurve2d, Adaptor3d_HCurve and Adaptor3d_HSurface classes
Adaptor2d_Curve2d, Adaptor3d_Curve and Adaptor3d_Surface now inherit Standard_Transient. Interfaces Adaptor2d_HCurve2d, Adaptor3d_HCurve, Adaptor3d_HSurface and their subclasses are now aliases to Adaptor2d_Curve2d, Adaptor3d_Curve and Adaptor3d_Surface. Removed numerous unsafe reinterpret casts. Generic classes Adaptor3d_GenHCurve, Adaptor3d_GenHSurface, Adaptor2d_GenHCurve2d have been removed. Several redundant .lxx files have been merged into .hxx. Removed obsolete adaptor classes with H suffix.
This commit is contained in:
@@ -13,15 +13,15 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <HLRBRep_BSurfaceTool.hxx>
|
||||
|
||||
#include <Adaptor3d_HCurve.hxx>
|
||||
#include <Adaptor3d_HSurface.hxx>
|
||||
#include <Adaptor3d_Curve.hxx>
|
||||
#include <Adaptor3d_Surface.hxx>
|
||||
#include <BRepAdaptor_Surface.hxx>
|
||||
#include <Geom_BezierSurface.hxx>
|
||||
#include <Geom_BSplineSurface.hxx>
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <gp_Vec.hxx>
|
||||
#include <HLRBRep_BSurfaceTool.hxx>
|
||||
#include <Standard_NoSuchObject.hxx>
|
||||
#include <Standard_OutOfRange.hxx>
|
||||
|
||||
|
@@ -17,15 +17,9 @@
|
||||
#ifndef _HLRBRep_BSurfaceTool_HeaderFile
|
||||
#define _HLRBRep_BSurfaceTool_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Real.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Adaptor3d_Surface.hxx>
|
||||
#include <GeomAbs_Shape.hxx>
|
||||
#include <TColStd_Array1OfReal.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <gp_Vec.hxx>
|
||||
#include <GeomAbs_SurfaceType.hxx>
|
||||
@@ -36,16 +30,12 @@
|
||||
#include <gp_Sphere.hxx>
|
||||
#include <gp_Ax1.hxx>
|
||||
#include <gp_Dir.hxx>
|
||||
class Standard_NoSuchObject;
|
||||
class Standard_OutOfRange;
|
||||
|
||||
class BRepAdaptor_Surface;
|
||||
class Adaptor3d_HSurface;
|
||||
class gp_Pnt;
|
||||
class gp_Vec;
|
||||
class Geom_BezierSurface;
|
||||
class Geom_BSplineSurface;
|
||||
class Adaptor3d_HCurve;
|
||||
|
||||
|
||||
|
||||
class HLRBRep_BSurfaceTool
|
||||
@@ -72,10 +62,10 @@ public:
|
||||
static void VIntervals (const BRepAdaptor_Surface& S, TColStd_Array1OfReal& T, const GeomAbs_Shape Sh);
|
||||
|
||||
//! If <First> >= <Last>
|
||||
static Handle(Adaptor3d_HSurface) UTrim (const BRepAdaptor_Surface& S, const Standard_Real First, const Standard_Real Last, const Standard_Real Tol);
|
||||
static Handle(Adaptor3d_Surface) UTrim (const BRepAdaptor_Surface& S, const Standard_Real First, const Standard_Real Last, const Standard_Real Tol);
|
||||
|
||||
//! If <First> >= <Last>
|
||||
static Handle(Adaptor3d_HSurface) VTrim (const BRepAdaptor_Surface& S, const Standard_Real First, const Standard_Real Last, const Standard_Real Tol);
|
||||
static Handle(Adaptor3d_Surface) VTrim (const BRepAdaptor_Surface& S, const Standard_Real First, const Standard_Real Last, const Standard_Real Tol);
|
||||
|
||||
static Standard_Boolean IsUClosed (const BRepAdaptor_Surface& S);
|
||||
|
||||
@@ -145,7 +135,7 @@ public:
|
||||
|
||||
static gp_Dir Direction (const BRepAdaptor_Surface& S);
|
||||
|
||||
static Handle(Adaptor3d_HCurve) BasisCurve (const BRepAdaptor_Surface& S);
|
||||
static Handle(Adaptor3d_Curve) BasisCurve (const BRepAdaptor_Surface& S);
|
||||
|
||||
static gp_Ax1 Axis (const BRepAdaptor_Surface& S);
|
||||
|
||||
|
@@ -24,8 +24,8 @@
|
||||
#include <gp_Dir.hxx>
|
||||
#include <Geom_BezierSurface.hxx>
|
||||
#include <Geom_BSplineSurface.hxx>
|
||||
#include <Adaptor3d_HSurface.hxx>
|
||||
#include <Adaptor3d_HCurve.hxx>
|
||||
#include <Adaptor3d_Surface.hxx>
|
||||
#include <Adaptor3d_Curve.hxx>
|
||||
#include <BRepAdaptor_Surface.hxx>
|
||||
|
||||
//=======================================================================
|
||||
@@ -112,7 +112,7 @@ HLRBRep_BSurfaceTool::VIntervals(const BRepAdaptor_Surface& Surf,
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
inline Handle(Adaptor3d_HSurface)
|
||||
inline Handle(Adaptor3d_Surface)
|
||||
HLRBRep_BSurfaceTool::UTrim(const BRepAdaptor_Surface& Surf,
|
||||
const Standard_Real F,
|
||||
const Standard_Real L,
|
||||
@@ -124,7 +124,7 @@ HLRBRep_BSurfaceTool::UTrim(const BRepAdaptor_Surface& Surf,
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
inline Handle(Adaptor3d_HSurface)
|
||||
inline Handle(Adaptor3d_Surface)
|
||||
HLRBRep_BSurfaceTool::VTrim(const BRepAdaptor_Surface& Surf,
|
||||
const Standard_Real F,
|
||||
const Standard_Real L,
|
||||
@@ -388,7 +388,7 @@ HLRBRep_BSurfaceTool::Direction(const BRepAdaptor_Surface& S)
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
inline Handle(Adaptor3d_HCurve)
|
||||
inline Handle(Adaptor3d_Curve)
|
||||
HLRBRep_BSurfaceTool::BasisCurve(const BRepAdaptor_Surface& S)
|
||||
{ return(S.BasisCurve()); }
|
||||
|
||||
|
@@ -13,15 +13,15 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <HLRBRep_SurfaceTool.hxx>
|
||||
|
||||
#include <Adaptor3d_HCurve.hxx>
|
||||
#include <Adaptor3d_HSurface.hxx>
|
||||
#include <Adaptor3d_Curve.hxx>
|
||||
#include <Adaptor3d_Surface.hxx>
|
||||
#include <BRepAdaptor_Surface.hxx>
|
||||
#include <Geom_BezierSurface.hxx>
|
||||
#include <Geom_BSplineSurface.hxx>
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <gp_Vec.hxx>
|
||||
#include <HLRBRep_SurfaceTool.hxx>
|
||||
#include <Standard_NoSuchObject.hxx>
|
||||
#include <Standard_OutOfRange.hxx>
|
||||
|
||||
|
@@ -17,16 +17,10 @@
|
||||
#ifndef _HLRBRep_SurfaceTool_HeaderFile
|
||||
#define _HLRBRep_SurfaceTool_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Real.hxx>
|
||||
#include <Standard_Address.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Adaptor3d_Curve.hxx>
|
||||
#include <Adaptor3d_Surface.hxx>
|
||||
#include <GeomAbs_Shape.hxx>
|
||||
#include <TColStd_Array1OfReal.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <gp_Vec.hxx>
|
||||
#include <GeomAbs_SurfaceType.hxx>
|
||||
@@ -37,16 +31,11 @@
|
||||
#include <gp_Sphere.hxx>
|
||||
#include <gp_Ax1.hxx>
|
||||
#include <gp_Dir.hxx>
|
||||
class Standard_NoSuchObject;
|
||||
class Standard_OutOfRange;
|
||||
class Adaptor3d_HSurface;
|
||||
|
||||
class gp_Pnt;
|
||||
class gp_Vec;
|
||||
class Geom_BezierSurface;
|
||||
class Geom_BSplineSurface;
|
||||
class Adaptor3d_HCurve;
|
||||
|
||||
|
||||
|
||||
class HLRBRep_SurfaceTool
|
||||
{
|
||||
@@ -72,10 +61,10 @@ public:
|
||||
static void VIntervals (const Standard_Address S, TColStd_Array1OfReal& T, const GeomAbs_Shape Sh);
|
||||
|
||||
//! If <First> >= <Last>
|
||||
static Handle(Adaptor3d_HSurface) UTrim (const Standard_Address S, const Standard_Real First, const Standard_Real Last, const Standard_Real Tol);
|
||||
static Handle(Adaptor3d_Surface) UTrim (const Standard_Address S, const Standard_Real First, const Standard_Real Last, const Standard_Real Tol);
|
||||
|
||||
//! If <First> >= <Last>
|
||||
static Handle(Adaptor3d_HSurface) VTrim (const Standard_Address S, const Standard_Real First, const Standard_Real Last, const Standard_Real Tol);
|
||||
static Handle(Adaptor3d_Surface) VTrim (const Standard_Address S, const Standard_Real First, const Standard_Real Last, const Standard_Real Tol);
|
||||
|
||||
static Standard_Boolean IsUClosed (const Standard_Address S);
|
||||
|
||||
@@ -125,9 +114,9 @@ public:
|
||||
|
||||
static gp_Dir Direction (const Standard_Address S);
|
||||
|
||||
static Handle(Adaptor3d_HCurve) BasisCurve (const Standard_Address S);
|
||||
static Handle(Adaptor3d_Curve) BasisCurve (const Standard_Address S);
|
||||
|
||||
static Handle(Adaptor3d_HSurface) BasisSurface (const Standard_Address S);
|
||||
static Handle(Adaptor3d_Surface) BasisSurface (const Standard_Address S);
|
||||
|
||||
static Standard_Real OffsetValue (const Standard_Address S);
|
||||
|
||||
|
@@ -24,8 +24,8 @@
|
||||
#include <gp_Dir.hxx>
|
||||
#include <Geom_BezierSurface.hxx>
|
||||
#include <Geom_BSplineSurface.hxx>
|
||||
#include <Adaptor3d_HSurface.hxx>
|
||||
#include <Adaptor3d_HCurve.hxx>
|
||||
#include <Adaptor3d_Surface.hxx>
|
||||
#include <Adaptor3d_Curve.hxx>
|
||||
#include <BRepAdaptor_Surface.hxx>
|
||||
|
||||
inline Standard_Real HLRBRep_SurfaceTool::FirstUParameter(const Standard_Address Surf){ return ((BRepAdaptor_Surface *)Surf)->FirstUParameter(); }
|
||||
@@ -56,14 +56,14 @@ inline void HLRBRep_SurfaceTool::VIntervals(const Standard_Address Surf,
|
||||
}
|
||||
|
||||
|
||||
inline Handle(Adaptor3d_HSurface) HLRBRep_SurfaceTool::UTrim(const Standard_Address Surf,
|
||||
inline Handle(Adaptor3d_Surface) HLRBRep_SurfaceTool::UTrim(const Standard_Address Surf,
|
||||
const Standard_Real F,
|
||||
const Standard_Real L,
|
||||
const Standard_Real Tol) {
|
||||
return ((BRepAdaptor_Surface *)Surf)->UTrim(F,L,Tol);
|
||||
}
|
||||
|
||||
inline Handle(Adaptor3d_HSurface) HLRBRep_SurfaceTool::VTrim(const Standard_Address Surf,
|
||||
inline Handle(Adaptor3d_Surface) HLRBRep_SurfaceTool::VTrim(const Standard_Address Surf,
|
||||
const Standard_Real F,
|
||||
const Standard_Real L,
|
||||
const Standard_Real Tol) {
|
||||
@@ -227,11 +227,11 @@ inline gp_Dir HLRBRep_SurfaceTool::Direction(const Standard_Address S) {
|
||||
return(((BRepAdaptor_Surface *)S)->Direction());
|
||||
}
|
||||
|
||||
inline Handle(Adaptor3d_HCurve) HLRBRep_SurfaceTool::BasisCurve(const Standard_Address S) {
|
||||
inline Handle(Adaptor3d_Curve) HLRBRep_SurfaceTool::BasisCurve(const Standard_Address S) {
|
||||
return(((BRepAdaptor_Surface *)S)->BasisCurve());
|
||||
}
|
||||
|
||||
inline Handle(Adaptor3d_HSurface) HLRBRep_SurfaceTool::BasisSurface(const Standard_Address S) {
|
||||
inline Handle(Adaptor3d_Surface) HLRBRep_SurfaceTool::BasisSurface(const Standard_Address S) {
|
||||
return(((BRepAdaptor_Surface *)S)->BasisSurface());
|
||||
}
|
||||
|
||||
|
@@ -50,56 +50,51 @@ public:
|
||||
Standard_EXPORT HLRBRep_ThePolygonOfInterCSurf(const gp_Lin& Curve, const TColStd_Array1OfReal& Upars);
|
||||
|
||||
//! Give the bounding box of the polygon.
|
||||
const Bnd_Box& Bounding() const;
|
||||
|
||||
Standard_Real DeflectionOverEstimation() const;
|
||||
|
||||
void SetDeflectionOverEstimation (const Standard_Real x);
|
||||
|
||||
void Closed (const Standard_Boolean clos);
|
||||
|
||||
Standard_Boolean Closed() const;
|
||||
|
||||
const Bnd_Box& Bounding() const { return TheBnd; }
|
||||
|
||||
Standard_Real DeflectionOverEstimation() const { return TheDeflection; }
|
||||
|
||||
void SetDeflectionOverEstimation (const Standard_Real x)
|
||||
{
|
||||
TheDeflection = x;
|
||||
TheBnd.Enlarge (TheDeflection);
|
||||
}
|
||||
|
||||
void Closed (const Standard_Boolean flag) { ClosedPolygon = flag; }
|
||||
|
||||
Standard_Boolean Closed() const { return Standard_False; } // -- Voir si le cas Closed est traitable
|
||||
|
||||
//! Give the number of Segments in the polyline.
|
||||
Standard_Integer NbSegments() const;
|
||||
|
||||
Standard_Integer NbSegments() const { return NbPntIn - 1; }
|
||||
|
||||
//! Give the point of range Index in the Polygon.
|
||||
const gp_Pnt& BeginOfSeg (const Standard_Integer Index) const;
|
||||
|
||||
const gp_Pnt& BeginOfSeg (const Standard_Integer theIndex) const { return ThePnts (theIndex); }
|
||||
|
||||
//! Give the point of range Index in the Polygon.
|
||||
const gp_Pnt& EndOfSeg (const Standard_Integer Index) const;
|
||||
|
||||
const gp_Pnt& EndOfSeg (const Standard_Integer theIndex) const { return ThePnts (theIndex + 1); }
|
||||
|
||||
//! Returns the parameter (On the curve)
|
||||
//! of the first point of the Polygon
|
||||
Standard_Real InfParameter() const;
|
||||
|
||||
Standard_Real InfParameter() const { return Binf; }
|
||||
|
||||
//! Returns the parameter (On the curve)
|
||||
//! of the last point of the Polygon
|
||||
Standard_Real SupParameter() const;
|
||||
|
||||
Standard_Real SupParameter() const { return Bsup; }
|
||||
|
||||
//! Give an approximation of the parameter on the curve
|
||||
//! according to the discretization of the Curve.
|
||||
Standard_EXPORT Standard_Real ApproxParamOnCurve (const Standard_Integer Index, const Standard_Real ParamOnLine) const;
|
||||
|
||||
Standard_EXPORT void Dump() const;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
Standard_EXPORT void Init (const gp_Lin& Curve);
|
||||
|
||||
|
||||
Standard_EXPORT void Init (const gp_Lin& Curve, const TColStd_Array1OfReal& Upars);
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
Bnd_Box TheBnd;
|
||||
Standard_Real TheDeflection;
|
||||
Standard_Integer NbPntIn;
|
||||
@@ -109,26 +104,6 @@ private:
|
||||
Standard_Real Bsup;
|
||||
Handle(TColStd_HArray1OfReal) myParams;
|
||||
|
||||
|
||||
};
|
||||
|
||||
#define TheCurve gp_Lin
|
||||
#define TheCurve_hxx <gp_Lin.hxx>
|
||||
#define TheCurveTool HLRBRep_LineTool
|
||||
#define TheCurveTool_hxx <HLRBRep_LineTool.hxx>
|
||||
#define IntCurveSurface_Polygon HLRBRep_ThePolygonOfInterCSurf
|
||||
#define IntCurveSurface_Polygon_hxx <HLRBRep_ThePolygonOfInterCSurf.hxx>
|
||||
|
||||
#include <IntCurveSurface_Polygon.lxx>
|
||||
|
||||
#undef TheCurve
|
||||
#undef TheCurve_hxx
|
||||
#undef TheCurveTool
|
||||
#undef TheCurveTool_hxx
|
||||
#undef IntCurveSurface_Polygon
|
||||
#undef IntCurveSurface_Polygon_hxx
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _HLRBRep_ThePolygonOfInterCSurf_HeaderFile
|
||||
|
Reference in New Issue
Block a user