From: Alexey SOZINOV Date: Mon, 15 Aug 2022 14:04:00 +0000 (+0300) Subject: Removed unused code X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f6bdbc8b8e026df1e57667af2fed0ca58924b474;p=modules%2Fgeom.git Removed unused code --- diff --git a/src/GEOMImpl/GEOMImpl_ConformityDriver.cxx b/src/GEOMImpl/GEOMImpl_ConformityDriver.cxx index cd8d9d84b..003e20457 100644 --- a/src/GEOMImpl/GEOMImpl_ConformityDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_ConformityDriver.cxx @@ -42,54 +42,6 @@ namespace { - //======================================================================= - //function : GetPairsOfFaultyShapes - //purpose : - //======================================================================= - NCollection_List> GetPairsOfFaultyShapes( - const BOPAlgo_ArgumentAnalyzer& theAnalyzer, - const BOPAlgo_CheckStatus theErrorStatus) - { - NCollection_List> aResList; - - const BOPAlgo_ListOfCheckResult& aResult = theAnalyzer.GetCheckResult(); - BOPAlgo_ListIteratorOfListOfCheckResult anIt(aResult); - for (; anIt.More(); anIt.Next()) - { - if (anIt.Value().GetCheckStatus() == theErrorStatus) - { - auto aFaultyShapes = anIt.Value().GetFaultyShapes1(); - - aResList.Append({ aFaultyShapes.First(), - aFaultyShapes.Size() == 1 ? TopoDS_Shape() : aFaultyShapes.Last() }); - } - } - - return aResList; - } - - //======================================================================= - //function : GetListOfSmallEdges - //purpose : - //======================================================================= - TopTools_ListOfShape GetListOfSmallEdges(const BOPAlgo_ArgumentAnalyzer& theAnalyzer) - { - TopTools_ListOfShape aResList; - - const BOPAlgo_ListOfCheckResult& aResult = theAnalyzer.GetCheckResult(); - BOPAlgo_ListIteratorOfListOfCheckResult anIt(aResult); - for (; anIt.More(); anIt.Next()) - { - if (anIt.Value().GetCheckStatus() == BOPAlgo_CheckStatus::BOPAlgo_TooSmallEdge) - { - auto aFaultyShapes = anIt.Value().GetFaultyShapes1(); - aResList.Append(aFaultyShapes.First()); - } - } - - return aResList; - } - //======================================================================= //function : ConvertShapesToIndices //purpose : Convert sub-shapes of shapes to sequence of indices @@ -176,34 +128,6 @@ Standard_Integer GEOMImpl_ConformityDriver::Execute(Handle(TFunction_Logbook)& l switch (aType) { - case CONFORMITY_DISTANT_SHAPES: - { - Standard_Integer aType1 = aCI.GetShapeType1(); - Standard_Integer aType2 = aCI.GetShapeType2(); - NCollection_List> aRes; - if (aType1 == -1 && aType2 == -1) - { - aRes = distantShapes(aShape); - } - else if (aType1 == -1) - { - aRes = distantShapes(aShape, (TopAbs_ShapeEnum)aType2); - } - else if (aType2 == -1) - { - aRes = distantShapes(aShape, (TopAbs_ShapeEnum)aType1); - } - else - { - aRes = distantShapes(aShape, (TopAbs_ShapeEnum)aType1, (TopAbs_ShapeEnum)aType2); - } - if (!aRes.IsEmpty()) - { - Handle(TColStd_HArray2OfInteger) anArray = ConvertShapesToIndices(aShape, aRes); - aCI.SetListOfShapesIndices(anArray); - } - } - break; case CONFORMITY_UPDATE_TOL: { Standard_Real aTolerance = updateTolerance(aShape); @@ -226,76 +150,9 @@ Standard_Integer GEOMImpl_ConformityDriver::Execute(Handle(TFunction_Logbook)& l } //======================================================================= -//function : distantShapes -//purpose : TODO: Not implemented! Wait for required functionality! -//======================================================================= -NCollection_List> GEOMImpl_ConformityDriver::distantShapes( - const TopoDS_Shape& theShape, - const TopAbs_ShapeEnum theShapeType, - const TopAbs_ShapeEnum theSubShapeType, - Standard_Real theTolerance) const -{ - // TODO: Not implemented! Wait for required functionality! - return NCollection_List>(); -} - -//======================================================================= -//function : distantShapes -//purpose : TODO: Not implemented! Wait for required functionality! -//======================================================================= -NCollection_List> GEOMImpl_ConformityDriver::distantShapes( - const TopoDS_Shape& theShape, - const TopAbs_ShapeEnum theShapeType, - Standard_Real theTolerance) const -{ - NCollection_List> aDistShapes; - NCollection_List> aDistShapesTmp; - switch (theShapeType) - { - case TopAbs_VERTEX: - aDistShapesTmp = distantShapes(theShape, TopAbs_EDGE, theShapeType, theTolerance); - aDistShapes.Append(aDistShapesTmp); - aDistShapesTmp = distantShapes(theShape, TopAbs_FACE, theShapeType, theTolerance); - aDistShapes.Append(aDistShapesTmp); - break; - case TopAbs_EDGE: - aDistShapesTmp = distantShapes(theShape, theShapeType, TopAbs_VERTEX, theTolerance); - aDistShapes.Append(aDistShapesTmp); - aDistShapesTmp = distantShapes(theShape, TopAbs_FACE, theShapeType, theTolerance); - aDistShapes.Append(aDistShapesTmp); - break; - case TopAbs_FACE: - aDistShapesTmp = distantShapes(theShape, theShapeType, TopAbs_VERTEX, theTolerance); - aDistShapes.Append(aDistShapesTmp); - aDistShapesTmp = distantShapes(theShape, theShapeType, TopAbs_EDGE, theTolerance); - aDistShapes.Append(aDistShapesTmp); - break; - } - - return aDistShapes; -} - -//======================================================================= -//function : distantShapes -//purpose : TODO: Not implemented! Wait for required functionality! +//function : checkShape +//purpose : //======================================================================= -NCollection_List> GEOMImpl_ConformityDriver::distantShapes - (const TopoDS_Shape& theShape, - Standard_Real theTolerance) const -{ - NCollection_List> aDistShapes; - NCollection_List> aDistShapesTmp; - - aDistShapesTmp = distantShapes(theShape, TopAbs_EDGE, TopAbs_VERTEX, theTolerance); - aDistShapes.Append(aDistShapesTmp); - aDistShapesTmp = distantShapes(theShape, TopAbs_FACE, TopAbs_VERTEX, theTolerance); - aDistShapes.Append(aDistShapesTmp); - aDistShapesTmp = distantShapes(theShape, TopAbs_FACE, TopAbs_EDGE, theTolerance); - aDistShapes.Append(aDistShapesTmp); - - return aDistShapes; -} - void GEOMImpl_ConformityDriver::checkShape(const TopoDS_Shape & theShape, NCollection_List>& theFailedShape, Handle(TColStd_HArray1OfInteger)& theTypesOfCheck) const diff --git a/src/GEOMImpl/GEOMImpl_ConformityDriver.hxx b/src/GEOMImpl/GEOMImpl_ConformityDriver.hxx index 89aafaf93..40734c384 100644 --- a/src/GEOMImpl/GEOMImpl_ConformityDriver.hxx +++ b/src/GEOMImpl/GEOMImpl_ConformityDriver.hxx @@ -42,19 +42,6 @@ public: Standard_EXPORT virtual void Validate(Handle(TFunction_Logbook)&) const {} private: - - Standard_EXPORT NCollection_List> distantShapes(const TopoDS_Shape& theShape, - const TopAbs_ShapeEnum theShapeType, - const TopAbs_ShapeEnum theSubShapeType, - Standard_Real theTolerance = -1.) const; - - Standard_EXPORT NCollection_List> distantShapes(const TopoDS_Shape& theShape, - const TopAbs_ShapeEnum theShapeType, - Standard_Real theTolerance = -1.) const; - - Standard_EXPORT NCollection_List> distantShapes(const TopoDS_Shape& theShape, - Standard_Real theTolerance = -1.) const; - Standard_EXPORT void checkShape(const TopoDS_Shape& theShape, NCollection_List>& theFailedShape, Handle(TColStd_HArray1OfInteger)& theTypesOfCheck) const; diff --git a/src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx b/src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx index d2b5394e0..1c8c7add3 100644 --- a/src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx +++ b/src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx @@ -2805,14 +2805,6 @@ std::list MESSAGE("GEOMImpl_IMeasureOperations::selfIntersected2D"); std::list aSelfInters2D; - Handle(GEOM_Object) aConformity = GetEngine()->AddObject(GEOM_CHECKCONFORMITY); - Handle(GEOM_Function) aFunction = aConformity->AddFunction(GEOMImpl_ConformityDriver::GetID(), CONFORMITY_SELFINTERSECTED); - if (aFunction.IsNull()) return aSelfInters2D; - - //Check if the function is set correctly - if (aFunction->GetDriverGUID() != GEOMImpl_ConformityDriver::GetID()) return aSelfInters2D; - - GEOMImpl_IConformity aCI(aFunction); try { OCC_CATCH_SIGNALS; diff --git a/src/GEOMImpl/GEOMImpl_Types.hxx b/src/GEOMImpl/GEOMImpl_Types.hxx index 0f7955766..fec26368a 100644 --- a/src/GEOMImpl/GEOMImpl_Types.hxx +++ b/src/GEOMImpl/GEOMImpl_Types.hxx @@ -399,13 +399,8 @@ #define TD_GET_IN_PLACE_BY_HISTORY 3 // Conformity operations -#define CONFORMITY_IS_VALID 2 -#define CONFORMITY_SELFINTERSECTED 3 -#define CONFORMITY_INTERFERENCE 4 -#define CONFORMITY_SMALL_EDGES 5 -#define CONFORMITY_DISTANT_SHAPES 6 -#define CONFORMITY_UPDATE_TOL 7 -#define CONFORMITY_CHECK_SHAPE 8 +#define CONFORMITY_UPDATE_TOL 2 +#define CONFORMITY_CHECK_SHAPE 3 // Plugins specified constants #define PLUGIN_NAME "Plugin Name" diff --git a/src/GEOM_I/GEOM_IMeasureOperations_i.cc b/src/GEOM_I/GEOM_IMeasureOperations_i.cc index 61efc2731..e3ed0659d 100644 --- a/src/GEOM_I/GEOM_IMeasureOperations_i.cc +++ b/src/GEOM_I/GEOM_IMeasureOperations_i.cc @@ -1261,13 +1261,13 @@ GEOM::GEOM_IMeasureOperations::SequenceOfPairOfShape* GEOM_IMeasureOperations_i: std::list aResults; ConvertToList(theResuts, aResults); - std::list aSelfInters = GetOperations()->SelfIntersected2D(aResults); + std::list aSelfInters = GetOperations()->SelfIntersected2D(aResults); if (!GetOperations()->IsDone() || aSelfInters.empty()) return aSeq._retn(); Standard_Integer aLength = aSelfInters.size(); aSeq->length(aLength); - std::list::iterator anIter(aSelfInters.begin()); + std::list::iterator anIter(aSelfInters.begin()); for (Standard_Integer i = 0; i < aLength; i++, ++anIter) { aSeq[i].first = GetObject(Handle(::GEOM_Object)::DownCast((*anIter).first)); @@ -1298,14 +1298,14 @@ GEOM::GEOM_IMeasureOperations::SequenceOfPairOfShape* GEOM_IMeasureOperations_i: std::list aResults; ConvertToList(theResuts, aResults); - std::list aSelfInterf = + std::list aSelfInterf = GetOperations()->InterferingSubshapes(aResults, theShapeType1, theShapeType2); if (!GetOperations()->IsDone() || aSelfInterf.empty()) return aSeq._retn(); Standard_Integer aLength = aSelfInterf.size(); aSeq->length(aLength); - std::list::iterator anIter(aSelfInterf.begin()); + std::list::iterator anIter(aSelfInterf.begin()); for (Standard_Integer i = 0; i < aLength; i++, ++anIter) { aSeq[i].first = GetObject(Handle(::GEOM_Object)::DownCast((*anIter).first)); @@ -1365,14 +1365,14 @@ GEOM::GEOM_IMeasureOperations::SequenceOfPairOfShape* GEOM_IMeasureOperations_i: ConvertToList(theResuts, aResults); // Perform patch face operation - std::list aDistantS = + std::list aDistantS = GetOperations()->DistantShapes(aResults, theShapeType, theSubShapeType, theTolerance); if (!GetOperations()->IsDone() || aDistantS.empty()) return aSeq._retn(); Standard_Integer aLength = aDistantS.size(); aSeq->length(aLength); - std::list::iterator anIter(aDistantS.begin()); + std::list::iterator anIter(aDistantS.begin()); for (Standard_Integer i = 0; i < aLength; i++, ++anIter) { aSeq[i].first = GetObject(Handle(::GEOM_Object)::DownCast((*anIter).first));