mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-06 18:26:22 +03:00
Wrong bounding box for edge on periodic B-Spline with target
range beyond own range. Improved consistency of 2D case with 3D
This commit is contained in:
parent
b1db572cfc
commit
1bd657ae3c
@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
#include <BndLib_Add2dCurve.ixx>
|
#include <BndLib_Add2dCurve.ixx>
|
||||||
#include <BndLib.hxx>
|
#include <BndLib.hxx>
|
||||||
|
#include <ElCLib.hxx>
|
||||||
#include <GeomAbs_CurveType.hxx>
|
#include <GeomAbs_CurveType.hxx>
|
||||||
|
|
||||||
#include <TColgp_Array1OfPnt2d.hxx>
|
#include <TColgp_Array1OfPnt2d.hxx>
|
||||||
@ -121,15 +122,18 @@ void BndLib_Add2dCurve::Add( const Adaptor2d_Curve2d& C,
|
|||||||
|
|
||||||
|
|
||||||
Handle(Geom2d_Geometry) G = Bs->Copy();
|
Handle(Geom2d_Geometry) G = Bs->Copy();
|
||||||
|
|
||||||
const Handle(Geom2d_BSplineCurve)& Bsaux = (*((Handle(Geom2d_BSplineCurve)*)&G));
|
const Handle(Geom2d_BSplineCurve)& Bsaux = (*((Handle(Geom2d_BSplineCurve)*)&G));
|
||||||
|
Standard_Real u1 = U1, u2 = U2;
|
||||||
|
if (Bsaux->IsPeriodic())
|
||||||
|
ElCLib::AdjustPeriodic( Bsaux->FirstParameter(), Bsaux->LastParameter(), Precision::PConfusion(), u1, u2 );
|
||||||
|
else {
|
||||||
|
////////////////////////////////////////////////
|
||||||
// modified by NIZHNY-EAP Fri Dec 3 14:29:14 1999 ___BEGIN___
|
// modified by NIZHNY-EAP Fri Dec 3 14:29:14 1999 ___BEGIN___
|
||||||
// To avoid exeption in Segment
|
// To avoid exeption in Segment
|
||||||
Standard_Real u1 = U1, u2 = U2;
|
|
||||||
if(Bsaux->FirstParameter() > U1) u1 = Bsaux->FirstParameter();
|
if(Bsaux->FirstParameter() > U1) u1 = Bsaux->FirstParameter();
|
||||||
if(Bsaux->LastParameter() < U2 ) u2 = Bsaux->LastParameter();
|
if(Bsaux->LastParameter() < U2 ) u2 = Bsaux->LastParameter();
|
||||||
// modified by NIZHNY-EAP Fri Dec 3 14:29:18 1999 ___END___
|
// modified by NIZHNY-EAP Fri Dec 3 14:29:18 1999 ___END___
|
||||||
|
}
|
||||||
Bsaux->Segment(u1, u2);
|
Bsaux->Segment(u1, u2);
|
||||||
for (Standard_Integer i = 1; i <= Bsaux->NbPoles(); i++) {
|
for (Standard_Integer i = 1; i <= Bsaux->NbPoles(); i++) {
|
||||||
B.Add(Bsaux->Pole(i));
|
B.Add(Bsaux->Pole(i));
|
||||||
|
@ -146,8 +146,7 @@ void BndLib_Add3dCurve::Add( const Adaptor3d_Curve& C,
|
|||||||
//// modified by jgv, 24.10.01 for BUC61031 ////
|
//// modified by jgv, 24.10.01 for BUC61031 ////
|
||||||
if (Bsaux->IsPeriodic())
|
if (Bsaux->IsPeriodic())
|
||||||
ElCLib::AdjustPeriodic( Bsaux->FirstParameter(), Bsaux->LastParameter(), Precision::PConfusion(), u1, u2 );
|
ElCLib::AdjustPeriodic( Bsaux->FirstParameter(), Bsaux->LastParameter(), Precision::PConfusion(), u1, u2 );
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
////////////////////////////////////////////////
|
////////////////////////////////////////////////
|
||||||
// modified by NIZHNY-EAP Fri Dec 3 14:29:14 1999 ___BEGIN___
|
// modified by NIZHNY-EAP Fri Dec 3 14:29:14 1999 ___BEGIN___
|
||||||
// To avoid exeption in Segment
|
// To avoid exeption in Segment
|
||||||
|
Loading…
x
Reference in New Issue
Block a user