Coding - Clang-Tidy apply with refactoring (#965)

- Replacing empty constructor/destructor implementations with `= default`
- Removing redundant `virtual` keywords from override methods
- Replacing `NULL` and `0` with `nullptr`
- Replacing C headers with C++ equivalents (`<cstdio>`, `<cstring>`, etc.)
- Marking copy constructors/assignment operators as `= delete` for non-copyable classes
- Converting `void` parameter lists to empty parameter lists
- Replacing integer literals with appropriate boolean values
This commit is contained in:
Pasukhin Dmitry
2025-12-29 11:55:04 +00:00
committed by GitHub
parent 14d4e91171
commit c020fc2fad
4823 changed files with 15722 additions and 16541 deletions
@@ -24,7 +24,7 @@ IMPLEMENT_STANDARD_RTTIEXT(BRepAlgo_AsDes, Standard_Transient)
//=================================================================================================
BRepAlgo_AsDes::BRepAlgo_AsDes() {}
BRepAlgo_AsDes::BRepAlgo_AsDes() = default;
//=================================================================================================
@@ -36,7 +36,7 @@
//=================================================================================================
BRepAlgo_FaceRestrictor::BRepAlgo_FaceRestrictor() {}
BRepAlgo_FaceRestrictor::BRepAlgo_FaceRestrictor() = default;
//=================================================================================================
@@ -210,7 +210,7 @@ static bool IsClosed(const TopoDS_Wire& W)
{
if (W.Closed())
return 1;
return true;
TopoDS_Vertex V1, V2;
TopExp::Vertices(W, V1, V2);
return (V1.IsSame(V2));
@@ -25,7 +25,7 @@
//=================================================================================================
BRepAlgo_Image::BRepAlgo_Image() {}
BRepAlgo_Image::BRepAlgo_Image() = default;
//=================================================================================================
@@ -43,7 +43,7 @@
#include <NCollection_Map.hxx>
#include <NCollection_Sequence.hxx>
#include <stdio.h>
#include <cstdio>
// #define OCCT_DEBUG_ALGO
// #define DRAW
#ifdef DRAW
@@ -165,7 +165,7 @@ static TopoDS_Vertex UpdateClosedEdge(const TopoDS_Edge& E, NCollection_Sequence
{
TopoDS_Vertex VB[2], V1, V2, VRes;
gp_Pnt P, PC;
bool OnStart = 0, OnEnd = 0;
bool OnStart = false, OnEnd = false;
//// modified by jgv, 13.04.04 for OCC5634 ////
TopExp::Vertices(E, V1, V2);
double Tol = BRep_Tool::Tolerance(V1);
@@ -1439,7 +1439,7 @@ static void InsertEDegenerated(const TopoDS_Face& theFace,
}
const NCollection_List<TopoDS_Shape>* anEList = aMapVE.Seek(aVertCurr);
if ((anEList != 0) && (anEList->Extent() <= 2))
if ((anEList != nullptr) && (anEList->Extent() <= 2))
{
anE1 = anE2;
continue;
@@ -1536,7 +1536,7 @@ static void InsertEDegenerated(const TopoDS_Face& theFace,
continue;
const NCollection_List<TopoDS_Shape>* anEList = aMapVE.Seek(aV[anIDFE]);
if ((anEList != 0) && (anEList->Extent() > 2))
if ((anEList != nullptr) && (anEList->Extent() > 2))
{
// Causes:
// 1. Non-manifold topology.
@@ -51,7 +51,7 @@ public:
const double theTolerance,
const bool theSolidReq = true);
bool IsDone(unsigned int* theErrorCode = 0) const
bool IsDone(unsigned int* theErrorCode = nullptr) const
{
if (theErrorCode)
*theErrorCode = myErrorStatus;
@@ -19,7 +19,7 @@
#include <TopoDS_Edge.hxx>
#include <TopoDS_Face.hxx>
BRepFill_EdgeFaceAndOrder::BRepFill_EdgeFaceAndOrder() {}
BRepFill_EdgeFaceAndOrder::BRepFill_EdgeFaceAndOrder() = default;
BRepFill_EdgeFaceAndOrder::BRepFill_EdgeFaceAndOrder(const TopoDS_Edge& anEdge,
const TopoDS_Face& aFace,
@@ -543,7 +543,7 @@ static void IsInversed(const TopoDS_Shape& S,
bool* Inverse)
{
Inverse[0] = Inverse[1] = 0;
Inverse[0] = Inverse[1] = false;
if (S.ShapeType() != TopAbs_EDGE)
return;
@@ -575,7 +575,7 @@ static void IsInversed(const TopoDS_Shape& S,
Inverse[0] = (DS.Dot(DC1) < 0.);
}
else
Inverse[0] = 1;
Inverse[0] = true;
if (!BRep_Tool::Degenerated(E2))
{
@@ -592,7 +592,7 @@ static void IsInversed(const TopoDS_Shape& S,
Inverse[1] = (DS.Dot(DC2) < 0.);
}
else
Inverse[1] = 1;
Inverse[1] = true;
}
//=================================================================================================
@@ -789,7 +789,7 @@ void BRepFill_Evolved::ElementaryPerform(const TopoDS_Face& Sp,
bool Inv0[2];
bool Inv1[2];
Inv0[0] = Inv0[1] = Inv1[0] = Inv1[1] = 0;
Inv0[0] = Inv0[1] = Inv1[0] = Inv1[1] = false;
if (Concave0)
IsInversed(S[0], E[0], E[1], Inv0);
if (Concave1)
@@ -2141,7 +2141,7 @@ void BRepFill_Evolved::AddTopAndBottom(BRepTools_Quilt& Glue)
{
const TopoDS_Edge& ES = TopoDS::Edge(ExpSpine.Current());
const NCollection_List<TopoDS_Shape>& L = GeneratedShapes(ES, V[i]);
bool ComputeOrientation = 0;
bool ComputeOrientation = false;
for (itL.Initialize(L); itL.More(); itL.Next())
{
@@ -2161,7 +2161,7 @@ void BRepFill_Evolved::AddTopAndBottom(BRepTools_Quilt& Glue)
C1.D1(us, P, V1);
C2.D1(u, P, V2);
ToReverse = (V1.Dot(V2) < 0.);
ComputeOrientation = 1;
ComputeOrientation = true;
}
TopAbs_Orientation Or = ES.Orientation();
@@ -18,7 +18,7 @@
#include <BRepFill_Filling.hxx>
#include <TopoDS_Face.hxx>
BRepFill_FaceAndOrder::BRepFill_FaceAndOrder() {}
BRepFill_FaceAndOrder::BRepFill_FaceAndOrder() = default;
BRepFill_FaceAndOrder::BRepFill_FaceAndOrder(const TopoDS_Face& aFace, const GeomAbs_Shape anOrder)
{
@@ -51,7 +51,7 @@ static int NbProj = 1;
#endif
// POP pour NT
#include <stdio.h>
#include <cstdio>
//=================================================================================================
@@ -74,10 +74,10 @@ public:
occ::handle<Geom2d_Curve>& PCurve2) const;
//! returns the first parameter of the Bissectrice.
Standard_EXPORT virtual double FirstParameter() const;
Standard_EXPORT double FirstParameter() const override;
//! returns the last parameter of the Bissectrice.
Standard_EXPORT virtual double LastParameter() const;
Standard_EXPORT double LastParameter() const override;
//! Returns the current point on the 3d curve
Standard_EXPORT gp_Pnt Value(const double U) const;
@@ -96,14 +96,14 @@ public:
gp_Pnt2d& PF2) const;
//! Returns the point at parameter <theU>.
Standard_EXPORT virtual bool Value(const double theU,
NCollection_Array1<gp_Pnt2d>& thePnt2d,
NCollection_Array1<gp_Pnt>& thePnt) const;
Standard_EXPORT bool Value(const double theU,
NCollection_Array1<gp_Pnt2d>& thePnt2d,
NCollection_Array1<gp_Pnt>& thePnt) const override;
//! Returns the derivative at parameter <theU>.
Standard_EXPORT virtual bool D1(const double theU,
NCollection_Array1<gp_Vec2d>& theVec2d,
NCollection_Array1<gp_Vec>& theVec) const;
Standard_EXPORT bool D1(const double theU,
NCollection_Array1<gp_Vec2d>& theVec2d,
NCollection_Array1<gp_Vec>& theVec) const override;
private:
TopoDS_Face myFace1;
@@ -48,7 +48,7 @@
#include <TopoDS_Vertex.hxx>
#include <TopoDS_Wire.hxx>
#include <stdio.h>
#include <cstdio>
IMPLEMENT_STANDARD_RTTIEXT(BRepFill_NSections, BRepFill_SectionLaw)
#ifdef OCCT_DEBUG
@@ -51,22 +51,21 @@ public:
const bool Build = true);
//! Say if the input shape is a vertex.
Standard_EXPORT virtual bool IsVertex() const override;
Standard_EXPORT bool IsVertex() const override;
//! Say if the Law is Constant.
Standard_EXPORT virtual bool IsConstant() const override;
Standard_EXPORT bool IsConstant() const override;
//! Give the law build on a concatenated section
Standard_EXPORT virtual occ::handle<GeomFill_SectionLaw> ConcatenedLaw() const override;
Standard_EXPORT occ::handle<GeomFill_SectionLaw> ConcatenedLaw() const override;
Standard_EXPORT virtual GeomAbs_Shape Continuity(const int Index,
const double TolAngular) const override;
Standard_EXPORT GeomAbs_Shape Continuity(const int Index, const double TolAngular) const override;
Standard_EXPORT virtual double VertexTol(const int Index, const double Param) const override;
Standard_EXPORT double VertexTol(const int Index, const double Param) const override;
Standard_EXPORT virtual TopoDS_Vertex Vertex(const int Index, const double Param) const override;
Standard_EXPORT TopoDS_Vertex Vertex(const int Index, const double Param) const override;
Standard_EXPORT virtual void D0(const double Param, TopoDS_Shape& S) override;
Standard_EXPORT void D0(const double Param, TopoDS_Shape& S) override;
DEFINE_STANDARD_RTTIEXT(BRepFill_NSections, BRepFill_SectionLaw)
@@ -79,7 +79,7 @@
#include <NCollection_IndexedMap.hxx>
#include <NCollection_Map.hxx>
#include <stdio.h>
#include <cstdio>
#ifdef OCCT_DEBUG
// #define DRAW
#ifdef DRAW
@@ -289,7 +289,7 @@ static bool KPartCircle(
myShape.Location(L);
if (fabs(Alt) > gp::Resolution())
{
BRepAdaptor_Surface S(mySpine, 0);
BRepAdaptor_Surface S(mySpine, false);
gp_Ax1 Nor = S.Plane().Axis();
gp_Trsf T;
gp_Vec Trans(Nor.Direction());
@@ -881,7 +881,7 @@ void BRepFill_OffsetWire::PerformWithBiLo(const TopoDS_Face& Spine,
Node2 = CurrentArc->SecondNode();
}
bool StartOnEdge = 0, EndOnEdge = 0;
bool StartOnEdge = false, EndOnEdge = false;
if (!Node1->Infinite())
{
@@ -899,7 +899,7 @@ void BRepFill_OffsetWire::PerformWithBiLo(const TopoDS_Face& Spine,
}
if (myJoinType == GeomAbs_Intersection)
StartOnEdge = EndOnEdge = 0;
StartOnEdge = EndOnEdge = false;
//---------------------------------------------
// Construction of geometries.
@@ -928,7 +928,7 @@ void BRepFill_OffsetWire::PerformWithBiLo(const TopoDS_Face& Spine,
}
if (StartOnEdge)
{
bool Start = 1;
bool Start = true;
Trim.AddOrConfuse(Start, E[0], E[1], Params);
if (Params.Length() == Vertices.Length() && Params.Length() != 0)
Vertices.SetValue(1, VS);
@@ -939,7 +939,7 @@ void BRepFill_OffsetWire::PerformWithBiLo(const TopoDS_Face& Spine,
}
if (EndOnEdge)
{
bool Start = 0;
bool Start = false;
Trim.AddOrConfuse(Start, E[0], E[1], Params);
if (Params.Length() == Vertices.Length() && Params.Length() != 0)
Vertices.SetValue(Params.Length(), VE);
@@ -74,7 +74,7 @@
#include <TopoDS_Vertex.hxx>
#include <TopoDS_Wire.hxx>
#include <stdio.h>
#include <cstdio>
IMPLEMENT_STANDARD_RTTIEXT(BRepFill_PipeShell, Standard_Transient)
// Specification Guide
@@ -25,10 +25,10 @@
#include <ShapeUpgrade_RemoveLocations.hxx>
BRepFill_Section::BRepFill_Section()
: islaw(0),
ispunctual(0),
contact(0),
correction(0)
: islaw(false),
ispunctual(false),
contact(false),
correction(false)
{
}
@@ -37,8 +37,8 @@ BRepFill_Section::BRepFill_Section(const TopoDS_Shape& Profile,
const bool WithContact,
const bool WithCorrection)
: vertex(V),
islaw(0),
ispunctual(0),
islaw(false),
ispunctual(false),
contact(WithContact),
correction(WithCorrection)
{
@@ -49,22 +49,21 @@ public:
const bool Build = true);
//! Say if the input shape is a vertex.
Standard_EXPORT virtual bool IsVertex() const override;
Standard_EXPORT bool IsVertex() const override;
//! Say if the Law is Constant.
Standard_EXPORT virtual bool IsConstant() const override;
Standard_EXPORT bool IsConstant() const override;
//! Give the law build on a concatenated section
Standard_EXPORT virtual occ::handle<GeomFill_SectionLaw> ConcatenedLaw() const override;
Standard_EXPORT occ::handle<GeomFill_SectionLaw> ConcatenedLaw() const override;
Standard_EXPORT virtual GeomAbs_Shape Continuity(const int Index,
const double TolAngular) const override;
Standard_EXPORT GeomAbs_Shape Continuity(const int Index, const double TolAngular) const override;
Standard_EXPORT virtual double VertexTol(const int Index, const double Param) const override;
Standard_EXPORT double VertexTol(const int Index, const double Param) const override;
Standard_EXPORT virtual TopoDS_Vertex Vertex(const int Index, const double Param) const override;
Standard_EXPORT TopoDS_Vertex Vertex(const int Index, const double Param) const override;
Standard_EXPORT virtual void D0(const double Param, TopoDS_Shape& S) override;
Standard_EXPORT void D0(const double Param, TopoDS_Shape& S) override;
const TopoDS_Edge& Edge(const int Index) const;
@@ -82,7 +82,7 @@
#include <NCollection_IndexedDataMap.hxx>
#include <GeomLib_CheckCurveOnSurface.hxx>
#include <stdio.h>
#include <cstdio>
// #include <BRepFill_TrimCorner.hxx>
// modified by NIZHNY-MKK Wed Oct 22 12:25:45 2003
// #include <GeomPlate_BuildPlateSurface.hxx>
@@ -70,7 +70,7 @@ static void SimpleExpression(const Bisector_Bisec& B, occ::handle<Geom2d_Curve>&
//=================================================================================================
BRepFill_TrimEdgeTool::BRepFill_TrimEdgeTool() {}
BRepFill_TrimEdgeTool::BRepFill_TrimEdgeTool() = default;
//=================================================================================================
@@ -54,7 +54,7 @@
#include <TopoDS_Vertex.hxx>
// #define DRAW
#include <stdio.h>
#include <cstdio>
#ifdef DRAW
#include <DrawTrSurf.hxx>
#include <DBRep.hxx>
@@ -136,7 +136,7 @@ extern bool TopOpeBRep_GetcontextNONOG();
//=================================================================================================
TopOpeBRep_DSFiller::TopOpeBRep_DSFiller()
: myPShapeClassifier(NULL)
: myPShapeClassifier(nullptr)
{
}
@@ -419,7 +419,7 @@ void TopOpeBRep_DSFiller::InsertIntersection(const TopoDS_Shape&
FBOX_Prepare();
FC2D_Prepare(aS1, aS2);
if (myPShapeClassifier == NULL)
if (myPShapeClassifier == nullptr)
myPShapeClassifier = new TopOpeBRepTool_ShapeClassifier();
myFacesFiller.SetPShapeClassifier(myPShapeClassifier);
@@ -556,7 +556,7 @@ void TopOpeBRep_DSFiller::InsertIntersection(const TopoDS_Shape&
if (unfill)
{
if (myPShapeClassifier == NULL)
if (myPShapeClassifier == nullptr)
myPShapeClassifier = new TopOpeBRepTool_ShapeClassifier();
unfill = BREP_UnfillSameDomain(lFF1, lFF2, HDS, *myPShapeClassifier);
}
@@ -646,7 +646,7 @@ void TopOpeBRep_DSFiller::InsertIntersection(const TopoDS_Shape&
if (islFFsamdom && !isEE)
{
if (myPShapeClassifier == NULL)
if (myPShapeClassifier == nullptr)
myPShapeClassifier = new TopOpeBRepTool_ShapeClassifier();
unfill = BREP_UnfillSameDomain(lFF1, lFF2, HDS, *myPShapeClassifier);
}
@@ -806,7 +806,7 @@ void TopOpeBRep_DSFiller::RemoveUnsharedGeometry(
unfill = unfill && FUN_ds_sdm(BDS, S, Ssd) && FUN_ds_sdm(BDS, Ssd, S);
if (unfill)
{
if (myPShapeClassifier == NULL)
if (myPShapeClassifier == nullptr)
myPShapeClassifier = new TopOpeBRepTool_ShapeClassifier();
unfill = BREP_UnfillSameDomain(S, Ssd, HDS, *myPShapeClassifier);
}
@@ -848,7 +848,7 @@ void TopOpeBRep_DSFiller::InsertIntersection2d(const TopoDS_Shape&
const TopoDS_Shape& aS2,
const occ::handle<TopOpeBRepDS_HDataStructure>& HDS)
{
if (myPShapeClassifier == NULL)
if (myPShapeClassifier == nullptr)
{
myPShapeClassifier = new TopOpeBRepTool_ShapeClassifier();
}
@@ -883,7 +883,7 @@ void TopOpeBRep_DSFiller::InsertIntersection2d(const TopoDS_Shape&
bool unfill = (!isEE && isFFsamdom);
if (unfill)
{
if (myPShapeClassifier == NULL)
if (myPShapeClassifier == nullptr)
myPShapeClassifier = new TopOpeBRepTool_ShapeClassifier();
// NYI : mettre en champs un ShapeClassifier commun a tous
// NYI : les fillers
@@ -58,8 +58,8 @@ Standard_EXPORT void debeeff() {}
//=================================================================================================
TopOpeBRep_EdgesFiller::TopOpeBRep_EdgesFiller()
: myPDS(NULL),
myPEI(NULL)
: myPDS(nullptr),
myPEI(nullptr)
{
}
@@ -130,7 +130,7 @@ TopOpeBRep_EdgesIntersector::TopOpeBRep_EdgesIntersector()
myselectkeep = true;
}
TopOpeBRep_EdgesIntersector::~TopOpeBRep_EdgesIntersector() {}
TopOpeBRep_EdgesIntersector::~TopOpeBRep_EdgesIntersector() = default;
//=================================================================================================
@@ -362,7 +362,7 @@ bool TopOpeBRep_EdgesIntersector::IsVertex1(const int Index)
// search for an INTERNAL vertex on edge <Index> with
// a 2d parameter <parV> equal to current point parameter <par>
double par = Parameter1(Index);
const TopoDS_Edge* pE = NULL;
const TopoDS_Edge* pE = nullptr;
pE = (Index == 1) ? &myEdge1 : &myEdge2;
const TopoDS_Edge& E = *pE;
TopExp_Explorer ex;
@@ -33,7 +33,7 @@ extern void FEINT_DUMPPOINTS(TopOpeBRep_FaceEdgeIntersector& FEINT,
//=================================================================================================
TopOpeBRep_FaceEdgeFiller::TopOpeBRep_FaceEdgeFiller() {}
TopOpeBRep_FaceEdgeFiller::TopOpeBRep_FaceEdgeFiller() = default;
//=================================================================================================
@@ -85,7 +85,7 @@ static void FUN_MakeERL(TopOpeBRep_FacesIntersector& FI, NCollection_List<TopoDS
//=================================================================================================
TopOpeBRep_FacesFiller::TopOpeBRep_FacesFiller()
: myPShapeClassifier(NULL)
: myPShapeClassifier(nullptr)
{
myexF1 = myexF2 = 0;
#ifdef OCCT_DEBUG
@@ -121,7 +121,7 @@ void TopOpeBRep_FacesFiller::Insert(const TopoDS_Shape&
myFacesIntersector = &FACINT;
myHDS = HDS;
myDS = &(HDS->ChangeDS());
if (myPShapeClassifier == NULL)
if (myPShapeClassifier == nullptr)
myPShapeClassifier = new TopOpeBRepTool_ShapeClassifier();
#ifdef OCCT_DEBUG
@@ -456,7 +456,7 @@ Standard_EXPORT void debtcxmess(int f1, int f2, int il)
void TopOpeBRep_FacesFiller::ProcessLine()
{
bool reject = (!myLineOK || myLine == NULL);
bool reject = (!myLineOK || myLine == nullptr);
if (reject)
return;
ResetDSC();
@@ -1300,7 +1300,7 @@ static int GetArc(NCollection_Sequence<occ::handle<IntPatch_Line>>& theSlin,
CurArc++;
void* anEAddress = theDomainObj->Edge();
if (anEAddress == NULL)
if (anEAddress == nullptr)
continue;
TopoDS_Edge* anE = (TopoDS_Edge*)anEAddress;
@@ -1330,7 +1330,7 @@ static int GetArc(NCollection_Sequence<occ::handle<IntPatch_Line>>& theSlin,
// 2. load parameters of founded edge and its arc.
CurArc = 0;
NCollection_Sequence<gp_Pnt> PointsFromArc;
occ::handle<Adaptor2d_Curve2d> arc = NULL;
occ::handle<Adaptor2d_Curve2d> arc = nullptr;
double tol = 1.e-7;
NCollection_Sequence<double> WLVertexParameters;
bool classifyOK = true;
@@ -40,7 +40,7 @@ Standard_EXPORT bool TopOpeBRep_GettracePROEDG();
//=================================================================================================
TopOpeBRep_Hctxee2d::TopOpeBRep_Hctxee2d() {}
TopOpeBRep_Hctxee2d::TopOpeBRep_Hctxee2d() = default;
//=================================================================================================
@@ -35,7 +35,7 @@
//=================================================================================================
TopOpeBRep_ShapeScanner::TopOpeBRep_ShapeScanner() {}
TopOpeBRep_ShapeScanner::TopOpeBRep_ShapeScanner() = default;
//=================================================================================================
@@ -19,7 +19,7 @@
//=================================================================================================
inline TopOpeBRep_VPointInter::TopOpeBRep_VPointInter()
: myPPOI(NULL),
: myPPOI(nullptr),
myShapeIndex(0),
myState1(TopAbs_UNKNOWN),
myState2(TopAbs_UNKNOWN),
@@ -21,7 +21,7 @@
//=================================================================================================
TopOpeBRep_VPointInterIterator::TopOpeBRep_VPointInterIterator()
: myLineInter(NULL),
: myLineInter(nullptr),
myVPointIndex(0),
myVPointNb(0),
mycheckkeep(false)
@@ -20,7 +20,7 @@
//=================================================================================================
TopOpeBRep_WPointInter::TopOpeBRep_WPointInter() {}
TopOpeBRep_WPointInter::TopOpeBRep_WPointInter() = default;
//=================================================================================================
@@ -21,7 +21,7 @@
//=================================================================================================
TopOpeBRep_WPointInterIterator::TopOpeBRep_WPointInterIterator()
: myLineInter(NULL),
: myLineInter(nullptr),
myWPointIndex(0),
myWPointNb(0)
{
@@ -15,7 +15,7 @@
// commercial license or contractual agreement.
#include <TopOpeBRepDS_TKI.hxx>
#include <stdlib.h>
#include <cstdlib>
#include <TopOpeBRep_define.hxx>
#include <TopOpeBRepDS_CurvePointInterference.hxx>
@@ -50,7 +50,7 @@
// modified by NIZHNY-MKK Tue Nov 21 17:30:23 2000.BEGIN
static NCollection_DataMap<TopoDS_Shape, NCollection_List<TopoDS_Shape>, TopTools_ShapeMapHasher>
aMapOfTreatedVertexListOfEdge;
static TopOpeBRep_PLineInter localCurrentLine = NULL;
static TopOpeBRep_PLineInter localCurrentLine = nullptr;
static bool local_FindTreatedEdgeOnVertex(const TopoDS_Edge& theEdge,
const TopoDS_Vertex& theVertex);
@@ -782,7 +782,7 @@ static bool local_FindVertex(
static void local_ReduceMapOfTreatedVertices(const TopOpeBRep_PLineInter& theCurrentLine)
{
if (localCurrentLine == NULL)
if (localCurrentLine == nullptr)
{
localCurrentLine = theCurrentLine;
aMapOfTreatedVertexListOfEdge.Clear();
@@ -51,7 +51,7 @@ void TopOpeBRepBuild_Area1dBuilder::DumpList(
//=================================================================================================
TopOpeBRepBuild_Area1dBuilder::TopOpeBRepBuild_Area1dBuilder() {}
TopOpeBRepBuild_Area1dBuilder::TopOpeBRepBuild_Area1dBuilder() = default;
//=================================================================================================
@@ -46,26 +46,26 @@ public:
//! Sets a Area1dBuilder to find the areas of
//! the shapes described by <LS> using the classifier <LC>.
Standard_EXPORT virtual void InitAreaBuilder(TopOpeBRepBuild_LoopSet& LS,
TopOpeBRepBuild_LoopClassifier& LC,
const bool ForceClass = false) override;
Standard_EXPORT void InitAreaBuilder(TopOpeBRepBuild_LoopSet& LS,
TopOpeBRepBuild_LoopClassifier& LC,
const bool ForceClass = false) override;
Standard_EXPORT virtual void ADD_Loop_TO_LISTOFLoop(
Standard_EXPORT void ADD_Loop_TO_LISTOFLoop(
const occ::handle<TopOpeBRepBuild_Loop>& L,
NCollection_List<occ::handle<TopOpeBRepBuild_Loop>>& LOL,
void* const s = NULL) const override;
void* const s = nullptr) const override;
Standard_EXPORT virtual void REM_Loop_FROM_LISTOFLoop(
Standard_EXPORT void REM_Loop_FROM_LISTOFLoop(
NCollection_List<occ::handle<TopOpeBRepBuild_Loop>>::Iterator& ITLOL,
NCollection_List<occ::handle<TopOpeBRepBuild_Loop>>& LOL,
void* const s = NULL) const override;
void* const s = nullptr) const override;
Standard_EXPORT virtual void ADD_LISTOFLoop_TO_LISTOFLoop(
Standard_EXPORT void ADD_LISTOFLoop_TO_LISTOFLoop(
NCollection_List<occ::handle<TopOpeBRepBuild_Loop>>& LOL1,
NCollection_List<occ::handle<TopOpeBRepBuild_Loop>>& LOL2,
void* const s = NULL,
void* const s1 = NULL,
void* const s2 = NULL) const override;
void* const s = nullptr,
void* const s1 = nullptr,
void* const s2 = nullptr) const override;
Standard_EXPORT static void DumpList(
const NCollection_List<occ::handle<TopOpeBRepBuild_Loop>>& L);
@@ -25,7 +25,7 @@ extern bool TopOpeBRepBuild_GettraceAREA();
//=================================================================================================
TopOpeBRepBuild_Area2dBuilder::TopOpeBRepBuild_Area2dBuilder() {}
TopOpeBRepBuild_Area2dBuilder::TopOpeBRepBuild_Area2dBuilder() = default;
//=================================================================================================
@@ -49,9 +49,9 @@ public:
//! Sets a Area1dBuilder to find the areas of
//! the shapes described by <LS> using the classifier <LC>.
Standard_EXPORT virtual void InitAreaBuilder(TopOpeBRepBuild_LoopSet& LS,
TopOpeBRepBuild_LoopClassifier& LC,
const bool ForceClass = false) override;
Standard_EXPORT void InitAreaBuilder(TopOpeBRepBuild_LoopSet& LS,
TopOpeBRepBuild_LoopClassifier& LC,
const bool ForceClass = false) override;
};
#endif // _TopOpeBRepBuild_Area2dBuilder_HeaderFile
@@ -21,7 +21,7 @@
//=================================================================================================
TopOpeBRepBuild_Area3dBuilder::TopOpeBRepBuild_Area3dBuilder() {}
TopOpeBRepBuild_Area3dBuilder::TopOpeBRepBuild_Area3dBuilder() = default;
//=================================================================================================
@@ -49,9 +49,9 @@ public:
//! Sets a Area1dBuilder to find the areas of
//! the shapes described by <LS> using the classifier <LC>.
Standard_EXPORT virtual void InitAreaBuilder(TopOpeBRepBuild_LoopSet& LS,
TopOpeBRepBuild_LoopClassifier& LC,
const bool ForceClass = false) override;
Standard_EXPORT void InitAreaBuilder(TopOpeBRepBuild_LoopSet& LS,
TopOpeBRepBuild_LoopClassifier& LC,
const bool ForceClass = false) override;
};
#endif // _TopOpeBRepBuild_Area3dBuilder_HeaderFile
@@ -42,7 +42,7 @@ TopOpeBRepBuild_AreaBuilder::TopOpeBRepBuild_AreaBuilder(TopOpeBRepBuild_LoopSet
InitAreaBuilder(LS, LC, ForceClass);
}
TopOpeBRepBuild_AreaBuilder::~TopOpeBRepBuild_AreaBuilder() {}
TopOpeBRepBuild_AreaBuilder::~TopOpeBRepBuild_AreaBuilder() = default;
//=======================================================================
// function : CompareLoopWithListOfLoop
@@ -89,19 +89,19 @@ public:
Standard_EXPORT virtual void ADD_Loop_TO_LISTOFLoop(
const occ::handle<TopOpeBRepBuild_Loop>& L,
NCollection_List<occ::handle<TopOpeBRepBuild_Loop>>& LOL,
void* const s = NULL) const;
void* const s = nullptr) const;
Standard_EXPORT virtual void REM_Loop_FROM_LISTOFLoop(
NCollection_List<occ::handle<TopOpeBRepBuild_Loop>>::Iterator& ITLOL,
NCollection_List<occ::handle<TopOpeBRepBuild_Loop>>& LOL,
void* const s = NULL) const;
void* const s = nullptr) const;
Standard_EXPORT virtual void ADD_LISTOFLoop_TO_LISTOFLoop(
NCollection_List<occ::handle<TopOpeBRepBuild_Loop>>& LOL1,
NCollection_List<occ::handle<TopOpeBRepBuild_Loop>>& LOL2,
void* const s = NULL,
void* const s1 = NULL,
void* const s2 = NULL) const;
void* const s = nullptr,
void* const s1 = nullptr,
void* const s2 = nullptr) const;
protected:
Standard_EXPORT TopAbs_State
@@ -90,7 +90,7 @@ TopOpeBRepBuild_Builder::TopOpeBRepBuild_Builder(const TopOpeBRepDS_BuildTool& B
// function : ~TopOpeBRepBuild_Builder
// purpose : virtual destructor
//=======================================================================
TopOpeBRepBuild_Builder::~TopOpeBRepBuild_Builder() {}
TopOpeBRepBuild_Builder::~TopOpeBRepBuild_Builder() = default;
//=================================================================================================
@@ -326,14 +326,14 @@ void TopOpeBRepBuild_Builder::MarkSplit(const TopoDS_Shape& S,
const bool Bval)
{
NCollection_DataMap<TopoDS_Shape, TopOpeBRepDS_ListOfShapeOn1State, TopTools_ShapeMapHasher>* p =
NULL;
nullptr;
if (ToBuild == TopAbs_OUT)
p = &mySplitOUT;
else if (ToBuild == TopAbs_IN)
p = &mySplitIN;
else if (ToBuild == TopAbs_ON)
p = &mySplitON;
if (p == NULL)
if (p == nullptr)
return;
TopOpeBRepDS_ListOfShapeOn1State thelist;
@@ -364,14 +364,14 @@ bool TopOpeBRepBuild_Builder::IsSplit(const TopoDS_Shape& S, const TopAbs_State
bool res = false;
const NCollection_DataMap<TopoDS_Shape,
TopOpeBRepDS_ListOfShapeOn1State,
TopTools_ShapeMapHasher>* p = NULL;
TopTools_ShapeMapHasher>* p = nullptr;
if (ToBuild == TopAbs_OUT)
p = &mySplitOUT;
else if (ToBuild == TopAbs_IN)
p = &mySplitIN;
else if (ToBuild == TopAbs_ON)
p = &mySplitON;
if (p == NULL)
if (p == nullptr)
return res;
if ((*p).IsBound(S))
@@ -393,14 +393,14 @@ const NCollection_List<TopoDS_Shape>& TopOpeBRepBuild_Builder::Splits(
{
const NCollection_DataMap<TopoDS_Shape,
TopOpeBRepDS_ListOfShapeOn1State,
TopTools_ShapeMapHasher>* p = NULL;
TopTools_ShapeMapHasher>* p = nullptr;
if (ToBuild == TopAbs_OUT)
p = &mySplitOUT;
else if (ToBuild == TopAbs_IN)
p = &mySplitIN;
else if (ToBuild == TopAbs_ON)
p = &mySplitON;
if (p == NULL)
if (p == nullptr)
return myEmptyShapeList;
if ((*p).IsBound(S))
@@ -431,14 +431,14 @@ NCollection_List<TopoDS_Shape>& TopOpeBRepBuild_Builder::ChangeSplit(const TopoD
#endif
NCollection_DataMap<TopoDS_Shape, TopOpeBRepDS_ListOfShapeOn1State, TopTools_ShapeMapHasher>* p =
NULL;
nullptr;
if (ToBuild == TopAbs_OUT)
p = &mySplitOUT;
else if (ToBuild == TopAbs_IN)
p = &mySplitIN;
else if (ToBuild == TopAbs_ON)
p = &mySplitON;
if (p == NULL)
if (p == nullptr)
return myEmptyShapeList;
TopOpeBRepDS_ListOfShapeOn1State thelist1;
if (!(*p).IsBound(S))
@@ -658,11 +658,11 @@ public:
const double p,
const gp_Pnt& Pnt);
Standard_EXPORT void GdumpSHA(const TopoDS_Shape& S, void* const str = NULL) const;
Standard_EXPORT void GdumpSHA(const TopoDS_Shape& S, void* const str = nullptr) const;
Standard_EXPORT void GdumpSHAORI(const TopoDS_Shape& S, void* const str = NULL) const;
Standard_EXPORT void GdumpSHAORI(const TopoDS_Shape& S, void* const str = nullptr) const;
Standard_EXPORT void GdumpSHAORIGEO(const TopoDS_Shape& S, void* const str = NULL) const;
Standard_EXPORT void GdumpSHAORIGEO(const TopoDS_Shape& S, void* const str = nullptr) const;
Standard_EXPORT void GdumpSHASTA(const int iS,
const TopAbs_State T,
@@ -681,14 +681,14 @@ public:
const TCollection_AsciiString& b = "",
const TCollection_AsciiString& c = "\n") const;
Standard_EXPORT void GdumpEDG(const TopoDS_Shape& S, void* const str = NULL) const;
Standard_EXPORT void GdumpEDG(const TopoDS_Shape& S, void* const str = nullptr) const;
Standard_EXPORT void GdumpEDGVER(const TopoDS_Shape& E,
const TopoDS_Shape& V,
void* const str = NULL) const;
void* const str = nullptr) const;
Standard_EXPORT void GdumpSAMDOM(const NCollection_List<TopoDS_Shape>& L,
void* const str = NULL) const;
void* const str = nullptr) const;
Standard_EXPORT void GdumpEXP(const TopOpeBRepTool_ShapeExplorer& E) const;
@@ -50,36 +50,35 @@ public:
Standard_EXPORT TopOpeBRepBuild_Builder1(const TopOpeBRepDS_BuildTool& BT);
Standard_EXPORT virtual ~TopOpeBRepBuild_Builder1();
Standard_EXPORT ~TopOpeBRepBuild_Builder1() override;
//! Removes all splits and merges already performed.
//! Does NOT clear the handled DS (except ShapeWithStatesMaps).
Standard_EXPORT virtual void Clear() override;
Standard_EXPORT void Clear() override;
Standard_EXPORT virtual void Perform(
const occ::handle<TopOpeBRepDS_HDataStructure>& HDS) override;
Standard_EXPORT void Perform(const occ::handle<TopOpeBRepDS_HDataStructure>& HDS) override;
Standard_EXPORT virtual void Perform(const occ::handle<TopOpeBRepDS_HDataStructure>& HDS,
const TopoDS_Shape& S1,
const TopoDS_Shape& S2) override;
Standard_EXPORT void Perform(const occ::handle<TopOpeBRepDS_HDataStructure>& HDS,
const TopoDS_Shape& S1,
const TopoDS_Shape& S2) override;
Standard_EXPORT virtual void MergeKPart() override;
Standard_EXPORT void MergeKPart() override;
Standard_EXPORT virtual void MergeKPart(const TopAbs_State TB1, const TopAbs_State TB2) override;
Standard_EXPORT void MergeKPart(const TopAbs_State TB1, const TopAbs_State TB2) override;
Standard_EXPORT virtual void GFillSolidSFS(const TopoDS_Shape& SO1,
const NCollection_List<TopoDS_Shape>& LSO2,
const TopOpeBRepBuild_GTopo& G,
TopOpeBRepBuild_ShellFaceSet& SFS) override;
Standard_EXPORT void GFillSolidSFS(const TopoDS_Shape& SO1,
const NCollection_List<TopoDS_Shape>& LSO2,
const TopOpeBRepBuild_GTopo& G,
TopOpeBRepBuild_ShellFaceSet& SFS) override;
Standard_EXPORT virtual void GFillShellSFS(const TopoDS_Shape& SH1,
const NCollection_List<TopoDS_Shape>& LSO2,
const TopOpeBRepBuild_GTopo& G,
TopOpeBRepBuild_ShellFaceSet& SFS) override;
Standard_EXPORT void GFillShellSFS(const TopoDS_Shape& SH1,
const NCollection_List<TopoDS_Shape>& LSO2,
const TopOpeBRepBuild_GTopo& G,
TopOpeBRepBuild_ShellFaceSet& SFS) override;
Standard_EXPORT virtual void GWESMakeFaces(const TopoDS_Shape& FF,
TopOpeBRepBuild_WireEdgeSet& WES,
NCollection_List<TopoDS_Shape>& LOF) override;
Standard_EXPORT void GWESMakeFaces(const TopoDS_Shape& FF,
TopOpeBRepBuild_WireEdgeSet& WES,
NCollection_List<TopoDS_Shape>& LOF) override;
Standard_EXPORT void GFillSplitsPVS(const TopoDS_Shape& anEdge,
const TopOpeBRepBuild_GTopo& G1,
@@ -140,7 +140,7 @@ static void FUN_cout(const TopoDS_Shape& eON)
//=================================================================================================
TopOpeBRepBuild_BuilderON::TopOpeBRepBuild_BuilderON() {}
TopOpeBRepBuild_BuilderON::TopOpeBRepBuild_BuilderON() = default;
//=================================================================================================
@@ -76,7 +76,7 @@ void TopOpeBRepBuild_BuilderON::Perform2d(const TopOpeBRepBuild_PBuilder& PB
myPWES = PWES;
const TopOpeBRepDS_DataStructure& BDS = myPB->DataStructure()->DS();
if (GLOBAL_DS2d == NULL)
if (GLOBAL_DS2d == nullptr)
GLOBAL_DS2d = (TopOpeBRepDS_PDataStructure) new TopOpeBRepDS_DataStructure();
const NCollection_List<occ::handle<TopOpeBRepDS_Interference>>& lFEI =
GLOBAL_DS2d->ShapeInterferences(FOR);
@@ -34,9 +34,8 @@ class TopOpeBRepBuild_CompositeClassifier : public TopOpeBRepBuild_LoopClassifie
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT virtual TopAbs_State Compare(
const occ::handle<TopOpeBRepBuild_Loop>& L1,
const occ::handle<TopOpeBRepBuild_Loop>& L2) override;
Standard_EXPORT TopAbs_State Compare(const occ::handle<TopOpeBRepBuild_Loop>& L1,
const occ::handle<TopOpeBRepBuild_Loop>& L2) override;
//! classify shape <B1> with shape <B2>
Standard_EXPORT virtual TopAbs_State CompareShapes(const TopoDS_Shape& B1,
@@ -20,7 +20,7 @@
//=================================================================================================
TopOpeBRepBuild_EdgeBuilder::TopOpeBRepBuild_EdgeBuilder() {}
TopOpeBRepBuild_EdgeBuilder::TopOpeBRepBuild_EdgeBuilder() = default;
//=================================================================================================
@@ -20,7 +20,7 @@
//=================================================================================================
TopOpeBRepBuild_FaceAreaBuilder::TopOpeBRepBuild_FaceAreaBuilder() {}
TopOpeBRepBuild_FaceAreaBuilder::TopOpeBRepBuild_FaceAreaBuilder() = default;
//=================================================================================================
@@ -60,7 +60,7 @@ void debifb() {}
//=================================================================================================
TopOpeBRepBuild_FaceBuilder::TopOpeBRepBuild_FaceBuilder() {}
TopOpeBRepBuild_FaceBuilder::TopOpeBRepBuild_FaceBuilder() = default;
//=================================================================================================
@@ -21,13 +21,13 @@
TopOpeBRepBuild_GIter::TopOpeBRepBuild_GIter()
: myII(0),
mypG(NULL)
mypG(nullptr)
{
}
TopOpeBRepBuild_GIter::TopOpeBRepBuild_GIter(const TopOpeBRepBuild_GTopo& G)
: myII(0),
mypG(NULL)
mypG(nullptr)
{
Init(G);
}
@@ -96,7 +96,7 @@ public:
const TopAbs_State s2,
const bool b);
Standard_EXPORT virtual void Dump(Standard_OStream& OS, void* const s = NULL) const;
Standard_EXPORT virtual void Dump(Standard_OStream& OS, void* const s = nullptr) const;
Standard_EXPORT void StatesON(TopAbs_State& s1, TopAbs_State& s2) const;
@@ -315,7 +315,7 @@ bool FUN_computeLIFfaces2d(const TopOpeBRepBuild_Builder& BU,
//=================================================================================================
Standard_EXPORT TopOpeBRepDS_PDataStructure GLOBAL_DS2d = NULL;
Standard_EXPORT TopOpeBRepDS_PDataStructure GLOBAL_DS2d = nullptr;
//=================================================================================================
@@ -325,7 +325,7 @@ void TopOpeBRepBuild_Builder::GMergeFaces(const NCollection_List<TopoDS_Shape>&
{
if (LF1.IsEmpty())
return;
if (GLOBAL_DS2d == NULL)
if (GLOBAL_DS2d == nullptr)
GLOBAL_DS2d = (TopOpeBRepDS_PDataStructure) new TopOpeBRepDS_DataStructure();
GLOBAL_DS2d->Init();
@@ -1134,7 +1134,7 @@ void TopOpeBRepBuild_Builder::GSplitEdgeWES(const TopoDS_Shape&
Standard_IMPORT bool FUN_ismotheropedef();
Standard_IMPORT const TopOpeBRepBuild_GTopo& FUN_motherope();
Standard_EXPORT bool GLOBAL_IEtoMERGE = 0; // xpu240498
Standard_EXPORT bool GLOBAL_IEtoMERGE = false; // xpu240498
#ifdef OCCT_DEBUG
void debmergee(const int /*i*/) {}
@@ -842,7 +842,7 @@ void TopOpeBRepBuild_Builder::GSplitFaceSFS(const TopoDS_Shape&
{
TopoDS_Shape newF = it.Value();
if (GLOBAL_SplitAnc != NULL)
if (GLOBAL_SplitAnc != nullptr)
{
bool hasoridef = GLOBAL_SplitAnc->IsBound(newF); // xpu260598
@@ -1036,7 +1036,7 @@ void TopOpeBRepBuild_Builder::GMergeFaceSFS(const TopoDS_Shape& FOR,
#endif
bool performcom = false;
NCollection_List<TopoDS_Shape>*PtrLF1 = NULL, *PtrLF2 = NULL;
NCollection_List<TopoDS_Shape>*PtrLF1 = nullptr, *PtrLF2 = nullptr;
int n1 = 0, n2 = 0;
if (makecomsam)
{
@@ -194,8 +194,8 @@ const NCollection_List<TopoDS_Shape>& TopOpeBRepBuild_HBuilder::Section()
return L;
}
static NCollection_List<TopoDS_Shape>* PLE = NULL;
static NCollection_List<TopoDS_Shape>::Iterator* PITLE = NULL;
static NCollection_List<TopoDS_Shape>* PLE = nullptr;
static NCollection_List<TopoDS_Shape>::Iterator* PITLE = nullptr;
//=================================================================================================
@@ -222,9 +222,9 @@ void TopOpeBRepBuild_HBuilder::InitExtendedSectionDS(const int k)
void TopOpeBRepBuild_HBuilder::InitSection(const int k)
{
if (PLE == NULL)
if (PLE == nullptr)
PLE = new NCollection_List<TopoDS_Shape>();
if (PITLE == NULL)
if (PITLE == nullptr)
PITLE = new NCollection_List<TopoDS_Shape>::Iterator();
PLE->Clear();
PITLE->Initialize(*PLE);
@@ -244,7 +244,7 @@ void TopOpeBRepBuild_HBuilder::InitSection(const int k)
bool TopOpeBRepBuild_HBuilder::MoreSection() const
{
if (PITLE == NULL)
if (PITLE == nullptr)
return false;
bool b = PITLE->More();
return b;
@@ -254,7 +254,7 @@ bool TopOpeBRepBuild_HBuilder::MoreSection() const
void TopOpeBRepBuild_HBuilder::NextSection()
{
if (PITLE == NULL)
if (PITLE == nullptr)
return;
if (PITLE->More())
PITLE->Next();
@@ -264,7 +264,7 @@ void TopOpeBRepBuild_HBuilder::NextSection()
const TopoDS_Shape& TopOpeBRepBuild_HBuilder::CurrentSection() const
{
if (PITLE == NULL)
if (PITLE == nullptr)
throw Standard_ProgramError("no more CurrentSection");
if (!PITLE->More())
throw Standard_ProgramError("no more CurrentSection");
@@ -599,8 +599,8 @@ void TopOpeBRepBuild_Builder::MergeKPartiskoletge()
bool SameOriented = (config2 == TopOpeBRepDS_SAMEORIENTED);
const TopoDS_Shape* pfGRE = NULL;
const TopoDS_Shape* pfSMA = NULL;
const TopoDS_Shape* pfGRE = nullptr;
const TopoDS_Shape* pfSMA = nullptr;
int rgre = 1;
if (SameOriented)
@@ -16,4 +16,4 @@
#include <TopOpeBRepBuild_LoopClassifier.hxx>
TopOpeBRepBuild_LoopClassifier::~TopOpeBRepBuild_LoopClassifier() {}
TopOpeBRepBuild_LoopClassifier::~TopOpeBRepBuild_LoopClassifier() = default;
@@ -24,7 +24,7 @@ TopOpeBRepBuild_LoopSet::TopOpeBRepBuild_LoopSet()
{
}
TopOpeBRepBuild_LoopSet::~TopOpeBRepBuild_LoopSet() {}
TopOpeBRepBuild_LoopSet::~TopOpeBRepBuild_LoopSet() = default;
//=================================================================================================
@@ -601,14 +601,14 @@ bool TopOpeBRepBuild_Builder::IsMerged(const TopoDS_Shape& S, const TopAbs_State
{
const NCollection_DataMap<TopoDS_Shape,
TopOpeBRepDS_ListOfShapeOn1State,
TopTools_ShapeMapHasher>* p = NULL;
TopTools_ShapeMapHasher>* p = nullptr;
if (ToBuild == TopAbs_OUT)
p = &myMergedOUT;
else if (ToBuild == TopAbs_IN)
p = &myMergedIN;
else if (ToBuild == TopAbs_ON)
p = &myMergedON;
if (p == NULL)
if (p == nullptr)
return false;
bool notbound = !(*p).IsBound(S);
@@ -632,14 +632,14 @@ const NCollection_List<TopoDS_Shape>& TopOpeBRepBuild_Builder::Merged(
{
const NCollection_DataMap<TopoDS_Shape,
TopOpeBRepDS_ListOfShapeOn1State,
TopTools_ShapeMapHasher>* p = NULL;
TopTools_ShapeMapHasher>* p = nullptr;
if (ToBuild == TopAbs_OUT)
p = &myMergedOUT;
else if (ToBuild == TopAbs_IN)
p = &myMergedIN;
else if (ToBuild == TopAbs_ON)
p = &myMergedON;
if (p == NULL)
if (p == nullptr)
return myEmptyShapeList;
if (!(*p).IsBound(S))
@@ -659,14 +659,14 @@ NCollection_List<TopoDS_Shape>& TopOpeBRepBuild_Builder::ChangeMerged(const Topo
const TopAbs_State ToBuild)
{
NCollection_DataMap<TopoDS_Shape, TopOpeBRepDS_ListOfShapeOn1State, TopTools_ShapeMapHasher>* p =
NULL;
nullptr;
if (ToBuild == TopAbs_OUT)
p = &myMergedOUT;
else if (ToBuild == TopAbs_IN)
p = &myMergedIN;
else if (ToBuild == TopAbs_ON)
p = &myMergedON;
if (p == NULL)
if (p == nullptr)
return myEmptyShapeList;
if (!(*p).IsBound(S))
@@ -51,11 +51,11 @@ public:
Standard_EXPORT TopOpeBRepDS_Kind& InterferenceType();
Standard_EXPORT virtual bool IsShape() const override;
Standard_EXPORT bool IsShape() const override;
Standard_EXPORT virtual const TopoDS_Shape& Shape() const override;
Standard_EXPORT const TopoDS_Shape& Shape() const override;
Standard_EXPORT virtual void Dump() const override;
Standard_EXPORT void Dump() const override;
DEFINE_STANDARD_RTTIEXT(TopOpeBRepBuild_Pave, TopOpeBRepBuild_Loop)
@@ -48,7 +48,7 @@ public:
//! Returns state of vertex <L1> compared with <L2>.
Standard_EXPORT TopAbs_State Compare(const occ::handle<TopOpeBRepBuild_Loop>& L1,
const occ::handle<TopOpeBRepBuild_Loop>& L2);
const occ::handle<TopOpeBRepBuild_Loop>& L2) override;
Standard_EXPORT void SetFirstParameter(const double P);
@@ -44,13 +44,13 @@ public:
//! Add <PV> in the Pave set.
Standard_EXPORT void Append(const occ::handle<TopOpeBRepBuild_Pave>& PV);
Standard_EXPORT virtual void InitLoop() override;
Standard_EXPORT void InitLoop() override;
Standard_EXPORT virtual bool MoreLoop() const override;
Standard_EXPORT bool MoreLoop() const override;
Standard_EXPORT virtual void NextLoop() override;
Standard_EXPORT void NextLoop() override;
Standard_EXPORT virtual occ::handle<TopOpeBRepBuild_Loop> Loop() const override;
Standard_EXPORT occ::handle<TopOpeBRepBuild_Loop> Loop() const override;
Standard_EXPORT const TopoDS_Edge& Edge() const;
@@ -365,8 +365,8 @@ void TopOpeBRepBuild_Builder::SplitSectionEdges()
NCollection_List<TopoDS_Shape> dummylos;
FUN_selLEE(LEoutLESD, ESD, TopAbs_IN, dummylos);
const TopoDS_Edge * pE1 = NULL, *pE2 = NULL;
const NCollection_List<TopoDS_Shape>*plos1 = NULL, *plos2 = NULL;
const TopoDS_Edge * pE1 = nullptr, *pE2 = nullptr;
const NCollection_List<TopoDS_Shape>*plos1 = nullptr, *plos2 = nullptr;
int nLEspon = LEspon.Extent();
int nLESDspon = LESDspon.Extent();
@@ -393,9 +393,9 @@ void TopOpeBRepBuild_Builder::SplitSectionEdges()
plos2 = &LEspon;
}
if (pE1 == NULL || pE2 == NULL)
if (pE1 == nullptr || pE2 == nullptr)
continue;
if (plos1 == NULL || plos2 == NULL)
if (plos1 == nullptr || plos2 == nullptr)
continue;
const TopoDS_Edge& E1 = *pE1;
@@ -33,7 +33,7 @@
//=================================================================================================
TopOpeBRepBuild_ShapeListOfShape::TopOpeBRepBuild_ShapeListOfShape() {}
TopOpeBRepBuild_ShapeListOfShape::TopOpeBRepBuild_ShapeListOfShape() = default;
//=================================================================================================
@@ -80,7 +80,7 @@ TopOpeBRepBuild_ShapeSet::TopOpeBRepBuild_ShapeSet(const TopAbs_ShapeEnum SubSha
myCheckShape = false; // temporary NYI
}
TopOpeBRepBuild_ShapeSet::~TopOpeBRepBuild_ShapeSet() {}
TopOpeBRepBuild_ShapeSet::~TopOpeBRepBuild_ShapeSet() = default;
//=================================================================================================
@@ -45,27 +45,29 @@ public:
Standard_EXPORT void Clear();
//! classify shell <B1> with shell <B2>
Standard_EXPORT TopAbs_State CompareShapes(const TopoDS_Shape& B1, const TopoDS_Shape& B2);
Standard_EXPORT TopAbs_State CompareShapes(const TopoDS_Shape& B1,
const TopoDS_Shape& B2) override;
//! classify face <F> with shell <S>
Standard_EXPORT TopAbs_State CompareElementToShape(const TopoDS_Shape& F, const TopoDS_Shape& S);
Standard_EXPORT TopAbs_State CompareElementToShape(const TopoDS_Shape& F,
const TopoDS_Shape& S) override;
//! prepare classification involving shell <S>
//! calls ResetElement on first face of <S>
Standard_EXPORT void ResetShape(const TopoDS_Shape& S);
Standard_EXPORT void ResetShape(const TopoDS_Shape& S) override;
//! prepare classification involving face <F>
//! define 3D point (later used in Compare()) on first vertex of face <F>.
Standard_EXPORT void ResetElement(const TopoDS_Shape& F);
Standard_EXPORT void ResetElement(const TopoDS_Shape& F) override;
//! Add the face <F> in the set of faces used in 3D point
//! classification. Returns FALSE if the face <F> has been already
//! added to the set of faces, otherwise returns TRUE.
Standard_EXPORT bool CompareElement(const TopoDS_Shape& F);
Standard_EXPORT bool CompareElement(const TopoDS_Shape& F) override;
//! Returns state of classification of 3D point, defined by
//! ResetElement, with the current set of faces, defined by Compare.
Standard_EXPORT TopAbs_State State();
Standard_EXPORT TopAbs_State State() override;
private:
bool myFirstCompare;
@@ -44,37 +44,37 @@ public:
//! Creates a ShellFaceSet to build blocks of faces
//! connected by edges.
Standard_EXPORT TopOpeBRepBuild_ShellFaceSet(const TopoDS_Shape& S, void* const Addr = NULL);
Standard_EXPORT TopOpeBRepBuild_ShellFaceSet(const TopoDS_Shape& S, void* const Addr = nullptr);
Standard_EXPORT const TopoDS_Solid& Solid() const;
Standard_EXPORT virtual void AddShape(const TopoDS_Shape& S) override;
Standard_EXPORT void AddShape(const TopoDS_Shape& S) override;
Standard_EXPORT virtual void AddStartElement(const TopoDS_Shape& S) override;
Standard_EXPORT void AddStartElement(const TopoDS_Shape& S) override;
Standard_EXPORT virtual void AddElement(const TopoDS_Shape& S) override;
Standard_EXPORT void AddElement(const TopoDS_Shape& S) override;
Standard_EXPORT virtual void DumpSS() override;
Standard_EXPORT void DumpSS() override;
Standard_EXPORT virtual TCollection_AsciiString SName(
const TopoDS_Shape& S,
const TCollection_AsciiString& sb = "",
const TCollection_AsciiString& sa = "") const override;
Standard_EXPORT TCollection_AsciiString
SName(const TopoDS_Shape& S,
const TCollection_AsciiString& sb = "",
const TCollection_AsciiString& sa = "") const override;
Standard_EXPORT virtual TCollection_AsciiString SName(
const NCollection_List<TopoDS_Shape>& S,
const TCollection_AsciiString& sb = "",
const TCollection_AsciiString& sa = "") const override;
Standard_EXPORT TCollection_AsciiString
SName(const NCollection_List<TopoDS_Shape>& S,
const TCollection_AsciiString& sb = "",
const TCollection_AsciiString& sa = "") const override;
Standard_EXPORT virtual TCollection_AsciiString SNameori(
const TopoDS_Shape& S,
const TCollection_AsciiString& sb = "",
const TCollection_AsciiString& sa = "") const override;
Standard_EXPORT TCollection_AsciiString
SNameori(const TopoDS_Shape& S,
const TCollection_AsciiString& sb = "",
const TCollection_AsciiString& sa = "") const override;
Standard_EXPORT virtual TCollection_AsciiString SNameori(
const NCollection_List<TopoDS_Shape>& S,
const TCollection_AsciiString& sb = "",
const TCollection_AsciiString& sa = "") const override;
Standard_EXPORT TCollection_AsciiString
SNameori(const NCollection_List<TopoDS_Shape>& S,
const TCollection_AsciiString& sb = "",
const TCollection_AsciiString& sa = "") const override;
private:
TopoDS_Solid mySolid;
@@ -22,7 +22,7 @@
//=================================================================================================
TopOpeBRepBuild_ShellToSolid::TopOpeBRepBuild_ShellToSolid() {}
TopOpeBRepBuild_ShellToSolid::TopOpeBRepBuild_ShellToSolid() = default;
//=================================================================================================
@@ -20,7 +20,7 @@
//=================================================================================================
TopOpeBRepBuild_SolidAreaBuilder::TopOpeBRepBuild_SolidAreaBuilder() {}
TopOpeBRepBuild_SolidAreaBuilder::TopOpeBRepBuild_SolidAreaBuilder() = default;
//=================================================================================================
@@ -21,7 +21,7 @@
//=================================================================================================
TopOpeBRepBuild_SolidBuilder::TopOpeBRepBuild_SolidBuilder() {}
TopOpeBRepBuild_SolidBuilder::TopOpeBRepBuild_SolidBuilder() = default;
//=================================================================================================
@@ -51,7 +51,7 @@
#include <NCollection_IndexedMap.hxx>
#include <NCollection_Map.hxx>
#include <stdio.h>
#include <cstdio>
// define parameter division number as 10*e^(-PI) = 0.43213918
const double PAR_T = 0.43213918;
@@ -23,7 +23,7 @@
#include <TopoDS_Shape.hxx>
#include <NCollection_List.hxx>
#include <stdio.h>
#include <cstdio>
static void BuildPath(
const TopoDS_Vertex& myVertex0,
const TopoDS_Edge& myEdge,
@@ -16,7 +16,7 @@
#include <TopoDS_Shape.hxx>
#include <NCollection_List.hxx>
#include <stdio.h>
#include <cstdio>
//=================================================================================================
@@ -43,9 +43,8 @@ public:
Standard_EXPORT TopOpeBRepBuild_WireEdgeClassifier(const TopoDS_Shape& F,
const TopOpeBRepBuild_BlockBuilder& BB);
Standard_EXPORT virtual TopAbs_State Compare(
const occ::handle<TopOpeBRepBuild_Loop>& L1,
const occ::handle<TopOpeBRepBuild_Loop>& L2) override;
Standard_EXPORT TopAbs_State Compare(const occ::handle<TopOpeBRepBuild_Loop>& L1,
const occ::handle<TopOpeBRepBuild_Loop>& L2) override;
Standard_EXPORT TopoDS_Shape LoopToShape(const occ::handle<TopOpeBRepBuild_Loop>& L);
@@ -46,24 +46,24 @@ public:
//! Creates a WireEdgeSet to build edges connected by vertices
//! on face F. Edges of the WireEdgeSet must have a representation
//! on surface of face F.
Standard_EXPORT TopOpeBRepBuild_WireEdgeSet(const TopoDS_Shape& F, void* const Addr = NULL);
Standard_EXPORT TopOpeBRepBuild_WireEdgeSet(const TopoDS_Shape& F, void* const Addr = nullptr);
//! value of field myFace
Standard_EXPORT const TopoDS_Face& Face() const;
Standard_EXPORT virtual void AddShape(const TopoDS_Shape& S) override;
Standard_EXPORT void AddShape(const TopoDS_Shape& S) override;
Standard_EXPORT virtual void AddStartElement(const TopoDS_Shape& S) override;
Standard_EXPORT void AddStartElement(const TopoDS_Shape& S) override;
Standard_EXPORT virtual void AddElement(const TopoDS_Shape& S) override;
Standard_EXPORT void AddElement(const TopoDS_Shape& S) override;
Standard_EXPORT virtual void InitNeighbours(const TopoDS_Shape& E) override;
Standard_EXPORT void InitNeighbours(const TopoDS_Shape& E) override;
//! Build the list of neighbour edges of edge myCurrentShape
//! Initialize iterator of neighbour edges to edge myCurrentShape
Standard_EXPORT virtual void FindNeighbours() override;
Standard_EXPORT void FindNeighbours() override;
Standard_EXPORT virtual const NCollection_List<TopoDS_Shape>& MakeNeighboursList(
Standard_EXPORT const NCollection_List<TopoDS_Shape>& MakeNeighboursList(
const TopoDS_Shape& E,
const TopoDS_Shape& V) override;
@@ -72,27 +72,27 @@ public:
bool& uiso,
bool& viso);
Standard_EXPORT virtual void DumpSS() override;
Standard_EXPORT void DumpSS() override;
Standard_EXPORT virtual TCollection_AsciiString SName(
const TopoDS_Shape& S,
const TCollection_AsciiString& sb = "",
const TCollection_AsciiString& sa = "") const override;
Standard_EXPORT TCollection_AsciiString
SName(const TopoDS_Shape& S,
const TCollection_AsciiString& sb = "",
const TCollection_AsciiString& sa = "") const override;
Standard_EXPORT virtual TCollection_AsciiString SName(
const NCollection_List<TopoDS_Shape>& S,
const TCollection_AsciiString& sb = "",
const TCollection_AsciiString& sa = "") const override;
Standard_EXPORT TCollection_AsciiString
SName(const NCollection_List<TopoDS_Shape>& S,
const TCollection_AsciiString& sb = "",
const TCollection_AsciiString& sa = "") const override;
Standard_EXPORT virtual TCollection_AsciiString SNameori(
const TopoDS_Shape& S,
const TCollection_AsciiString& sb = "",
const TCollection_AsciiString& sa = "") const override;
Standard_EXPORT TCollection_AsciiString
SNameori(const TopoDS_Shape& S,
const TCollection_AsciiString& sb = "",
const TCollection_AsciiString& sa = "") const override;
Standard_EXPORT virtual TCollection_AsciiString SNameori(
const NCollection_List<TopoDS_Shape>& S,
const TCollection_AsciiString& sb = "",
const TCollection_AsciiString& sa = "") const override;
Standard_EXPORT TCollection_AsciiString
SNameori(const NCollection_List<TopoDS_Shape>& S,
const TCollection_AsciiString& sb = "",
const TCollection_AsciiString& sa = "") const override;
private:
//! Indicates whether vertex V is a good connexity vertex between
@@ -22,7 +22,7 @@
//=================================================================================================
TopOpeBRepBuild_WireToFace::TopOpeBRepBuild_WireToFace() {}
TopOpeBRepBuild_WireToFace::TopOpeBRepBuild_WireToFace() = default;
//=================================================================================================
@@ -204,7 +204,7 @@ static int FUN_getAncestorFsp(TopOpeBRepBuild_Builder& B,
}
Standard_EXPORT NCollection_DataMap<TopoDS_Shape, int, TopTools_ShapeMapHasher>* GLOBAL_SplitAnc =
NULL; // xpu260598
nullptr; // xpu260598
static void FUN_getAncestorFsp(
TopOpeBRepBuild_Builder& B,
@@ -214,7 +214,7 @@ static void FUN_getAncestorFsp(
const TopoDS_Shape& FOR,
NCollection_DataMap<TopoDS_Shape, int, TopTools_ShapeMapHasher>* SplitAnc)
{
if (SplitAnc == NULL)
if (SplitAnc == nullptr)
return;
bool issplitIN = B.IsSplit(FOR, TopAbs_IN);
@@ -244,7 +244,7 @@ static void FUN_getAncestorFsp(
} // itsp
}
Standard_EXPORT NCollection_List<TopoDS_Shape>* GLOBAL_lfr1 = NULL;
Standard_EXPORT NCollection_List<TopoDS_Shape>* GLOBAL_lfr1 = nullptr;
Standard_EXPORT bool GLOBAL_lfrtoprocess = false;
// Standard_IMPORT extern NCollection_List<TopoDS_Shape>* GLOBAL_lfr1;
@@ -325,7 +325,7 @@ void TopOpeBRepBuild_Builder::GFillFaceSFS(const TopoDS_Shape&
GLOBAL_lfrtoprocess = true;
if (GLOBAL_lfrtoprocess)
{
if (GLOBAL_lfr1 == NULL)
if (GLOBAL_lfr1 == nullptr)
GLOBAL_lfr1 = (NCollection_List<TopoDS_Shape>*)new NCollection_List<TopoDS_Shape>();
GLOBAL_lfr1->Clear();
}
@@ -334,7 +334,7 @@ void TopOpeBRepBuild_Builder::GFillFaceSFS(const TopoDS_Shape&
// xpu280598 : Filling up GLOBAL_SplitAnc = {(fsp,ifanc)}
// . fsp = spIN/OU(fanc),
// . fanc hsdm is the unique ancestor face
if (GLOBAL_SplitAnc == NULL)
if (GLOBAL_SplitAnc == nullptr)
GLOBAL_SplitAnc =
(NCollection_DataMap<TopoDS_Shape, int, TopTools_ShapeMapHasher>*)new NCollection_DataMap<
TopoDS_Shape,
@@ -404,7 +404,7 @@ void TopOpeBRepBuild_Builder::GFillFaceSFS(const TopoDS_Shape&
// ici : GLOBAL_lfrtoprocess = t
// clang-format off
if (GLOBAL_lfr1==NULL) GLOBAL_lfr1=(NCollection_List<TopoDS_Shape>*)new NCollection_List<TopoDS_Shape>(); //flo150998
if (GLOBAL_lfr1==nullptr) GLOBAL_lfr1=(NCollection_List<TopoDS_Shape>*)new NCollection_List<TopoDS_Shape>(); //flo150998
// clang-format on
GLOBAL_lfr1->Clear();
GSplitFaceSFS(FOR, LSO2, GM, SFS);
@@ -116,9 +116,9 @@ void TopOpeBRepBuild_Builder::MergeKPartiskole()
#endif
NCollection_List<TopoDS_Shape> LFIN;
NCollection_List<TopoDS_Shape>* plfIN = NULL;
const TopoDS_Shape* pfOU = NULL;
const TopoDS_Shape* pfIN = NULL;
NCollection_List<TopoDS_Shape>* plfIN = nullptr;
const TopoDS_Shape* pfOU = nullptr;
const TopoDS_Shape* pfIN = nullptr;
for (; itm1.More(); itm1.Next())
{
@@ -128,22 +128,22 @@ void TopOpeBRepBuild_Builder::MergeKPartiskole()
bool emp = los.IsEmpty();
if (!emp)
{
if (plfIN == NULL)
if (plfIN == nullptr)
plfIN = (NCollection_List<TopoDS_Shape>*)&itm1.Value();
if (pfOU == NULL)
if (pfOU == nullptr)
pfOU = &itm1.Key();
if (pfIN == NULL)
if (pfIN == nullptr)
pfIN = &plfIN->First();
for (NCollection_List<TopoDS_Shape>::Iterator it(los); it.More(); it.Next())
LFIN.Append(it.Value());
}
}
if (plfIN == NULL)
if (plfIN == nullptr)
return;
if (pfOU == NULL)
if (pfOU == nullptr)
return;
if (pfIN == NULL)
if (pfIN == nullptr)
return;
#ifdef OCCT_DEBUG
@@ -28,14 +28,14 @@ static bool Contains(const NCollection_List<occ::handle<TopOpeBRepDS_Interferenc
it.Next())
{
if (I->HasSameGeometry(it.Value()))
return 1;
return true;
}
return 0;
return false;
}
//=================================================================================================
TopOpeBRepDS_Association::TopOpeBRepDS_Association() {}
TopOpeBRepDS_Association::TopOpeBRepDS_Association() = default;
//=================================================================================================
@@ -554,11 +554,11 @@ bool FUN_getUV(const occ::handle<Geom_Surface>& surf,
return true;
}
bool FUN_reversePC(occ::handle<Geom2d_Curve> PCnew,
const TopoDS_Face& F,
const gp_Pnt& P3DC3D,
const double par2d,
const double tol)
bool FUN_reversePC(const occ::handle<Geom2d_Curve>& PCnew,
const TopoDS_Face& F,
const gp_Pnt& P3DC3D,
const double par2d,
const double tol)
{
gp_Pnt2d P2D;
PCnew->D0(par2d, P2D);
@@ -584,8 +584,8 @@ bool FUN_reversePC(occ::handle<Geom2d_Curve> PCnew,
bool FUN_makeUisoLineOnSphe(const TopoDS_Face& F, // with geometry the spherical surface
const occ::handle<Geom_Curve>& C3D,
occ::handle<Geom2d_Curve> PCnew,
const double tol3d)
const occ::handle<Geom2d_Curve>& PCnew,
const double tol3d)
{
// p3df,p3dl : C3d first and last parameters
double p3df = C3D->FirstParameter();
@@ -19,7 +19,7 @@
//=================================================================================================
TopOpeBRepDS_CurveData::TopOpeBRepDS_CurveData() {}
TopOpeBRepDS_CurveData::TopOpeBRepDS_CurveData() = default;
//=================================================================================================
@@ -19,14 +19,14 @@
#include <TopOpeBRepDS_DataStructure.hxx>
#define MYDS (*((TopOpeBRepDS_DataStructure*)myDS))
static TopOpeBRepDS_Curve* CEX_PEMPTY = NULL;
static TopOpeBRepDS_Curve* CEX_PEMPTY = nullptr;
//=================================================================================================
TopOpeBRepDS_CurveExplorer::TopOpeBRepDS_CurveExplorer()
: myIndex(1),
myMax(0),
myDS(NULL),
myDS(nullptr),
myFound(false),
myFindKeep(false)
{
@@ -98,7 +98,7 @@ const TopOpeBRepDS_Curve& TopOpeBRepDS_CurveExplorer::Curve() const
}
else
{
if (CEX_PEMPTY == NULL)
if (CEX_PEMPTY == nullptr)
{
CEX_PEMPTY = new TopOpeBRepDS_Curve();
}
@@ -134,7 +134,7 @@ const TopOpeBRepDS_Curve& TopOpeBRepDS_CurveExplorer::Curve(const int I) const
return C;
}
if (CEX_PEMPTY == NULL)
if (CEX_PEMPTY == nullptr)
{
CEX_PEMPTY = new TopOpeBRepDS_Curve();
}
@@ -43,7 +43,7 @@ public:
//! Returns True if the Interference <I> has a
//! GeometryType() TopOpeBRepDS_CURVE
//! returns False else.
Standard_EXPORT virtual bool MatchInterference(
Standard_EXPORT bool MatchInterference(
const occ::handle<TopOpeBRepDS_Interference>& I) const override;
//! Index of the curve in the data structure.
@@ -456,7 +456,7 @@ Standard_EXPORT bool FDS_HasSameDomain3d(const TopOpeBRepDS_DataStructure& BDS,
{
const NCollection_List<TopoDS_Shape>& lssd = BDS.ShapeSameDomain(E);
bool hsd = (!lssd.IsEmpty());
if (PLSD != NULL)
if (PLSD != nullptr)
PLSD->Clear();
if (!hsd)
return false;
@@ -472,7 +472,7 @@ Standard_EXPORT bool FDS_HasSameDomain3d(const TopOpeBRepDS_DataStructure& BDS,
if (ok)
{
hsd3d = true;
if (PLSD != NULL)
if (PLSD != nullptr)
PLSD->Append(esd);
else
break;
@@ -521,7 +521,7 @@ Standard_EXPORT bool FDS_HasSameDomain2d(const TopOpeBRepDS_DataStructure& BDS,
{
const NCollection_List<TopoDS_Shape>& lssd = BDS.ShapeSameDomain(E);
bool hsd = (!lssd.IsEmpty());
if (PLSD != NULL)
if (PLSD != nullptr)
PLSD->Clear();
if (!hsd)
return false;
@@ -536,7 +536,7 @@ Standard_EXPORT bool FDS_HasSameDomain2d(const TopOpeBRepDS_DataStructure& BDS,
if (ok)
{
hsd2d = true;
if (PLSD != NULL)
if (PLSD != nullptr)
PLSD->Append(esd);
else
break;
@@ -114,13 +114,13 @@ Standard_EXPORT double FDS_Parameter(const occ::handle<TopOpeBRepDS_Interference
Standard_EXPORT bool FDS_Parameter(const occ::handle<TopOpeBRepDS_Interference>& I, double& par);
Standard_EXPORT bool FDS_HasSameDomain3d(const TopOpeBRepDS_DataStructure& BDS,
const TopoDS_Shape& E,
NCollection_List<TopoDS_Shape>* PLSD = NULL);
NCollection_List<TopoDS_Shape>* PLSD = nullptr);
Standard_EXPORT bool FDS_Config3d(const TopoDS_Shape& E1,
const TopoDS_Shape& E2,
TopOpeBRepDS_Config& c);
Standard_EXPORT bool FDS_HasSameDomain2d(const TopOpeBRepDS_DataStructure& BDS,
const TopoDS_Shape& E,
NCollection_List<TopoDS_Shape>* PLSD = NULL);
NCollection_List<TopoDS_Shape>* PLSD = nullptr);
Standard_EXPORT void FDS_getupperlower(const occ::handle<TopOpeBRepDS_HDataStructure>& HDS,
const int edgeIndex,
const double paredge,
@@ -29,7 +29,7 @@
//=================================================================================================
TopOpeBRepDS_EdgeInterferenceTool::TopOpeBRepDS_EdgeInterferenceTool() {}
TopOpeBRepDS_EdgeInterferenceTool::TopOpeBRepDS_EdgeInterferenceTool() = default;
static double Parameter(const occ::handle<TopOpeBRepDS_Interference>& I)
{
@@ -35,7 +35,7 @@ public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT TopOpeBRepDS_Filter(const occ::handle<TopOpeBRepDS_HDataStructure>& HDS,
const TopOpeBRepTool_PShapeClassifier& pClassif = 0);
const TopOpeBRepTool_PShapeClassifier& pClassif = nullptr);
Standard_EXPORT void ProcessInterferences();
@@ -92,9 +92,9 @@ bool Contains(const TopoDS_Shape& F, const TopoDS_Shape& E)
{
// for (TopExp_Explorer exp(F,E.ShapeType()); exp.More(); exp.Next()){
if (exp.Current().IsSame(E))
return 1;
return true;
}
return 0;
return false;
}
//=================================================================================================
@@ -198,7 +198,7 @@ void TopOpeBRepDS_GapFiller::FindAssociatedPoints(
bool TopOpeBRepDS_GapFiller::CheckConnexity(
NCollection_List<occ::handle<TopOpeBRepDS_Interference>>&)
{
return 1;
return true;
}
//=================================================================================================
@@ -261,11 +261,11 @@ bool TopOpeBRepDS_GapFiller::IsOnFace(const occ::handle<TopOpeBRepDS_Interferenc
TopoDS_Shape S1, S2;
C.GetShapes(S1, S2);
if (S1.IsSame(F))
return 1;
return true;
if (S2.IsSame(F))
return 1;
return true;
}
return 0;
return false;
}
//=================================================================================================
@@ -305,10 +305,10 @@ bool TopOpeBRepDS_GapFiller::IsOnEdge(const occ::handle<TopOpeBRepDS_Interferenc
{
const TopoDS_Shape& S1 = myHDS->Shape(IC->Support());
if (S1.IsSame(E))
return 1;
return true;
}
}
return 0;
return false;
}
//=================================================================================================
@@ -330,7 +330,7 @@ static bool Normal(const occ::handle<TopOpeBRepDS_GapTool>& A,
if (S.GetType() == GeomAbs_Plane)
{
D = S.Plane().Axis().Direction();
return 1;
return true;
}
const NCollection_List<occ::handle<TopOpeBRepDS_Interference>>& LI = A->SameInterferences(I);
@@ -349,13 +349,13 @@ static bool Normal(const occ::handle<TopOpeBRepDS_GapTool>& A,
if (F.IsSame(S1))
{
if (C.Curve1().IsNull())
return 0;
return false;
P2d = C.Curve1()->Value(P);
}
else
{
if (C.Curve2().IsNull())
return 0;
return false;
P2d = C.Curve2()->Value(P);
}
@@ -367,13 +367,13 @@ static bool Normal(const occ::handle<TopOpeBRepDS_GapTool>& A,
if (N.SquareMagnitude() >= gp::Resolution())
{
D = gp_Dir(N);
return 1;
return true;
}
}
return 0;
return false;
}
}
return 0;
return false;
}
//=================================================================================================
@@ -389,7 +389,7 @@ void TopOpeBRepDS_GapFiller::FilterByIncidentDistance(
const TopOpeBRepDS_Point& PI1 = myHDS->Point(I->Geometry());
const gp_Pnt GPI = PI1.Point();
BRepAdaptor_Surface S(F, 0);
BRepAdaptor_Surface S(F, false);
double TolDef = 0.94; // cos(20degre);
double TolDist = 20 * PI1.Tolerance();
@@ -23,7 +23,7 @@ IMPLEMENT_STANDARD_RTTIEXT(TopOpeBRepDS_GapTool, Standard_Transient)
//=================================================================================================
TopOpeBRepDS_GapTool::TopOpeBRepDS_GapTool() {}
TopOpeBRepDS_GapTool::TopOpeBRepDS_GapTool() = default;
//=================================================================================================
@@ -96,7 +96,7 @@ bool TopOpeBRepDS_GapTool::Curve(const occ::handle<TopOpeBRepDS_Interference>& I
if (SK == TopOpeBRepDS_CURVE)
{
C = myHDS->Curve(S);
return 1;
return true;
}
const NCollection_List<occ::handle<TopOpeBRepDS_Interference>>& LI = myGToI(G);
for (NCollection_List<occ::handle<TopOpeBRepDS_Interference>>::Iterator it(LI); it.More();
@@ -106,11 +106,11 @@ bool TopOpeBRepDS_GapTool::Curve(const occ::handle<TopOpeBRepDS_Interference>& I
if (SK == TopOpeBRepDS_CURVE)
{
C = myHDS->Curve(S);
return 1;
return true;
}
}
}
return 0;
return false;
}
//=================================================================================================
@@ -150,7 +150,7 @@ bool TopOpeBRepDS_GapTool::EdgeSupport(const occ::handle<TopOpeBRepDS_Interferen
if (S.ShapeType() == TopAbs_EDGE)
{
E = S;
return 1;
return true;
}
}
const NCollection_List<occ::handle<TopOpeBRepDS_Interference>>& LI = myGToI(I->Geometry());
@@ -164,12 +164,12 @@ bool TopOpeBRepDS_GapTool::EdgeSupport(const occ::handle<TopOpeBRepDS_Interferen
if (S.ShapeType() == TopAbs_EDGE)
{
E = S;
return 1;
return true;
}
}
}
}
return 0;
return false;
}
//=================================================================================================
@@ -182,9 +182,9 @@ bool TopOpeBRepDS_GapTool::FacesSupport(const occ::handle<TopOpeBRepDS_Interfere
if (Curve(I, C))
{
C.GetShapes(F1, F2);
return 1;
return true;
}
return 0;
return false;
}
//=================================================================================================
@@ -201,7 +201,7 @@ bool TopOpeBRepDS_GapTool::ParameterOnEdge(const occ::handle<TopOpeBRepDS_Interf
if (S.IsSame(E))
{
U = occ::down_cast<TopOpeBRepDS_CurvePointInterference>(I)->Parameter();
return 1;
return true;
}
}
const NCollection_List<occ::handle<TopOpeBRepDS_Interference>>& LI = myGToI(I->Geometry());
@@ -215,12 +215,12 @@ bool TopOpeBRepDS_GapTool::ParameterOnEdge(const occ::handle<TopOpeBRepDS_Interf
if (S.IsSame(E))
{
U = occ::down_cast<TopOpeBRepDS_CurvePointInterference>(II)->Parameter();
return 1;
return true;
}
}
}
}
return 0;
return false;
}
//=================================================================================================
@@ -20,7 +20,7 @@
//=================================================================================================
TopOpeBRepDS_GeometryData::TopOpeBRepDS_GeometryData() {}
TopOpeBRepDS_GeometryData::TopOpeBRepDS_GeometryData() = default;
// modified by NIZNHY-PKV Tue Oct 30 09:25:59 2001 f
//=================================================================================================
@@ -88,7 +88,7 @@ Standard_EXPORT bool FUN_HDS_FACESINTERFER(const TopoDS_Shape&
//=================================================================================================
TopOpeBRepDS_HDataStructure::TopOpeBRepDS_HDataStructure() {}
TopOpeBRepDS_HDataStructure::TopOpeBRepDS_HDataStructure() = default;
//=================================================================================================
@@ -22,7 +22,7 @@ IMPLEMENT_STANDARD_RTTIEXT(TopOpeBRepDS_Interference, Standard_Transient)
//=================================================================================================
TopOpeBRepDS_Interference::TopOpeBRepDS_Interference() {}
TopOpeBRepDS_Interference::TopOpeBRepDS_Interference() = default;
//=================================================================================================
@@ -25,7 +25,7 @@
TopOpeBRepDS_PointExplorer::TopOpeBRepDS_PointExplorer()
: myIndex(1),
myMax(0),
myDS(NULL),
myDS(nullptr),
myFound(false),
myFindKeep(false)
{
@@ -42,7 +42,7 @@ public:
//! Returns True if the Interference <I> has a
//! GeometryType() TopOpeBRepDS_POINT or TopOpeBRepDS_VERTEX
//! returns False else.
Standard_EXPORT virtual bool MatchInterference(
Standard_EXPORT bool MatchInterference(
const occ::handle<TopOpeBRepDS_Interference>& I) const override;
//! Index of the point in the data structure.
@@ -365,7 +365,7 @@ Standard_EXPORT void FUN_resolveFUNKNOWN
} // xpu230498
else
{
TopOpeBRepTool_PShapeClassifier pClass = 0;
TopOpeBRepTool_PShapeClassifier pClass = nullptr;
if (pClassif)
{
// MSV: find Solids of the same object rank as FS
@@ -23,7 +23,7 @@ IMPLEMENT_STANDARD_RTTIEXT(TopOpeBRepDS_SurfaceCurveInterference, TopOpeBRepDS_I
//=================================================================================================
TopOpeBRepDS_SurfaceCurveInterference::TopOpeBRepDS_SurfaceCurveInterference() {}
TopOpeBRepDS_SurfaceCurveInterference::TopOpeBRepDS_SurfaceCurveInterference() = default;
//=================================================================================================
@@ -19,7 +19,7 @@
//=================================================================================================
TopOpeBRepDS_SurfaceData::TopOpeBRepDS_SurfaceData() {}
TopOpeBRepDS_SurfaceData::TopOpeBRepDS_SurfaceData() = default;
//=================================================================================================

Some files were not shown because too many files have changed in this diff Show More