raises NoSuchObject from Standard; -- raised if shape has not been modified
---Purpose: Gives a modifieded subshape
+ IsProtectedFromModification(me; theS : Shape from TopoDS) returns Boolean;
+ ---Purpose: Indicates if theS is protected from modification.
+
Dump(me);
---Purpose: print the informations
myReShape : ReShape from BRepTools is protected;
myMergedEdges : MapOfShape from TopTools;
+
+ myProtectedFromModificationShapes : IndexedMapOfShape from TopTools;
end Sewing;
#include <BRep_Builder.hxx>
#include <BRep_Tool.hxx>
#include <BRepLib.hxx>
+#include <BRepLib_ToleranceRule.hxx>
#include <BRepTools_Quilt.hxx>
#include <BSplCLib.hxx>
#include <Extrema_ExtPC.hxx>
{
myReShape->Clear();
if (theShape.IsNull()) myShape.Nullify();
- else myShape = myReShape->Apply(theShape);
+ else
+ {
+ TopExp::MapShapes(theShape, myProtectedFromModificationShapes);
+ //
+ myShape = myReShape->Apply(theShape);
+ }
mySewedShape.Nullify();
// Nullify flags and counters
myNbShapes = myNbEdges = myNbVertices = 0;
void BRepBuilderAPI_Sewing::Add(const TopoDS_Shape& aShape)
{
if (aShape.IsNull()) return;
+ //
+ TopExp::MapShapes(aShape, myProtectedFromModificationShapes);
+ //
TopoDS_Shape oShape = myReShape->Apply(aShape);
myOldShapes.Add(aShape,oShape);
myNbShapes = myOldShapes.Extent();
mySewedShape.Nullify();
return;
}
- BRepLib::UpdateTolerances(mySewedShape);
+ BRepLib_ToleranceRule::SetProperTolerances(
+ mySewedShape, *this);
}
#if DEB
chr_total.Stop();
return myReShape->Apply(aShape);
}
+//=======================================================================
+//function : IsProtectedFromModification
+//purpose :
+//=======================================================================
+Standard_Boolean BRepBuilderAPI_Sewing::IsProtectedFromModification(
+ const TopoDS_Shape & theS) const
+{
+ return myProtectedFromModificationShapes.Contains(theS);
+}
+
//=======================================================================
//function : Dump
//purpose :
BarycCurve(me: in out)
returns Curve from Geom;
---Purpose: Generates a curve along the center of mass of the primitive.
+
+ IsProtectedFromModification(me; theS : Shape from TopoDS)
+ returns Boolean from Standard;
+ ---Purpose: Indicates if theS is protected from modification.
fields
myPbase : Shape from TopoDS;
myCurves : SequenceOfCurve from TColGeom;
myBCurve : Curve from Geom;
myStatusError : StatusError from BRepFeat;
+ myProtectedFromModificationShapes : IndexedMapOfShape from TopTools;
end MakePrism;
#include <BRep_Tool.hxx>
-#include <BRepLib.hxx>
+#include <BRepLib_ToleranceRule.hxx>
#include <BRepTools.hxx>
Standard_Boolean trc = BRepFeat_GettraceFEAT();
if (trc) cout << "BRepFeat_MakePrism::Init" << endl;
#endif
+ TopExp::MapShapes(Sbase, myProtectedFromModificationShapes);
+ TopExp::MapShapes(Pbase, myProtectedFromModificationShapes);
+ TopExp::MapShapes(Skface, myProtectedFromModificationShapes);
+ //
mySkface = Skface;
SketchFaceValid();
mySbase = Sbase;
Standard_Boolean trc = BRepFeat_GettraceFEAT();
if (trc) cout << "BRepFeat_MakePrism::Add(Edge,face)" << endl;
#endif
+ TopExp::MapShapes(E, myProtectedFromModificationShapes);
+ //
TopExp_Explorer exp;
for (exp.Init(mySbase,TopAbs_FACE);exp.More();exp.Next()) {
if (exp.Current().IsSame(F)) {
Standard_Boolean trc = BRepFeat_GettraceFEAT();
if (trc) cout << "BRepFeat_MakePrism::Perform(Until)" << endl;
#endif
+ TopExp::MapShapes(Until, myProtectedFromModificationShapes);
+ //
if (Until.IsNull()) {
Standard_ConstructionError::Raise();
}
}
}
}
- BRepLib::UpdateTolerances(myShape);
+ BRepLib_ToleranceRule::SetProperTolerances(myShape, *this);
/* // loop of control of descendance
TopExp_Explorer expr(mySbase, TopAbs_FACE);
Standard_Boolean trc = BRepFeat_GettraceFEAT();
if (trc) cout << "BRepFeat_MakePrism::Perform(From,Until)" << endl;
#endif
+ TopExp::MapShapes(From, myProtectedFromModificationShapes);
+ TopExp::MapShapes(Until, myProtectedFromModificationShapes);
+ //
if (From.IsNull() || Until.IsNull()) {
Standard_ConstructionError::Raise();
}
Standard_Boolean trc = BRepFeat_GettraceFEAT();
if (trc) cout << "BRepFeat_MakePrism::PerformFromEnd(From,Until)" << endl;
#endif
+ TopExp::MapShapes(Until, myProtectedFromModificationShapes);
+ //
if (Until.IsNull()) {
Standard_ConstructionError::Raise();
}
Standard_Boolean trc = BRepFeat_GettraceFEAT();
if (trc) cout << "BRepFeat_MakePrism::PerformUntilHeight(Until,Length)" << endl;
#endif
+ TopExp::MapShapes(Until, myProtectedFromModificationShapes);
+ //
if (Until.IsNull()) {
Perform(Length);
}
return ValRet;
}
-
-
-
-
-
+//=======================================================================
+//function : IsProtectedFromModification
+//purpose :
+//=======================================================================
+Standard_Boolean BRepFeat_MakePrism::IsProtectedFromModification(
+ const TopoDS_Shape & theS) const
+{
+ return myProtectedFromModificationShapes.Contains(theS);
+}
returns Boolean
is redefined virtual;
+ IsProtectedFromModification(me; theS : Shape from TopoDS)
+ returns Boolean from Standard;
+ ---Purpose: Indicates if theS is protected from modification.
+
-------------------------------
---Methods for quick simulation
-------------------------------
myBuilder : ChBuilder from ChFi3d;
myMap : MapOfShape from TopTools;
+ myProtectedFromModificationShapes : IndexedMapOfShape from TopTools;
end MakeChamfer;
#include <TopTools_ListIteratorOfListOfShape.hxx>
#include <ChFiDS_Spine.hxx>
#include <TopExp_Explorer.hxx>
-#include <BRepLib.hxx>
+#include <BRepLib_ToleranceRule.hxx>
+#include <TopExp.hxx>
//=======================================================================
BRepFilletAPI_MakeChamfer::BRepFilletAPI_MakeChamfer(const TopoDS_Shape &S):myBuilder(S)
{
+ TopExp::MapShapes(S, myProtectedFromModificationShapes);
}
if (myBuilder.IsDone()){
Done();
myShape = myBuilder.Shape();
- BRepLib::UpdateTolerances(myShape);
+ BRepLib_ToleranceRule::SetProperTolerances(myShape, *this);
//creation of the Map.
TopExp_Explorer ex;
return Standard_True;
}
+//=======================================================================
+//function : IsProtectedFromModification
+//purpose :
+//=======================================================================
+Standard_Boolean BRepFilletAPI_MakeChamfer::IsProtectedFromModification(
+ const TopoDS_Shape & theS) const
+{
+ return myProtectedFromModificationShapes.Contains(theS);
+}
+
//=======================================================================
//function : Simulate
//purpose :
returns Boolean
is redefined virtual;
+ IsProtectedFromModification(me; theS : Shape from TopoDS)
+ returns Boolean from Standard;
+ ---Purpose: Indicates if theS is protected from modification.
+
-------------------------------------------
-- Methods usefull for BRepCtx utilities --
-------------------------------------------
myBuilder : FilBuilder from ChFi3d;
myMap : MapOfShape from TopTools;
+ myProtectedFromModificationShapes : IndexedMapOfShape from TopTools;
end MakeFillet;
#include <Law_Linear.hxx>
#include <Law_S.hxx>
#include <Law_Interpol.hxx>
-#include <BRepLib.hxx>
+#include <BRepLib_ToleranceRule.hxx>
+#include <TopExp.hxx>
//=======================================================================
//function : BRepFilletAPI_MakeFillet
const ChFi3d_FilletShape FShape):
myBuilder(S,FShape)
{
+ TopExp::MapShapes(S, myProtectedFromModificationShapes);
}
//=======================================================================
if(myBuilder.IsDone()) {
Done();
myShape = myBuilder.Shape();
- BRepLib::UpdateTolerances(myShape);
+ BRepLib_ToleranceRule::SetProperTolerances(myShape, *this);
// creation of the Map.
TopExp_Explorer ex;
return Standard_True;
}
+//=======================================================================
+//function : IsProtectedFromModification
+//purpose :
+//=======================================================================
+Standard_Boolean BRepFilletAPI_MakeFillet::IsProtectedFromModification(
+ const TopoDS_Shape & theS) const
+{
+ return myProtectedFromModificationShapes.Contains(theS);
+}
+
//=======================================================================
//function : NbFaultyContours
//purpose :
returns Shape from TopoDS;
+ IsProtectedFromModification(me; theS : Shape from TopoDS)
+ ---Purpose: Indicates if theS is protected from modification.
+ returns Boolean from Standard;
+
fields
myPipe : Pipe from BRepFill;
+ myProtectedFromModificationShapes : IndexedMapOfShape from TopTools;
+
end MakePipe;
#include <BRepOffsetAPI_MakePipe.ixx>
-#include <BRepLib.hxx>
+#include <BRepLib_ToleranceRule.hxx>
#include <TopExp_Explorer.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Vertex.hxx>
#include <TopoDS.hxx>
#include <TopAbs_ShapeEnum.hxx>
+#include <TopExp.hxx>
//=======================================================================
//function : BRepOffsetAPI_MakePipe
const TopoDS_Shape& Profile)
: myPipe(Spine, Profile)
{
+ TopExp::MapShapes(Profile, myProtectedFromModificationShapes);
+ //
Build();
}
void BRepOffsetAPI_MakePipe::Build()
{
myShape = myPipe.Shape();
- BRepLib::UpdateTolerances(myShape);
+ BRepLib_ToleranceRule::SetProperTolerances(myShape, *this);
Done();
}
return bid;
}
+//=======================================================================
+//function : IsProtectedFromModification
+//purpose :
+//=======================================================================
+Standard_Boolean BRepOffsetAPI_MakePipe::IsProtectedFromModification(
+ const TopoDS_Shape & theS) const
+{
+ return myProtectedFromModificationShapes.Contains(theS);
+}
returns ListOfShape from TopTools
is redefined;
+ IsProtectedFromModification(me; theS : Shape)
+ ---Purpose: Indicates if theS is protected from modification.
+ returns Boolean;
+
fields
myPipe : PipeShell from BRepFill;
+ myProtectedFromModificationShapes : IndexedMapOfShape from TopTools;
+
end MakePipeShell;
#include <BRepOffsetAPI_MakePipeShell.ixx>
-#include <BRepLib.hxx>
+#include <BRepLib_ToleranceRule.hxx>
#include <GeomFill_PipeError.hxx>
#include <Standard_NotImplemented.hxx>
#include <StdFail_NotDone.hxx>
+#include <TopExp.hxx>
//=======================================================================
//function :
const Standard_Boolean WithContact,
const Standard_Boolean WithCorrection)
{
+ TopExp::MapShapes(Profile, myProtectedFromModificationShapes);
myPipe->Add(Profile, WithContact, WithCorrection);
}
const Standard_Boolean WithContact,
const Standard_Boolean WithCorrection)
{
+ TopExp::MapShapes(Profile, myProtectedFromModificationShapes);
myPipe->Add(Profile, Location, WithContact, WithCorrection);
}
const Standard_Boolean WithContact,
const Standard_Boolean WithCorrection)
{
+ TopExp::MapShapes(Profile, myProtectedFromModificationShapes);
myPipe->SetLaw(Profile, L, WithContact, WithCorrection);
}
const Standard_Boolean WithContact,
const Standard_Boolean WithCorrection)
{
+ TopExp::MapShapes(Profile, myProtectedFromModificationShapes);
myPipe->SetLaw(Profile, L, Location, WithContact, WithCorrection);
}
Ok = myPipe->Build();
if (Ok) {
myShape = myPipe->Shape();
- BRepLib::UpdateTolerances(myShape);
+ BRepLib_ToleranceRule::SetProperTolerances(myShape, *this);
Done();
}
else NotDone();
return myGenerated;
}
+//=======================================================================
+//function : IsProtectedFromModification
+//purpose :
+//=======================================================================
+Standard_Boolean BRepOffsetAPI_MakePipeShell::IsProtectedFromModification(
+ const TopoDS_Shape & theS) const
+{
+ return myProtectedFromModificationShapes.Contains(theS);
+}
#include <BRepOffsetAPI_NormalProjection.ixx>
-#include <BRepLib.hxx>
+#include <BRepLib_ToleranceRule.hxx>
BRepOffsetAPI_NormalProjection::BRepOffsetAPI_NormalProjection()
{
{
myNormalProjector.Build();
myShape = myNormalProjector.Projection();
- BRepLib::UpdateTolerances(myShape);
+ BRepLib_ToleranceRule::SetProperTolerances(myShape);
Done();
}
#include <TopAbs_ShapeEnum.hxx>
#include <BRepTools.hxx>
#include <BRep_Builder.hxx>
-#include <BRepLib.hxx>
+#include <BRepLib_ToleranceRule.hxx>
#include <ShapeFix.hxx>
#include <ShapeBuild_ReShape.hxx>
Standard_Boolean ShapeFix_Shape::Perform(const Handle(Message_ProgressIndicator)& theProgress)
{
Standard_Boolean aR = PerformR(theProgress);
- BRepLib::UpdateTolerances(myResult);
+ BRepLib_ToleranceRule::SetProperTolerances(myResult);
return aR;
}
#include <ShapeUpgrade_WireDivide.hxx>
#include <Standard_ErrorHandler.hxx>
#include <Standard_Failure.hxx>
-#include <BRepLib.hxx>
+#include <BRepLib_ToleranceRule.hxx>
//=======================================================================
//function : ShapeUpgrade_ShapeDivide
if ( Status ( ShapeExtend_DONE ) ) {
myResult = myContext->Apply ( C, TopAbs_SHAPE );
myContext->Replace ( myShape, myResult );
- BRepLib::UpdateTolerances(myResult);
+ BRepLib_ToleranceRule::SetProperTolerances(myResult);
return Standard_True;
}
myResult = myShape;
}
}
myResult = myContext->Apply ( myShape, TopAbs_SHAPE );
- BRepLib::UpdateTolerances(myResult);
+ BRepLib_ToleranceRule::SetProperTolerances(myResult);
return ! myResult.IsSame ( myShape );
}
restore [locate_data_file CFI_2_o12ffq.rle] s
+updatetolerance s
explode s e
mkevol result s
## ====================================
restore [locate_data_file CTO900_pro12880c.rle] a
+updatetolerance a
explode a e
blend result a 5 a_89
## ====================================
restore [locate_data_file CFI_pro12894.rle] a
+updatetolerance a
explode a e
blend result a 5 a_89
## ====================================
restore [locate_data_file CFI_ger60206.rle] a
+updatetolerance a
explode a e
mkevol result a
updatevol a_21 0 0.5 1 1
## ====================================
restore [locate_data_file CFI_pro8792.rle] a
+updatetolerance a
explode a e
mkevol result a
updatevol a_20 0 15 0.5 20 1 5
## ====================================
restore [locate_data_file CFI_pro10631.rle] a
+updatetolerance a
explode a e
blend result a 5 a_45
## ====================================
restore [locate_data_file CFI_pro10522.rle] a
+updatetolerance a
explode a e
blend result a 2 a_82
## ====================================
restore [locate_data_file CFI_pro10117.rle] a
+updatetolerance a
explode a e
blend result a 2 a_128 1 a_10
restore [locate_data_file CCH_propag.rle] a
+updatetolerance a
restore [locate_data_file CCH_r2.rle] a
+updatetolerance a