]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
Removed unused code
authorAlexey SOZINOV <alexey.sozinov@opencascade.com>
Mon, 15 Aug 2022 14:04:00 +0000 (17:04 +0300)
committerjfa <jfa@opencascade.com>
Mon, 26 Sep 2022 10:49:46 +0000 (13:49 +0300)
src/GEOMImpl/GEOMImpl_ConformityDriver.cxx
src/GEOMImpl/GEOMImpl_ConformityDriver.hxx
src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx
src/GEOMImpl/GEOMImpl_Types.hxx
src/GEOM_I/GEOM_IMeasureOperations_i.cc

index cd8d9d84b91e477836c996c17f860a01a13be717..003e204574d890e474e5b20cf33a53c46479e5f4 100644 (file)
 
 namespace
 {
-  //=======================================================================
-  //function : GetPairsOfFaultyShapes
-  //purpose  :
-  //=======================================================================
-  NCollection_List<std::pair<TopoDS_Shape, TopoDS_Shape>> GetPairsOfFaultyShapes(
-                                                          const BOPAlgo_ArgumentAnalyzer& theAnalyzer,
-                                                          const BOPAlgo_CheckStatus       theErrorStatus)
-  {
-    NCollection_List<std::pair<TopoDS_Shape, TopoDS_Shape>> 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<std::pair<TopoDS_Shape, TopoDS_Shape>> 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<std::pair<TopoDS_Shape, TopoDS_Shape>> 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<std::pair<TopoDS_Shape, TopoDS_Shape>>();
-}
-
-//=======================================================================
-//function : distantShapes
-//purpose  : TODO: Not implemented! Wait for required functionality!
-//=======================================================================
-NCollection_List<std::pair<TopoDS_Shape, TopoDS_Shape>> GEOMImpl_ConformityDriver::distantShapes(
-  const TopoDS_Shape& theShape,
-  const TopAbs_ShapeEnum theShapeType,
-  Standard_Real          theTolerance) const
-{
-  NCollection_List<std::pair<TopoDS_Shape, TopoDS_Shape>> aDistShapes;
-  NCollection_List<std::pair<TopoDS_Shape, TopoDS_Shape>> 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<std::pair<TopoDS_Shape, TopoDS_Shape>> GEOMImpl_ConformityDriver::distantShapes
-  (const TopoDS_Shape& theShape,
-   Standard_Real       theTolerance) const
-{
-  NCollection_List<std::pair<TopoDS_Shape, TopoDS_Shape>> aDistShapes;
-  NCollection_List<std::pair<TopoDS_Shape, TopoDS_Shape>> 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<std::pair<TopoDS_Shape, TopoDS_Shape>>& theFailedShape,
                                            Handle(TColStd_HArray1OfInteger)& theTypesOfCheck) const
index 89aafaf93047dfeb32ea782f01353215860d7245..40734c38435166913788b513682fd2ad72fadb11 100644 (file)
@@ -42,19 +42,6 @@ public:
   Standard_EXPORT virtual void             Validate(Handle(TFunction_Logbook)&) const {}
 
 private:
-
-  Standard_EXPORT NCollection_List<std::pair<TopoDS_Shape, TopoDS_Shape>> distantShapes(const TopoDS_Shape& theShape,
-                                                                                        const TopAbs_ShapeEnum theShapeType,
-                                                                                        const TopAbs_ShapeEnum theSubShapeType,
-                                                                                        Standard_Real          theTolerance = -1.) const;
-
-  Standard_EXPORT NCollection_List<std::pair<TopoDS_Shape, TopoDS_Shape>> distantShapes(const TopoDS_Shape& theShape,
-                                                                                        const TopAbs_ShapeEnum theShapeType,
-                                                                                        Standard_Real          theTolerance = -1.) const;
-
-  Standard_EXPORT NCollection_List<std::pair<TopoDS_Shape, TopoDS_Shape>> distantShapes(const TopoDS_Shape& theShape,
-                                                                                        Standard_Real          theTolerance = -1.) const;
-
   Standard_EXPORT void checkShape(const TopoDS_Shape& theShape,
                                   NCollection_List<std::pair<TopoDS_Shape, TopoDS_Shape>>& theFailedShape,
                                   Handle(TColStd_HArray1OfInteger)& theTypesOfCheck) const;
index d2b5394e072be63f9e0b593a11094c8169ab1caf..1c8c7add37667c3ecbc3179336a1e8b890cb29c8 100644 (file)
@@ -2805,14 +2805,6 @@ std::list<GEOMImpl_IMeasureOperations::CoupleOfObjects>
   MESSAGE("GEOMImpl_IMeasureOperations::selfIntersected2D");
 
   std::list<GEOMImpl_IMeasureOperations::CoupleOfObjects> 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;
index 0f79557668d0566557c860f2e43377295fc5718d..fec26368a732588a3dff19d0357b939420ab84a9 100644 (file)
 #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"
index 61efc273153eb025c5255062aa6b0d33a5a32e1b..e3ed0659d664a5837d40aac34bfa97b44b5963a7 100644 (file)
@@ -1261,13 +1261,13 @@ GEOM::GEOM_IMeasureOperations::SequenceOfPairOfShape* GEOM_IMeasureOperations_i:
   std::list<GEOMImpl_IMeasureOperations::FailedChecks> aResults;
   ConvertToList(theResuts, aResults);
 
-  std::list<GEOMImpl_IMeasureOperations::FailedShapes> aSelfInters = GetOperations()->SelfIntersected2D(aResults);
+  std::list<GEOMImpl_IMeasureOperations::CoupleOfObjects> aSelfInters = GetOperations()->SelfIntersected2D(aResults);
   if (!GetOperations()->IsDone() || aSelfInters.empty())
     return aSeq._retn();
 
   Standard_Integer aLength = aSelfInters.size();
   aSeq->length(aLength);
-  std::list<GEOMImpl_IMeasureOperations::FailedShapes>::iterator anIter(aSelfInters.begin());
+  std::list<GEOMImpl_IMeasureOperations::CoupleOfObjects>::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<GEOMImpl_IMeasureOperations::FailedChecks> aResults;
   ConvertToList(theResuts, aResults);
 
-  std::list<GEOMImpl_IMeasureOperations::FailedShapes> aSelfInterf =
+  std::list<GEOMImpl_IMeasureOperations::CoupleOfObjects> aSelfInterf =
     GetOperations()->InterferingSubshapes(aResults, theShapeType1, theShapeType2);
   if (!GetOperations()->IsDone() || aSelfInterf.empty())
     return aSeq._retn();
 
   Standard_Integer aLength = aSelfInterf.size();
   aSeq->length(aLength);
-  std::list<GEOMImpl_IMeasureOperations::FailedShapes>::iterator anIter(aSelfInterf.begin());
+  std::list<GEOMImpl_IMeasureOperations::CoupleOfObjects>::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<GEOMImpl_IMeasureOperations::FailedShapes> aDistantS =
+  std::list<GEOMImpl_IMeasureOperations::CoupleOfObjects> 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<GEOMImpl_IMeasureOperations::FailedShapes>::iterator anIter(aDistantS.begin());
+  std::list<GEOMImpl_IMeasureOperations::CoupleOfObjects>::iterator anIter(aDistantS.begin());
   for (Standard_Integer i = 0; i < aLength; i++, ++anIter)
   {
     aSeq[i].first = GetObject(Handle(::GEOM_Object)::DownCast((*anIter).first));