mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +03:00
Tolerance post Build (Perform) fix was changed for:
- BRepBuilderAPI_Sewing, - BRepFeat_MakePrism, - BRepFilletAPI_MakeChamfer, - BRepFilletAPI_MakeFillet, - BRepOffsetAPI_MakePipe, - BRepOffsetAPI_MakePipeShell so that input shapes remain unchanged by the fix. Tolerance post Build (Perform) fix was slightly changed for: - BRepOffsetAPI_NormalProjection, - ShapeFix_Shape, - ShapeUpgrade_ShapeDivide. Correction of tolerances in input shapes was made for tests: - blend buildevol F9, - complex B6, - B8, - D5, - E2, - E4, - E6, - E9, - sewing tol_0_01 G3, - G4.
This commit is contained in:
parent
58ac0479d3
commit
9f066175b1
@ -212,6 +212,9 @@ is
|
|||||||
raises NoSuchObject from Standard; -- raised if shape has not been modified
|
raises NoSuchObject from Standard; -- raised if shape has not been modified
|
||||||
---Purpose: Gives a modifieded subshape
|
---Purpose: Gives a modifieded subshape
|
||||||
|
|
||||||
|
IsProtectedFromModification(me; theS : Shape from TopoDS) returns Boolean;
|
||||||
|
---Purpose: Indicates if theS is protected from modification.
|
||||||
|
|
||||||
Dump(me);
|
Dump(me);
|
||||||
---Purpose: print the informations
|
---Purpose: print the informations
|
||||||
|
|
||||||
@ -554,4 +557,6 @@ fields
|
|||||||
|
|
||||||
myReShape : ReShape from BRepTools is protected;
|
myReShape : ReShape from BRepTools is protected;
|
||||||
myMergedEdges : MapOfShape from TopTools;
|
myMergedEdges : MapOfShape from TopTools;
|
||||||
|
|
||||||
|
myProtectedFromModificationShapes : IndexedMapOfShape from TopTools;
|
||||||
end Sewing;
|
end Sewing;
|
||||||
|
@ -55,6 +55,7 @@
|
|||||||
#include <BRep_Builder.hxx>
|
#include <BRep_Builder.hxx>
|
||||||
#include <BRep_Tool.hxx>
|
#include <BRep_Tool.hxx>
|
||||||
#include <BRepLib.hxx>
|
#include <BRepLib.hxx>
|
||||||
|
#include <BRepLib_ToleranceRule.hxx>
|
||||||
#include <BRepTools_Quilt.hxx>
|
#include <BRepTools_Quilt.hxx>
|
||||||
#include <BSplCLib.hxx>
|
#include <BSplCLib.hxx>
|
||||||
#include <Extrema_ExtPC.hxx>
|
#include <Extrema_ExtPC.hxx>
|
||||||
@ -1736,7 +1737,12 @@ void BRepBuilderAPI_Sewing::Load(const TopoDS_Shape& theShape)
|
|||||||
{
|
{
|
||||||
myReShape->Clear();
|
myReShape->Clear();
|
||||||
if (theShape.IsNull()) myShape.Nullify();
|
if (theShape.IsNull()) myShape.Nullify();
|
||||||
else myShape = myReShape->Apply(theShape);
|
else
|
||||||
|
{
|
||||||
|
TopExp::MapShapes(theShape, myProtectedFromModificationShapes);
|
||||||
|
//
|
||||||
|
myShape = myReShape->Apply(theShape);
|
||||||
|
}
|
||||||
mySewedShape.Nullify();
|
mySewedShape.Nullify();
|
||||||
// Nullify flags and counters
|
// Nullify flags and counters
|
||||||
myNbShapes = myNbEdges = myNbVertices = 0;
|
myNbShapes = myNbEdges = myNbVertices = 0;
|
||||||
@ -1766,6 +1772,9 @@ void BRepBuilderAPI_Sewing::Load(const TopoDS_Shape& theShape)
|
|||||||
void BRepBuilderAPI_Sewing::Add(const TopoDS_Shape& aShape)
|
void BRepBuilderAPI_Sewing::Add(const TopoDS_Shape& aShape)
|
||||||
{
|
{
|
||||||
if (aShape.IsNull()) return;
|
if (aShape.IsNull()) return;
|
||||||
|
//
|
||||||
|
TopExp::MapShapes(aShape, myProtectedFromModificationShapes);
|
||||||
|
//
|
||||||
TopoDS_Shape oShape = myReShape->Apply(aShape);
|
TopoDS_Shape oShape = myReShape->Apply(aShape);
|
||||||
myOldShapes.Add(aShape,oShape);
|
myOldShapes.Add(aShape,oShape);
|
||||||
myNbShapes = myOldShapes.Extent();
|
myNbShapes = myOldShapes.Extent();
|
||||||
@ -1909,7 +1918,8 @@ void BRepBuilderAPI_Sewing::Perform(const Handle(Message_ProgressIndicator)& the
|
|||||||
mySewedShape.Nullify();
|
mySewedShape.Nullify();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
BRepLib::UpdateTolerances(mySewedShape);
|
BRepLib_ToleranceRule::SetProperTolerances(
|
||||||
|
mySewedShape, *this);
|
||||||
}
|
}
|
||||||
#if DEB
|
#if DEB
|
||||||
chr_total.Stop();
|
chr_total.Stop();
|
||||||
@ -2148,6 +2158,16 @@ TopoDS_Shape BRepBuilderAPI_Sewing::ModifiedSubShape(const TopoDS_Shape& aShape)
|
|||||||
return myReShape->Apply(aShape);
|
return myReShape->Apply(aShape);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : IsProtectedFromModification
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
Standard_Boolean BRepBuilderAPI_Sewing::IsProtectedFromModification(
|
||||||
|
const TopoDS_Shape & theS) const
|
||||||
|
{
|
||||||
|
return myProtectedFromModificationShapes.Contains(theS);
|
||||||
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : Dump
|
//function : Dump
|
||||||
//purpose :
|
//purpose :
|
||||||
|
@ -168,6 +168,10 @@ is
|
|||||||
BarycCurve(me: in out)
|
BarycCurve(me: in out)
|
||||||
returns Curve from Geom;
|
returns Curve from Geom;
|
||||||
---Purpose: Generates a curve along the center of mass of the primitive.
|
---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
|
fields
|
||||||
|
|
||||||
myPbase : Shape from TopoDS;
|
myPbase : Shape from TopoDS;
|
||||||
@ -176,5 +180,6 @@ fields
|
|||||||
myCurves : SequenceOfCurve from TColGeom;
|
myCurves : SequenceOfCurve from TColGeom;
|
||||||
myBCurve : Curve from Geom;
|
myBCurve : Curve from Geom;
|
||||||
myStatusError : StatusError from BRepFeat;
|
myStatusError : StatusError from BRepFeat;
|
||||||
|
myProtectedFromModificationShapes : IndexedMapOfShape from TopTools;
|
||||||
|
|
||||||
end MakePrism;
|
end MakePrism;
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
|
|
||||||
#include <BRep_Tool.hxx>
|
#include <BRep_Tool.hxx>
|
||||||
|
|
||||||
#include <BRepLib.hxx>
|
#include <BRepLib_ToleranceRule.hxx>
|
||||||
|
|
||||||
#include <BRepTools.hxx>
|
#include <BRepTools.hxx>
|
||||||
|
|
||||||
@ -141,6 +141,10 @@ void BRepFeat_MakePrism::Init(const TopoDS_Shape& Sbase,
|
|||||||
Standard_Boolean trc = BRepFeat_GettraceFEAT();
|
Standard_Boolean trc = BRepFeat_GettraceFEAT();
|
||||||
if (trc) cout << "BRepFeat_MakePrism::Init" << endl;
|
if (trc) cout << "BRepFeat_MakePrism::Init" << endl;
|
||||||
#endif
|
#endif
|
||||||
|
TopExp::MapShapes(Sbase, myProtectedFromModificationShapes);
|
||||||
|
TopExp::MapShapes(Pbase, myProtectedFromModificationShapes);
|
||||||
|
TopExp::MapShapes(Skface, myProtectedFromModificationShapes);
|
||||||
|
//
|
||||||
mySkface = Skface;
|
mySkface = Skface;
|
||||||
SketchFaceValid();
|
SketchFaceValid();
|
||||||
mySbase = Sbase;
|
mySbase = Sbase;
|
||||||
@ -206,6 +210,8 @@ void BRepFeat_MakePrism::Add(const TopoDS_Edge& E,
|
|||||||
Standard_Boolean trc = BRepFeat_GettraceFEAT();
|
Standard_Boolean trc = BRepFeat_GettraceFEAT();
|
||||||
if (trc) cout << "BRepFeat_MakePrism::Add(Edge,face)" << endl;
|
if (trc) cout << "BRepFeat_MakePrism::Add(Edge,face)" << endl;
|
||||||
#endif
|
#endif
|
||||||
|
TopExp::MapShapes(E, myProtectedFromModificationShapes);
|
||||||
|
//
|
||||||
TopExp_Explorer exp;
|
TopExp_Explorer exp;
|
||||||
for (exp.Init(mySbase,TopAbs_FACE);exp.More();exp.Next()) {
|
for (exp.Init(mySbase,TopAbs_FACE);exp.More();exp.Next()) {
|
||||||
if (exp.Current().IsSame(F)) {
|
if (exp.Current().IsSame(F)) {
|
||||||
@ -366,6 +372,8 @@ void BRepFeat_MakePrism::Perform(const TopoDS_Shape& Until)
|
|||||||
Standard_Boolean trc = BRepFeat_GettraceFEAT();
|
Standard_Boolean trc = BRepFeat_GettraceFEAT();
|
||||||
if (trc) cout << "BRepFeat_MakePrism::Perform(Until)" << endl;
|
if (trc) cout << "BRepFeat_MakePrism::Perform(Until)" << endl;
|
||||||
#endif
|
#endif
|
||||||
|
TopExp::MapShapes(Until, myProtectedFromModificationShapes);
|
||||||
|
//
|
||||||
if (Until.IsNull()) {
|
if (Until.IsNull()) {
|
||||||
Standard_ConstructionError::Raise();
|
Standard_ConstructionError::Raise();
|
||||||
}
|
}
|
||||||
@ -465,7 +473,7 @@ void BRepFeat_MakePrism::Perform(const TopoDS_Shape& Until)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
BRepLib::UpdateTolerances(myShape);
|
BRepLib_ToleranceRule::SetProperTolerances(myShape, *this);
|
||||||
/* // loop of control of descendance
|
/* // loop of control of descendance
|
||||||
|
|
||||||
TopExp_Explorer expr(mySbase, TopAbs_FACE);
|
TopExp_Explorer expr(mySbase, TopAbs_FACE);
|
||||||
@ -517,6 +525,9 @@ void BRepFeat_MakePrism::Perform(const TopoDS_Shape& From,
|
|||||||
Standard_Boolean trc = BRepFeat_GettraceFEAT();
|
Standard_Boolean trc = BRepFeat_GettraceFEAT();
|
||||||
if (trc) cout << "BRepFeat_MakePrism::Perform(From,Until)" << endl;
|
if (trc) cout << "BRepFeat_MakePrism::Perform(From,Until)" << endl;
|
||||||
#endif
|
#endif
|
||||||
|
TopExp::MapShapes(From, myProtectedFromModificationShapes);
|
||||||
|
TopExp::MapShapes(Until, myProtectedFromModificationShapes);
|
||||||
|
//
|
||||||
if (From.IsNull() || Until.IsNull()) {
|
if (From.IsNull() || Until.IsNull()) {
|
||||||
Standard_ConstructionError::Raise();
|
Standard_ConstructionError::Raise();
|
||||||
}
|
}
|
||||||
@ -788,6 +799,8 @@ void BRepFeat_MakePrism::PerformFromEnd(const TopoDS_Shape& Until)
|
|||||||
Standard_Boolean trc = BRepFeat_GettraceFEAT();
|
Standard_Boolean trc = BRepFeat_GettraceFEAT();
|
||||||
if (trc) cout << "BRepFeat_MakePrism::PerformFromEnd(From,Until)" << endl;
|
if (trc) cout << "BRepFeat_MakePrism::PerformFromEnd(From,Until)" << endl;
|
||||||
#endif
|
#endif
|
||||||
|
TopExp::MapShapes(Until, myProtectedFromModificationShapes);
|
||||||
|
//
|
||||||
if (Until.IsNull()) {
|
if (Until.IsNull()) {
|
||||||
Standard_ConstructionError::Raise();
|
Standard_ConstructionError::Raise();
|
||||||
}
|
}
|
||||||
@ -991,6 +1004,8 @@ void BRepFeat_MakePrism::PerformUntilHeight(const TopoDS_Shape& Until,
|
|||||||
Standard_Boolean trc = BRepFeat_GettraceFEAT();
|
Standard_Boolean trc = BRepFeat_GettraceFEAT();
|
||||||
if (trc) cout << "BRepFeat_MakePrism::PerformUntilHeight(Until,Length)" << endl;
|
if (trc) cout << "BRepFeat_MakePrism::PerformUntilHeight(Until,Length)" << endl;
|
||||||
#endif
|
#endif
|
||||||
|
TopExp::MapShapes(Until, myProtectedFromModificationShapes);
|
||||||
|
//
|
||||||
if (Until.IsNull()) {
|
if (Until.IsNull()) {
|
||||||
Perform(Length);
|
Perform(Length);
|
||||||
}
|
}
|
||||||
@ -1435,8 +1450,12 @@ Standard_Boolean ToFuse(const TopoDS_Face& F1,
|
|||||||
return ValRet;
|
return ValRet;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : IsProtectedFromModification
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
Standard_Boolean BRepFeat_MakePrism::IsProtectedFromModification(
|
||||||
|
const TopoDS_Shape & theS) const
|
||||||
|
{
|
||||||
|
return myProtectedFromModificationShapes.Contains(theS);
|
||||||
|
}
|
||||||
|
@ -379,6 +379,10 @@ is
|
|||||||
returns Boolean
|
returns Boolean
|
||||||
is redefined virtual;
|
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
|
---Methods for quick simulation
|
||||||
-------------------------------
|
-------------------------------
|
||||||
@ -396,6 +400,7 @@ fields
|
|||||||
|
|
||||||
myBuilder : ChBuilder from ChFi3d;
|
myBuilder : ChBuilder from ChFi3d;
|
||||||
myMap : MapOfShape from TopTools;
|
myMap : MapOfShape from TopTools;
|
||||||
|
myProtectedFromModificationShapes : IndexedMapOfShape from TopTools;
|
||||||
|
|
||||||
end MakeChamfer;
|
end MakeChamfer;
|
||||||
|
|
||||||
|
@ -25,7 +25,8 @@
|
|||||||
#include <TopTools_ListIteratorOfListOfShape.hxx>
|
#include <TopTools_ListIteratorOfListOfShape.hxx>
|
||||||
#include <ChFiDS_Spine.hxx>
|
#include <ChFiDS_Spine.hxx>
|
||||||
#include <TopExp_Explorer.hxx>
|
#include <TopExp_Explorer.hxx>
|
||||||
#include <BRepLib.hxx>
|
#include <BRepLib_ToleranceRule.hxx>
|
||||||
|
#include <TopExp.hxx>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -35,6 +36,7 @@
|
|||||||
//=======================================================================
|
//=======================================================================
|
||||||
BRepFilletAPI_MakeChamfer::BRepFilletAPI_MakeChamfer(const TopoDS_Shape &S):myBuilder(S)
|
BRepFilletAPI_MakeChamfer::BRepFilletAPI_MakeChamfer(const TopoDS_Shape &S):myBuilder(S)
|
||||||
{
|
{
|
||||||
|
TopExp::MapShapes(S, myProtectedFromModificationShapes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -392,7 +394,7 @@ void BRepFilletAPI_MakeChamfer::Build()
|
|||||||
if (myBuilder.IsDone()){
|
if (myBuilder.IsDone()){
|
||||||
Done();
|
Done();
|
||||||
myShape = myBuilder.Shape();
|
myShape = myBuilder.Shape();
|
||||||
BRepLib::UpdateTolerances(myShape);
|
BRepLib_ToleranceRule::SetProperTolerances(myShape, *this);
|
||||||
|
|
||||||
//creation of the Map.
|
//creation of the Map.
|
||||||
TopExp_Explorer ex;
|
TopExp_Explorer ex;
|
||||||
@ -472,6 +474,16 @@ Standard_Boolean BRepFilletAPI_MakeChamfer::IsDeleted(const TopoDS_Shape& F)
|
|||||||
return Standard_True;
|
return Standard_True;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : IsProtectedFromModification
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
Standard_Boolean BRepFilletAPI_MakeChamfer::IsProtectedFromModification(
|
||||||
|
const TopoDS_Shape & theS) const
|
||||||
|
{
|
||||||
|
return myProtectedFromModificationShapes.Contains(theS);
|
||||||
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : Simulate
|
//function : Simulate
|
||||||
//purpose :
|
//purpose :
|
||||||
|
@ -450,6 +450,10 @@ is
|
|||||||
returns Boolean
|
returns Boolean
|
||||||
is redefined virtual;
|
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 --
|
-- Methods usefull for BRepCtx utilities --
|
||||||
-------------------------------------------
|
-------------------------------------------
|
||||||
@ -538,5 +542,6 @@ fields
|
|||||||
|
|
||||||
myBuilder : FilBuilder from ChFi3d;
|
myBuilder : FilBuilder from ChFi3d;
|
||||||
myMap : MapOfShape from TopTools;
|
myMap : MapOfShape from TopTools;
|
||||||
|
myProtectedFromModificationShapes : IndexedMapOfShape from TopTools;
|
||||||
|
|
||||||
end MakeFillet;
|
end MakeFillet;
|
||||||
|
@ -30,7 +30,8 @@
|
|||||||
#include <Law_Linear.hxx>
|
#include <Law_Linear.hxx>
|
||||||
#include <Law_S.hxx>
|
#include <Law_S.hxx>
|
||||||
#include <Law_Interpol.hxx>
|
#include <Law_Interpol.hxx>
|
||||||
#include <BRepLib.hxx>
|
#include <BRepLib_ToleranceRule.hxx>
|
||||||
|
#include <TopExp.hxx>
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : BRepFilletAPI_MakeFillet
|
//function : BRepFilletAPI_MakeFillet
|
||||||
@ -41,6 +42,7 @@ BRepFilletAPI_MakeFillet::BRepFilletAPI_MakeFillet(const TopoDS_Shape& S,
|
|||||||
const ChFi3d_FilletShape FShape):
|
const ChFi3d_FilletShape FShape):
|
||||||
myBuilder(S,FShape)
|
myBuilder(S,FShape)
|
||||||
{
|
{
|
||||||
|
TopExp::MapShapes(S, myProtectedFromModificationShapes);
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
@ -533,7 +535,7 @@ void BRepFilletAPI_MakeFillet::Build()
|
|||||||
if(myBuilder.IsDone()) {
|
if(myBuilder.IsDone()) {
|
||||||
Done();
|
Done();
|
||||||
myShape = myBuilder.Shape();
|
myShape = myBuilder.Shape();
|
||||||
BRepLib::UpdateTolerances(myShape);
|
BRepLib_ToleranceRule::SetProperTolerances(myShape, *this);
|
||||||
|
|
||||||
// creation of the Map.
|
// creation of the Map.
|
||||||
TopExp_Explorer ex;
|
TopExp_Explorer ex;
|
||||||
@ -667,6 +669,16 @@ Standard_Boolean BRepFilletAPI_MakeFillet::IsDeleted(const TopoDS_Shape& F)
|
|||||||
return Standard_True;
|
return Standard_True;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : IsProtectedFromModification
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
Standard_Boolean BRepFilletAPI_MakeFillet::IsProtectedFromModification(
|
||||||
|
const TopoDS_Shape & theS) const
|
||||||
|
{
|
||||||
|
return myProtectedFromModificationShapes.Contains(theS);
|
||||||
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : NbFaultyContours
|
//function : NbFaultyContours
|
||||||
//purpose :
|
//purpose :
|
||||||
|
@ -86,8 +86,14 @@ is
|
|||||||
returns Shape from TopoDS;
|
returns Shape from TopoDS;
|
||||||
|
|
||||||
|
|
||||||
|
IsProtectedFromModification(me; theS : Shape from TopoDS)
|
||||||
|
---Purpose: Indicates if theS is protected from modification.
|
||||||
|
returns Boolean from Standard;
|
||||||
|
|
||||||
fields
|
fields
|
||||||
|
|
||||||
myPipe : Pipe from BRepFill;
|
myPipe : Pipe from BRepFill;
|
||||||
|
|
||||||
|
myProtectedFromModificationShapes : IndexedMapOfShape from TopTools;
|
||||||
|
|
||||||
end MakePipe;
|
end MakePipe;
|
||||||
|
@ -21,13 +21,14 @@
|
|||||||
|
|
||||||
#include <BRepOffsetAPI_MakePipe.ixx>
|
#include <BRepOffsetAPI_MakePipe.ixx>
|
||||||
|
|
||||||
#include <BRepLib.hxx>
|
#include <BRepLib_ToleranceRule.hxx>
|
||||||
#include <TopExp_Explorer.hxx>
|
#include <TopExp_Explorer.hxx>
|
||||||
#include <TopoDS_Face.hxx>
|
#include <TopoDS_Face.hxx>
|
||||||
#include <TopoDS_Edge.hxx>
|
#include <TopoDS_Edge.hxx>
|
||||||
#include <TopoDS_Vertex.hxx>
|
#include <TopoDS_Vertex.hxx>
|
||||||
#include <TopoDS.hxx>
|
#include <TopoDS.hxx>
|
||||||
#include <TopAbs_ShapeEnum.hxx>
|
#include <TopAbs_ShapeEnum.hxx>
|
||||||
|
#include <TopExp.hxx>
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : BRepOffsetAPI_MakePipe
|
//function : BRepOffsetAPI_MakePipe
|
||||||
@ -38,6 +39,8 @@ BRepOffsetAPI_MakePipe::BRepOffsetAPI_MakePipe(const TopoDS_Wire& Spine ,
|
|||||||
const TopoDS_Shape& Profile)
|
const TopoDS_Shape& Profile)
|
||||||
: myPipe(Spine, Profile)
|
: myPipe(Spine, Profile)
|
||||||
{
|
{
|
||||||
|
TopExp::MapShapes(Profile, myProtectedFromModificationShapes);
|
||||||
|
//
|
||||||
Build();
|
Build();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -60,7 +63,7 @@ const BRepFill_Pipe& BRepOffsetAPI_MakePipe::Pipe() const
|
|||||||
void BRepOffsetAPI_MakePipe::Build()
|
void BRepOffsetAPI_MakePipe::Build()
|
||||||
{
|
{
|
||||||
myShape = myPipe.Shape();
|
myShape = myPipe.Shape();
|
||||||
BRepLib::UpdateTolerances(myShape);
|
BRepLib_ToleranceRule::SetProperTolerances(myShape, *this);
|
||||||
Done();
|
Done();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -107,3 +110,12 @@ TopoDS_Shape BRepOffsetAPI_MakePipe::Generated (const TopoDS_Shape& SSpine,
|
|||||||
return bid;
|
return bid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : IsProtectedFromModification
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
Standard_Boolean BRepOffsetAPI_MakePipe::IsProtectedFromModification(
|
||||||
|
const TopoDS_Shape & theS) const
|
||||||
|
{
|
||||||
|
return myProtectedFromModificationShapes.Contains(theS);
|
||||||
|
}
|
||||||
|
@ -320,9 +320,15 @@ is
|
|||||||
returns ListOfShape from TopTools
|
returns ListOfShape from TopTools
|
||||||
is redefined;
|
is redefined;
|
||||||
|
|
||||||
|
IsProtectedFromModification(me; theS : Shape)
|
||||||
|
---Purpose: Indicates if theS is protected from modification.
|
||||||
|
returns Boolean;
|
||||||
|
|
||||||
fields
|
fields
|
||||||
myPipe : PipeShell from BRepFill;
|
myPipe : PipeShell from BRepFill;
|
||||||
|
|
||||||
|
myProtectedFromModificationShapes : IndexedMapOfShape from TopTools;
|
||||||
|
|
||||||
end MakePipeShell;
|
end MakePipeShell;
|
||||||
|
|
||||||
|
|
||||||
|
@ -22,10 +22,11 @@
|
|||||||
|
|
||||||
#include <BRepOffsetAPI_MakePipeShell.ixx>
|
#include <BRepOffsetAPI_MakePipeShell.ixx>
|
||||||
|
|
||||||
#include <BRepLib.hxx>
|
#include <BRepLib_ToleranceRule.hxx>
|
||||||
#include <GeomFill_PipeError.hxx>
|
#include <GeomFill_PipeError.hxx>
|
||||||
#include <Standard_NotImplemented.hxx>
|
#include <Standard_NotImplemented.hxx>
|
||||||
#include <StdFail_NotDone.hxx>
|
#include <StdFail_NotDone.hxx>
|
||||||
|
#include <TopExp.hxx>
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function :
|
//function :
|
||||||
@ -96,6 +97,7 @@ BRepOffsetAPI_MakePipeShell::BRepOffsetAPI_MakePipeShell(const TopoDS_Wire& Spin
|
|||||||
const Standard_Boolean WithContact,
|
const Standard_Boolean WithContact,
|
||||||
const Standard_Boolean WithCorrection)
|
const Standard_Boolean WithCorrection)
|
||||||
{
|
{
|
||||||
|
TopExp::MapShapes(Profile, myProtectedFromModificationShapes);
|
||||||
myPipe->Add(Profile, WithContact, WithCorrection);
|
myPipe->Add(Profile, WithContact, WithCorrection);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -108,6 +110,7 @@ BRepOffsetAPI_MakePipeShell::BRepOffsetAPI_MakePipeShell(const TopoDS_Wire& Spin
|
|||||||
const Standard_Boolean WithContact,
|
const Standard_Boolean WithContact,
|
||||||
const Standard_Boolean WithCorrection)
|
const Standard_Boolean WithCorrection)
|
||||||
{
|
{
|
||||||
|
TopExp::MapShapes(Profile, myProtectedFromModificationShapes);
|
||||||
myPipe->Add(Profile, Location, WithContact, WithCorrection);
|
myPipe->Add(Profile, Location, WithContact, WithCorrection);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -120,6 +123,7 @@ BRepOffsetAPI_MakePipeShell::BRepOffsetAPI_MakePipeShell(const TopoDS_Wire& Spin
|
|||||||
const Standard_Boolean WithContact,
|
const Standard_Boolean WithContact,
|
||||||
const Standard_Boolean WithCorrection)
|
const Standard_Boolean WithCorrection)
|
||||||
{
|
{
|
||||||
|
TopExp::MapShapes(Profile, myProtectedFromModificationShapes);
|
||||||
myPipe->SetLaw(Profile, L, WithContact, WithCorrection);
|
myPipe->SetLaw(Profile, L, WithContact, WithCorrection);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -133,6 +137,7 @@ BRepOffsetAPI_MakePipeShell::BRepOffsetAPI_MakePipeShell(const TopoDS_Wire& Spin
|
|||||||
const Standard_Boolean WithContact,
|
const Standard_Boolean WithContact,
|
||||||
const Standard_Boolean WithCorrection)
|
const Standard_Boolean WithCorrection)
|
||||||
{
|
{
|
||||||
|
TopExp::MapShapes(Profile, myProtectedFromModificationShapes);
|
||||||
myPipe->SetLaw(Profile, L, Location, WithContact, WithCorrection);
|
myPipe->SetLaw(Profile, L, Location, WithContact, WithCorrection);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -226,7 +231,7 @@ void BRepOffsetAPI_MakePipeShell::Delete( const TopoDS_Shape& Profile)
|
|||||||
Ok = myPipe->Build();
|
Ok = myPipe->Build();
|
||||||
if (Ok) {
|
if (Ok) {
|
||||||
myShape = myPipe->Shape();
|
myShape = myPipe->Shape();
|
||||||
BRepLib::UpdateTolerances(myShape);
|
BRepLib_ToleranceRule::SetProperTolerances(myShape, *this);
|
||||||
Done();
|
Done();
|
||||||
}
|
}
|
||||||
else NotDone();
|
else NotDone();
|
||||||
@ -274,3 +279,12 @@ BRepOffsetAPI_MakePipeShell::Generated(const TopoDS_Shape& S)
|
|||||||
return myGenerated;
|
return myGenerated;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : IsProtectedFromModification
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
Standard_Boolean BRepOffsetAPI_MakePipeShell::IsProtectedFromModification(
|
||||||
|
const TopoDS_Shape & theS) const
|
||||||
|
{
|
||||||
|
return myProtectedFromModificationShapes.Contains(theS);
|
||||||
|
}
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#include <BRepOffsetAPI_NormalProjection.ixx>
|
#include <BRepOffsetAPI_NormalProjection.ixx>
|
||||||
#include <BRepLib.hxx>
|
#include <BRepLib_ToleranceRule.hxx>
|
||||||
|
|
||||||
BRepOffsetAPI_NormalProjection::BRepOffsetAPI_NormalProjection()
|
BRepOffsetAPI_NormalProjection::BRepOffsetAPI_NormalProjection()
|
||||||
{
|
{
|
||||||
@ -65,7 +65,7 @@ BRepOffsetAPI_NormalProjection::BRepOffsetAPI_NormalProjection()
|
|||||||
{
|
{
|
||||||
myNormalProjector.Build();
|
myNormalProjector.Build();
|
||||||
myShape = myNormalProjector.Projection();
|
myShape = myNormalProjector.Projection();
|
||||||
BRepLib::UpdateTolerances(myShape);
|
BRepLib_ToleranceRule::SetProperTolerances(myShape);
|
||||||
Done();
|
Done();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
#include <TopAbs_ShapeEnum.hxx>
|
#include <TopAbs_ShapeEnum.hxx>
|
||||||
#include <BRepTools.hxx>
|
#include <BRepTools.hxx>
|
||||||
#include <BRep_Builder.hxx>
|
#include <BRep_Builder.hxx>
|
||||||
#include <BRepLib.hxx>
|
#include <BRepLib_ToleranceRule.hxx>
|
||||||
|
|
||||||
#include <ShapeFix.hxx>
|
#include <ShapeFix.hxx>
|
||||||
#include <ShapeBuild_ReShape.hxx>
|
#include <ShapeBuild_ReShape.hxx>
|
||||||
@ -103,7 +103,7 @@ void ShapeFix_Shape::Init(const TopoDS_Shape& shape)
|
|||||||
Standard_Boolean ShapeFix_Shape::Perform(const Handle(Message_ProgressIndicator)& theProgress)
|
Standard_Boolean ShapeFix_Shape::Perform(const Handle(Message_ProgressIndicator)& theProgress)
|
||||||
{
|
{
|
||||||
Standard_Boolean aR = PerformR(theProgress);
|
Standard_Boolean aR = PerformR(theProgress);
|
||||||
BRepLib::UpdateTolerances(myResult);
|
BRepLib_ToleranceRule::SetProperTolerances(myResult);
|
||||||
return aR;
|
return aR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
#include <ShapeUpgrade_WireDivide.hxx>
|
#include <ShapeUpgrade_WireDivide.hxx>
|
||||||
#include <Standard_ErrorHandler.hxx>
|
#include <Standard_ErrorHandler.hxx>
|
||||||
#include <Standard_Failure.hxx>
|
#include <Standard_Failure.hxx>
|
||||||
#include <BRepLib.hxx>
|
#include <BRepLib_ToleranceRule.hxx>
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : ShapeUpgrade_ShapeDivide
|
//function : ShapeUpgrade_ShapeDivide
|
||||||
@ -175,7 +175,7 @@ Standard_Boolean ShapeUpgrade_ShapeDivide::Perform(const Standard_Boolean newCon
|
|||||||
if ( Status ( ShapeExtend_DONE ) ) {
|
if ( Status ( ShapeExtend_DONE ) ) {
|
||||||
myResult = myContext->Apply ( C, TopAbs_SHAPE );
|
myResult = myContext->Apply ( C, TopAbs_SHAPE );
|
||||||
myContext->Replace ( myShape, myResult );
|
myContext->Replace ( myShape, myResult );
|
||||||
BRepLib::UpdateTolerances(myResult);
|
BRepLib_ToleranceRule::SetProperTolerances(myResult);
|
||||||
return Standard_True;
|
return Standard_True;
|
||||||
}
|
}
|
||||||
myResult = myShape;
|
myResult = myShape;
|
||||||
@ -284,7 +284,7 @@ Standard_Boolean ShapeUpgrade_ShapeDivide::Perform(const Standard_Boolean newCon
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
myResult = myContext->Apply ( myShape, TopAbs_SHAPE );
|
myResult = myContext->Apply ( myShape, TopAbs_SHAPE );
|
||||||
BRepLib::UpdateTolerances(myResult);
|
BRepLib_ToleranceRule::SetProperTolerances(myResult);
|
||||||
return ! myResult.IsSame ( myShape );
|
return ! myResult.IsSame ( myShape );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
restore [locate_data_file CFI_2_o12ffq.rle] s
|
restore [locate_data_file CFI_2_o12ffq.rle] s
|
||||||
|
updatetolerance s
|
||||||
explode s e
|
explode s e
|
||||||
|
|
||||||
mkevol result s
|
mkevol result s
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
## ====================================
|
## ====================================
|
||||||
|
|
||||||
restore [locate_data_file CTO900_pro12880c.rle] a
|
restore [locate_data_file CTO900_pro12880c.rle] a
|
||||||
|
updatetolerance a
|
||||||
explode a e
|
explode a e
|
||||||
blend result a 5 a_89
|
blend result a 5 a_89
|
||||||
|
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
## ====================================
|
## ====================================
|
||||||
|
|
||||||
restore [locate_data_file CFI_pro12894.rle] a
|
restore [locate_data_file CFI_pro12894.rle] a
|
||||||
|
updatetolerance a
|
||||||
explode a e
|
explode a e
|
||||||
blend result a 5 a_89
|
blend result a 5 a_89
|
||||||
|
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
## ====================================
|
## ====================================
|
||||||
|
|
||||||
restore [locate_data_file CFI_ger60206.rle] a
|
restore [locate_data_file CFI_ger60206.rle] a
|
||||||
|
updatetolerance a
|
||||||
explode a e
|
explode a e
|
||||||
mkevol result a
|
mkevol result a
|
||||||
updatevol a_21 0 0.5 1 1
|
updatevol a_21 0 0.5 1 1
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
## ====================================
|
## ====================================
|
||||||
|
|
||||||
restore [locate_data_file CFI_pro8792.rle] a
|
restore [locate_data_file CFI_pro8792.rle] a
|
||||||
|
updatetolerance a
|
||||||
explode a e
|
explode a e
|
||||||
mkevol result a
|
mkevol result a
|
||||||
updatevol a_20 0 15 0.5 20 1 5
|
updatevol a_20 0 15 0.5 20 1 5
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
## ====================================
|
## ====================================
|
||||||
|
|
||||||
restore [locate_data_file CFI_pro10631.rle] a
|
restore [locate_data_file CFI_pro10631.rle] a
|
||||||
|
updatetolerance a
|
||||||
explode a e
|
explode a e
|
||||||
blend result a 5 a_45
|
blend result a 5 a_45
|
||||||
|
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
## ====================================
|
## ====================================
|
||||||
|
|
||||||
restore [locate_data_file CFI_pro10522.rle] a
|
restore [locate_data_file CFI_pro10522.rle] a
|
||||||
|
updatetolerance a
|
||||||
explode a e
|
explode a e
|
||||||
blend result a 2 a_82
|
blend result a 2 a_82
|
||||||
|
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
## ====================================
|
## ====================================
|
||||||
|
|
||||||
restore [locate_data_file CFI_pro10117.rle] a
|
restore [locate_data_file CFI_pro10117.rle] a
|
||||||
|
updatetolerance a
|
||||||
explode a e
|
explode a e
|
||||||
blend result a 2 a_128 1 a_10
|
blend result a 2 a_128 1 a_10
|
||||||
|
|
||||||
|
@ -1 +1,2 @@
|
|||||||
restore [locate_data_file CCH_propag.rle] a
|
restore [locate_data_file CCH_propag.rle] a
|
||||||
|
updatetolerance a
|
||||||
|
@ -1 +1,2 @@
|
|||||||
restore [locate_data_file CCH_r2.rle] a
|
restore [locate_data_file CCH_r2.rle] a
|
||||||
|
updatetolerance a
|
||||||
|
Loading…
x
Reference in New Issue
Block a user