mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +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:
@@ -14,7 +14,7 @@
|
||||
|
||||
#include <GeomEvaluator_OffsetCurve.hxx>
|
||||
|
||||
#include <GeomAdaptor_HCurve.hxx>
|
||||
#include <GeomAdaptor_Curve.hxx>
|
||||
#include <Standard_NullValue.hxx>
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ GeomEvaluator_OffsetCurve::GeomEvaluator_OffsetCurve(
|
||||
}
|
||||
|
||||
GeomEvaluator_OffsetCurve::GeomEvaluator_OffsetCurve(
|
||||
const Handle(GeomAdaptor_HCurve)& theBase,
|
||||
const Handle(GeomAdaptor_Curve)& theBase,
|
||||
const Standard_Real theOffset,
|
||||
const gp_Dir& theDirection)
|
||||
: GeomEvaluator_Curve(),
|
||||
|
@@ -16,11 +16,10 @@
|
||||
#define _GeomEvaluator_OffsetCurve_HeaderFile
|
||||
|
||||
#include <Geom_Curve.hxx>
|
||||
#include <GeomAdaptor_Curve.hxx>
|
||||
#include <GeomEvaluator_Curve.hxx>
|
||||
#include <gp_Dir.hxx>
|
||||
|
||||
class GeomAdaptor_HCurve;
|
||||
|
||||
//! Allows to calculate values and derivatives for offset curves in 3D
|
||||
class GeomEvaluator_OffsetCurve : public GeomEvaluator_Curve
|
||||
{
|
||||
@@ -32,7 +31,7 @@ public:
|
||||
const gp_Dir& theDirection);
|
||||
//! Initialize evaluator by curve adaptor
|
||||
Standard_EXPORT GeomEvaluator_OffsetCurve(
|
||||
const Handle(GeomAdaptor_HCurve)& theBase,
|
||||
const Handle(GeomAdaptor_Curve)& theBase,
|
||||
const Standard_Real theOffset,
|
||||
const gp_Dir& theDirection);
|
||||
|
||||
@@ -112,7 +111,7 @@ private:
|
||||
|
||||
private:
|
||||
Handle(Geom_Curve) myBaseCurve;
|
||||
Handle(GeomAdaptor_HCurve) myBaseAdaptor;
|
||||
Handle(GeomAdaptor_Curve) myBaseAdaptor;
|
||||
|
||||
Standard_Real myOffset; ///< offset value
|
||||
gp_Dir myOffsetDir; ///< offset direction
|
||||
|
@@ -14,13 +14,12 @@
|
||||
|
||||
#include <GeomEvaluator_OffsetSurface.hxx>
|
||||
|
||||
#include <GeomAdaptor_HSurface.hxx>
|
||||
#include <CSLib.hxx>
|
||||
#include <CSLib_NormalStatus.hxx>
|
||||
#include <Geom_BezierSurface.hxx>
|
||||
#include <Geom_BSplineSurface.hxx>
|
||||
#include <Geom_UndefinedValue.hxx>
|
||||
#include <GeomAdaptor_HSurface.hxx>
|
||||
#include <GeomAdaptor_Surface.hxx>
|
||||
#include <gp_Vec.hxx>
|
||||
#include <Standard_RangeError.hxx>
|
||||
#include <Standard_NumericError.hxx>
|
||||
@@ -44,7 +43,7 @@ const Standard_Real the_D1MagTol = 1.e-9;
|
||||
static Standard_Boolean shiftPoint (const Standard_Real theUStart, const Standard_Real theVStart,
|
||||
Standard_Real& theU, Standard_Real& theV,
|
||||
const Handle(Geom_Surface)& theSurf,
|
||||
const Handle(GeomAdaptor_HSurface)& theAdaptor,
|
||||
const Handle(GeomAdaptor_Surface)& theAdaptor,
|
||||
const gp_Vec& theD1U, const gp_Vec& theD1V)
|
||||
{
|
||||
// Get parametric bounds and closure status
|
||||
@@ -249,7 +248,7 @@ GeomEvaluator_OffsetSurface::GeomEvaluator_OffsetSurface(
|
||||
}
|
||||
|
||||
GeomEvaluator_OffsetSurface::GeomEvaluator_OffsetSurface(
|
||||
const Handle(GeomAdaptor_HSurface)& theBase,
|
||||
const Handle(GeomAdaptor_Surface)& theBase,
|
||||
const Standard_Real theOffset,
|
||||
const Handle(Geom_OsculatingSurface)& theOscSurf)
|
||||
: GeomEvaluator_Surface(),
|
||||
@@ -891,11 +890,11 @@ Standard_Boolean GeomEvaluator_OffsetSurface::ReplaceDerivative(
|
||||
|
||||
// Calculate step along non-zero derivative
|
||||
Standard_Real aStep;
|
||||
Handle(Adaptor3d_HSurface) aSurfAdapt;
|
||||
Handle(Adaptor3d_Surface) aSurfAdapt;
|
||||
if (!myBaseAdaptor.IsNull())
|
||||
aSurfAdapt = myBaseAdaptor;
|
||||
else
|
||||
aSurfAdapt = new GeomAdaptor_HSurface(myBaseSurf);
|
||||
aSurfAdapt = new GeomAdaptor_Surface(myBaseSurf);
|
||||
if (isReplaceDV)
|
||||
{
|
||||
aStep = Precision::Confusion() * theDU.Magnitude();
|
||||
|
@@ -15,13 +15,11 @@
|
||||
#ifndef _GeomEvaluator_OffsetSurface_HeaderFile
|
||||
#define _GeomEvaluator_OffsetSurface_HeaderFile
|
||||
|
||||
#include <GeomAdaptor_Surface.hxx>
|
||||
#include <GeomEvaluator_Surface.hxx>
|
||||
|
||||
#include <Geom_OsculatingSurface.hxx>
|
||||
#include <Geom_Surface.hxx>
|
||||
|
||||
class GeomAdaptor_HSurface;
|
||||
|
||||
//! Allows to calculate values and derivatives for offset surfaces
|
||||
class GeomEvaluator_OffsetSurface : public GeomEvaluator_Surface
|
||||
{
|
||||
@@ -33,7 +31,7 @@ public:
|
||||
const Handle(Geom_OsculatingSurface)& theOscSurf = Handle(Geom_OsculatingSurface)());
|
||||
//! Initialize evaluator by surface adaptor
|
||||
Standard_EXPORT GeomEvaluator_OffsetSurface(
|
||||
const Handle(GeomAdaptor_HSurface)& theBase,
|
||||
const Handle(GeomAdaptor_Surface)& theBase,
|
||||
const Standard_Real theOffset,
|
||||
const Handle(Geom_OsculatingSurface)& theOscSurf = Handle(Geom_OsculatingSurface)());
|
||||
|
||||
@@ -119,7 +117,7 @@ private:
|
||||
|
||||
private:
|
||||
Handle(Geom_Surface) myBaseSurf;
|
||||
Handle(GeomAdaptor_HSurface) myBaseAdaptor;
|
||||
Handle(GeomAdaptor_Surface) myBaseAdaptor;
|
||||
|
||||
Standard_Real myOffset; ///< offset value
|
||||
Handle(Geom_OsculatingSurface) myOscSurf; ///< auxiliary osculating surface
|
||||
|
@@ -14,7 +14,7 @@
|
||||
|
||||
#include <GeomEvaluator_SurfaceOfExtrusion.hxx>
|
||||
|
||||
#include <GeomAdaptor_HCurve.hxx>
|
||||
#include <GeomAdaptor_Curve.hxx>
|
||||
|
||||
IMPLEMENT_STANDARD_RTTIEXT(GeomEvaluator_SurfaceOfExtrusion,GeomEvaluator_Surface)
|
||||
|
||||
@@ -27,7 +27,7 @@ GeomEvaluator_SurfaceOfExtrusion::GeomEvaluator_SurfaceOfExtrusion(
|
||||
}
|
||||
|
||||
GeomEvaluator_SurfaceOfExtrusion::GeomEvaluator_SurfaceOfExtrusion(
|
||||
const Handle(Adaptor3d_HCurve)& theBase, const gp_Dir& theExtrusionDir)
|
||||
const Handle(Adaptor3d_Curve)& theBase, const gp_Dir& theExtrusionDir)
|
||||
: GeomEvaluator_Surface(),
|
||||
myBaseAdaptor(theBase),
|
||||
myDirection(theExtrusionDir)
|
||||
|
@@ -15,13 +15,11 @@
|
||||
#ifndef _GeomEvaluator_SurfaceOfExtrusion_HeaderFile
|
||||
#define _GeomEvaluator_SurfaceOfExtrusion_HeaderFile
|
||||
|
||||
#include <Adaptor3d_Curve.hxx>
|
||||
#include <GeomEvaluator_Surface.hxx>
|
||||
|
||||
#include <Geom_Curve.hxx>
|
||||
#include <gp_Dir.hxx>
|
||||
|
||||
class Adaptor3d_HCurve;
|
||||
|
||||
//! Allows to calculate values and derivatives for surfaces of linear extrusion
|
||||
class GeomEvaluator_SurfaceOfExtrusion : public GeomEvaluator_Surface
|
||||
{
|
||||
@@ -30,7 +28,7 @@ public:
|
||||
Standard_EXPORT GeomEvaluator_SurfaceOfExtrusion(const Handle(Geom_Curve)& theBase,
|
||||
const gp_Dir& theExtrusionDir);
|
||||
//! Initialize evaluator by surface adaptor
|
||||
Standard_EXPORT GeomEvaluator_SurfaceOfExtrusion(const Handle(Adaptor3d_HCurve)& theBase,
|
||||
Standard_EXPORT GeomEvaluator_SurfaceOfExtrusion(const Handle(Adaptor3d_Curve)& theBase,
|
||||
const gp_Dir& theExtrusionDir);
|
||||
|
||||
///! Changes the direction of extrusion
|
||||
@@ -72,7 +70,7 @@ private:
|
||||
|
||||
private:
|
||||
Handle(Geom_Curve) myBaseCurve;
|
||||
Handle(Adaptor3d_HCurve) myBaseAdaptor;
|
||||
Handle(Adaptor3d_Curve) myBaseAdaptor;
|
||||
|
||||
gp_Dir myDirection;
|
||||
};
|
||||
|
@@ -14,8 +14,9 @@
|
||||
|
||||
#include <GeomEvaluator_SurfaceOfRevolution.hxx>
|
||||
|
||||
#include <Adaptor3d_HCurve.hxx>
|
||||
#include <Adaptor3d_Curve.hxx>
|
||||
#include <gp_Trsf.hxx>
|
||||
#include <Precision.hxx>
|
||||
|
||||
IMPLEMENT_STANDARD_RTTIEXT(GeomEvaluator_SurfaceOfRevolution,GeomEvaluator_Surface)
|
||||
|
||||
@@ -30,7 +31,7 @@ GeomEvaluator_SurfaceOfRevolution::GeomEvaluator_SurfaceOfRevolution(
|
||||
}
|
||||
|
||||
GeomEvaluator_SurfaceOfRevolution::GeomEvaluator_SurfaceOfRevolution(
|
||||
const Handle(Adaptor3d_HCurve)& theBase,
|
||||
const Handle(Adaptor3d_Curve)& theBase,
|
||||
const gp_Dir& theRevolDir,
|
||||
const gp_Pnt& theRevolLoc)
|
||||
: GeomEvaluator_Surface(),
|
||||
|
@@ -15,15 +15,13 @@
|
||||
#ifndef _GeomEvaluator_SurfaceOfRevolution_HeaderFile
|
||||
#define _GeomEvaluator_SurfaceOfRevolution_HeaderFile
|
||||
|
||||
#include <Adaptor3d_Curve.hxx>
|
||||
#include <GeomEvaluator_Surface.hxx>
|
||||
|
||||
#include <Geom_Curve.hxx>
|
||||
#include <gp_Dir.hxx>
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <gp_Ax1.hxx>
|
||||
|
||||
class Adaptor3d_HCurve;
|
||||
|
||||
//! Allows to calculate values and derivatives for surfaces of revolution
|
||||
class GeomEvaluator_SurfaceOfRevolution : public GeomEvaluator_Surface
|
||||
{
|
||||
@@ -33,7 +31,7 @@ public:
|
||||
const gp_Dir& theRevolDir,
|
||||
const gp_Pnt& theRevolLoc);
|
||||
//! Initialize evaluator by adaptor of the revolved curve, the axis of revolution and the location
|
||||
Standard_EXPORT GeomEvaluator_SurfaceOfRevolution(const Handle(Adaptor3d_HCurve)& theBase,
|
||||
Standard_EXPORT GeomEvaluator_SurfaceOfRevolution(const Handle(Adaptor3d_Curve)& theBase,
|
||||
const gp_Dir& theRevolDir,
|
||||
const gp_Pnt& theRevolLoc);
|
||||
|
||||
@@ -77,7 +75,7 @@ public:
|
||||
|
||||
private:
|
||||
Handle(Geom_Curve) myBaseCurve;
|
||||
Handle(Adaptor3d_HCurve) myBaseAdaptor;
|
||||
Handle(Adaptor3d_Curve) myBaseAdaptor;
|
||||
gp_Ax1 myRotAxis;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user