1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0028346: Function ProjectOnSegments of ShapeAnalysis_Curve returns only single solution leading to projection result far from optimal

Subdivision of curve parametric interval based on deflection criteria is added for curve type OtherCurve in
Extrema_GExtPC.gxx. Algorithm of subdivision is implemented in Extrema_Curve(2d)Tool.cxx

New Draw command projpcurve for projection of point on CurveOnSurface is added in SWDRAW_ShapeAnalysis.cxx
projpcurve is modified to reflect "start parameter" in usage message and Draw help.
This commit is contained in:
ifv
2017-02-02 15:38:10 +03:00
committed by bugmaster
parent 75b9688a9f
commit f6b08ecf71
14 changed files with 317 additions and 36 deletions

View File

@@ -47,11 +47,17 @@ void GeomFill_SnglrFunc::SetRatio(const Standard_Real Ratio)
Standard_Integer GeomFill_SnglrFunc::NbIntervals(const GeomAbs_Shape S) const
{
GeomAbs_Shape HCS=GeomAbs_C0;
switch(S) {
case GeomAbs_C0: HCS = GeomAbs_C2; break;
case GeomAbs_C1: HCS = GeomAbs_C3; break;
case GeomAbs_C2: HCS = GeomAbs_CN; break;
default: throw Standard_DomainError();
if (S == GeomAbs_C0)
{
HCS = GeomAbs_C2;
}
else if (S == GeomAbs_C1)
{
HCS = GeomAbs_C3;
}
else if (S >= GeomAbs_C2)
{
HCS = GeomAbs_CN;
}
return myHCurve->NbIntervals(HCS);
}
@@ -59,11 +65,17 @@ void GeomFill_SnglrFunc::SetRatio(const Standard_Real Ratio)
void GeomFill_SnglrFunc::Intervals(TColStd_Array1OfReal& T,const GeomAbs_Shape S) const
{
GeomAbs_Shape HCS=GeomAbs_C0;
switch(S) {
case GeomAbs_C0: HCS = GeomAbs_C2; break;
case GeomAbs_C1: HCS = GeomAbs_C3; break;
case GeomAbs_C2: HCS = GeomAbs_CN; break;
default: throw Standard_DomainError();
if (S == GeomAbs_C0)
{
HCS = GeomAbs_C2;
}
else if (S == GeomAbs_C1)
{
HCS = GeomAbs_C3;
}
else if (S >= GeomAbs_C2)
{
HCS = GeomAbs_CN;
}
myHCurve->Intervals(T, HCS);
}