mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-09-13 14:27:08 +03:00
0031461: Mesh - Add possibility to force the meshing of the shape
BRepMesh: Add new mesh parameter *AllowQualityDecrease* which affects the criteria used for checking of the consistency of the existing mesh to new meshing parameters. So if set to true it will force the meshing of the shape if current deflection strongly vary from the new one, no matter in which side. BRepTools::Clean: Keep triangulation on non-geometric shapes (faces with no surface or edges with no curves).
This commit is contained in:
@@ -35,7 +35,8 @@ struct IMeshTools_Parameters {
|
||||
ControlSurfaceDeflection (Standard_True),
|
||||
CleanModel (Standard_True),
|
||||
AdjustMinSize (Standard_False),
|
||||
ForceFaceDeflection (Standard_False)
|
||||
ForceFaceDeflection (Standard_False),
|
||||
AllowQualityDecrease (Standard_False)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -89,6 +90,10 @@ struct IMeshTools_Parameters {
|
||||
//! Enables/disables usage of shape tolerances for computing face deflection.
|
||||
//! Disabled by default.
|
||||
Standard_Boolean ForceFaceDeflection;
|
||||
|
||||
//! Allows/forbids the decrease of the quality of the generated mesh
|
||||
//! over the existing one.
|
||||
Standard_Boolean AllowQualityDecrease;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@@ -88,7 +88,6 @@ void IMeshTools_ShapeExplorer::Accept (
|
||||
BRepLib::ReverseSortFaces (GetShape (), aFaceList);
|
||||
TopTools_MapOfShape aFaceMap;
|
||||
|
||||
TopLoc_Location aDummyLoc;
|
||||
const TopLoc_Location aEmptyLoc;
|
||||
TopTools_ListIteratorOfListOfShape aFaceIter (aFaceList);
|
||||
for (; aFaceIter.More (); aFaceIter.Next ())
|
||||
@@ -101,8 +100,7 @@ void IMeshTools_ShapeExplorer::Accept (
|
||||
}
|
||||
|
||||
const TopoDS_Face& aFace = TopoDS::Face (aFaceIter.Value ());
|
||||
const Handle (Geom_Surface)& aSurf = BRep_Tool::Surface (aFace, aDummyLoc);
|
||||
if (aSurf.IsNull())
|
||||
if (!BRep_Tool::IsGeometric (aFace))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
Reference in New Issue
Block a user