mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +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
src
BRepAlgoAPI
BRepBuilderAPI
BRepFeat
BRepOffsetAPI
BRepTest
@ -325,6 +325,7 @@ const TopTools_ListOfShape& BRepAlgoAPI_BooleanOperation::Modified(const TopoDS_
|
|||||||
myErrorStatus=0;
|
myErrorStatus=0;
|
||||||
myBuilderCanWork=Standard_True;
|
myBuilderCanWork=Standard_True;
|
||||||
myShape=myBuilder->Result();
|
myShape=myBuilder->Result();
|
||||||
|
EnsureToleranceRule(myShape);
|
||||||
Done();
|
Done();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -400,6 +401,7 @@ const TopTools_ListOfShape& BRepAlgoAPI_BooleanOperation::Modified(const TopoDS_
|
|||||||
myErrorStatus=0;
|
myErrorStatus=0;
|
||||||
myBuilderCanWork=Standard_True;
|
myBuilderCanWork=Standard_True;
|
||||||
myShape=myBuilder->Result();
|
myShape=myBuilder->Result();
|
||||||
|
EnsureToleranceRule(myShape);
|
||||||
Done();
|
Done();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -135,12 +135,12 @@ void BRepBuilderAPI_MakeShape::EnsureToleranceRule(const TopoDS_Shape & theS)
|
|||||||
for (TopExp_Explorer aFE(theS, TopAbs_FACE); aFE.More(); aFE.Next())
|
for (TopExp_Explorer aFE(theS, TopAbs_FACE); aFE.More(); aFE.Next())
|
||||||
{
|
{
|
||||||
TopoDS_Face aF = TopoDS::Face(aFE.Current());
|
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())
|
for (TopExp_Explorer anEE(aF, TopAbs_EDGE); anEE.More(); anEE.Next())
|
||||||
{
|
{
|
||||||
TopoDS_Edge anES = TopoDS::Edge(anEE.Current());
|
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();
|
Standard_Real anET = anEG->Tolerance();
|
||||||
if (anET < aFT)
|
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())
|
for (TopExp_Explorer aVE(anES, TopAbs_VERTEX); aVE.More(); aVE.Next())
|
||||||
{
|
{
|
||||||
TopoDS_Vertex aVS = TopoDS::Vertex(aVE.Current());
|
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);
|
aVG->UpdateTolerance(anET);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -159,7 +159,7 @@ void BRepBuilderAPI_MakeShape::EnsureToleranceRule(const TopoDS_Shape & theS)
|
|||||||
aVE.More(); aVE.Next())
|
aVE.More(); aVE.Next())
|
||||||
{
|
{
|
||||||
TopoDS_Vertex aVS = TopoDS::Vertex(aVE.Current());
|
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);
|
aVG->UpdateTolerance(aFT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -168,12 +168,12 @@ void BRepBuilderAPI_MakeShape::EnsureToleranceRule(const TopoDS_Shape & theS)
|
|||||||
anEE.More(); anEE.Next())
|
anEE.More(); anEE.Next())
|
||||||
{
|
{
|
||||||
TopoDS_Edge anES = TopoDS::Edge(anEE.Current());
|
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();
|
Standard_Real anET = anEG->Tolerance();
|
||||||
for (TopExp_Explorer aVE(anES, TopAbs_VERTEX); aVE.More(); aVE.Next())
|
for (TopExp_Explorer aVE(anES, TopAbs_VERTEX); aVE.More(); aVE.Next())
|
||||||
{
|
{
|
||||||
TopoDS_Vertex aVS = TopoDS::Vertex(aVE.Current());
|
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);
|
aVG->UpdateTolerance(anET);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -463,6 +463,7 @@ void BRepFeat_MakePrism::Perform(const TopoDS_Shape& Until)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
EnsureToleranceRule(myShape);
|
||||||
/* // loop of control of descendance
|
/* // loop of control of descendance
|
||||||
|
|
||||||
TopExp_Explorer expr(mySbase, TopAbs_FACE);
|
TopExp_Explorer expr(mySbase, TopAbs_FACE);
|
||||||
|
@ -225,6 +225,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();
|
||||||
|
EnsureToleranceRule(myShape);
|
||||||
Done();
|
Done();
|
||||||
}
|
}
|
||||||
else NotDone();
|
else NotDone();
|
||||||
|
@ -859,12 +859,12 @@ void BRepTest::SweepCommands(Draw_Interpretor& theCommands)
|
|||||||
"deletesweep wire, To delete a section",
|
"deletesweep wire, To delete a section",
|
||||||
__FILE__,deletesweep,g);
|
__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);
|
__FILE__,buildsweep,g);
|
||||||
|
|
||||||
theCommands.Add("simulsweep", "simulsweep r [n] [option]"
|
theCommands.Add("simulsweep", "simulsweep r [n] [option]",
|
||||||
__FILE__,simulsweep,g);
|
__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);
|
__FILE__,geompipe,g);
|
||||||
|
|
||||||
theCommands.Add("middlepath", "middlepath res shape startshape endshape",
|
theCommands.Add("middlepath", "middlepath res shape startshape endshape",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user