mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-04 18:06:22 +03:00
Method BRepBuilderAPI_MakeShape::EnsureToleranceRule was made slightly
simpler. Tolerance post Build (Perform) fix was made for: - BRepAlgoAPI_BooleanOperation, - BRepFeat_MakePrism, - BRepOffsetAPI_MakePipeShell. Draw command getsourcefile now returns result for: - buildsweep, - simulsweep, - geompipe.
This commit is contained in:
parent
d270c8d398
commit
2714f5dd39
@ -325,6 +325,7 @@ const TopTools_ListOfShape& BRepAlgoAPI_BooleanOperation::Modified(const TopoDS_
|
||||
myErrorStatus=0;
|
||||
myBuilderCanWork=Standard_True;
|
||||
myShape=myBuilder->Result();
|
||||
EnsureToleranceRule(myShape);
|
||||
Done();
|
||||
}
|
||||
else {
|
||||
@ -400,6 +401,7 @@ const TopTools_ListOfShape& BRepAlgoAPI_BooleanOperation::Modified(const TopoDS_
|
||||
myErrorStatus=0;
|
||||
myBuilderCanWork=Standard_True;
|
||||
myShape=myBuilder->Result();
|
||||
EnsureToleranceRule(myShape);
|
||||
Done();
|
||||
}
|
||||
else {
|
||||
|
@ -135,12 +135,12 @@ void BRepBuilderAPI_MakeShape::EnsureToleranceRule(const TopoDS_Shape & theS)
|
||||
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();
|
||||
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();
|
||||
Handle_BRep_TEdge & anEG = (Handle_BRep_TEdge &)anES.TShape();
|
||||
Standard_Real anET = anEG->Tolerance();
|
||||
if (anET < aFT)
|
||||
{
|
||||
@ -150,7 +150,7 @@ void BRepBuilderAPI_MakeShape::EnsureToleranceRule(const TopoDS_Shape & theS)
|
||||
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();
|
||||
Handle_BRep_TVertex & aVG = (Handle_BRep_TVertex &)aVS.TShape();
|
||||
aVG->UpdateTolerance(anET);
|
||||
}
|
||||
}
|
||||
@ -159,7 +159,7 @@ void BRepBuilderAPI_MakeShape::EnsureToleranceRule(const TopoDS_Shape & theS)
|
||||
aVE.More(); aVE.Next())
|
||||
{
|
||||
TopoDS_Vertex aVS = TopoDS::Vertex(aVE.Current());
|
||||
Handle_BRep_TVertex & aVG = *(Handle_BRep_TVertex *)&aVS.TShape();
|
||||
Handle_BRep_TVertex & aVG = (Handle_BRep_TVertex &)aVS.TShape();
|
||||
aVG->UpdateTolerance(aFT);
|
||||
}
|
||||
}
|
||||
@ -168,12 +168,12 @@ void BRepBuilderAPI_MakeShape::EnsureToleranceRule(const TopoDS_Shape & theS)
|
||||
anEE.More(); anEE.Next())
|
||||
{
|
||||
TopoDS_Edge anES = TopoDS::Edge(anEE.Current());
|
||||
Handle_BRep_TEdge & anEG = *(Handle_BRep_TEdge *)&anES.TShape();
|
||||
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();
|
||||
Handle_BRep_TVertex & aVG = (Handle_BRep_TVertex &)aVS.TShape();
|
||||
aVG->UpdateTolerance(anET);
|
||||
}
|
||||
}
|
||||
|
@ -463,6 +463,7 @@ void BRepFeat_MakePrism::Perform(const TopoDS_Shape& Until)
|
||||
}
|
||||
}
|
||||
}
|
||||
EnsureToleranceRule(myShape);
|
||||
/* // loop of control of descendance
|
||||
|
||||
TopExp_Explorer expr(mySbase, TopAbs_FACE);
|
||||
|
@ -225,6 +225,7 @@ void BRepOffsetAPI_MakePipeShell::Delete( const TopoDS_Shape& Profile)
|
||||
Ok = myPipe->Build();
|
||||
if (Ok) {
|
||||
myShape = myPipe->Shape();
|
||||
EnsureToleranceRule(myShape);
|
||||
Done();
|
||||
}
|
||||
else NotDone();
|
||||
|
@ -859,12 +859,12 @@ void BRepTest::SweepCommands(Draw_Interpretor& theCommands)
|
||||
"deletesweep wire, To delete a section",
|
||||
__FILE__,deletesweep,g);
|
||||
|
||||
theCommands.Add("buildsweep", "builsweep [r] [option] [Tol] , no args to get help"
|
||||
theCommands.Add("buildsweep", "buildsweep [r] [option] [Tol] , no args to get help",
|
||||
__FILE__,buildsweep,g);
|
||||
|
||||
theCommands.Add("simulsweep", "simulsweep r [n] [option]"
|
||||
theCommands.Add("simulsweep", "simulsweep r [n] [option]",
|
||||
__FILE__,simulsweep,g);
|
||||
theCommands.Add("geompipe", "geompipe r spineedge profileedge radius [byACR [byrotate]]"
|
||||
theCommands.Add("geompipe", "geompipe r spineedge profileedge radius [byACR [byrotate]]",
|
||||
__FILE__,geompipe,g);
|
||||
|
||||
theCommands.Add("middlepath", "middlepath res shape startshape endshape",
|
||||
|
Loading…
x
Reference in New Issue
Block a user