BRepLib::UpdateTolerances.
BRepBuilderAPI_MakeShape::EnsureToleranceRule was removed.
#include <BOP_SolidSolidHistoryCollector.hxx>
#include <BOP_SectionHistoryCollector.hxx>
#include <BRepLib_FuseEdges.hxx>
+#include <BRepLib.hxx>
#include <TopExp.hxx>
#include <TopTools_MapOfShape.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
myErrorStatus=0;
myBuilderCanWork=Standard_True;
myShape=myBuilder->Result();
- EnsureToleranceRule(myShape);
+ BRepLib::UpdateTolerances(myShape);
Done();
}
else {
myErrorStatus=0;
myBuilderCanWork=Standard_True;
myShape=myBuilder->Result();
- EnsureToleranceRule(myShape);
+ BRepLib::UpdateTolerances(myShape);
Done();
}
else {
is virtual;
---Purpose: Returns true if the shape S has been deleted.
- EnsureToleranceRule (myclass; theS : Shape from TopoDS);
- ---Purpose: Fixes all tolerances of shape theS and it's subshapes by the tolerance
- -- rule: vertex tolerance >= edge tolerance >= face tolerance.
- -- Edge or vertex tolerance which does not satisfy the tolerance rule will
- -- be increased.
fields
{
return Standard_False;
}
-
-
-
-//=======================================================================
-//function : EnsureToleranceRule
-//purpose :
-//=======================================================================
-
-void BRepBuilderAPI_MakeShape::EnsureToleranceRule(const TopoDS_Shape & theS)
-{
- if (theS.IsNull())
- {
- return;
- }
- //
- for (TopExp_Explorer aFE(theS, TopAbs_FACE); aFE.More(); aFE.Next())
- {
- TopoDS_Face aF = TopoDS::Face(aFE.Current());
- Standard_Real aFT = ((Handle_BRep_TFace &)aF.TShape())->Tolerance();
- //
- for (TopExp_Explorer anEE(aF, TopAbs_EDGE); anEE.More(); anEE.Next())
- {
- TopoDS_Edge anES = TopoDS::Edge(anEE.Current());
- Handle_BRep_TEdge & anEG = (Handle_BRep_TEdge &)anES.TShape();
- Standard_Real anET = anEG->Tolerance();
- if (anET < aFT)
- {
- anET = aFT;
- anEG->Tolerance(anET);
- }
- for (TopExp_Explorer aVE(anES, TopAbs_VERTEX); aVE.More(); aVE.Next())
- {
- TopoDS_Vertex aVS = TopoDS::Vertex(aVE.Current());
- Handle_BRep_TVertex & aVG = (Handle_BRep_TVertex &)aVS.TShape();
- aVG->UpdateTolerance(anET);
- }
- }
- //
- for (TopExp_Explorer aVE(aF, TopAbs_VERTEX, TopAbs_EDGE);
- aVE.More(); aVE.Next())
- {
- TopoDS_Vertex aVS = TopoDS::Vertex(aVE.Current());
- Handle_BRep_TVertex & aVG = (Handle_BRep_TVertex &)aVS.TShape();
- aVG->UpdateTolerance(aFT);
- }
- }
- //
- for (TopExp_Explorer anEE(theS, TopAbs_EDGE, TopAbs_FACE);
- anEE.More(); anEE.Next())
- {
- TopoDS_Edge anES = TopoDS::Edge(anEE.Current());
- Handle_BRep_TEdge & anEG = (Handle_BRep_TEdge &)anES.TShape();
- Standard_Real anET = anEG->Tolerance();
- for (TopExp_Explorer aVE(anES, TopAbs_VERTEX); aVE.More(); aVE.Next())
- {
- TopoDS_Vertex aVS = TopoDS::Vertex(aVE.Current());
- Handle_BRep_TVertex & aVG = (Handle_BRep_TVertex &)aVS.TShape();
- aVG->UpdateTolerance(anET);
- }
- }
-}
-
-
#include <BRepBuilderAPI_VertexInspector.hxx>
#include <BRepBuilderAPI_CellFilter.hxx>
#include <BRepBuilderAPI_BndBoxTreeSelector.hxx>
-#include <BRepBuilderAPI_MakeShape.hxx>
#include <NCollection_UBTreeFiller.hxx>
static void SortBox (const Handle(Bnd_HArray1OfBox) hSetBoxes,
mySewedShape.Nullify();
return;
}
- BRepBuilderAPI_MakeShape::EnsureToleranceRule(mySewedShape);
+ BRepLib::UpdateTolerances(mySewedShape);
}
#if DEB
chr_total.Stop();
#include <BRep_Tool.hxx>
+#include <BRepLib.hxx>
+
#include <BRepTools.hxx>
}
}
}
- EnsureToleranceRule(myShape);
+ BRepLib::UpdateTolerances(myShape);
/* // loop of control of descendance
TopExp_Explorer expr(mySbase, TopAbs_FACE);
#include <TopTools_ListIteratorOfListOfShape.hxx>
#include <ChFiDS_Spine.hxx>
#include <TopExp_Explorer.hxx>
+#include <BRepLib.hxx>
if (myBuilder.IsDone()){
Done();
myShape = myBuilder.Shape();
- EnsureToleranceRule(myShape);
+ BRepLib::UpdateTolerances(myShape);
//creation of the Map.
TopExp_Explorer ex;
#include <Law_Linear.hxx>
#include <Law_S.hxx>
#include <Law_Interpol.hxx>
+#include <BRepLib.hxx>
//=======================================================================
//function : BRepFilletAPI_MakeFillet
if(myBuilder.IsDone()) {
Done();
myShape = myBuilder.Shape();
- EnsureToleranceRule(myShape);
+ BRepLib::UpdateTolerances(myShape);
// creation of the Map.
TopExp_Explorer ex;
#include <BRepOffsetAPI_MakePipe.ixx>
+#include <BRepLib.hxx>
#include <TopExp_Explorer.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Edge.hxx>
void BRepOffsetAPI_MakePipe::Build()
{
myShape = myPipe.Shape();
- BRepBuilderAPI_MakeShape::EnsureToleranceRule(myShape);
+ BRepLib::UpdateTolerances(myShape);
Done();
}
#include <BRepOffsetAPI_MakePipeShell.ixx>
+#include <BRepLib.hxx>
#include <GeomFill_PipeError.hxx>
#include <Standard_NotImplemented.hxx>
#include <StdFail_NotDone.hxx>
Ok = myPipe->Build();
if (Ok) {
myShape = myPipe->Shape();
- EnsureToleranceRule(myShape);
+ BRepLib::UpdateTolerances(myShape);
Done();
}
else NotDone();
#include <BRepOffsetAPI_NormalProjection.ixx>
+#include <BRepLib.hxx>
BRepOffsetAPI_NormalProjection::BRepOffsetAPI_NormalProjection()
{
{
myNormalProjector.Build();
myShape = myNormalProjector.Projection();
- BRepBuilderAPI_MakeShape::EnsureToleranceRule(myShape);
+ BRepLib::UpdateTolerances(myShape);
Done();
}
}
//
TopoDS_Shape aRes = BRepBuilderAPI_Copy(aS);
- BRepBuilderAPI_MakeShape::EnsureToleranceRule(aRes);
+ BRepLib::UpdateTolerances(aRes);
//
DBRep::Set(theAs[1], aRes);
return 0;
#include <TopAbs_ShapeEnum.hxx>
#include <BRepTools.hxx>
#include <BRep_Builder.hxx>
-#include <BRepBuilderAPI_MakeShape.hxx>
+#include <BRepLib.hxx>
#include <ShapeFix.hxx>
#include <ShapeBuild_ReShape.hxx>
Standard_Boolean ShapeFix_Shape::Perform(const Handle(Message_ProgressIndicator)& theProgress)
{
Standard_Boolean aR = PerformR(theProgress);
- BRepBuilderAPI_MakeShape::EnsureToleranceRule(myResult);
+ BRepLib::UpdateTolerances(myResult);
return aR;
}
#include <ShapeUpgrade_WireDivide.hxx>
#include <Standard_ErrorHandler.hxx>
#include <Standard_Failure.hxx>
-#include <BRepBuilderAPI_MakeShape.hxx>
+#include <BRepLib.hxx>
//=======================================================================
//function : ShapeUpgrade_ShapeDivide
if ( Status ( ShapeExtend_DONE ) ) {
myResult = myContext->Apply ( C, TopAbs_SHAPE );
myContext->Replace ( myShape, myResult );
- BRepBuilderAPI_MakeShape::EnsureToleranceRule(myResult);
+ BRepLib::UpdateTolerances(myResult);
return Standard_True;
}
myResult = myShape;
}
}
myResult = myContext->Apply ( myShape, TopAbs_SHAPE );
- BRepBuilderAPI_MakeShape::EnsureToleranceRule(myResult);
+ BRepLib::UpdateTolerances(myResult);
return ! myResult.IsSame ( myShape );
}