mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-04 13:13:25 +03:00
0028599: Replacement of old Boolean operations with new ones in BRepProj_Projection algorithm
The usage of *BRepAlgo_Section* has been replaced with the usage of *BRepAlgoAPI_Section* in *BRepProj_Projection* algorithm. The TODO statements have been removed from the failing test case in the "prj" grid as they are working correctly now. The following changes have been made to improve the performance *BRepAlgoAPI_Section*: 1. Revision of the *IntPolyh_Intersection* class to avoid repeated calculation of the deflection of the same triangulation. 2. Small revision of the Edge/Face intersection algorithm to perform Extrema computation on the whole intersection range of the edge instead of discrete ranges. 3. Implementation of the extrema computation for the Circle and Sphere. 4. Correct computation of the parameter of the point on the Circle.
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
#include <Bnd_Box.hxx>
|
||||
#include <BRep_Builder.hxx>
|
||||
#include <BRep_Tool.hxx>
|
||||
#include <BRepAlgo_Section.hxx>
|
||||
#include <BRepAlgoAPI_Section.hxx>
|
||||
#include <BRepBndLib.hxx>
|
||||
#include <BRepFill_Generator.hxx>
|
||||
#include <BRepLib_MakeEdge.hxx>
|
||||
@@ -125,15 +125,17 @@ void BRepProj_Projection::BuildSection (const TopoDS_Shape& theShape,
|
||||
if ( aShape.IsNull() )
|
||||
throw Standard_ConstructionError(__FILE__": target shape has no faces");
|
||||
|
||||
// build section computing pcurves on the shape
|
||||
// BRepAlgoAPI_Section aSectionTool (aShape, theTool, Standard_False);
|
||||
BRepAlgo_Section aSectionTool (aShape, theTool, Standard_False);
|
||||
aSectionTool.Approximation (Standard_True);
|
||||
aSectionTool.ComputePCurveOn1 (Standard_True);
|
||||
// build section computing p-curves on both shapes to get higher precision
|
||||
BRepAlgoAPI_Section aSectionTool(aShape, theTool, Standard_False);
|
||||
aSectionTool.Approximation(Standard_True);
|
||||
aSectionTool.ComputePCurveOn1(Standard_True);
|
||||
aSectionTool.ComputePCurveOn2(Standard_True);
|
||||
// Use Oriented Bounding Boxes inside Booleans to speed up calculation of the section
|
||||
aSectionTool.SetUseOBB(Standard_True);
|
||||
aSectionTool.Build();
|
||||
|
||||
// check for successful work of the section tool
|
||||
if (! aSectionTool.IsDone())
|
||||
if (!aSectionTool.IsDone())
|
||||
return;
|
||||
|
||||
// get edges of the result
|
||||
|
Reference in New Issue
Block a user