Add parameter EnableControlSurfaceDeflectionAllSurfaces to IMeshTools_Parameters enabling possibility to optimize mesh even on analytical surfaces;
Add corresponding parameter -surf_def_all to incmesh Draw command.
switch (theSurfaceType)
{
case GeomAbs_Plane:
- return theParameters.InternalVerticesMode ?
- new NodeInsertionMeshAlgo<BRepMesh_DefaultRangeSplitter>::Type :
- new BaseMeshAlgo::Type;
+ return theParameters.EnableControlSurfaceDeflectionAllSurfaces ?
+ new DeflectionControlMeshAlgo<BRepMesh_DefaultRangeSplitter>::Type :
+ (theParameters.InternalVerticesMode ?
+ new NodeInsertionMeshAlgo<BRepMesh_DefaultRangeSplitter>::Type :
+ new BaseMeshAlgo::Type);
break;
case GeomAbs_Sphere:
- return new NodeInsertionMeshAlgo<BRepMesh_SphereRangeSplitter>::Type;
+ return theParameters.EnableControlSurfaceDeflectionAllSurfaces ?
+ new DeflectionControlMeshAlgo<BRepMesh_SphereRangeSplitter>::Type :
+ new NodeInsertionMeshAlgo<BRepMesh_SphereRangeSplitter>::Type;
break;
case GeomAbs_Cylinder:
- return theParameters.InternalVerticesMode ?
- new NodeInsertionMeshAlgo<BRepMesh_CylinderRangeSplitter>::Type :
- new BaseMeshAlgo::Type;
+ return theParameters.EnableControlSurfaceDeflectionAllSurfaces ?
+ new DeflectionControlMeshAlgo<BRepMesh_CylinderRangeSplitter>::Type :
+ (theParameters.InternalVerticesMode ?
+ new NodeInsertionMeshAlgo<BRepMesh_CylinderRangeSplitter>::Type :
+ new BaseMeshAlgo::Type);
break;
case GeomAbs_Cone:
- return new NodeInsertionMeshAlgo<BRepMesh_ConeRangeSplitter>::Type;
+ return theParameters.EnableControlSurfaceDeflectionAllSurfaces ?
+ new DeflectionControlMeshAlgo<BRepMesh_ConeRangeSplitter>::Type :
+ new NodeInsertionMeshAlgo<BRepMesh_ConeRangeSplitter>::Type;
break;
case GeomAbs_Torus:
- return new NodeInsertionMeshAlgo<BRepMesh_TorusRangeSplitter>::Type;
+ return theParameters.EnableControlSurfaceDeflectionAllSurfaces ?
+ new DeflectionControlMeshAlgo<BRepMesh_TorusRangeSplitter>::Type :
+ new NodeInsertionMeshAlgo<BRepMesh_TorusRangeSplitter>::Type;
break;
case GeomAbs_SurfaceOfRevolution:
Relative (Standard_False),
InternalVerticesMode (Standard_True),
ControlSurfaceDeflection (Standard_True),
+ EnableControlSurfaceDeflectionAllSurfaces(Standard_False),
CleanModel (Standard_True),
AdjustMinSize (Standard_False),
ForceFaceDeflection (Standard_False),
//! the face
Standard_Boolean ControlSurfaceDeflection;
+ // Enables/disables check triggered by ControlSurfaceDeflection flag
+ // for all types of surfaces including analytical.
+ Standard_Boolean EnableControlSurfaceDeflectionAllSurfaces;
+
//! Cleans temporary data model when algorithm is finished.
Standard_Boolean CleanModel;
{
aMeshParams.ControlSurfaceDeflection = !Draw::ParseOnOffIterator (theNbArgs, theArgVec, anArgIter);
}
+ else if (aNameCase == "-surf_def_all")
+ {
+ aMeshParams.EnableControlSurfaceDeflectionAllSurfaces = Draw::ParseOnOffIterator(theNbArgs, theArgVec, anArgIter);
+ }
else if (aNameCase == "-adjust_min")
{
aMeshParams.AdjustMinSize = Draw::ParseOnOffNoIterator (theNbArgs, theArgVec, anArgIter);
"\n\t\t: -ai angular deflection inside of faces in deg (~57.29 deg = 1 rad by default);"
"\n\t\t: -int_vert_off disables insertion of internal vertices into mesh (enabled by default);"
"\n\t\t: -surf_def_off disables control of deflection of mesh from real surface (enabled by default);"
+ "\n\t\t: -surf_def_all enables control of deflection of mesh from real surface for all types of surfaces"
+ "\n\t\t: (FALSE by default);"
"\n\t\t: -adjust_min enables local adjustment of min size depending on edge size (FALSE by default);"
"\n\t\t: -force_face_def disables usage of shape tolerances for computing face deflection (FALSE by default);"
"\n\t\t: -decrease enforces the meshing of the shape even if current mesh satisfies the new criteria"
--- /dev/null
+puts "================"
+puts "0033050: \[Regression to OCCT 7.3.0\] Mesh - meshing deflection is not reached"
+puts "================"
+puts ""
+
+restore [locate_data_file bug33050.brep] result
+
+################## Deflection: 0.001 ##################
+tclean result
+incmesh result 0.001
+
+checktrinfo result -tri 27652 -nod 28016 -defl 0.0027132671526737435 -tol_abs_defl 1e-6
+
+tclean result
+incmesh result 0.001 -surf_def_all
+
+checktrinfo result -tri 30102 -nod 29241 -defl 0.0010301984083541042 -tol_abs_defl 1e-6
+
+################## Deflection: 0.0001 #################
+
+tclean result
+incmesh result 0.0001
+
+checktrinfo result -tri 88140 -nod 84304 -defl 0.00073349807253346574 -tol_abs_defl 1e-6
+
+tclean result
+incmesh result 0.0001 -surf_def_all
+
+checktrinfo result -tri 103376 -nod 91922 -defl 0.00012553867394267057 -tol_abs_defl 1e-6
+
+################## Deflection: 0.00005 ################
+
+tclean result
+incmesh result 0.00005
+
+checktrinfo result -tri 127538 -nod 119773 -defl 0.00043153032084638013 -tol_abs_defl 1e-6
+
+tclean result
+incmesh result 0.00005 -surf_def_all
+
+checktrinfo result -tri 154246 -nod 133127 -defl 5.1157129731636775e-05 -tol_abs_defl 1e-6
\ No newline at end of file