1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-29 14:00:49 +03:00

0026042: OCCT won't work with the latest Xcode

Dereferenced null pointers was eliminated for PLib, BSplCLib and BSplSLib. All affected code was changed accordingly.
This commit is contained in:
akz
2015-09-23 16:31:15 +03:00
committed by bugmaster
parent 42a9dcfc64
commit 0e14656b30
53 changed files with 867 additions and 906 deletions

View File

@@ -154,15 +154,15 @@ Standard_Integer SetSameDistribution(Handle(Geom_BSplineCurve)& C1,
Standard_Integer NP,NK;
if ( BSplCLib::PrepareInsertKnots(C1->Degree(),Standard_False,
K1,M1,K2,M2,NP,NK,Precision::PConfusion(),
K1,M1,K2,&M2,NP,NK,Precision::PConfusion(),
Standard_False)) {
TColgp_Array1OfPnt NewP(1, NP);
TColStd_Array1OfReal NewW(1, NP);
TColStd_Array1OfReal NewK(1, NK);
TColStd_Array1OfInteger NewM(1, NK);
BSplCLib::InsertKnots(C1->Degree(),Standard_False,
P1,W1,K1,M1,K2,M2,
NewP,NewW,NewK,NewM,Precision::PConfusion(),
P1,&W1,K1,M1,K2,&M2,
NewP,&NewW,NewK,NewM,Precision::PConfusion(),
Standard_False);
if ( C1->IsRational()) {
C1 = new Geom_BSplineCurve(NewP,NewW,NewK,NewM,C1->Degree());
@@ -171,8 +171,8 @@ Standard_Integer SetSameDistribution(Handle(Geom_BSplineCurve)& C1,
C1 = new Geom_BSplineCurve(NewP,NewK,NewM,C1->Degree());
}
BSplCLib::InsertKnots(C2->Degree(),Standard_False,
P2,W2,K2,M2,K1,M1,
NewP,NewW,NewK,NewM,Precision::PConfusion(),
P2,&W2,K2,M2,K1,&M1,
NewP,&NewW,NewK,NewM,Precision::PConfusion(),
Standard_False);
if ( C2->IsRational()) {
C2 = new Geom_BSplineCurve(NewP,NewW,NewK,NewM,C2->Degree());

View File

@@ -693,43 +693,43 @@ void GeomFill_ConstrainedFilling::MatchKnots()
if(BSplCLib::PrepareInsertKnots(degree[1],0,
knots[1]->Array1(),
mults[1]->Array1(),
addk,addm,nbnp,nbnk,tolk,0)){
addk,&addm,nbnp,nbnk,tolk,0)){
nm[1] = new TColStd_HArray1OfInteger(1,nbnk);
nk[1] = new TColStd_HArray1OfReal(1,nbnk);
ncpol[1] = new TColgp_HArray1OfPnt(1,nbnp);
ncpol[3] = new TColgp_HArray1OfPnt(1,nbnp);
BSplCLib::InsertKnots(degree[1],0,
curvpol[1]->Array1(),PLib::NoWeights(),
curvpol[1]->Array1(),BSplCLib::NoWeights(),
knots[1]->Array1(),mults[1]->Array1(),
addk,addm,
ncpol[1]->ChangeArray1(),PLib::NoWeights(),
addk,&addm,
ncpol[1]->ChangeArray1(),BSplCLib::NoWeights(),
nk[1]->ChangeArray1(),nm[1]->ChangeArray1(),
tolk,0);
BSplCLib::InsertKnots(degree[1],0,
curvpol[3]->Array1(),PLib::NoWeights(),
curvpol[3]->Array1(),BSplCLib::NoWeights(),
knots[1]->Array1(),mults[1]->Array1(),
addk,addm,
ncpol[3]->ChangeArray1(),PLib::NoWeights(),
addk,&addm,
ncpol[3]->ChangeArray1(),BSplCLib::NoWeights(),
nk[1]->ChangeArray1(),nm[1]->ChangeArray1(),
tolk,0);
if(!tgtepol[1].IsNull()){
ntpol[1] = new TColgp_HArray1OfPnt(1,nbnp);
BSplCLib::InsertKnots(degree[1],0,
tgtepol[1]->Array1(),PLib::NoWeights(),
tgtepol[1]->Array1(),BSplCLib::NoWeights(),
knots[1]->Array1(),mults[1]->Array1(),
addk,addm,
ntpol[1]->ChangeArray1(),PLib::NoWeights(),
addk,&addm,
ntpol[1]->ChangeArray1(),BSplCLib::NoWeights(),
nk[1]->ChangeArray1(),nm[1]->ChangeArray1(),
tolk,0);
}
if(!tgtepol[3].IsNull()){
ntpol[3] = new TColgp_HArray1OfPnt(1,nbnp);
BSplCLib::InsertKnots(degree[1],0,
tgtepol[3]->Array1(),PLib::NoWeights(),
tgtepol[3]->Array1(),BSplCLib::NoWeights(),
knots[1]->Array1(),mults[1]->Array1(),
addk,addm,
ntpol[3]->ChangeArray1(),PLib::NoWeights(),
addk,&addm,
ntpol[3]->ChangeArray1(),BSplCLib::NoWeights(),
nk[1]->ChangeArray1(),nm[1]->ChangeArray1(),
tolk,0);
}
@@ -760,43 +760,43 @@ void GeomFill_ConstrainedFilling::MatchKnots()
if(BSplCLib::PrepareInsertKnots(degree[0],0,
knots[0]->Array1(),
mults[0]->Array1(),
addk,addm,nbnp,nbnk,tolk,0)){
addk,&addm,nbnp,nbnk,tolk,0)){
nm[0] = new TColStd_HArray1OfInteger(1,nbnk);
nk[0] = new TColStd_HArray1OfReal(1,nbnk);
ncpol[0] = new TColgp_HArray1OfPnt(1,nbnp);
ncpol[2] = new TColgp_HArray1OfPnt(1,nbnp);
BSplCLib::InsertKnots(degree[0],0,
curvpol[0]->Array1(),PLib::NoWeights(),
curvpol[0]->Array1(),BSplCLib::NoWeights(),
knots[0]->Array1(),mults[0]->Array1(),
addk,addm,
ncpol[0]->ChangeArray1(),PLib::NoWeights(),
addk,&addm,
ncpol[0]->ChangeArray1(),BSplCLib::NoWeights(),
nk[0]->ChangeArray1(),nm[0]->ChangeArray1(),
tolk,0);
BSplCLib::InsertKnots(degree[0],0,
curvpol[2]->Array1(),PLib::NoWeights(),
curvpol[2]->Array1(),BSplCLib::NoWeights(),
knots[0]->Array1(),mults[0]->Array1(),
addk,addm,
ncpol[2]->ChangeArray1(),PLib::NoWeights(),
addk,&addm,
ncpol[2]->ChangeArray1(),BSplCLib::NoWeights(),
nk[0]->ChangeArray1(),nm[0]->ChangeArray1(),
tolk,0);
if(!tgtepol[0].IsNull()){
ntpol[0] = new TColgp_HArray1OfPnt(1,nbnp);
BSplCLib::InsertKnots(degree[0],0,
tgtepol[0]->Array1(),PLib::NoWeights(),
tgtepol[0]->Array1(),BSplCLib::NoWeights(),
knots[0]->Array1(),mults[0]->Array1(),
addk,addm,
ntpol[0]->ChangeArray1(),PLib::NoWeights(),
addk,&addm,
ntpol[0]->ChangeArray1(),BSplCLib::NoWeights(),
nk[0]->ChangeArray1(),nm[0]->ChangeArray1(),
tolk,0);
}
if(!tgtepol[2].IsNull()){
ntpol[2] = new TColgp_HArray1OfPnt(1,nbnp);
BSplCLib::InsertKnots(degree[0],0,
tgtepol[2]->Array1(),PLib::NoWeights(),
tgtepol[2]->Array1(),BSplCLib::NoWeights(),
knots[0]->Array1(),mults[0]->Array1(),
addk,addm,
ntpol[2]->ChangeArray1(),PLib::NoWeights(),
addk,&addm,
ntpol[2]->ChangeArray1(),BSplCLib::NoWeights(),
nk[0]->ChangeArray1(),nm[0]->ChangeArray1(),
tolk,0);
}
@@ -1355,10 +1355,10 @@ void GeomFill_ConstrainedFilling::CheckApprox(const Standard_Integer I)
uu /= nbp;
pbound = bou->Value(uu);
BSplCLib::D0(uu,0,degree[I%2],0,ncpol[I]->Array1(),BSplCLib::NoWeights(),
nk[I%2]->Array1(),nm[I%2]->Array1(),papp);
nk[I%2]->Array1(),&nm[I%2]->Array1(),papp);
if(donor) {
BSplCLib::D0(uu,0,degree[I%2],0,ntpol[I]->Array1(),BSplCLib::NoWeights(),
nk[I%2]->Array1(),nm[I%2]->Array1(),pbid);
nk[I%2]->Array1(),&nm[I%2]->Array1(),pbid);
vapp.SetXYZ(pbid.XYZ());
vbound = bou->Norm(uu);
if(vapp.Magnitude() > 1.e-15 && vbound.Magnitude() > 1.e-15){

View File

@@ -106,15 +106,15 @@ void GeomFill_Coons::Init(const TColgp_Array1OfPnt& P1,
PLib::CoefficientsPoles(Coef, PLib::NoWeights(),
Pole, PLib::NoWeights());
if (NPolU > 4) {
BSplCLib::IncreaseDegree(NPolU-1, Pole, PLib::NoWeights(),
CoefU, PLib::NoWeights());
BSplCLib::IncreaseDegree(NPolU-1, Pole, BSplCLib::NoWeights(),
CoefU, BSplCLib::NoWeights());
}
else {
CoefU = Pole;
}
if (NPolV > 4) {
BSplCLib::IncreaseDegree(NPolV-1, Pole, PLib::NoWeights(),
CoefV, PLib::NoWeights());
BSplCLib::IncreaseDegree(NPolV-1, Pole, BSplCLib::NoWeights(),
CoefV, BSplCLib::NoWeights());
}
else {
CoefV = Pole;