mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0032471: Mesh - Deflection of the triangulation is not recomputed for planar face
Remove Poly_TriangulationParameters and API related to Poly_Triangulation in order to keep binary compatibility of dynamic libraries.
This commit is contained in:
@@ -20,7 +20,6 @@
|
||||
#include <IMeshData_PCurve.hxx>
|
||||
#include <OSD_Parallel.hxx>
|
||||
#include <BRepLib.hxx>
|
||||
#include <Poly_TriangulationParameters.hxx>
|
||||
|
||||
IMPLEMENT_STANDARD_RTTIEXT(BRepMesh_ModelPostProcessor, IMeshTools_ModelAlgo)
|
||||
|
||||
@@ -165,11 +164,8 @@ namespace
|
||||
{
|
||||
public:
|
||||
//! Constructor
|
||||
DeflectionEstimator (const Handle(IMeshData_Model)& theModel,
|
||||
const IMeshTools_Parameters& theParams)
|
||||
: myModel (theModel)
|
||||
, myParams (new Poly_TriangulationParameters (
|
||||
theParams.Deflection, theParams.Angle, theParams.MinSize))
|
||||
DeflectionEstimator (const Handle(IMeshData_Model)& theModel)
|
||||
: myModel(theModel)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -184,21 +180,11 @@ namespace
|
||||
}
|
||||
|
||||
BRepLib::UpdateDeflection (aDFace->GetFace());
|
||||
|
||||
TopLoc_Location aLoc;
|
||||
const Handle(Poly_Triangulation)& aTriangulation =
|
||||
BRep_Tool::Triangulation (aDFace->GetFace(), aLoc);
|
||||
|
||||
if (!aTriangulation.IsNull())
|
||||
{
|
||||
aTriangulation->Deflection(myParams->Deflection());
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
Handle(IMeshData_Model) myModel;
|
||||
Handle(Poly_TriangulationParameters) myParams;
|
||||
Handle(IMeshData_Model) myModel;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -238,6 +224,6 @@ Standard_Boolean BRepMesh_ModelPostProcessor::performInternal(
|
||||
|
||||
// Estimate deflection here due to BRepLib::EstimateDeflection requires
|
||||
// existence of both Poly_Triangulation and Poly_PolygonOnTriangulation.
|
||||
OSD_Parallel::For (0, theModel->FacesNb(), DeflectionEstimator (theModel, theParameters), !theParameters.InParallel);
|
||||
OSD_Parallel::For (0, theModel->FacesNb(), DeflectionEstimator (theModel), !theParameters.InParallel);
|
||||
return Standard_True;
|
||||
}
|
||||
|
@@ -23,7 +23,6 @@
|
||||
#include <IMeshData_PCurve.hxx>
|
||||
#include <OSD_Parallel.hxx>
|
||||
#include <BRepMesh_ConeRangeSplitter.hxx>
|
||||
#include <Poly_TriangulationParameters.hxx>
|
||||
|
||||
IMPLEMENT_STANDARD_RTTIEXT(BRepMesh_ModelPreProcessor, IMeshTools_ModelAlgo)
|
||||
|
||||
@@ -56,15 +55,8 @@ namespace
|
||||
|
||||
if (!aTriangulation.IsNull())
|
||||
{
|
||||
// If there is an info about initial parameters, use it due to deflection kept
|
||||
// by Poly_Triangulation is generally an estimation upon generated mesh and can
|
||||
// be either less or even greater than specified value.
|
||||
const Handle(Poly_TriangulationParameters)& aSourceParams = aTriangulation->Parameters();
|
||||
const Standard_Real aDeflection = (!aSourceParams.IsNull() && aSourceParams->HasDeflection()) ?
|
||||
aSourceParams->Deflection() : aTriangulation->Deflection();
|
||||
|
||||
Standard_Boolean isTriangulationConsistent =
|
||||
BRepMesh_Deflection::IsConsistent (aDeflection,
|
||||
BRepMesh_Deflection::IsConsistent (aTriangulation->Deflection(),
|
||||
aDFace->GetDeflection(),
|
||||
myAllowQualityDecrease);
|
||||
|
||||
|
Reference in New Issue
Block a user