mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-19 13:40:49 +03:00
0028968: Incorrect offset for the faces with singularities
Simple offset algorithm (BRepOffset_MakeSimpleOffset) is improved to handle the case when bspline surface has imprecise singularity at one of sides (when side is degenerated but not exactly to one point). In such case, the algorithm tries to collapse all poles of singular side of the surface to the same point; this allows avoiding flapping of normal due to small fluctuations of surface. If face being offset contains degenerated edges, then check for singularity is done using position and tolerance of corresponding vertices. In addition, each side is checked with some user-defined tolerance (by default Precision::Confusion()); this helps to process cases when no edge is located at that side or if such edge is not encoded as degenerated. New parameter Tolerance is introduced for that in BRepOffset_MakeSimpleOffset class. Tests added: bugs modelg_7 bug28968 - on isolated faces as reported in the issue, mostly for visual check (absence of loops) offset simple F01-05 - on original shells, checking tolerances of resulting shell
This commit is contained in:
@@ -95,6 +95,12 @@ public:
|
||||
//! Sets offset value.
|
||||
void SetOffsetValue(const Standard_Real theOffsetValue) { myOffsetValue = theOffsetValue; }
|
||||
|
||||
//! Gets tolerance (used for handling singularities).
|
||||
Standard_Real GetTolerance() const { return myTolerance; }
|
||||
|
||||
//! Sets tolerance (used for handling singularities).
|
||||
void SetTolerance (const Standard_Real theValue) { myTolerance = theValue; }
|
||||
|
||||
//! Gets done state.
|
||||
Standard_Boolean IsDone() const { return myIsDone; }
|
||||
|
||||
@@ -134,6 +140,9 @@ private:
|
||||
//! Offset value.
|
||||
Standard_Real myOffsetValue;
|
||||
|
||||
//! Tolerance (for singularities)
|
||||
Standard_Real myTolerance;
|
||||
|
||||
//! Solid building flag. True means solid construction.
|
||||
Standard_Boolean myIsBuildSolid;
|
||||
|
||||
|
Reference in New Issue
Block a user