mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0029780: [REGRESSION] Shape Healing - Operator FixShape failed with exception
Method ShapeFix_Wire::FixNotchedEdges() is corrected to handle the case of closed notched edges: on such edges split parameter may fall to wrong end of the curve due to projection.
This commit is contained in:
@@ -3225,12 +3225,21 @@ Standard_Boolean ShapeFix_Wire::FixNotchedEdges()
|
||||
Handle(Geom2d_Curve) c2d;
|
||||
Standard_Real a, b;
|
||||
sae.PCurve ( splitE, face, c2d, a, b, Standard_True );
|
||||
Standard_Real ppar = (isRemoveFirst ? b : a);
|
||||
ShapeBuild_Edge sbe;
|
||||
TopAbs_Orientation orient = splitE.Orientation();
|
||||
if ( Abs(param - ppar) > ::Precision::PConfusion() ) {
|
||||
//pdn perform splitting of the edge and adding to wire
|
||||
|
||||
|
||||
// check whether the whole edges should be removed - this is the case
|
||||
// when split point coincides with the end of the edge;
|
||||
// for closed edges split point may fall at the other end (see issue #0029780)
|
||||
if (Abs(param - (isRemoveFirst ? b : a)) <= ::Precision::PConfusion() ||
|
||||
(sae.IsClosed3d(splitE) && Abs(param - (isRemoveFirst ? a : b)) <= ::Precision::PConfusion()))
|
||||
{
|
||||
FixDummySeam(n1);
|
||||
// The seam edge is removed from the list. So, need to step back to avoid missing of edge processing
|
||||
i--;
|
||||
}
|
||||
else // perform splitting of the edge and adding to wire
|
||||
{
|
||||
//pdn check if it is necessary
|
||||
if( Abs((isRemoveFirst ? a : b)-param) < ::Precision::PConfusion() ) {
|
||||
continue;
|
||||
@@ -3286,12 +3295,6 @@ Standard_Boolean ShapeFix_Wire::FixNotchedEdges()
|
||||
FixDummySeam(isRemoveLast ? NbEdges() : toRemove);
|
||||
myLastFixStatus |= ShapeExtend::EncodeStatus ( ShapeExtend_DONE2 );
|
||||
}
|
||||
else
|
||||
{
|
||||
FixDummySeam(n1);
|
||||
// The seam edge is removed from the list. So, need to step back to avoid missing of edge processing
|
||||
i--;
|
||||
}
|
||||
|
||||
i--;
|
||||
if(!Context().IsNull()) //skl 07.03.2002 for OCC180
|
||||
|
Reference in New Issue
Block a user