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:
@@ -15,12 +15,12 @@
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
|
||||
#include <Adaptor3d_HCurve.hxx>
|
||||
#include <Adaptor3d_Curve.hxx>
|
||||
#include <AdvApprox_ApproxAFunction.hxx>
|
||||
#include <AdvApprox_PrefAndRec.hxx>
|
||||
#include <Geom_BSplineCurve.hxx>
|
||||
#include <Geom_Curve.hxx>
|
||||
#include <GeomAdaptor_HCurve.hxx>
|
||||
#include <GeomAdaptor_Curve.hxx>
|
||||
#include <GeomConvert_ApproxCurve.hxx>
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <gp_Vec.hxx>
|
||||
@@ -37,7 +37,7 @@
|
||||
class GeomConvert_ApproxCurve_Eval : public AdvApprox_EvaluatorFunction
|
||||
{
|
||||
public:
|
||||
GeomConvert_ApproxCurve_Eval (const Handle(Adaptor3d_HCurve)& theFunc,
|
||||
GeomConvert_ApproxCurve_Eval (const Handle(Adaptor3d_Curve)& theFunc,
|
||||
Standard_Real First, Standard_Real Last)
|
||||
: fonct(theFunc) { StartEndSav[0] = First; StartEndSav[1] = Last; }
|
||||
|
||||
@@ -49,7 +49,7 @@ class GeomConvert_ApproxCurve_Eval : public AdvApprox_EvaluatorFunction
|
||||
Standard_Integer *ErrorCode);
|
||||
|
||||
private:
|
||||
Handle(Adaptor3d_HCurve) fonct;
|
||||
Handle(Adaptor3d_Curve) fonct;
|
||||
Standard_Real StartEndSav[2];
|
||||
};
|
||||
|
||||
@@ -106,17 +106,17 @@ void GeomConvert_ApproxCurve_Eval::Evaluate (Standard_Integer *Dimension,
|
||||
|
||||
GeomConvert_ApproxCurve::GeomConvert_ApproxCurve(const Handle(Geom_Curve)& Curve,const Standard_Real Tol3d,const GeomAbs_Shape Order,const Standard_Integer MaxSegments,const Standard_Integer MaxDegree)
|
||||
{
|
||||
Handle(GeomAdaptor_HCurve) HCurve = new GeomAdaptor_HCurve (Curve);
|
||||
Handle(GeomAdaptor_Curve) HCurve = new GeomAdaptor_Curve (Curve);
|
||||
Approximate(HCurve, Tol3d, Order, MaxSegments, MaxDegree);
|
||||
}
|
||||
|
||||
GeomConvert_ApproxCurve::GeomConvert_ApproxCurve(const Handle(Adaptor3d_HCurve)& Curve,const Standard_Real Tol3d,const GeomAbs_Shape Order,const Standard_Integer MaxSegments,const Standard_Integer MaxDegree)
|
||||
GeomConvert_ApproxCurve::GeomConvert_ApproxCurve(const Handle(Adaptor3d_Curve)& Curve,const Standard_Real Tol3d,const GeomAbs_Shape Order,const Standard_Integer MaxSegments,const Standard_Integer MaxDegree)
|
||||
{
|
||||
Approximate(Curve, Tol3d, Order, MaxSegments, MaxDegree);
|
||||
}
|
||||
|
||||
void GeomConvert_ApproxCurve::Approximate(
|
||||
const Handle(Adaptor3d_HCurve)& theCurve,
|
||||
const Handle(Adaptor3d_Curve)& theCurve,
|
||||
const Standard_Real theTol3d,
|
||||
const GeomAbs_Shape theOrder,
|
||||
const Standard_Integer theMaxSegments,
|
||||
|
@@ -17,21 +17,14 @@
|
||||
#ifndef _GeomConvert_ApproxCurve_HeaderFile
|
||||
#define _GeomConvert_ApproxCurve_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <Adaptor3d_Curve.hxx>
|
||||
#include <GeomAbs_Shape.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_OStream.hxx>
|
||||
|
||||
class Geom_BSplineCurve;
|
||||
class Standard_OutOfRange;
|
||||
class Standard_ConstructionError;
|
||||
class Geom_Curve;
|
||||
class Adaptor3d_HCurve;
|
||||
|
||||
|
||||
//! A framework to convert a 3D curve to a 3D BSpline.
|
||||
//! This is done by approximation to a BSpline curve within a given tolerance.
|
||||
@@ -60,7 +53,7 @@ public:
|
||||
//! MaxSegments allowed in the resulting BSpline curve, and
|
||||
//! - the highest degree MaxDeg which the
|
||||
//! polynomial defining the BSpline curve may have.
|
||||
Standard_EXPORT GeomConvert_ApproxCurve(const Handle(Adaptor3d_HCurve)& Curve, const Standard_Real Tol3d, const GeomAbs_Shape Order, const Standard_Integer MaxSegments, const Standard_Integer MaxDegree);
|
||||
Standard_EXPORT GeomConvert_ApproxCurve(const Handle(Adaptor3d_Curve)& Curve, const Standard_Real Tol3d, const GeomAbs_Shape Order, const Standard_Integer MaxSegments, const Standard_Integer MaxDegree);
|
||||
|
||||
//! Returns the BSpline curve resulting from the approximation algorithm.
|
||||
Standard_EXPORT Handle(Geom_BSplineCurve) Curve() const;
|
||||
@@ -95,7 +88,7 @@ private:
|
||||
|
||||
|
||||
//! Converts a curve to B-spline
|
||||
Standard_EXPORT void Approximate (const Handle(Adaptor3d_HCurve)& theCurve, const Standard_Real theTol3d, const GeomAbs_Shape theOrder, const Standard_Integer theMaxSegments, const Standard_Integer theMaxDegree);
|
||||
Standard_EXPORT void Approximate (const Handle(Adaptor3d_Curve)& theCurve, const Standard_Real theTol3d, const GeomAbs_Shape theOrder, const Standard_Integer theMaxSegments, const Standard_Integer theMaxDegree);
|
||||
|
||||
|
||||
Standard_Boolean myIsDone;
|
||||
|
@@ -12,14 +12,14 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <GeomConvert_ApproxSurface.hxx>
|
||||
|
||||
#include <Adaptor3d_HSurface.hxx>
|
||||
#include <Adaptor3d_Surface.hxx>
|
||||
#include <AdvApp2Var_ApproxAFunc2Var.hxx>
|
||||
#include <AdvApprox_PrefAndRec.hxx>
|
||||
#include <Geom_BSplineSurface.hxx>
|
||||
#include <Geom_Surface.hxx>
|
||||
#include <GeomAdaptor_HSurface.hxx>
|
||||
#include <GeomConvert_ApproxSurface.hxx>
|
||||
#include <GeomAdaptor_Surface.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <Standard_OutOfRange.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
@@ -31,7 +31,7 @@ class GeomConvert_ApproxSurface_Eval : public AdvApp2Var_EvaluatorFunc2Var
|
||||
|
||||
public:
|
||||
|
||||
GeomConvert_ApproxSurface_Eval (const Handle(Adaptor3d_HSurface)& theAdaptor)
|
||||
GeomConvert_ApproxSurface_Eval (const Handle(Adaptor3d_Surface)& theAdaptor)
|
||||
: myAdaptor (theAdaptor) {}
|
||||
|
||||
virtual void Evaluate (Standard_Integer* theDimension,
|
||||
@@ -48,7 +48,7 @@ public:
|
||||
|
||||
private:
|
||||
|
||||
mutable Handle(Adaptor3d_HSurface) myAdaptor;
|
||||
mutable Handle(Adaptor3d_Surface) myAdaptor;
|
||||
|
||||
};
|
||||
|
||||
@@ -298,11 +298,11 @@ GeomConvert_ApproxSurface::GeomConvert_ApproxSurface(const Handle(Geom_Surface)&
|
||||
const Standard_Integer MaxSegments,
|
||||
const Standard_Integer PrecisCode)
|
||||
{
|
||||
Handle(Adaptor3d_HSurface) aSurfAdaptor = new GeomAdaptor_HSurface (Surf);
|
||||
Handle(Adaptor3d_Surface) aSurfAdaptor = new GeomAdaptor_Surface (Surf);
|
||||
Approximate(aSurfAdaptor, Tol3d, UContinuity, VContinuity, MaxDegU, MaxDegV, MaxSegments, PrecisCode);
|
||||
}
|
||||
|
||||
GeomConvert_ApproxSurface::GeomConvert_ApproxSurface(const Handle(Adaptor3d_HSurface)& Surf,
|
||||
GeomConvert_ApproxSurface::GeomConvert_ApproxSurface(const Handle(Adaptor3d_Surface)& Surf,
|
||||
const Standard_Real Tol3d,
|
||||
const GeomAbs_Shape UContinuity,
|
||||
const GeomAbs_Shape VContinuity,
|
||||
@@ -314,7 +314,7 @@ GeomConvert_ApproxSurface::GeomConvert_ApproxSurface(const Handle(Adaptor3d_HSur
|
||||
Approximate(Surf, Tol3d, UContinuity, VContinuity, MaxDegU, MaxDegV, MaxSegments, PrecisCode);
|
||||
}
|
||||
|
||||
void GeomConvert_ApproxSurface::Approximate(const Handle(Adaptor3d_HSurface)& theSurf,
|
||||
void GeomConvert_ApproxSurface::Approximate(const Handle(Adaptor3d_Surface)& theSurf,
|
||||
const Standard_Real theTol3d,
|
||||
const GeomAbs_Shape theUContinuity,
|
||||
const GeomAbs_Shape theVContinuity,
|
||||
|
@@ -17,20 +17,12 @@
|
||||
#ifndef _GeomConvert_ApproxSurface_HeaderFile
|
||||
#define _GeomConvert_ApproxSurface_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <Adaptor3d_Surface.hxx>
|
||||
#include <GeomAbs_Shape.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_OStream.hxx>
|
||||
class Geom_BSplineSurface;
|
||||
class Standard_OutOfRange;
|
||||
class Geom_Surface;
|
||||
class Adaptor3d_HSurface;
|
||||
|
||||
class Geom_BSplineSurface;
|
||||
class Geom_Surface;
|
||||
|
||||
//! A framework to convert a surface to a BSpline
|
||||
//! surface. This is done by approximation to a BSpline
|
||||
@@ -66,7 +58,7 @@ public:
|
||||
//! - the maximum number of segments MaxSegments
|
||||
//! allowed in the resulting BSpline curve
|
||||
//! - the index of precision PrecisCode.
|
||||
Standard_EXPORT GeomConvert_ApproxSurface(const Handle(Adaptor3d_HSurface)& Surf, const Standard_Real Tol3d, const GeomAbs_Shape UContinuity, const GeomAbs_Shape VContinuity, const Standard_Integer MaxDegU, const Standard_Integer MaxDegV, const Standard_Integer MaxSegments, const Standard_Integer PrecisCode);
|
||||
Standard_EXPORT GeomConvert_ApproxSurface(const Handle(Adaptor3d_Surface)& Surf, const Standard_Real Tol3d, const GeomAbs_Shape UContinuity, const GeomAbs_Shape VContinuity, const Standard_Integer MaxDegU, const Standard_Integer MaxDegV, const Standard_Integer MaxSegments, const Standard_Integer PrecisCode);
|
||||
|
||||
//! Returns the BSpline surface resulting from the approximation algorithm.
|
||||
Standard_EXPORT Handle(Geom_BSplineSurface) Surface() const;
|
||||
@@ -101,7 +93,7 @@ private:
|
||||
|
||||
|
||||
//! Converts a surface to B-spline
|
||||
Standard_EXPORT void Approximate (const Handle(Adaptor3d_HSurface)& theSurf, const Standard_Real theTol3d, const GeomAbs_Shape theUContinuity, const GeomAbs_Shape theVContinuity, const Standard_Integer theMaxDegU, const Standard_Integer theMaxDegV, const Standard_Integer theMaxSegments, const Standard_Integer thePrecisCode);
|
||||
Standard_EXPORT void Approximate (const Handle(Adaptor3d_Surface)& theSurf, const Standard_Real theTol3d, const GeomAbs_Shape theUContinuity, const GeomAbs_Shape theVContinuity, const Standard_Integer theMaxDegU, const Standard_Integer theMaxDegV, const Standard_Integer theMaxSegments, const Standard_Integer thePrecisCode);
|
||||
|
||||
|
||||
Standard_Boolean myIsDone;
|
||||
|
Reference in New Issue
Block a user