mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-04 13:13:25 +03:00
0028747: Incorrect result of the section operation after edge refinement
Implementation of the method for simplification of the result of Boolean Operation on the API level. The method BRepAlgoAPI_BuilderAlgo::SimplifyResult has been added, so the derived classes such as BooleanOpeation and Splitter can also use this method. The result shape simplification should be called after the operation is done. The simplification is performed by the means of ShapeUpgrade_UnifySameDomain algorithm. Draw command "bsimplify" has been added to control the simplification options. Documentation for new functionality and draw commands controlling the options of Boolean operations. Test cases for the new functionality. Side-effect change: The algorithms in Boolean component have been changed to use the BRepTools_History as a History tool. Now it became possible to disable the collection of shapes modifications during Boolean Operations, which may be useful for performance sake (in draw the option is controlled by *setfillhistory* command). Draw command "unifysamedom" has been changed to accept the angular tolerance in degrees instead of radians.
This commit is contained in:
@@ -1299,7 +1299,7 @@ static Standard_Integer unifysamedom(Draw_Interpretor& di, Standard_Integer n, c
|
||||
di << "+b to switch on 'concat bspline' mode\n";
|
||||
di << "+i to switch on 'allow internal edges' mode\n";
|
||||
di << "-t val to set linear tolerance\n";
|
||||
di << "-a val to set angular tolerance\n";
|
||||
di << "-a val to set angular tolerance (in degrees)\n";
|
||||
di << "'unify-faces' and 'unify-edges' modes are switched on by default";
|
||||
return 1;
|
||||
}
|
||||
@@ -1341,7 +1341,10 @@ static Standard_Integer unifysamedom(Draw_Interpretor& di, Standard_Integer n, c
|
||||
{
|
||||
if (++i < n)
|
||||
{
|
||||
(a[i-1][1] == 't' ? aLinTol : aAngTol) = Draw::Atof(a[i]);
|
||||
if (a[i-1][1] == 't')
|
||||
aLinTol = Draw::Atof(a[i]);
|
||||
else
|
||||
aAngTol = Draw::Atof(a[i]) * (M_PI / 180.0);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1361,7 +1364,8 @@ static Standard_Integer unifysamedom(Draw_Interpretor& di, Standard_Integer n, c
|
||||
Unifier().Build();
|
||||
TopoDS_Shape Result = Unifier().Shape();
|
||||
|
||||
BRepTest_Objects::SetHistory(Unifier().History());
|
||||
if (BRepTest_Objects::IsHistoryNeeded())
|
||||
BRepTest_Objects::SetHistory(Unifier().History());
|
||||
|
||||
DBRep::Set(a[1], Result);
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user