mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +03:00
0033179: Modeling Algorithms - Crash in in ShapeFix_Shape with the attached object, when healing for fixing SameParameterFlag
BSplCLib_2.cxx - method MergeBSplineKnots is modified in order to have always not empty result. Geom2dConvert.cxx - in static function MultNumandDenom tolerance for comparing knots is decreased.
This commit is contained in:
parent
ea5f35f4e5
commit
316d3693a4
@ -1234,5 +1234,20 @@ void BSplCLib::MergeBSplineKnots
|
|||||||
}
|
}
|
||||||
NumPoles = index - degree - 1 ;
|
NumPoles = index - degree - 1 ;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
degree = Degree1 + Degree2;
|
||||||
|
num_knots = 2;
|
||||||
|
NewKnots =
|
||||||
|
new TColStd_HArray1OfReal(1, num_knots);
|
||||||
|
NewKnots->ChangeArray1()(1) = StartValue;
|
||||||
|
NewKnots->ChangeArray1()(num_knots) = EndValue;
|
||||||
|
|
||||||
|
NewMults =
|
||||||
|
new TColStd_HArray1OfInteger(1, num_knots);
|
||||||
|
NewMults->ChangeArray1()(1) = degree + 1;
|
||||||
|
NewMults->ChangeArray1()(num_knots) = degree + 1;
|
||||||
|
NumPoles = BSplCLib::NbPoles(degree, Standard_False, NewMults->Array1());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -519,7 +519,6 @@ static Handle(Geom2d_BSplineCurve) MultNumandDenom(const Handle(Geom2d_BSplineCu
|
|||||||
Handle(TColStd_HArray1OfReal) resKnots;
|
Handle(TColStd_HArray1OfReal) resKnots;
|
||||||
Handle(TColStd_HArray1OfInteger) resMults;
|
Handle(TColStd_HArray1OfInteger) resMults;
|
||||||
Standard_Real start_value,end_value;
|
Standard_Real start_value,end_value;
|
||||||
Standard_Real tolerance=Precision::Confusion();
|
|
||||||
Standard_Integer resNbPoles,degree,
|
Standard_Integer resNbPoles,degree,
|
||||||
ii,jj,
|
ii,jj,
|
||||||
aStatus;
|
aStatus;
|
||||||
@ -531,6 +530,7 @@ static Handle(Geom2d_BSplineCurve) MultNumandDenom(const Handle(Geom2d_BSplineCu
|
|||||||
BS->KnotSequence(BSFlatKnots);
|
BS->KnotSequence(BSFlatKnots);
|
||||||
start_value = BSKnots(1);
|
start_value = BSKnots(1);
|
||||||
end_value = BSKnots(BS->NbKnots());
|
end_value = BSKnots(BS->NbKnots());
|
||||||
|
Standard_Real tolerance = 10.*Epsilon(Abs(end_value));
|
||||||
|
|
||||||
a->Knots(aKnots);
|
a->Knots(aKnots);
|
||||||
a->Poles(aPoles);
|
a->Poles(aPoles);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user