mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-29 14:00:49 +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 <BRepAdaptor_HSurface.hxx>
|
||||
#include <BRepAdaptor_Surface.hxx>
|
||||
#include <BRepClass3d_Intersector3d.hxx>
|
||||
#include <BRepClass_FaceClassifier.hxx>
|
||||
#include <Geom_Line.hxx>
|
||||
#include <GeomAdaptor_Curve.hxx>
|
||||
#include <GeomAdaptor_HCurve.hxx>
|
||||
#include <GeomAdaptor_Curve.hxx>
|
||||
#include <gp_Lin.hxx>
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <gp_Pnt2d.hxx>
|
||||
@@ -65,8 +65,8 @@ void BRepClass3d_Intersector3d::Perform(const gp_Lin& L,
|
||||
Standard_Real V2 = surface.LastVParameter();
|
||||
|
||||
//--
|
||||
Handle(GeomAdaptor_HCurve) HLL = new GeomAdaptor_HCurve(LL);
|
||||
Handle(BRepAdaptor_HSurface) Hsurface = new BRepAdaptor_HSurface(surface);
|
||||
Handle(GeomAdaptor_Curve) HLL = new GeomAdaptor_Curve(LL);
|
||||
Handle(BRepAdaptor_Surface) Hsurface = new BRepAdaptor_Surface(surface);
|
||||
//--
|
||||
HICS.Perform(HLL,Hsurface);
|
||||
|
||||
|
@@ -28,7 +28,6 @@
|
||||
#include <Bnd_Box.hxx>
|
||||
#include <BRep_Tool.hxx>
|
||||
#include <BRepAdaptor_Curve2d.hxx>
|
||||
#include <BRepAdaptor_HSurface.hxx>
|
||||
#include <BRepAdaptor_Surface.hxx>
|
||||
#include <BRepBndLib.hxx>
|
||||
#include <BRepClass3d_DataMapIteratorOfMapOfInter.hxx>
|
||||
@@ -214,7 +213,7 @@ Standard_Boolean BRepClass3d_SolidExplorer::PointInTheFace
|
||||
Standard_Real& u_, Standard_Real& v_,
|
||||
Standard_Real& param_,
|
||||
Standard_Integer& IndexPoint,
|
||||
const Handle(BRepAdaptor_HSurface)& surf,
|
||||
const Handle(BRepAdaptor_Surface)& surf,
|
||||
const Standard_Real U1,
|
||||
const Standard_Real V1,
|
||||
const Standard_Real U2,
|
||||
@@ -232,7 +231,7 @@ Standard_Boolean BRepClass3d_SolidExplorer::PointInTheFace
|
||||
|
||||
TopAbs_State BRepClass3d_SolidExplorer::ClassifyUVPoint
|
||||
(const IntCurvesFace_Intersector& theIntersector,
|
||||
const Handle(BRepAdaptor_HSurface)& theSurf,
|
||||
const Handle(BRepAdaptor_Surface)& theSurf,
|
||||
const gp_Pnt2d& theP2d) const
|
||||
{
|
||||
// first find if the point is near an edge/vertex
|
||||
@@ -259,7 +258,7 @@ Standard_Boolean BRepClass3d_SolidExplorer::PointInTheFace
|
||||
Standard_Real& u_, Standard_Real& v_,
|
||||
Standard_Real& param_,
|
||||
Standard_Integer& IndexPoint,
|
||||
const Handle(BRepAdaptor_HSurface)& surf,
|
||||
const Handle(BRepAdaptor_Surface)& surf,
|
||||
const Standard_Real U1,
|
||||
const Standard_Real V1,
|
||||
const Standard_Real U2,
|
||||
@@ -479,7 +478,7 @@ Standard_Integer BRepClass3d_SolidExplorer::OtherSegment(const gp_Pnt& P,
|
||||
if (myFirstFace > NbFacesInSolid) continue;
|
||||
face = TopoDS::Face(faceexplorer.Current());
|
||||
|
||||
Handle(BRepAdaptor_HSurface) surf = new BRepAdaptor_HSurface();
|
||||
Handle(BRepAdaptor_Surface) surf = new BRepAdaptor_Surface();
|
||||
if(aTestInvert)
|
||||
{
|
||||
BRepTopAdaptor_FClass2d aClass(face, Precision::Confusion());
|
||||
@@ -499,7 +498,7 @@ Standard_Integer BRepClass3d_SolidExplorer::OtherSegment(const gp_Pnt& P,
|
||||
aRestr = Standard_True;
|
||||
}
|
||||
}
|
||||
surf->ChangeSurface().Initialize(face, aRestr);
|
||||
surf->Initialize(face, aRestr);
|
||||
Standard_Real U1,V1,U2,V2;
|
||||
U1 = surf->FirstUParameter();
|
||||
V1 = surf->FirstVParameter();
|
||||
@@ -714,8 +713,8 @@ Standard_Boolean BRepClass3d_SolidExplorer::PointInTheFace
|
||||
{
|
||||
TopoDS_Face Face = _face;
|
||||
Face.Orientation(TopAbs_FORWARD);
|
||||
Handle(BRepAdaptor_HSurface) surf = new BRepAdaptor_HSurface();
|
||||
surf->ChangeSurface().Initialize(Face);
|
||||
Handle(BRepAdaptor_Surface) surf = new BRepAdaptor_Surface();
|
||||
surf->Initialize(Face);
|
||||
Standard_Real U1,V1,U2,V2;//,u,v;
|
||||
U1 = surf->FirstUParameter();
|
||||
V1 = surf->FirstVParameter();
|
||||
|
@@ -17,29 +17,20 @@
|
||||
#ifndef _BRepClass3d_SolidExplorer_HeaderFile
|
||||
#define _BRepClass3d_SolidExplorer_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Bnd_Box.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <TopExp_Explorer.hxx>
|
||||
#include <BRepAdaptor_Surface.hxx>
|
||||
#include <BRepClass3d_BndBoxTree.hxx>
|
||||
#include <BRepClass3d_MapOfInter.hxx>
|
||||
#include <TopAbs_State.hxx>
|
||||
#include <BRepClass3d_BndBoxTree.hxx>
|
||||
#include <TopExp_Explorer.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <TopTools_IndexedMapOfShape.hxx>
|
||||
|
||||
class TopoDS_Shape;
|
||||
class gp_Pnt;
|
||||
class TopoDS_Face;
|
||||
class gp_Vec;
|
||||
class BRepAdaptor_HSurface;
|
||||
class TopoDS_Shell;
|
||||
class gp_Lin;
|
||||
class Bnd_Box;
|
||||
class IntCurvesFace_Intersector;
|
||||
|
||||
//! Provide an exploration of a BRep Shape for the classification.
|
||||
@@ -79,11 +70,11 @@ public:
|
||||
|
||||
Standard_EXPORT Standard_Boolean PointInTheFace (const TopoDS_Face& F, gp_Pnt& P, Standard_Real& u, Standard_Real& v, Standard_Real& Param, Standard_Integer& Index) const;
|
||||
|
||||
Standard_EXPORT Standard_Boolean PointInTheFace (const TopoDS_Face& F, gp_Pnt& P, Standard_Real& u, Standard_Real& v, Standard_Real& Param, Standard_Integer& Index, const Handle(BRepAdaptor_HSurface)& surf, const Standard_Real u1, const Standard_Real v1, const Standard_Real u2, const Standard_Real v2) const;
|
||||
Standard_EXPORT Standard_Boolean PointInTheFace (const TopoDS_Face& F, gp_Pnt& P, Standard_Real& u, Standard_Real& v, Standard_Real& Param, Standard_Integer& Index, const Handle(BRepAdaptor_Surface)& surf, const Standard_Real u1, const Standard_Real v1, const Standard_Real u2, const Standard_Real v2) const;
|
||||
|
||||
//! <Index> gives point index to search from and returns
|
||||
//! point index of succeseful search
|
||||
Standard_EXPORT Standard_Boolean PointInTheFace (const TopoDS_Face& F, gp_Pnt& P, Standard_Real& u, Standard_Real& v, Standard_Real& Param, Standard_Integer& Index, const Handle(BRepAdaptor_HSurface)& surf, const Standard_Real u1, const Standard_Real v1, const Standard_Real u2, const Standard_Real v2, gp_Vec& theVecD1U, gp_Vec& theVecD1V) const;
|
||||
Standard_EXPORT Standard_Boolean PointInTheFace (const TopoDS_Face& F, gp_Pnt& P, Standard_Real& u, Standard_Real& v, Standard_Real& Param, Standard_Integer& Index, const Handle(BRepAdaptor_Surface)& surf, const Standard_Real u1, const Standard_Real v1, const Standard_Real u2, const Standard_Real v2, gp_Vec& theVecD1U, gp_Vec& theVecD1V) const;
|
||||
|
||||
//! Starts an exploration of the shells.
|
||||
Standard_EXPORT void InitShell();
|
||||
@@ -157,7 +148,7 @@ protected:
|
||||
|
||||
Standard_EXPORT TopAbs_State ClassifyUVPoint
|
||||
(const IntCurvesFace_Intersector& theIntersector,
|
||||
const Handle(BRepAdaptor_HSurface)& theSurf,
|
||||
const Handle(BRepAdaptor_Surface)& theSurf,
|
||||
const gp_Pnt2d& theP2d) const;
|
||||
|
||||
private:
|
||||
|
Reference in New Issue
Block a user