0031992: Modeling Algorithms - Offset of closed B-spline edge fails

1. Increase the tolerance of approximation.
2. Update auxiliary Draw command "topoload" for usage of option "-approx".

Add missing comment
This commit is contained in:
jgv
2022-09-22 12:51:18 +03:00
committed by smoskvin
parent 5bde4773f9
commit b95eefe1c2
9 changed files with 170 additions and 61 deletions

View File

@@ -60,8 +60,8 @@ static Standard_Boolean NeedsConvertion (const TopoDS_Wire& theWire)
return Standard_False;
}
static TopoDS_Face ConvertFace (const TopoDS_Face& theFace,
const Standard_Real theAngleTolerance)
TopoDS_Face BRepOffsetAPI_MakeOffset::ConvertFace (const TopoDS_Face& theFace,
const Standard_Real theAngleTolerance)
{
TopAbs_Orientation anOr = theFace.Orientation();
TopoDS_Face aFace = theFace;
@@ -76,6 +76,7 @@ static TopoDS_Face ConvertFace (const TopoDS_Face& theFace,
if (NeedsConvertion (aWire))
{
TopAbs_Orientation anOrOfWire = aWire.Orientation();
aWire.Orientation (TopAbs_FORWARD);
aWire = BRepAlgo::ConvertWire (aWire, theAngleTolerance, aFace);
BRepLib::BuildCurves3d (aWire);
aWire.Orientation (anOrOfWire);
@@ -352,7 +353,7 @@ void BRepOffsetAPI_MakeOffset::Perform(const Standard_Real Offset,
{
if (myIsToApprox)
{
Standard_Real aTol = 0.01;
Standard_Real aTol = 0.1;
if (myFace.IsNull())
{
TopoDS_Face aFace;

View File

@@ -84,7 +84,10 @@ public:
//! from the shape <S>.
Standard_EXPORT virtual const TopTools_ListOfShape& Generated (const TopoDS_Shape& S) Standard_OVERRIDE;
//! Converts each wire of the face into contour consisting only of
//! arcs and segments. New 3D curves are built too.
Standard_EXPORT static TopoDS_Face ConvertFace (const TopoDS_Face& theFace,
const Standard_Real theAngleTolerance);
protected: