gp_Dir oX = myAx2->Ax2().XDirection();
gp_Dir oY = myAx2->Ax2().YDirection();
gp_Dir oZ = myAx2->Ax2().Direction();
- Quantity_Length xo,yo,zo,x,y,z;
+ Quantity_Length xo,yo,zo,x = 0.,y = 0.,z = 0.;
Orig.Coord(xo,yo,zo);
myPfirst.SetCoord(xo,yo,zo);
//=======================================================================
static void Locate1Coord(const Standard_Integer Index,
- const gp_Pnt2d& UV,
- const gp_Vec2d& DUV,
- const Handle(Geom_BSplineSurface)& BSplS,
- Standard_Boolean& DIsNull,
- gp_Pnt2d& LeftBot,
- gp_Pnt2d& RightTop)
+ const gp_Pnt2d& UV,
+ const gp_Vec2d& DUV,
+ const Handle(Geom_BSplineSurface)& BSplS,
+ Standard_Boolean& DIsNull,
+ gp_Pnt2d& LeftBot,
+ gp_Pnt2d& RightTop)
{
Standard_Real Comp1=0,DComp1=0;
Standard_Real Tol = Precision::PConfusion()/10;
- Standard_Integer i=1, Up=0, Up1, Up2, Down=0, Down1, Down2, Bnd1, Bnd2;
- Standard_Real cur=0, f, l;
+ Standard_Integer i=1, Up=0, Up1, Up2, Down=0, Down1, Down2;
+ Standard_Real cur = 0.;
DIsNull= Standard_False;
Up2 = BSplS->LastVKnotIndex();
Down2 = BSplS->FirstVKnotIndex();
-
- if(Index==1){ i = Down1; Comp1 = UV.X(); DComp1= DUV.X(); Up=Up1; Down=Down1;
- while ( ( Abs(BSplS->UKnot(i)-Comp1)>Tol )&&(i!=Up1 ) ) i++;
- cur = BSplS->UKnot(i);
- } else
- if(Index==2) { i = Down2; Comp1 = UV.Y(); DComp1=DUV.Y(); Up=Up2; Down=Down2;
- while ( ( Abs(BSplS->VKnot(i)-Comp1)>Tol )&&(i!=Up2 ) ) i++;
- cur = BSplS->VKnot(i);
- }
+ if(Index==1)
+ {
+ i = Down1;
+ Comp1 = UV.X();
+ DComp1= DUV.X();
+ Up=Up1;
+ Down=Down1;
+
+ while ( ( Abs(BSplS->UKnot(i)-Comp1)>Tol )&&(i!=Up1 ) )
+ {
+ i++;
+ }
+
+ cur = BSplS->UKnot(i);
+ }
+ else if(Index==2)
+ {
+ i = Down2;
+ Comp1 = UV.Y();
+ DComp1=DUV.Y();
+ Up=Up2;
+ Down=Down2;
+
+ while ( ( Abs(BSplS->VKnot(i)-Comp1)>Tol )&&(i!=Up2 ) )
+ {
+ i++;
+ }
+
+ cur = BSplS->VKnot(i);
+ }
if( Abs(Comp1-cur)<=Tol )
- {
- Bnd1 = Down; Bnd2 = Up;
- if(Index==1) {
- TColStd_Array1OfReal Arr1(1,BSplS->NbUKnots());
- BSplS->UKnots(Arr1); // Up1=Arr1.Upper(); Down1=Arr1.Lower();
- FindBounds(Arr1,cur,DUV.X(),Bnd1,Bnd2,DIsNull);
+ {
+ Standard_Integer Bnd1 = Down, Bnd2 = Up;
+ if(Index==1)
+ {
+ TColStd_Array1OfReal Arr1(1,BSplS->NbUKnots());
+ BSplS->UKnots(Arr1); // Up1=Arr1.Upper(); Down1=Arr1.Lower();
+ FindBounds(Arr1,cur,DUV.X(),Bnd1,Bnd2,DIsNull);
+ }
+ else if(Index==2)
+ {
+ TColStd_Array1OfReal Arr2(1,BSplS->NbVKnots());
+ BSplS->VKnots(Arr2); // Up2=Arr2.Upper(); Down2=Arr2.Lower();
+ FindBounds(Arr2,cur,DUV.Y(),Bnd1,Bnd2,DIsNull);
+ }
+
+ ReverseParam(Bnd1,Bnd2,Bnd1,Bnd2);
+
+ if(DIsNull==Standard_False)
+ {
+ if(Index==1)
+ {
+ LeftBot.SetX(BSplS->UKnot(Bnd1));
+ RightTop.SetX(BSplS->UKnot(Bnd2));
}
- else if(Index==2) {
- TColStd_Array1OfReal Arr2(1,BSplS->NbVKnots());
- BSplS->VKnots(Arr2); // Up2=Arr2.Upper(); Down2=Arr2.Lower();
- FindBounds(Arr2,cur,DUV.Y(),Bnd1,Bnd2,DIsNull);
+ else if(Index==2)
+ {
+ LeftBot.SetY(BSplS->VKnot(Bnd1));
+ RightTop.SetY(BSplS->VKnot(Bnd2));
}
-
- ReverseParam(Bnd1,Bnd2,Bnd1,Bnd2);
-
- if(DIsNull==Standard_False){
- if(Index==1) {LeftBot.SetX(BSplS->UKnot(Bnd1));
- RightTop.SetX(BSplS->UKnot(Bnd2));}
- else
- if(Index==2){ LeftBot.SetY(BSplS->VKnot(Bnd1));
- RightTop.SetY(BSplS->VKnot(Bnd2));
- }
- }
- }
+ }
+ }
else//*********if Coord != Knot
+ {
+ if( (Index==1)&&(Comp1 < BSplS->UKnot(Down)) )
+ {
+ LeftBot.SetX(BSplS->UKnot(Down));
+ RightTop.SetX( BSplS->UKnot(Down + 1) );
+ return;
+ }
+ else if( (Index==2)&&(Comp1 < BSplS->VKnot(Down)) )
+ {
+ LeftBot.SetY(BSplS->VKnot(Down));
+ RightTop.SetY( BSplS->VKnot(Down + 1) );
+ return;
+ }
+ else if( (Index==1)&&(Comp1 > BSplS->UKnot(Up)) )
+ {
+ RightTop.SetX(BSplS->UKnot(Up - 1));
+ LeftBot.SetX( BSplS->UKnot(Up) );
+ return;
+ }
+ else if( (Index==2)&&(Comp1 > BSplS->VKnot(Up)) )
+ {
+ RightTop.SetY(BSplS->VKnot(Up - 1));
+ LeftBot.SetY( BSplS->VKnot(Up) );
+ return;
+ }
+ else
{
- if( (Index==1)&&(Comp1 < BSplS->UKnot(Down)) )
- { LeftBot.SetX(BSplS->UKnot(Down));
- RightTop.SetX( BSplS->UKnot(Down + 1) );
- return; }
+ Standard_Real f = 0., l = 1.;
+ if (Index==1)
+ {
+ f=BSplS->UKnot(Down);
+ l=BSplS->UKnot(Up);
+ }
+ else if (Index == 2)
+ {
+ f=BSplS->VKnot(Down);
+ l=BSplS->VKnot(Up);
+ }
+
+ i = Down;
+ if ((!(Comp1 < f))&&(!(Comp1 > l)))
+ {
+ if (Index==1)
+ {
+ while (!(((f=BSplS->UKnot(i)) < Comp1)&&((l=BSplS->UKnot(i+1)) > Comp1)) && (i<Up))
+ {
+ i++;
+ }
+ }
+ else if (Index==2)
+ {
+ while (!(((f=BSplS->VKnot(i)) < Comp1)&&((l=BSplS->VKnot(i+1)) > Comp1)) && (i<Up))
+ {
+ i++;
+ }
+ }
+ }
else
- if( (Index==2)&&(Comp1 < BSplS->VKnot(Down)) )
- { LeftBot.SetY(BSplS->VKnot(Down));
- RightTop.SetY( BSplS->VKnot(Down + 1) );
- return; }
- else
- if( (Index==1)&&(Comp1 > BSplS->UKnot(Up)) )
- { RightTop.SetX(BSplS->UKnot(Up - 1));
- LeftBot.SetX( BSplS->UKnot(Up) );
- return; }
- else
- if( (Index==2)&&(Comp1 > BSplS->VKnot(Up)) )
- { RightTop.SetY(BSplS->VKnot(Up - 1));
- LeftBot.SetY( BSplS->VKnot(Up) );
- return; }
- else
- { i = Down;
- if( (Index==1)&&(!(Comp1 < BSplS->UKnot(Down)))&&(!(Comp1 > BSplS->UKnot(Up))) )
- while (!( ((f=BSplS->UKnot(i)) < Comp1)&&((l=BSplS->UKnot(i+1)) > Comp1)) && (i<Up)) i++;
- else
- if( (Index==2)&&(!(Comp1 < BSplS->VKnot(Down)))&&(!(Comp1 > BSplS->VKnot(Up))) )
- while (!(((f=BSplS->VKnot(i)) < Comp1)&&((l=BSplS->VKnot(i+1)) > Comp1)) && (i<Up)) i++;
- else
- ReverseParam(f,l,f,l);
-
- if(i!=Up){
- if(Abs(DComp1)>Tol)
- {if(Index==1) {
- if(DComp1>0){ LeftBot.SetX(Comp1); RightTop.SetX(l);}else
- if(DComp1<0){LeftBot.SetX(f); RightTop.SetX(Comp1);}
- }else
- if(Index==2) {
- if(DComp1>0){ LeftBot.SetY(Comp1); RightTop.SetY(l);}else
- if(DComp1<0){ LeftBot.SetY(f); RightTop.SetY(Comp1);}
- }
- }
- else
- {
- if(Abs(DComp1)<Tol)
- {if(Index==1){LeftBot.SetX(f); RightTop.SetX(l);} else
- if(Index==2) { LeftBot.SetY(f); RightTop.SetY(l);}
- }
- }
- }else
- if(i==Up){if(Index==1){LeftBot.SetX(Comp1); RightTop.SetX(BSplS->UKnot(i));} else
- if(Index==2) { LeftBot.SetY(Comp1); RightTop.SetY(BSplS->VKnot(i));}
- }
- }
+ ReverseParam(f,l,f,l);
+
+ if(i!=Up)
+ {
+ if(Abs(DComp1)>Tol)
+ {
+ if(Index==1)
+ {
+ if(DComp1>0)
+ {
+ LeftBot.SetX(Comp1);
+ RightTop.SetX(l);
+ }
+ else if(DComp1<0)
+ {
+ LeftBot.SetX(f);
+ RightTop.SetX(Comp1);
+ }
+ }
+ else if(Index==2)
+ {
+ if(DComp1>0)
+ {
+ LeftBot.SetY(Comp1);
+ RightTop.SetY(l);
+ }
+ else if(DComp1<0)
+ {
+ LeftBot.SetY(f);
+ RightTop.SetY(Comp1);
+ }
+ }
+ }
+ else
+ {
+ if(Abs(DComp1)<Tol)
+ {
+ if(Index==1)
+ {
+ LeftBot.SetX(f);
+ RightTop.SetX(l);
+ }
+ else if(Index==2)
+ {
+ LeftBot.SetY(f);
+ RightTop.SetY(l);
+ }
+ }
+ }
+ }
+ else if(i==Up)
+ {
+ if(Index==1)
+ {
+ LeftBot.SetX(Comp1);
+ RightTop.SetX(BSplS->UKnot(i));
+ }
+ else if(Index==2)
+ {
+ LeftBot.SetY(Comp1);
+ RightTop.SetY(BSplS->VKnot(i));
+ }
+ }
}
+ }
}
//=======================================================================
//function :Locate2Coord
uinf = myS->FirstUParameter(); usup = myS->LastUParameter();
vinf = myS->FirstVParameter(); vsup = myS->LastVParameter();
- Standard_Integer i, j, k, nbi;
+ Standard_Integer i, k, j = 1;
Standard_Real t1, t2, dt;
Standard_Integer ui1 = aBS->FirstUKnotIndex();
Standard_Integer ui2 = aBS->LastUKnotIndex();
}
}
else {
- nbi = aBS->UDegree();
+ Standard_Integer nbi = aBS->UDegree();
k = 0;
t1 = uinf;
for(i = ui1+1; i <= ui2; ++i) {
}
}
else {
- nbi = aBS->VDegree();
+ Standard_Integer nbi = aBS->VDegree();
k = 0;
t1 = vinf;
for(i = vi1+1; i <= vi2; ++i) {
/* Local variables */
integer nroo2, ncfhe, nd, ii, kk;
integer ibb, kkm, kkp;
- doublereal bid1, bid2, bid3;
+ doublereal bid1, bid2, bid3 = 0.;
/* **********************************************************************
*/
integer crvjac_dim1, crvjac_offset, i__1, i__2;
/* Local variables */
- integer idim, ncfja, ncfnw, ndses, ii, kk, ibb, ier = 0;
+ integer idim, ncfja, ncfnw, ndses, ii, kk, ibb, ier;
integer nbr0;
intptr_t iofwr;
doublereal* wrkar = 0;
integer iszwr;
- integer ibb, ier;
+ integer ibb, ier = 0;
integer isz1, isz2, isz3, isz4;
intptr_t ipt1, ipt2, ipt3, ipt4;
Standard_Real TCONST = myConstPar;
// data related to the type of the iso
- Standard_Integer ISOFAV,NBROOT,NDGJAC,NCFLIM;
+ Standard_Integer ISOFAV = 0,NBROOT = 0,NDGJAC = 0,NCFLIM = 1;
Standard_Real TABDEC[2];
Handle (TColStd_HArray1OfReal) HUROOT = Conditions.URoots();
Handle (TColStd_HArray1OfReal) HVROOT = Conditions.VRoots();
integer ndec;
doublereal tdeb, tfin;
integer iter;
- doublereal oldso;
+ doublereal oldso = 0.;
integer itmax;
doublereal sottc;
integer kk, ibb;
/* Local variables */
doublereal* work = 0;
- integer ilong, isize, ii, jj, ier;
- intptr_t iofst,iipt, jjpt;
+ integer ilong, isize, ii, jj, ier = 0;
+ intptr_t iofst = 0,iipt, jjpt;
/************************************************************************
/* Local variables */
doublereal tran;
- integer ngaus;
- doublereal c1, c2, d1, d2, wgaus[20], uroot[20], x1, x2, dd;
+ integer ngaus = 0;
+ doublereal c1, c2, d1, d2,
+ wgaus[20] = {0.}, uroot[20] = {0.}, x1, x2, dd;
integer ii, jj, kk;
doublereal som;
doublereal der1, der2;
doublereal d__1;
/* Local variables */
- integer nchif, iunit, izero;
+ integer nchif, iunit = 1, izero;
doublereal vnorm;
integer ii;
doublereal bid;
char cbid[1];
integer ibid, ienr;
doublereal* t = 0;
- integer novfl;
+ integer novfl = 0;
intptr_t ioff,iadrfl, iadt;
}
// the computation of Qq(t)
- Standard_Real Sum;
+ Standard_Real Sum = 0.;
for (k=0; k<=DegreeQ; k+=2) {
for (idim=1; idim<=myTotalDimension; idim++) {
Sum=0.;
ICurv(1, LastPoint-FirstPoint+1)
{
Standard_Integer i, j, k, NbCu= SCurv.NbCurves();
-// Standard_Integer Npt, Nptl = LastPoint-FirstPoint+1;
Standard_Integer Npt;
- Standard_Integer Inc3, IncSec, IncCol, IP, CCol;
+ Standard_Integer Inc3, IncSec, IncCol, IP = 0, CCol;
Standard_Integer myindex, Def = SCurv.NbPoles()-1;
Standard_Integer nb3d, nb2d, Npol= Def+1, Npol2 = 2*Npol;
- Standard_Real T1, T2, T3, Tmax, Daij;
+ Standard_Real T1 = 0., T2 = 0., T3, Tmax, Daij;
Standard_Boolean Ok;
gp_Vec V;
gp_Vec2d V2d;
// Equations exprimant le meme rapport de tangence sur chaque courbe:
// On prend les coordonnees les plus significatives.
- Inc3 = Inc3 -1;
- for (i =1; i <= IncTan; i++) {
+ --Inc3;
+ for (i = 1; i <= IncTan; ++i) {
IncCol = 0;
Npt = ITan(i);
- for (k = 1; k <= NbCu-1; k++) {
- Inc3 = Inc3 + 1;
- if (Ibont(k, i) == 1) {
- if (k <= nb3d) {
- Ok = ToolLine::Tangency(SSP, Npt, tabV);
- V = tabV(k);
- T1 = V.X();
- IP = 3*Npol;
- }
- else {
- Ok = ToolLine::Tangency(SSP, Npt, tabV2d);
- V2d = tabV2d(k-nb3d);
- T1 = V2d.X();
- IP = 2*Npol;
- }
- if (Ibont(k+1, i) == 1) { // Relations entre T1x et T2x:
- if ((k+1) <= nb3d) {
- Ok = ToolLine::Tangency(SSP, Npt, tabV);
- V = tabV(k+1);
- T2 = V.X();
- }
- else {
- Ok = ToolLine::Tangency(SSP, Npt, tabV2d);
- V2d = tabV2d(k+1-nb3d);
- T2 = V2d.X();
- }
- for (j = 1; j <= Npol; j++) {
- Daij = DerivativeBern(Npt, j);
- Cont(Inc3, j + IncCol) = Daij*T2;
- Cont(Inc3, j + IP + IncCol) = -Daij*T1;
- }
- IncCol = IncCol + IP;
- }
- else if (Ibont(k+1, i) == 2) { // Relations entre T1x et T2y:
- if ((k+1) <= nb3d) {
- Ok = ToolLine::Tangency(SSP, Npt, tabV);
- V = tabV(k+1);
- T2 = V.Y();
- }
- else {
- Ok = ToolLine::Tangency(SSP, Npt, tabV2d);
- V2d = tabV2d(k+1-nb3d);
- T2 = V2d.Y();
- }
- for (j = 1; j <= Npol; j++) {
- Daij = DerivativeBern(Npt, j);
- Cont(Inc3, j + IncCol) = Daij*T2;
- Cont(Inc3, j + IP + Npol + IncCol) = -Daij*T1;
- }
- IncCol = IncCol + IP;
- }
- else if (Ibont(k+1,i) == 3) { // Relations entre T1x et T2z:
- Ok = ToolLine::Tangency(SSP, Npt, tabV);
- V = tabV(k+1);
- T2 = V.Z();
- for (j = 1; j <= Npol; j++) {
- Daij = DerivativeBern(Npt, j);
- Cont(Inc3, j + IncCol) = Daij*T2;
- Cont(Inc3, j + IP + 2*Npol + IncCol) = -Daij*T1;
- }
- IncCol = IncCol + IP;
- }
+ for (k = 1; k <= NbCu-1; ++k) {
+ ++Inc3;
+// Initialize first relation variable (T1)
+ Standard_Integer addIndex_1 = 0, aVal = Ibont(k, i);
+ switch (aVal)
+ {
+ case 1: //T1 ~ T1x
+ {
+ if (k <= nb3d) {
+ Ok = ToolLine::Tangency(SSP, Npt, tabV);
+ V = tabV(k);
+ T1 = V.X();
+ IP = 3 * Npol;
+ }
+ else {
+ Ok = ToolLine::Tangency(SSP, Npt, tabV2d);
+ V2d = tabV2d(k-nb3d);
+ T1 = V2d.X();
+ IP = 2 * Npol;
+ }
+ addIndex_1 = 0;
+ break;
+ }
+ case 2: //T1 ~ T1y
+ {
+ if (k <= nb3d) {
+ Ok = ToolLine::Tangency(SSP, Npt, tabV);
+ V = tabV(k);
+ IP = 3 * Npol;
+ }
+ else {
+ Ok = ToolLine::Tangency(SSP, Npt, tabV2d);
+ V2d = tabV2d(k-nb3d);
+ T1 = V2d.Y();
+ IP = 2 * Npol;
+ }
+ addIndex_1 = Npol;
+ break;
+ }
+ case 3: //T1 ~ T1z
+ {
+ Ok = ToolLine::Tangency(SSP, Npt, tabV);
+ V = tabV(k);
+ T1 = V.Z();
+ IP = 3 * Npol;
+ addIndex_1 = 2 * Npol;
+ break;
+ }
}
- else if (Ibont(k,i) == 2) {
- if (k <= nb3d) {
- Ok = ToolLine::Tangency(SSP, Npt, tabV);
- V = tabV(k);
- IP = 3*Npol;
- }
- else {
- Ok = ToolLine::Tangency(SSP, Npt, tabV2d);
- V2d = tabV2d(k-nb3d);
- T1 = V2d.Y();
- IP = 2*Npol;
- }
- if (Ibont(k+1, i) == 1) { // Relations entre T1y et T2x:
- if ((k+1) <= nb3d) {
- Ok = ToolLine::Tangency(SSP, Npt, tabV);
- V = tabV(k+1);
- T2 = V.X();
- }
- else {
- Ok = ToolLine::Tangency(SSP, Npt, tabV2d);
- V2d = tabV2d(k+1-nb3d);
- T2 = V2d.X();
- }
- for (j = 1; j <= Npol; j++) {
- Daij = DerivativeBern(Npt, j);
- Cont(Inc3, j + Npol + IncCol) = Daij*T2;
- Cont(Inc3, j + IP + IncCol) = -Daij*T1;
- }
- IncCol = IncCol + IP;
-
- }
- else if (Ibont(k+1, i) == 2) { // Relations entre T1y et T2y:
- if ((k+1) <= nb3d) {
- Ok = ToolLine::Tangency(SSP, Npt, tabV);
- V = tabV(k+1);
- T2 = V.Y();
- }
- else {
- Ok = ToolLine::Tangency(SSP, Npt, tabV2d);
- V2d = tabV2d(k+1-nb3d);
- T2 = V2d.Y();
- }
- for (j = 1; j <= Npol; j++) {
- Daij = DerivativeBern(Npt, j);
- Cont(Inc3, j + Npol + IncCol) = Daij*T2;
- Cont(Inc3, j + IP + Npol + IncCol) = -Daij*T1;
- }
- IncCol = IncCol + IP;
-
- }
- else if (Ibont(k+1,i)== 3) { // Relations entre T1y et T2z:
- Ok = ToolLine::Tangency(SSP, Npt, tabV);
- V = tabV(k+1);
- T2 = V.Z();
- for (j = 1; j <= Npol; j++) {
- Daij = DerivativeBern(Npt, j);
- Cont(Inc3, j + Npol +IncCol) = Daij*T2;
- Cont(Inc3, j + IP + 2*Npol + IncCol) = -Daij*T1;
- }
- IncCol = IncCol + IP;
- }
+ // Initialize second relation variable (T2)
+ Standard_Integer addIndex_2 = 0, aNextVal = Ibont(k + 1, i);
+ switch (aNextVal)
+ {
+ case 1: //T2 ~ T2x
+ {
+ if ((k+1) <= nb3d) {
+ Ok = ToolLine::Tangency(SSP, Npt, tabV);
+ V = tabV(k+1);
+ T2 = V.X();
+ }
+ else {
+ Ok = ToolLine::Tangency(SSP, Npt, tabV2d);
+ V2d = tabV2d(k+1-nb3d);
+ T2 = V2d.X();
+ }
+ addIndex_2 = 0;
+ break;
+ }
+ case 2: //T2 ~ T2y
+ {
+ if ((k+1) <= nb3d) {
+ Ok = ToolLine::Tangency(SSP, Npt, tabV);
+ V = tabV(k+1);
+ T2 = V.Y();
+ }
+ else {
+ Ok = ToolLine::Tangency(SSP, Npt, tabV2d);
+ V2d = tabV2d(k+1-nb3d);
+ T2 = V2d.Y();
+ }
+ addIndex_2 = Npol;
+ break;
+ }
+ case 3: //T2 ~ T2z
+ {
+ Ok = ToolLine::Tangency(SSP, Npt, tabV);
+ V = tabV(k+1);
+ T2 = V.Z();
+ addIndex_2 = 2 * Npol;
+ break;
+ }
}
-
- else {
- Ok = ToolLine::Tangency(SSP, Npt, tabV);
- V = tabV(k);
- T1 = V.Z();
- IP = 3*Npol;
- if (Ibont(k+1, i) == 1) { // Relations entre T1z et T2x:
- if ((k+1) <= nb3d) {
- Ok = ToolLine::Tangency(SSP, Npt, tabV);
- V = tabV(k+1);
- T2 = V.X();
- }
- else {
- Ok = ToolLine::Tangency(SSP, Npt, tabV2d);
- V2d = tabV2d(k+1-nb3d);
- T2 = V2d.X();
- }
- for (j = 1; j <= Npol; j++) {
- Daij = DerivativeBern(Npt, j);
- Cont(Inc3, j + 2*Npol +IncCol) = Daij*T2;
- Cont(Inc3, j + IP + IncCol) = -Daij*T1;
- }
- IncCol = IncCol + IP;
- }
-
- else if (Ibont(k+1, i) == 2) { // Relations entre T1z et T2y:
- if ((k+1) <= nb3d) {
- Ok = ToolLine::Tangency(SSP, Npt, tabV);
- V = tabV(k+1);
- T2 = V.Y();
- }
- else {
- Ok = ToolLine::Tangency(SSP, Npt, tabV2d);
- V2d = tabV2d(k+1-nb3d);
- T2 = V2d.Y();
- }
- for (j = 1; j <= Npol; j++) {
- Daij = DerivativeBern(Npt, j);
- Cont(Inc3, j + 2*Npol +IncCol) = Daij*T2;
- Cont(Inc3, j + IP + Npol + IncCol) = -Daij*T1;
- }
- IncCol = IncCol + IP;
- }
-
- else if (Ibont(k+1,i)==3) { // Relations entre T1z et T2z:
- Ok = ToolLine::Tangency(SSP, Npt, tabV);
- V = tabV(k+1);
- T2 = V.Z();
- for (j = 1; j <= Npol; j++) {
- Daij = DerivativeBern(Npt, j);
- Cont(Inc3, j + 2*Npol + IncCol) = Daij*T2;
- Cont(Inc3, j + IP + 2*Npol + IncCol) = -Daij*T1;
- }
- IncCol = IncCol + IP;
- }
+
+ // Relations between T1 and T2:
+ for (j = 1; j <= Npol; j++) {
+ Daij = DerivativeBern(Npt, j);
+ Cont(Inc3, j + IncCol + addIndex_1) = Daij*T2;
+ Cont(Inc3, j + IP + IncCol + addIndex_2) = -Daij*T1;
}
+ IncCol += IP;
}
}
Handle(TColStd_HArray1OfReal) CurrentTi, NewTi, OldTi;
Handle(TColStd_HArray2OfInteger) Dependence;
Standard_Boolean lestim, lconst, ToOptim, iscut;
- Standard_Boolean isnear, again = Standard_True;
+ Standard_Boolean isnear = Standard_False, again = Standard_True;
Standard_Integer NbEst, ICDANA, NumPnt, Iter;
Standard_Integer MaxNbEst =5;
Standard_Real VOCRI[3] = {BigValue, BigValue, BigValue}, EROLD = BigValue,
- VALCRI[3], ERRMAX, ERRMOY, ERRQUA;
+ VALCRI[3], ERRMAX = BigValue, ERRMOY, ERRQUA;
Standard_Real CBLONG, LNOLD;
Standard_Integer NbrPnt = myLastPoint - myFirstPoint + 1;
Standard_Integer NbrConstraint = myNbPassPoints + myNbTangPoints + myNbCurvPoints;
Handle(FEmTool_Curve) CCurrent, COld, CNew;
- Standard_Real EpsLength;// = 1.e-6 * CBLONG / NbrPnt;
- Standard_Real EpsDeg; // = Min(WQuality * .1, CBLONG * .001);
+ Standard_Real EpsLength = SmallValue;
+ Standard_Real EpsDeg;
Standard_Real e1, e2, e3;
Standard_Real J1min, J2min, J3min;
delete TheAssembly;
}
-
-
-
-
-
#include <TColStd_Array1OfReal.hxx>
#include <AppParCurves_Constraint.hxx>
#include <Approx_Status.hxx>
+#include <Precision.hxx>
//=======================================================================
//function : Approx_ComputeCLine
void Approx_ComputeCLine::Perform(const MultiLine& Line)
{
-
-
Standard_Real UFirst, ULast;
Standard_Boolean Finish = Standard_False,
begin = Standard_True, Ok = Standard_False;
- Standard_Real thetol3d, thetol2d;
+ Standard_Real thetol3d = Precision::Confusion(), thetol2d = Precision::Confusion();
UFirst = LineTool::FirstParameter(Line);
ULast = LineTool::LastParameter(Line);
Standard_Real TolU = (ULast-UFirst)*1.e-05;
// previous decision to be taken if we get worse with next cut (eap)
AppParCurves_MultiCurve KeptMultiCurve;
- Standard_Real KeptUfirst, KeptUlast, KeptT3d, KeptT2d;
+ Standard_Real KeptUfirst = 0., KeptUlast = 0., KeptT3d = RealLast(), KeptT2d = 0.;
Standard_Integer NbWorseDecis = 0, NbAllowedBadDecis = 10;
-
- KeptT3d = RealLast(); KeptT2d = 0;
-
+
while (!Finish) {
// Gestion du decoupage de la multiline pour approximer:
void BOPAlgo_BOP::BuildRC()
{
Standard_Boolean bFlag;
- Standard_Integer i, aDmin, aNb[2], iX, iY;
+ Standard_Integer i, aDmin, aNb[2], iX = 0, iY = 0;
TopAbs_ShapeEnum aTmin;
TopoDS_Compound aC, aCS[2];
BRep_Builder aBB;
}
//
Standard_Boolean bHasPaveBlocks, bOld;
- Standard_Integer iErr, nSx, nVSD, iX, iP, iC, j, nV, iV, iE, k;
+ Standard_Integer iErr, nSx, nVSD, iX, iP, iC, j, nV, iV = 0, iE, k;
Standard_Integer jx;
Standard_Real aT;
Standard_Integer aNbLPBx;
//=======================================================================
void BOPDS_DS::InitPaveBlocks(const Standard_Integer theI)
{
- Standard_Integer nV, iRef, aNbV, nVSD, i;
+ Standard_Integer nV = 0, iRef, aNbV, nVSD, i;
Standard_Real aT;
TopoDS_Vertex aV;
BOPCol_ListIteratorOfListOfInteger aIt;
{
Standard_Boolean bFound;
Standard_Integer i, aNbCEF;
- TopAbs_Orientation aOr, aOrC;
+ TopAbs_Orientation aOr, aOrC = TopAbs_FORWARD;
BOPCol_MapOfShape aMFP;
TopoDS_Face aF1, aF2;
TopoDS_Edge aEL, aE1;
void BOPTools_AlgoTools3D::DoSplitSEAMOnFace (const TopoDS_Edge& aSplit,
const TopoDS_Face& aF)
{
- Standard_Boolean bIsUPeriodic, bIsVPeriodic, bIsLeft;
+ Standard_Boolean bIsUPeriodic, bIsVPeriodic, bIsLeft = Standard_False;
Standard_Real aTol, a, b, anUPeriod, anVPeriod, aT, anU, dU=1.e-7, anU1,
anV, dV=1.e-7, anV1;
Standard_Real aScPr;
//
if (!bIsUPeriodic && !bIsVPeriodic) {
Standard_Boolean bIsUClosed, bIsVClosed;
- Standard_Real aUmin, aUmax, aVmin, aVmax;
+ Standard_Real aUmin = 0., aUmax = 0., aVmin = 0., aVmax = 0.;
Handle(Geom_BSplineSurface) aBS;
Handle(Geom_BezierSurface) aBZ;
//
Standard_Boolean bIsDone, bHasFirstPoint, bHasSecondPoint;
Standard_Integer iErr, aIx, aNbDomains, i;
Standard_Real aUMin, aUMax, aVMin, aVMax;
- Standard_Real aVx, aUx, aV1, aV2, aEpsT;
+ Standard_Real aVx = 0., aUx, aV1, aV2, aEpsT;
gp_Dir2d aD2D (0., 1.);
gp_Pnt2d aP2D;
gp_Pnt aPx;
TopoDS_Iterator aItF, aItW, aItE;
BRep_Builder aBB;
//
- aTolF = BRep_Tool::Tolerance(aF);
+ aTolE = aTolF = BRep_Tool::Tolerance(aF);
aItF.Initialize(aF);
for (; aItF.More(); aItF.Next()) {
const TopoDS_Shape& aS = aItF.Value();
//=======================================================================
Standard_Integer BOPTools_AlgoTools::Dimension(const TopoDS_Shape& theS)
{
- Standard_Integer i, iRet, iRx0, iRx;
+ Standard_Integer i, iRet, iRx0 = 0, iRx = 0;
TopAbs_ShapeEnum aTS;
BOPCol_ListOfShape aLS;
BOPCol_ListIteratorOfListOfShape aIt;
{
BRep_ListIteratorOfListOfCurveRepresentation itcr(lcr);
Handle(BRep_GCurve) GC;
- Standard_Real f,l;
+ Standard_Real f = 0.,l = 0.;
while (itcr.More()) {
GC = Handle(BRep_GCurve)::DownCast(itcr.Value());
BRep_ListIteratorOfListOfCurveRepresentation itcr(lcr);
Handle(BRep_CurveRepresentation) cr;
Handle(BRep_GCurve) GC;
- Standard_Real f,l;
+ Standard_Real f = 0.,l = 0.;
Standard_Boolean rangeFound = Standard_False;
// search the range of the 3d curve
BRep_ListIteratorOfListOfCurveRepresentation itcr(lcr);
Handle(BRep_CurveRepresentation) cr;
Handle(BRep_GCurve) GC;
- Standard_Real f,l;
+ Standard_Real f = 0.,l = 0.;
Standard_Boolean rangeFound = Standard_False;
// search the range of the 3d curve
BRep_ListIteratorOfListOfCurveRepresentation itcr(lcr);
Handle(BRep_CurveRepresentation) cr;
Handle(BRep_GCurve) GC;
- Standard_Real f,l;
+ Standard_Real f = 0.,l = 0.;
while (itcr.More()) {
GC = Handle(BRep_GCurve)::DownCast(itcr.Value());
BRep_ListIteratorOfListOfCurveRepresentation itcr(lcr);
Handle(BRep_CurveRepresentation) cr;
Handle(BRep_GCurve) GC;
- Standard_Real f,l;
+ Standard_Real f = 0.,l = 0.;
while (itcr.More()) {
GC = Handle(BRep_GCurve)::DownCast(itcr.Value());
TColStd_SequenceOfReal FparSeq;
TColStd_SequenceOfReal LparSeq;
TColStd_SequenceOfReal TolSeq;
- GeomAbs_CurveType CurType;
+ GeomAbs_CurveType CurType = GeomAbs_OtherCurve;
TopoDS_Vertex FirstVertex, LastVertex;
Standard_Boolean FinalReverse = Standard_False;
else
{
Standard_Boolean Done = Standard_False;
- Standard_Real NewFpar, NewLpar;
+ Standard_Real NewFpar = 0., NewLpar = 0.;
GeomAdaptor_Curve GAprevcurve(CurveSeq.Last());
TopoDS_Vertex CurVertex = wexp.CurrentVertex();
TopoDS_Vertex CurFirstVer = TopExp::FirstVertex(anEdge);
}
Blend_Status State = Blend_OnRst12;
Standard_Real trst11 = 0., trst12 = 0., trst21 = 0., trst22 = 0.;
- TopAbs_State situonc1, situonc2;
- Blend_DecrochStatus decroch;
+ TopAbs_State situonc1 = TopAbs_UNKNOWN, situonc2 = TopAbs_UNKNOWN;
+ Blend_DecrochStatus decroch = Blend_NoDecroch;
Standard_Boolean Arrive, recadp1, recadp2, recadrst1, recadrst2, echecrecad;
Standard_Real wp1, wp2, wrst1, wrst2;
math_Vector infbound(1, 2), supbound(1, 2);
Standard_Boolean ok = Standard_False;
Standard_Boolean byinter = (line->NbPoints() != 0), okinter = 0;
Standard_Real distmin = RealLast();
- Standard_Real uprev = 0.0, vprev = 0.0, prm = 0.0, dist = 0.0;
+ Standard_Real uprev = 0.,vprev = 0., prm = 0., dist = 0.;
if(byinter) previousP.ParametersOnS(uprev,vprev);
pt2d.SetCoord(sol(1),sol(2));
Standard_Real trst = 0.;
Standard_Boolean recadp,recadrst,recads;
Standard_Real wp,wrst,ws;
- Standard_Real U,V;
+ Standard_Real U = 0.,V = 0.;
math_Vector infbound(1,3),supbound(1,3),tolerance(1,3);
math_Vector solinvp(1,3),solinvrst(1,4),solinvs(1,3);
Handle(Adaptor3d_HVertex) Vtxp,Vtxrst,Vtxs,Vtxc;
return;
}
Blend_Status State = Blend_OnRst12;
- TopAbs_State situonc,situons;
- Standard_Boolean decroch;
+ TopAbs_State situonc = TopAbs_UNKNOWN, situons = TopAbs_UNKNOWN;
+ Standard_Boolean decroch = Standard_False;
Standard_Boolean Arrive,recadp,recadrst,recads,echecrecad;
Standard_Real wp,wrst,ws;
- Standard_Real U,V;
- Standard_Real trst = 0.;
+ Standard_Real U = 0.,V = 0.;
+ Standard_Real trst = 0.;
math_Vector infbound(1,3),supbound(1,3);
math_Vector parinit(1,3),tolerance(1,3);
math_Vector solinvp(1,3),solinvrst(1,4),solinvs(1,3);
f2-IP_ParamOnSecond > ::Precision::PConfusion() ||
IP_ParamOnSecond-l2 > ::Precision::PConfusion() )
continue;
- Standard_Real tolvtt;
+ Standard_Real tolvtt = 0.;
// Modified by Sergey KHROMOV - Mon Apr 15 12:34:22 2002 Begin
if (!ConS.IsNull()) {
P3d = ConS->Value(IP_ParamOnFirst);
// 1
Standard_Boolean bFound, bFlag;
Standard_Integer nump;
- Standard_Real aParam, aU1, aV1, aU2, aV2;
+ Standard_Real aParam, aU1 = 0., aV1 = 0., aU2 = 0., aV2 = 0.;
gp_Pnt A,B;
gp_Dir aDN1, aDN2;
TopoDS_Face aF1, aF2;
// That's why the main loop while is added.
Standard_Boolean isFaultyLine = Standard_True;
Standard_Integer anIndFace = 0;
- Standard_Real parmin;
+ Standard_Real parmin = 0.;
while (isFaultyLine) {
if (anIndFace == 0) {
Precision::IsInfinite(aLast2))
return;
- Standard_Real Umin, Umax;
+ Standard_Real Umin = 0., Umax = 0.;
Standard_Boolean bUmin, bUmax;
bUmin = bUmax = Standard_False;
const Standard_Boolean bRestrict = BRep_Tool::NaturalRestriction(aF);
Standard_Real U1, V1, U2, V2;
- Standard_Real Umin, Umax, Vmin, Vmax;
+ Standard_Real Umin = RealLast(), Umax = RealFirst(), Vmin = RealLast(), Vmax = RealFirst();
Standard_Boolean bUmin, bUmax, bVmin, bVmax;
bUmin = bUmax = bVmin = bVmax = Standard_False;
Standard_Boolean bIsTrim = Standard_False;
Sh.Orientation(TopAbs_FORWARD);
-#ifdef DEB
- TopAbs_Orientation orient;
-#else
+
TopAbs_Orientation orient = TopAbs_FORWARD;
-#endif
+
for (exp.Init(Sh,TopAbs_FACE); exp.More(); exp.Next()) {
if (exp.Current().IsSame(Fac)) {
orient = exp.Current().Orientation();
TopTools_ListOfShape lshape;
theBuilder.PartsOfTool(lshape);
//
- Standard_Real pbmin, pbmax, prmin, prmax;
- Standard_Boolean flag1;
+ Standard_Real pbmin = RealLast(), pbmax = RealFirst();
+ Standard_Real prmin = RealLast() - 2*Precision::Confusion();
+ Standard_Real prmax = RealFirst() + 2*Precision::Confusion();
+ Standard_Boolean flag1 = Standard_False;
Handle(Geom_Curve) C;
//--- Selection of pieces of tool to be preserved
exp1.Init(exp.Current(), TopAbs_VERTEX);
if(!exp1.More())
{
- FacRevolInfini = Standard_True;
- break;
+ FacRevolInfini = Standard_True;
+ break;
}
}
-
if(!FacRevolInfini)
BRepBndLib::Add(theSUntil,Box);
}
}
Standard_Real MinSumDist = Precision::Infinite();
- Standard_Integer jmin, j, k, n;
- Standard_Boolean forward;
+ Standard_Integer jmin = 1, j, k, n;
+ Standard_Boolean forward = Standard_False;
if (i == myWork.Length() && myDegen2)
{
// last point section
Handle(Geom2dAdaptor_HCurve) AC2d;
Handle(Adaptor3d_HCurveOnSurface) AC;
Handle(BRepAdaptor_HSurface) AS;
- Standard_Real First, Last;
+ Standard_Real First = 0., Last = 0.;
Handle(GeomFill_Darboux) TLaw = new (GeomFill_Darboux)() ;
Handle(GeomFill_CurveAndTrihedron) Law =
new (GeomFill_CurveAndTrihedron) (TLaw);
TopTools_SequenceOfShape& LastV )
{
Standard_Integer IOnF = 1,IOnL = 1;
- Standard_Real U1,U2;
+ Standard_Real U1 = 0.,U2;
TopoDS_Shape V1,V2;
if (!VS.IsNull()) {
while (! WireSeq.IsEmpty())
{
TopoDS_Vertex MinVtx;
- Standard_Integer i, MinInd;
+ Standard_Integer i, MinInd = 1;
Standard_Boolean IsLast = Standard_False;
Standard_Real MinAngle = M_PI;
Standard_Integer IType = 0;
// characteristics of the first edge
- Standard_Real first1, last1, first2, last2, ff, ll;
+ Standard_Real first1 = 0., last1 = 0., first2, last2, ff, ll;
TopLoc_Location loc;
TopoDS_Vertex V1, V2;
Handle(Geom_Curve) curv1, curv;
BRepTools_WireExplorer ex1,ex2;
- Standard_Boolean wPoint1, wPoint2, uClosed, DegenFirst, DegenLast;
+ Standard_Boolean wPoint1, wPoint2, uClosed = Standard_False, DegenFirst = Standard_False, DegenLast = Standard_False;
for ( Standard_Integer i = 1; i <= Nb-1; i++) {
TopLoc_Location L;
TopExp_Explorer Exp;
- Standard_Real Umin,Vmin,Umax,Vmax,U,V;
+ Standard_Real Umin = 0.,Vmin = 0.,Umax = 0.,Vmax = 0.,U,V;
gp_Pnt2d P1,P2;
gp_Vec DZ;
gp_Pnt P;
Pf = BRep_Tool::Pnt(Vf);
Pl = BRep_Tool::Pnt(Vl);
Standard_Real DistF = RealLast(), DistL = RealLast();
- Standard_Integer IndexF, IndexL;
- Standard_Boolean IsFirstF, IsFirstL;
+ Standard_Integer IndexF = 1, IndexL = 1;
+ Standard_Boolean IsFirstF = Standard_False, IsFirstL = Standard_False;
for (Standard_Integer i = 2; i <= UnclosedWires.Length(); i++)
{
TopoDS_Wire aWire = TopoDS::Wire( UnclosedWires(i) );
Standard_Integer ii;
Standard_Integer Ind1 = 0, Ind2 = 0;
Standard_Boolean Bof, isVertex = Standard_False;
- Standard_Real First, Last;
+ Standard_Real First = 0., Last = 0.;
TopExp_Explorer Ex;
TopoDS_Edge E;
TopoDS_Vertex V;
Handle(Geom_Curve) Cumin,Cumax,Cvmin,Cvmax;
Standard_Boolean Dumin,Dumax,Dvmin,Dvmax;
Dumin = Dumax = Dvmin = Dvmax = Standard_False;
- Standard_Real uminTol, umaxTol, vminTol, vmaxTol;
+ Standard_Real uminTol = Precision::Confusion(),
+ umaxTol = Precision::Confusion(),
+ vminTol = Precision::Confusion(),
+ vmaxTol = Precision::Confusion();
if (!umininf) {
Cumin = S->UIso(UMin);
Standard_Integer k = 1;
for (Standard_Integer i = 1; i <= aNbWires; i++)
{
- Standard_Real x1, y1, x2, y2, aXstart, aYstart;
+ Standard_Real x1 = 0., y1 = 0., x2, y2, aXstart = 0., aYstart = 0.;
const Standard_Integer aLen = aWireLength(i) + 1;
for (Standard_Integer j = 1; j <= aLen; j++)
{
Handle(Poly_Triangulation) T, TNull;
Handle(Poly_PolygonOnTriangulation) Poly, NullPoly;
Standard_Boolean found = Standard_False;
- Standard_Real defedge;
+ Standard_Real defedge = Precision::Confusion();
Standard_Real cdef = 1.;
BRep_Builder B;
Standard_Boolean defined = Standard_False;
#include <TopTools_IndexedMapOfShape.hxx>
#include <Extrema_ExtPC.hxx>
#include <TopTools_MapOfShape.hxx>
+#include <Precision.hxx>
Standard_Integer i;
Standard_Real aTol = BRep_Tool::Tolerance(EI);
Standard_Boolean isMinFound = Standard_False;
- Standard_Real aSqrDist1;
- Standard_Real aSqrDist2;
+ Standard_Real aSqrDist1 = Precision::Infinite();
+ Standard_Real aSqrDist2 = Precision::Infinite();
anExt.Initialize(Ad2, Fst, Lst, aTol);
{
gp_Ax1 theAxis;
gp_Dir theDir1, theDir2;
- Standard_Real theAngle;
+ Standard_Real theAngle = 0.;
gp_Vec theTangent;
Standard_Boolean SimilarArcs = Standard_True;
for (j = 1; j <= myPaths.Length(); j++)
theAx2 = gp_Ax2(theCenterOfCirc, theAxis.Direction(), Vec1);
theCircle = GC_MakeCircle(theAx2, Vec1.Magnitude());
}
- MidEdges(i) = BRepLib_MakeEdge(theCircle, 0., theAngle);
+ BRepLib_MakeEdge aME (theCircle, 0., theAngle);
+ aME.Build();
+
+ MidEdges(i) = aME.IsDone() ?
+ aME.Shape() :
+ TopoDS_Edge();
}
}
}
TopoDS_Edge E = TopoDS::Edge(S);
TopLoc_Location L;
- Standard_Real f,l;
+ Standard_Real f = 0., l = 0.;
Handle(Geom2d_Curve) C;
Handle(Geom_Surface) Surf;
// Modifed: Portage NT 7-5-97 DPF (strcasecmp)
#include <Standard_Stream.hxx>
-
+#include <Precision.hxx>
#include <BRepTools_ShapeSet.ixx>
#include <BRepTools.hxx>
{
// Read the geometry
- Standard_Integer val,c,pc,pc2,s,s2,l,l2,t, pt, pt2;
+ Standard_Integer val,c,pc,pc2 = 0,s,s2,l,l2,t, pt, pt2 = 0;
Standard_Real tol,X,Y,Z,first,last,p1,p2;
Standard_Real PfX,PfY,PlX,PlY;
gp_Pnt2d aPf, aPl;
{
// Read the geometry
- Standard_Integer val, c,pc,pc2,s,s2,l,l2,t, pt, pt2;
- Standard_Real tol,X,Y,Z,first,last,p1,p2;
+ Standard_Integer val, c,pc,pc2 = 0,s,s2,l,l2,t, pt, pt2 = 0;
+ Standard_Real tol,X,Y,Z,first,last,p1 = 0.,p2;
Standard_Real PfX,PfY,PlX,PlY;
gp_Pnt2d aPf, aPl;
Standard_Boolean closed, bval;
gp_Pnt2d pt2d;
Standard_Real pOnC;
Blend_Status State1,State2;
-#ifndef DEB
IntSurf_TypeTrans tras = IntSurf_Undecided;
-#else
- IntSurf_TypeTrans tras;
-#endif
+
if (Function.IsSolution(Sol,tolesp)) {
pt1 = Function.PointOnS();
math_Vector tolerance(1,4),infbound(1,4),supbound(1,4);
math_Vector solrst1(1,4),solrst2(1,4);
TheExtremity Ext1,Ext2;
- Standard_Integer Index1,Index2,nbarc;
- Standard_Boolean Isvtx1,Isvtx2;
+ Standard_Integer Index1 = 0, Index2 = 0, nbarc;
+ Standard_Boolean Isvtx1 = Standard_False, Isvtx2 = Standard_False;
TheVertex Vtx1,Vtx2;
gp_Pnt2d p2d;
const Standard_Real CosRef2D = 0.88; // correspond a 25 d
Standard_Real Norme, Cosi, Cosi2;
-#ifndef DEB
Standard_Real prevNorme = 0.;
-#else
- Standard_Real prevNorme;
-#endif
Standard_Real FlecheCourante;
Standard_Real Du,Dv,Duv;
Standard_Real tolu,tolv;
Standard_Boolean ok = Standard_False;
Standard_Boolean byinter = (line->NbPoints() != 0), okinter = 0;
Standard_Real distmin = RealLast();
- Standard_Real uprev = 0.0, vprev = 0.0, prm = 0.0, dist = 0.0;
+ Standard_Real uprev = 0.,vprev = 0., prm = 0., dist = 0.;
Handle(TheTopolTool) Iter;
if (OnFirst) {
Standard_Boolean jalons_Trouve = Standard_False;
Standard_Boolean recadre = Standard_True, ok;
Standard_Boolean byinter = (line->NbPoints() != 0);
-#ifndef DEB
Standard_Integer LeJalon = 0;
-#else
- Standard_Integer LeJalon;
-#endif
+
Standard_Integer nbarc;
Standard_Real dist,prm,pmin, vtol;
gp_Pnt2d pt2d, lastpt2d;
Blend_Status State = Blend_OnRst12;
TopAbs_State situ1 =TopAbs_IN,situ2=TopAbs_IN;
Standard_Real w1,w2;
- Standard_Integer Index1,Index2,nbarc;
+ Standard_Integer Index1 = 0, Index2 = 0, nbarc;
Standard_Boolean Arrive,recad1,recad2, control;
- Standard_Boolean Isvtx1,Isvtx2,echecrecad;
+ Standard_Boolean Isvtx1 = Standard_False, Isvtx2 = Standard_False, echecrecad;
gp_Pnt2d p2d;
math_Vector tolerance(1,4),infbound(1,4),supbound(1,4),parinit(1,4);
math_Vector solrst1(1,4),solrst2(1,4);
}
}
-
-
-
-
-
-
-
-
-
Standard_Integer Iarc1 = 0,Iarc2 = 0;
TopAbs_Orientation trafil1 = TopAbs_FORWARD, trafil2 = TopAbs_FORWARD;
Standard_Integer IcFil1,IcFil2,Isurf,Ishape1,Ishape2;
- Standard_Real Pardeb,Parfin;
+ Standard_Real Pardeb = 0.,Parfin = 0.;
TopAbs_Orientation ET1;
Handle(TopOpeBRepDS_CurvePointInterference) Interfp1,Interfp2;
Handle(TopOpeBRepDS_SurfaceCurveInterference) Interfc1,Interfc2;
//in the direction of the start/end line.
gp_Vec Vint, Vref(pdeb,pfin);
gp_Pnt Pbid;
- Standard_Real Udeb,Ufin;
+ Standard_Real Udeb = 0.,Ufin = 0.;
Standard_Real tolr1,tolr2;
tolr1 = tolr2 = tolreached = tol3d;
if((S1->GetType() == GeomAbs_Cylinder && S2->GetType() == GeomAbs_Plane)||
Standard_Boolean periodic, Bof, checkdeb, cepadur,bIsSmooth;
Standard_Integer IEdge,IF,IL,nbed, iToApproxByC2;
- Standard_Real WF, WL, Wrefdeb, Wreffin,nwf,nwl,period,pared,tolpared;
+ Standard_Real WF, WL, Wrefdeb, Wreffin,nwf,nwl,period,pared = 0.,tolpared;
Standard_Real First, Last, epsV, urefdeb, tolrac;
GeomAbs_Shape aContinuity;
gp_Pnt PDeb, PFin, Bout;
Handle(BRepAdaptor_HCurve2d) HC1,HC2;
Handle(BRepAdaptor_HCurve2d) HCref1 = new BRepAdaptor_HCurve2d();
Handle(BRepAdaptor_HCurve2d) HCref2 = new BRepAdaptor_HCurve2d();
- Standard_Boolean decroch1 = 0, decroch2 = 0;
- Standard_Boolean RecP1 = 0, RecS1 = 0, RecRst1 = 0, obstacleon1 = 0;
- Standard_Boolean RecP2 = 0, RecS2 = 0, RecRst2 = 0, obstacleon2 = 0;
+ Standard_Boolean decroch1 = Standard_False, decroch2 = Standard_False;
+ Standard_Boolean RecP1 = Standard_False, RecS1 = Standard_False, RecRst1 = Standard_False, obstacleon1 = Standard_False;
+ Standard_Boolean RecP2 = Standard_False, RecS2 = Standard_False, RecRst2 = Standard_False, obstacleon2 = Standard_False;
gp_Pnt2d pp1,pp2,pp3,pp4;
- Standard_Real w1,w2;
+ Standard_Real w1 = 0.,w2 = 0.;
math_Vector Soldep(1,4);
math_Vector SoldepCS(1,3);
math_Vector SoldepCC(1,2);
Standard_Real MS = MaxStep;
Standard_Integer again = 0;
Standard_Integer nbptmin = 3; //jlr
- Standard_Integer Nbpnt = 0;
+ Standard_Integer Nbpnt = 1;
// the initial solution is reframed if necessary.
math_Vector ParSol(1,3);
Standard_Real NewFirst = PFirst;
Standard_Real MS = MaxStep;
Standard_Real TolGuide=tolguide, TolEsp = tolesp;
- Standard_Integer Nbpnt;
+ Standard_Integer Nbpnt = 0;
Standard_Real SpFirst = HGuide->FirstParameter();
Standard_Real SpLast = HGuide->LastParameter();
Standard_Boolean reverse = (!Forward || Inside);
TopoDS_Edge edgecouture;
Standard_Boolean couture,intcouture=Standard_False;;
- Standard_Real tolreached;
+ Standard_Real tolreached = tolesp;
Standard_Real par1 =0.,par2 =0.;
Standard_Integer indpt = 0,Icurv1 = 0,Icurv2 = 0;
Handle(Geom_TrimmedCurve) curv1,curv2;
TopoDS_Edge Arcpiv,Arcprol,Arcspine,Arcprolbis;
if(isfirst) Arcspine = spine->Edges(1);
else Arcspine = spine->Edges(spine->NbEdges());
- TopAbs_Orientation OArcprolbis;
+ TopAbs_Orientation OArcprolbis = TopAbs_FORWARD;
TopAbs_Orientation OArcprolv = TopAbs_FORWARD, OArcprolop = TopAbs_FORWARD;
Standard_Integer ICurve;
Handle(BRepAdaptor_HSurface) HBs = new BRepAdaptor_HSurface();
TopoDS_Edge edgecouture;
Standard_Boolean couture,intcouture=Standard_False;;
- Standard_Real tolreached;
+ Standard_Real tolreached = tolesp;
Standard_Real par1 = 0.,par2 = 0.;
Standard_Integer indpt =0,Icurv1 =0,Icurv2 =0;
Handle(Geom_TrimmedCurve) curv1,curv2;
// Above all the points cut the points with the edge of the spine.
Standard_Integer IArcspine = DStr.AddShape(Arcspine);
Standard_Integer IVtx = DStr.AddShape(Vtx);
- TopAbs_Orientation OVtx2;
+ TopAbs_Orientation OVtx2 = TopAbs_FORWARD;
TopAbs_Orientation OVtx = TopAbs_FORWARD;
for(ex.Init(Arcspine.Oriented(TopAbs_FORWARD),TopAbs_VERTEX);
ex.More(); ex.Next()){
Reduce(UIntPC1,UIntPC2,HS1,HS2);
}
- Standard_Real tolreached;
+ Standard_Real tolreached = tolesp;
if (IFaCo1 == 1 &&
!ChFi3d_ComputeCurves(HS1,HS2,Pardeb,Parfin,Gc,
PGc1,PGc2,tolesp,tol2d,tolreached)) {
ChFiDS_ListIteratorOfListOfStripe It;
Handle(ChFiDS_Stripe) cd2,cdbid,cnext;
TopoDS_Face face;
- Standard_Integer jfp,ii;
+ Standard_Integer jfp = 0,ii;
Standard_Integer ic,icplus,icmoins,icplus2,
sense,index,indice,isurf1,isurf2;
- Standard_Integer cbplus=0, n3d=0,IVtx,nb;
+ Standard_Integer cbplus=0, n3d=0,IVtx = 0,nb;
Standard_Boolean sameside,trouve,isfirst;
Standard_Real pardeb ,parfin,xdir,ydir;
- Standard_Real tolapp=1.e-4,maxapp,maxapp1,avedev;
+ Standard_Real tolapp=1.e-4,maxapp = 0.,maxapp1 = 0.,avedev;
Handle (TopOpeBRepDS_CurvePointInterference) Interfp1, Interfp2;
Handle (TopOpeBRepDS_SurfaceCurveInterference) Interfc;
Handle(Geom_Curve) Curv3d;
oksea.SetValue(ic, Standard_False);
}
else {
- Standard_Integer jf1;
- Standard_Integer i1,i2;
- Standard_Real pa1,pa2;
+ Standard_Integer jf1 = 0;
+ Standard_Integer i1 = 0,i2 = 0;
+ Standard_Real pa1 = 0.,pa2;
Standard_Boolean ok;
Handle(ChFiDS_Stripe) strip;
Standard_Real angedg;
// Then this courbe3d is projected on all faces (nbface) that
// separate icmoins and indfin
Standard_Integer nbface = 0;
- Standard_Real error;
+ Standard_Real error = 0.;
TColGeom2d_Array1OfCurve proj2d1(0,size);
TColGeom2d_Array1OfCurve proj2d2(0,size);
TColGeom_Array1OfCurve cproj1(0,size);
const Handle(Geom_Surface)& surf = DStr.Surface(CD->Surf()).Surface();
Standard_Real par = 0., x, y;
if(!isfirst) par = edglen;
- Standard_Real sppar;
+ Standard_Real sppar = 0.;
for (Standard_Integer i = 1; i <= 2; i++) {
CD->ChangeInterference(i).SetParameter(par,isfirst);
Handle(Geom2d_Curve) pc = CD->Interference(i).PCurveOnSurf();
TopAbs_Orientation oriSFF1 = st1->Orientation(IFaArc1);
bid = 1;
bid = ChFi3d::NextSide(ori,OFF1,oriS,oriSFF1,bid);
- TopAbs_Orientation op1,op2;
+ TopAbs_Orientation op1 = TopAbs_FORWARD,op2 = TopAbs_FORWARD;
if(yapiv) bid = ChFi3d::ConcaveSide(BRS1,BRS2,pivot,op1,op2);
op1 = TopAbs::Reverse(op1);
op2 = TopAbs::Reverse(op2);
Standard_Real Uf = FirstParameter(IE);
Standard_Real Ul = LastParameter(IE);
- Standard_Real StartRad, par, rad;
+ Standard_Real StartRad = 0., par, rad;
Standard_Integer i;
for (i = 1; i < parandrad.Length(); i++)
{
gp_Pnt2d p2d;
gp_Vec2d d2d;
Standard_Boolean found,ok = Standard_False,toutvu,solution;
- Standard_Real paramp,paraminf,paramsup,toler;
+ Standard_Real paramp = 0.,paraminf,paramsup,toler;
if (Line.TypeContour() != Contap_Restriction) {
return;
gp_Pnt P;
gp_Vec T;
ElCLib::D1(0.0,L,P,T);
- Standard_Real u,v;
+ Standard_Real u = 0.,v = 0.;
switch (typS) {
case GeomAbs_Cylinder: {
ElSLib::Parameters(TheSurfaceTool::Cylinder(Surf),P,u,v);
gp_Pnt P;
gp_Vec T;
ElCLib::D1(0.0,C,P,T);
- Standard_Real u,v;
+ Standard_Real u = 0.,v = 0.;
switch (typS) {
case GeomAbs_Cylinder: {
ElSLib::Parameters(TheSurfaceTool::Cylinder(Surf),P,u,v);
q_param,
param ;
- Standard_Integer num_poles,
+ Standard_Integer num_poles = 0,
ii,
jj,
- num_knots=0,
- num_spans=0,
+ num_knots = 1,
+ num_spans = 1,
num_flat_knots,
num_temp_knots,
- temp_degree=0,
+ temp_degree = 0,
tgt_theta_flag,
num_temp_poles,
- order ;
+ order = 0;
Convert_CosAndSinEvalFunction *EvaluatorPtr=NULL ;
{
if (n <= 1) return 1;
Standard_Integer cas = 0;
-#ifdef DEB
- TopAbs_Orientation ori;
-#else
TopAbs_Orientation ori=TopAbs_FORWARD;
-#endif
Standard_Integer last = n;
if (!strcasecmp(a[0],"orientation")) {
if (n <= 2) return 1;
void DDF_IOStream::ReadString(TCollection_AsciiString& buffer)
{
- char c;
+ char c = '\0';
Standard_Boolean IsEnd = Standard_False;
buffer.Clear();
void DDF_IOStream::ReadWord(TCollection_AsciiString& buffer)
{
- char c;
+ char c = '\0';
Standard_Boolean IsEnd = Standard_False;
buffer.Clear();
theSurf = S2;
}
if(detrompeur != 0 && detrompeur != 4) {
- Standard_Real ul, vl, uf, vf;
- Standard_Real ufprim, ulprim, vfprim, vlprim;
+ Standard_Real ul = 0., vl = 0., uf = 0., vf = 0.;
+ Standard_Real ufprim = 0., ulprim = 0., vfprim = 0., vlprim = 0.;
if(theSurf->DynamicType() == STANDARD_TYPE(Geom_Plane)) {
gp_Pln pl = Handle(Geom_Plane)::DownCast(S2)->Pln();
// init X window and create display
// *****************************************************************
#ifdef WNT
- HWND hWnd;
+ HWND hWnd = NULL;
#endif
if (!Draw_Batch)
static Standard_Integer wzoom(Draw_Interpretor& di, Standard_Integer argc, const char** argv)
{
- Standard_Integer id,X,Y,W,H,X1,Y1,X2,Y2,b;
+ Standard_Integer id,X,Y,W,H,X1,Y1,X2 = 0,Y2 = 0,b;
Standard_Real dX1,dY1,dX2,dY2,zx,zy;
if(argc != 1 && argc != 6)
{
{
Standard_Integer is3d;
is >> is3d;
- Standard_Real x,y,z;
+ Standard_Real x,y,z = 0.;
if (is3d)
is >> x >> y >> z;
else
Dynamic_ModeEnum Dynamic::Mode(const Standard_CString amode)
{
-#ifdef DEB
-Dynamic_ModeEnum aMode;
-#else
Dynamic_ModeEnum aMode=Dynamic_IN;
-#endif
if (!strcasecmp(amode,"in" )) aMode = Dynamic_IN;
else if(!strcasecmp(amode,"out" )) aMode = Dynamic_OUT;
else if(!strcasecmp(amode,"inout" )) aMode = Dynamic_INOUT;
Standard_Real aCUSq = 0, aSUSq = 0, aSVSq = 0;
while (aRestIterCount--)
{
- Standard_Real aMinCU, aMinSU, aMinSV, aMaxCU, aMaxSU, aMaxSV;
+ Standard_Real aMinCU = 0., aMinSU = 0., aMinSV = 0., aMaxCU = 0., aMaxSU = 0., aMaxSV = 0.;
Standard_Real aMinSqDist = DBL_MAX, aMaxSqDist = -DBL_MAX;
for (Standard_Integer aSUNom = 1; aSUNom < aSUDen; aSUNom += 2)
{
}
else D0 (C, U2, CurrentPoint); //Point suivant
- Standard_Real Coef, ACoef, FCoef;
+ Standard_Real Coef, ACoef = 0., FCoef = 0.;
Standard_Boolean Correction, TooLarge, TooSmall;
TooLarge = Standard_False;
TooSmall = Standard_False;
Result.Nullify();
Handle(Standard_Type) TheType = basisSurf->DynamicType();
Standard_Boolean IsTrimmed;
- Standard_Real U1, V1, U2, V2;
+ Standard_Real U1 = 0., V1 = 0., U2 = 0., V2 = 0.;
// Preambule pour les surface trimmes
if (TheType == STANDARD_TYPE(Geom_RectangularTrimmedSurface)) {
{
if ( (myTypeCurve == GeomAbs_BSplineCurve)&&
(U==myFirst || U==myLast) ) {
- Standard_Integer Ideb, Ifin;
+ Standard_Integer Ideb = 0, Ifin = 0;
if (U==myFirst) {
myBspl->LocateU(myFirst, PosTol, Ideb, Ifin);
if (Ideb<1) Ideb=1;
{
if ( (myTypeCurve == GeomAbs_BSplineCurve)&&
(U==myFirst || U==myLast) ) {
- Standard_Integer Ideb, Ifin;
+ Standard_Integer Ideb = 0, Ifin = 0;
if (U==myFirst) {
myBspl->LocateU(myFirst, PosTol, Ideb, Ifin);
if (Ideb<1) Ideb=1;
{
if ( (myTypeCurve == GeomAbs_BSplineCurve)&&
(U==myFirst || U==myLast) ) {
- Standard_Integer Ideb, Ifin;
+ Standard_Integer Ideb = 0, Ifin = 0;
if (U==myFirst) {
myBspl->LocateU(myFirst, PosTol, Ideb, Ifin);
if (Ideb<1) Ideb=1;
{
if ( (myTypeCurve == GeomAbs_BSplineCurve)&&
(U==myFirst || U==myLast) ) {
- Standard_Integer Ideb, Ifin;
+ Standard_Integer Ideb = 0, Ifin = 0;
if (U==myFirst) {
myBspl->LocateU(myFirst, PosTol, Ideb, Ifin);
if (Ideb<1) Ideb=1;
{
if ( (myTypeCurve == GeomAbs_BSplineCurve) &&
(U==myFirst || U==myLast) ) {
- Standard_Integer Ideb, Ifin;
+ Standard_Integer Ideb = 0, Ifin = 0;
if (U==myFirst) {
myBspl->LocateU(myFirst, PosTol, Ideb, Ifin);
if (Ideb<1) Ideb=1;
{
if ( (myTypeCurve == GeomAbs_BSplineCurve) &&
(U==myFirst || U==myLast) ) {
- Standard_Integer Ideb, Ifin;
+ Standard_Integer Ideb = 0, Ifin = 0;
if (U==myFirst) {
myBspl->LocateU(myFirst, PosTol, Ideb, Ifin);
if (Ideb<1) Ideb=1;
{
if ( (myTypeCurve == GeomAbs_BSplineCurve)&&
(U==myFirst || U==myLast) ) {
- Standard_Integer Ideb, Ifin;
+ Standard_Integer Ideb = 0, Ifin = 0;
if (U==myFirst) {
myBspl->LocateU(myFirst, PosTol, Ideb, Ifin);
if (Ideb<1) Ideb=1;
{
if ( (myTypeCurve == GeomAbs_BSplineCurve)&&
(U==myFirst || U==myLast) ) {
- Standard_Integer Ideb, Ifin;
+ Standard_Integer Ideb = 0, Ifin = 0;
if (U==myFirst) {
myBspl->LocateU(myFirst, PosTol, Ideb, Ifin);
if (Ideb<1) Ideb=1;
{
if ( (myTypeCurve == GeomAbs_BSplineCurve)&&
(U==myFirst || U==myLast) ) {
- Standard_Integer Ideb, Ifin;
+ Standard_Integer Ideb = 0, Ifin = 0;
if (U==myFirst) {
myBspl->LocateU(myFirst, PosTol, Ideb, Ifin);
if (Ideb<1) Ideb=1;
{
if ( (myTypeCurve == GeomAbs_BSplineCurve)&&
(U==myFirst || U==myLast) ) {
- Standard_Integer Ideb, Ifin;
+ Standard_Integer Ideb = 0, Ifin = 0;
if (U==myFirst) {
myBspl->LocateU(myFirst, PosTol, Ideb, Ifin);
if (Ideb<1) Ideb=1;
{
if ( (myTypeCurve == GeomAbs_BSplineCurve) &&
(U==myFirst || U==myLast) ) {
- Standard_Integer Ideb, Ifin;
+ Standard_Integer Ideb = 0, Ifin = 0;
if (U==myFirst) {
myBspl->LocateU(myFirst, PosTol, Ideb, Ifin);
if (Ideb<1) Ideb=1;
{
if ( (myTypeCurve == GeomAbs_BSplineCurve) &&
(U==myFirst || U==myLast) ) {
- Standard_Integer Ideb, Ifin;
+ Standard_Integer Ideb = 0, Ifin = 0;
if (U==myFirst) {
myBspl->LocateU(myFirst, PosTol, Ideb, Ifin);
if (Ideb<1) Ideb=1;
aT = gp_Vec(0, 0, 0);
aN = gp_Vec(0, 0, 0);
- Standard_Real angleAT, currParam, currStep = Step;
+ Standard_Real angleAT = 0., currParam, currStep = Step;
Handle( Geom_Plane ) aPlane;
Standard_Boolean isPlanar = Standard_False;
// Box.Update(-0.1, -0.1, 0.1, 0.1); // Taille minimal
gp_Vec Tangent,Normal,BiNormal;
Standard_Integer ii;
- Standard_Real t, DeltaG, w;
+ Standard_Real t, DeltaG, w = 0.;
Standard_Real f = myCurve->FirstParameter();
Standard_Real l = myCurve->LastParameter();
gp_Vec GeomFill_TgtOnCoons::Value(const Standard_Real W) const
{
- Standard_Real U,V,bid;
+ Standard_Real U = 0.,V = 0.,bid = 0.;
switch (ibound){
case 0 :
myK->Bound(1)->Bounds(V,bid);
gp_Vec GeomFill_TgtOnCoons::D1(const Standard_Real W) const
{
- Standard_Real U,V,bid;
+ Standard_Real U = 0.,V = 0.,bid = 0.;
switch (ibound){
case 0 :
myK->Bound(1)->Bounds(V,bid);
void GeomFill_TgtOnCoons::D1(const Standard_Real W, gp_Vec& T, gp_Vec& DT) const
{
- Standard_Real U,V,bid;
+ Standard_Real U = 0.,V = 0.,bid = 0.;
switch (ibound){
case 0 :
myK->Bound(1)->Bounds(V,bid);
- Standard_Integer Cdeg, Cdim, NbP, Ksize, Psize ;
+ Standard_Integer Cdeg = 0, Cdim = 0, NbP = 0, Ksize = 0, Psize = 1;
Standard_Integer ii, jj, ipole, Kount;
Standard_Real Tbord, lambmin=Length;
- Standard_Real * Padr;
+ Standard_Real * Padr = NULL;
Standard_Boolean Ok;
Handle(TColStd_HArray1OfReal) FKnots, Point, lambda, Tgte, Poles;
}
// tableaux necessaires pour l'extension
- Standard_Integer Ksize2 = Ksize+Cdeg, NbPoles, NbKnots;
+ Standard_Integer Ksize2 = Ksize+Cdeg, NbPoles, NbKnots = 0;
TColStd_Array1OfReal FK(1, Ksize2) ;
Standard_Real * FKRadr = &FK(1);
Standard_Boolean S1 = Standard_False;
Standard_Boolean S2 = Standard_False;
- Standard_Real U1f,U1l,U2f,U2l,V1f,V1l,V2f,V2l;
+ Standard_Real U1f,U1l,U2f,U2l,V1f = 0.,V1l = 0.,V2f = 0.,V2l = 0.;
GC1 = DrawTrSurf::GetCurve(a[1]);
if ( GC1.IsNull()) {
//
{
Standard_Real Tolerance=0;
-#ifdef DEB
- AppParCurves_Constraint Constraint;
-#else
+
AppParCurves_Constraint Constraint=AppParCurves_NoConstraint;
-#endif
+
Handle(AppParCurves_HArray1OfConstraintCouple)TABofCC;
TABofCC.Nullify();
Handle(AppDef_HArray1OfMultiPointConstraint) Points;
//============================================================================
{
Standard_Real Tolerance=0;
-#ifdef DEB
- AppParCurves_Constraint Constraint;
-#else
- AppParCurves_Constraint Constraint=AppParCurves_NoConstraint;
-#endif
+ AppParCurves_Constraint Constraint = AppParCurves_NoConstraint;
Handle(AppParCurves_HArray1OfConstraintCouple)TABofCC;
Handle(AppDef_HArray1OfMultiPointConstraint) Points;
TColStd_Array1OfTransient& Polyg = (*psd2)->PolyData();
Standard_Integer nbFace = Polyg.Upper();
Standard_Integer nbFaHi = 0;
- Handle(HLRAlgo_PolyData)* pd;
+ Handle(HLRAlgo_PolyData)* pd = NULL;
if(nbFace > 0) pd = (Handle(HLRAlgo_PolyData)*)&(Polyg.ChangeValue(1));
for (j = 1; j <= nbFace; j++) {
Standard_Address& PINod)
{
Standard_Integer i,n1,n2;
- Standard_Integer find,iiii,icsv;
- Standard_Address A1,A2,A3,Nod1Indices,Nod2Indices,Seg2Indices,Tri2Indices;
+ Standard_Integer find,iiii,icsv = 0;
+ Standard_Address A1,A2,A3,Nod1Indices,Nod2Indices,Seg2Indices = NULL,Tri2Indices;
Standard_Boolean newSeg = Standard_False;
HLRAlgo_TriangleData* TD =
&(((HLRAlgo_Array1OfTData*)TData)->ChangeValue(1));
Standard_Address& )
{
Standard_Integer find,iiii,iisv,icsv,iip2 =0,cnx1 =0,cnx2 =0;
- Standard_Address Seg1Indices,Seg2Indices;
+ Standard_Address Seg1Indices,Seg2Indices = NULL;
Seg1Indices = 0;
find = 0;
iisv = 0;
}
}
Standard_Integer nbFace = myPolyg.Upper();
- Handle(HLRAlgo_PolyData)* pd;
+ Handle(HLRAlgo_PolyData)* pd = NULL;
if(nbFace > 0) pd = (Handle(HLRAlgo_PolyData)*)&(myPolyg.ChangeValue(1));
for (Standard_Integer i = 1; i <= nbFace; i++) {
{
TopLoc_Location L;
TopExp_Explorer exface,exedge;
- Standard_Integer f,i,j;
+ Standard_Integer f = 0,i,j;
Standard_Integer nbFaceShell = 0;
Standard_Boolean reversed;
Standard_Boolean closed = Standard_False;
Standard_Integer iPol,nbPol,i1,i1p1,i1p2,i2,i2p1,i2p2;
Standard_Real X1 ,Y1 ,Z1 ,X2 ,Y2 ,Z2 ;
Standard_Real XTI1,YTI1,ZTI1,XTI2,YTI2,ZTI2;
- Standard_Real U1,U2;
+ Standard_Real U1,U2 = 0.;
Handle(Poly_PolygonOnTriangulation) HPol[2];
TopLoc_Location L;
myBCurv.Initialize(E);
TopLoc_Location L;
Standard_Boolean insP3,mP3P1,IntOutL;
Standard_Integer f,ip1,ip2,ip3;//, i;
- Standard_Real U3,V3,coef3,X3,Y3,Z3;
+ Standard_Real U3,V3,coef3,X3 = 0.,Y3 = 0.,Z3 = 0.;
const gp_Trsf& T = myProj.Transformation();
// Create the data structure
Handle(HLRBRep_Data) DS = new HLRBRep_Data (nbVert, nbEdge, nbFace);
- HLRBRep_EdgeData* ed;
+ HLRBRep_EdgeData* ed = NULL;
if(nbEdge != 0) ed = &(DS->EDataArray().ChangeValue(1));
// ed++;
Standard_Integer tempCorneringCode;
Standard_Integer tempExtensionFlag;
Standard_Integer tempJustificationFlag;
- Standard_Real tempExtensionValue;
+ Standard_Real tempExtensionValue = 0.;
//Standard_Boolean st; //szv#4:S4163:12Mar99 not needed
//szv#4:S4163:12Mar99 `st=` not needed
(const IGESData_ParamCursor& PC,Message_Msg& /*amsg*/, gp_XY& val)
{
if (!PrepareRead(PC,Standard_False,2)) return Standard_False;
- Standard_Real X,Y;
+ Standard_Real X,Y = 0.;
Standard_Boolean stat =
(ReadingReal (theindex ,X) &&
ReadingReal (theindex+1,Y) );
(const IGESData_ParamCursor& PC, const Standard_CString mess, gp_XY& val)
{
if (!PrepareRead(PC,mess,Standard_False,2)) return Standard_False;
- Standard_Real X,Y;
+ Standard_Real X,Y = 0.;
Standard_Boolean stat =
(ReadingReal (theindex ,mess,X) &&
ReadingReal (theindex+1,mess,Y) );
(const IGESData_ParamCursor& PC,Message_Msg& /*amsg*/, gp_XYZ& val)
{
if (!PrepareRead(PC,Standard_False,3)) return Standard_False;
- Standard_Real X,Y,Z;
+ Standard_Real X,Y = 0.,Z = 0.;
Standard_Boolean stat =
(ReadingReal (theindex ,X) &&
ReadingReal (theindex+1,Y) &&
(const IGESData_ParamCursor& PC, const Standard_CString mess, gp_XYZ& val)
{
if (!PrepareRead(PC,mess,Standard_False,3)) return Standard_False;
- Standard_Real X,Y,Z;
+ Standard_Real X,Y = 0.,Z = 0.;
Standard_Boolean stat =
(ReadingReal (theindex ,mess,X) &&
ReadingReal (theindex+1,mess,Y) &&
Standard_Integer I, J;
Standard_Integer anIndexU, anIndexV, aDegU, aDegV;
Standard_Boolean aCloseU, aCloseV, aPolynom, aPeriodU, aPeriodV;
- Standard_Real aUmin, aUmax, aVmin, aVmax;
+ Standard_Real aUmin, aUmax, aVmin = 0., aVmax = 0.;
Standard_Real tempVal;
gp_XYZ tempXYZ;
Handle(TColStd_HArray1OfReal) allKnotsU;
//======================================
//Standard_Boolean st; //szv#4:S4163:12Mar99 not needed
- Standard_Real A, B, C, D, E, F, ZT;
+ Standard_Real A, B = 0., C = 0., D = 0., E = 0., F = 0., ZT;
gp_XY tempStart, tempEnd;
/* PR.ReadReal(PR.Current(), Msg81, A); //szv#4:S4163:12Mar99 `st=` not needed
{
// MGE 30/07/98
- Standard_Real A, B, C, D, aSize = 0.;
+ Standard_Real A, B = 0., C = 0., D = 0., aSize = 0.;
Handle(IGESData_IGESEntity) aCurve;
gp_XYZ attach (0.,0.,0.);
IGESData_Status aStatus;
Standard_Integer weighted;
gp_XY gridPoint;
gp_XY gridSpacing;
- Standard_Integer nbPointsX;
- Standard_Integer nbPointsY;
+ Standard_Integer nbPointsX = 0;
+ Standard_Integer nbPointsY = 0;
// Reading nbPropertyValues(Integer)
PR.ReadInteger(PR.Current(), "No. of property values", nbPropertyValues);
{
TopExp_Explorer anExp(theEdges, TopAbs_EDGE);
Standard_Integer howMuch = 0;
- Standard_Real f, l;
+ Standard_Real f = 0., l = 0.;
for (; anExp.More(); anExp.Next()) {
TopoDS_Edge anEdge = TopoDS::Edge(anExp.Current());
if (anEdge.IsNull())
// Find a different area (a set of close to each other pixels which colors differ in both images).
// It filters alone pixels with different color.
- Standard_Size aRow1, aCol1, aRow2, aCol2;
+ Standard_Size aRow1 = 0, aCol1 = 0, aRow2, aCol2;
Standard_Integer aLen1 = (myDiffPixels.Length() > 0) ? (myDiffPixels.Length() - 1) : 0;
for (Standard_Integer aPixelId1 = 0; aPixelId1 < aLen1; ++aPixelId1)
{
//--
Standard_Integer ResHasFirstPoint=0;
Standard_Integer ResHasLastPoint=0;
- Standard_Real ParamStart,ParamStart2,ParamEnd,ParamEnd2;
+ Standard_Real ParamStart = 0.,ParamStart2,ParamEnd = 0.,ParamEnd2;
Standard_Real Org2SurL1=ElCLib::Parameter(L1,L2.Location());
//== 3 : L1 et L2 bornent
//== 2 : L2 borne
gp_Pnt P(Sp.Pnt());
Standard_Integer Pt1,Pt2,Pt3;
- Standard_Real u1,v1,param;
+ Standard_Real u1 = 0.,v1 = 0.,param;
//----------------------------------------------------------------------
//-- Calcul des parametres approches sur la surface --
//----------------------------------------------------------------------
Standard_Integer colP = Pivotm1 - ligP * nbdeltaVp1;
// Point sur Edge position in the MaTriangle and edge typ :
-#ifndef DEB
Standard_Integer ligE =0, colE =0, typE =0;
-#else
- Standard_Integer ligE, colE, typE;
-#endif
if (Pedge!=0) {
ligE= (Pedge-1)/nbdeltaVp1;
colE= (Pedge-1) - (ligE * nbdeltaVp1);
}
// Triangle position General case :
-#ifndef DEB
+
Standard_Integer linT =0, colT =0;
Standard_Integer linO =0, colO =0;
Standard_Integer t =0, tt =0;
-#else
- Standard_Integer linT, colT;
- Standard_Integer linO, colO;
- Standard_Integer t,tt;
-#endif
+
if (Triang!=0) {
t = (Triang-1)/(nbdeltaVm2);
tt= (Triang-1)-t*nbdeltaVm2;
LinOn2S = new IntSurf_LineOn2S;
//// Modified by jgv, 17.09.09 for OCC21255 ////
- Standard_Real refpar = RealLast(), ref_u1, ref_u2;
+ Standard_Real refpar = RealLast(), ref_u1 = 0., ref_u2 = 0.;
if (nbvtx)
{
const IntPatch_Point& FirstVertex = aline->Vertex(1);
}
//
Standard_Boolean bIsDone, bIsEmpty, bParallel, bFound;
- Standard_Integer aNbPoints;
- Standard_Real aHalfPi, aEpsilon, aLimV, dT, aT1, aT2, aEpsT;
+ Standard_Integer aNbPoints = 0;
+ Standard_Real aHalfPi, aEpsilon, aLimV, dT, aT1, aT2 = 0., aEpsT;
Standard_Real aU1, aV1, aU2, aV2;
gp_Pnt aP1, aP2, aPx;
gp_Pnt2d aP2D1, aP2D2, aPLim(0., 0.);
dtheta = (u1alin-u0alin)*0.01;
Standard_Real du=0.000000001;
Standard_Real distmin = RealLast();
-#ifndef DEB
+
Standard_Real thetamin = 0.;
-#else
- Standard_Real thetamin;
-#endif
+
Standard_Real theparameteronarc = _theparameteronarc;
for(Standard_Real _theta=u0alin+dtheta; _theta<=u1alin-dtheta; _theta+=dtheta) {
gp_Pnt P=alin->Value(_theta);
distmin=d;
}
}
-#ifndef DEB
+
Standard_Real bestpara =0., besttheta =0., bestdist =0., distinit =0. ;
-#else
- Standard_Real bestpara,besttheta,bestdist,distinit;
-#endif
+
//-- Distance initiale
{
gp_Pnt pp0 = alin->Value(thetamin);
IntPatch_IType typarc = lin->ArcType();
- Standard_Real parproj;
+ Standard_Real parproj = 0.;
gp_Vec tgint;
gp_Pnt ptproj;
Standard_Boolean retvalue;
IntPatch_TheSegmentOfTheSOnBounds thesegsol;
IntPatch_ThePathPointOfTheSOnBounds PStartf,PStartl;
Standard_Boolean dofirst,dolast,procf,procl;
-#ifndef DEB
+
Standard_Real paramf =0.,paraml =0.,U1 =0.,V1 =0.,U2 =0.,V2 =0.;
-#else
- Standard_Real paramf,paraml,U1,V1,U2,V2;
-#endif
+
IntPatch_IType typ;
IntSurf_TypeTrans trans1,trans2;
IntSurf_Transition TRest,TArc;
Standard_Integer i,j,k;
Standard_Integer Nblin,Nbvtx, Nbpt;
-#ifndef DEB
+
Standard_Boolean OnFirst = Standard_False,project = Standard_False,keeppoint = Standard_False;
-#else
- Standard_Boolean OnFirst,project,keeppoint;
-#endif
+
Handle(Adaptor2d_HCurve2d) arcref;
Standard_Real paramproj,paramf,paraml;
const Standard_Real Pas)
{
Standard_Boolean reversed, procf, procl, dofirst, dolast;
- Standard_Integer indfirst, indlast, ind2, i,j,k, NbSegm;
+ Standard_Integer indfirst = 0, indlast = 0, ind2, i,j,k, NbSegm;
Standard_Integer NbPointIns, NbPointRst, Nblines, Nbpts, NbPointDep;
Standard_Real U1,V1,U2,V2,paramf,paraml,currentparam;
IntPatch_SearchPnt Commun;
Standard_Real U,V,W;
- Standard_Real U1,V1,U2,V2;
+ Standard_Real U1,V1,U2 = 0.,V2 = 0.;
Standard_Real paramarc=0.,paramline=0.;
Standard_Integer i,j,k;
TColgp_SequenceOfPnt locpt;
Standard_Integer i,Nbi,Nbp;
gp_Pnt ptdeb,ptfin;
- Standard_Real pardeb,parfin;
+ Standard_Real pardeb = 0,parfin = 0;
Standard_Integer ideb,ifin,range,ranged,rangef;
Standard_Integer i,Nbi,Nbp;
gp_Pnt ptdeb,ptfin;
- Standard_Real pardeb,parfin;
+ Standard_Real pardeb = 0.,parfin = 0.;
Standard_Integer ideb,ifin,range,ranged,rangef;
}
//
if(aAng2<=aTolang2) {// IsParallel = Standard_True;
- Standard_Boolean bFlag;
+ Standard_Boolean bFlag = Standard_False;
Standard_Integer i;
Standard_Real aD;
gp_Pnt aPL[2];
IntTools_ComparatorCurve::IsSameXYZ(const gp_XYZ& aXYZ1,
const gp_XYZ& aXYZ2)
{
- Standard_Boolean bRet;
+ Standard_Boolean bRet = Standard_False;
Standard_Integer i;
Standard_Real aX1[3], aX2[3];
myC.D0(t, P);
GeomAPI_ProjectPointOnSurf aProjector;
//
- Standard_Real ULD, VLD;
+ Standard_Real ULD = 0., VLD = 0.;
GeomAPI_ProjectPointOnSurf& aLocProj = myContext->ProjPS(myFace);
aLocProj.Perform(P);
// ********************************************************************
{
- Standard_Integer I,N;
+ Standard_Integer I,N = 0;
Standard_Real aBornInf[2], aBornSup[2], aUVap[2];
math_Vector BornInf(aBornInf,1,2), BornSup(aBornSup,1,2);
math_Vector Uvap(aUVap,1,2);// parameters of current approach
{
Standard_Real Uvd[4],Uvf[4],Epsuv[4],Duv[4],Uvp[4],dv,dv2,ParC[4];
Standard_Real DPc,DPb;
-#ifndef DEB
Standard_Integer i = 0, k = 0;
-#else
- Standard_Integer i,k;
-#endif
Epsuv[0] = ResoU1;
Epsuv[1] = ResoV1;
Epsuv[2] = ResoU2;
// Valeur flottante, expurgee de "0000" qui trainent et de "E+00"
const Standard_Integer anMasSize = 5; // change 6 to 5: index 5 is not used below
char lxp[anMasSize], *pText;
- int i0, j0 = 0;
+ int i0 = 0, j0 = 0;
for (Standard_Integer i = 0; i < anMasSize; ++i)
lxp[i] = '\0';
theData.Clear();
myError.Clear();
ParserState aState = STATE_WAITING;
- const char * aStartData = NULL, * aNameEnd, * aPtr;
+ const char * aStartData = NULL, * aNameEnd = NULL, * aPtr;
LDOMBasicString anAttrName, anAttrValue;
char anAttDelimiter = '\0';
Standard_Real Law_BSpFunc::Value(const Standard_Real X)
{
if ((X==first) || (X==last)) {
- Standard_Integer Ideb, Ifin;
+ Standard_Integer Ideb = 0, Ifin = 0;
if (X==first) {
curv->LocateU(first, PosTol, Ideb, Ifin);
if (Ideb<1) Ideb=1;
Standard_Real& D)
{
if ((X==first) || (X==last)) {
- Standard_Integer Ideb, Ifin;
+ Standard_Integer Ideb = 0, Ifin = 0;
if (X==first) {
curv->LocateU(first, PosTol, Ideb, Ifin);
if (Ideb<1) Ideb=1;
Standard_Real& D2)
{
if ((X==first) || (X==last)) {
- Standard_Integer Ideb, Ifin;
+ Standard_Integer Ideb = 0, Ifin = 0;
if (X==first) {
curv->LocateU(first, PosTol, Ideb, Ifin);
if (Ideb<1) Ideb=1;
for (exp.Init(F,TopAbs_EDGE); exp.More(); exp.Next()) {
// for (TopExp_Explorer exp(F,TopAbs_EDGE); exp.More(); exp.Next()) {
const TopoDS_Shape& edg = exp.Current();
-#ifdef DEB
- TopAbs_Orientation ored1 = edg.Orientation(),ored2;
-#else
+
TopAbs_Orientation ored1 = edg.Orientation(),ored2 = TopAbs_FORWARD;
-#endif
+
if (ored1 == TopAbs_INTERNAL || ored1 == TopAbs_EXTERNAL) {
continue;
}
param = theInt.WParameter(j);
paramu = theInt.UParameter(j);
paramv = theInt.VParameter(j);
-#ifdef DEB
- TopAbs_Orientation theor;
-#else
+
TopAbs_Orientation theor=TopAbs_FORWARD;
-#endif
+
switch (theInt.Transition(j)) {
case IntCurveSurface_In:
/* JAG 13.09.96
{
Standard_Real param,paramu,paramv;
Standard_Integer i, nbpoints=0;
-#ifdef DEB
- TopAbs_Orientation theor, orface;
-#else
+
TopAbs_Orientation theor=TopAbs_FORWARD, orface;
-#endif
while (theInt.More()) {
const gp_Pnt& thept = theInt.Pnt();
TopoDS_Edge newedg;
TopoDS_Vertex newvtx;
TopLoc_Location loc;
- Standard_Real tol,prm,f,l, Uminc,Umaxc;;
+ Standard_Real tol,prm,f,l, Uminc = 0.,Umaxc = 0.;
gp_Pnt2d pf,pl;
Handle(Geom_Surface) S;
Standard_ConstructionError::Raise();
}
-#ifdef DEB
- TopAbs_Orientation OriF;
-#else
TopAbs_Orientation OriF = TopAbs_FORWARD;
-#endif
+
Standard_Boolean FinS = Standard_False;
TopExp_Explorer exp,exp2;
for (exp.Init(myShape,TopAbs_FACE); exp.More(); exp.Next()) {
Standard_Boolean wdone = (ledg.IsEmpty() || VFirst.IsSame(VLast));
while (!wdone) {
TopoDS_Vertex VF,VL;
-#ifdef DEB
- TopAbs_Orientation oredg;
-#else
+
TopAbs_Orientation oredg = TopAbs_FORWARD;
-#endif
+
for (itl.Initialize(ledg); itl.More(); itl.Next()) {
const TopoDS_Edge& edg2 = TopoDS::Edge(itl.Value());
TopoDS_Shape aLocalShape = edg2.Oriented(TopAbs_FORWARD);
newF2.Orientation(TopAbs_FORWARD);
// modifs JAG 97.05.28
-#ifdef DEB
- TopAbs_Orientation orfila;
-#else
+
TopAbs_Orientation orfila=TopAbs_FORWARD;
-#endif
+
for (exp.Init(FaceRef.Oriented(TopAbs_FORWARD),TopAbs_WIRE);
exp.More(); exp.Next()) {
const TopoDS_Wire& wir = TopoDS::Wire(exp.Current());
TopExp_Explorer Explo(RefDir, TopAbs_EDGE);
TopoDS_Edge RefEdge;
TopoDS_Vertex V1, V2;
- TopAbs_Orientation anOr;
+ TopAbs_Orientation anOr = TopAbs_FORWARD;
for (; Explo.More(); Explo.Next())
{
RefEdge = TopoDS::Edge(Explo.Current());
Standard_Real Tolerance = MAT2d_TOLCONF;
Standard_Real Param1,Param2;
Standard_Real Parama,Paramb;
- Standard_Real Distance,DistanceMini;
+ Standard_Real Distance = 0.,DistanceMini;
Standard_Boolean SolutionValide;
gp_Pnt2d PointSolution;
const Standard_Boolean IsShrinked,
const Standard_Real ShrinkCoef) const
{
- Standard_Real xG, yG, zG, X, Y, Z, startX=0., startY=0., startZ=0.;
+ Standard_Real xG = 0., yG = 0., zG = 0., X, Y, Z, startX=0., startY=0., startZ=0.;
theLines->AddBound ( NbNodes+1 );
if ( IsShrinked )
CalculateCenter( theCoords, NbNodes, xG, yG, zG );
if ( aDS.IsNull() )
return;
- Standard_Real xG, yG, zG, X, Y, Z, nx, ny, nz;
+ Standard_Real xG = 0., yG = 0., zG = 0., X, Y, Z, nx = 0., ny = 0., nz = 0.;
thePolygons->AddBound ( NbNodes );
if ( IsShrinked )
CalculateCenter( theCoords, NbNodes, xG, yG, zG );
// Check that the box is not empty
if (aBox.IsVoid() == Standard_False && MyView->IsDefined() == Standard_True) {
// Convert the 3D box to 2D representation in view coordinates
- Standard_Real Umin,Umax,Vmin,Vmax,U,V,W;
+ Standard_Real Umin = 0.,Umax = 0.,Vmin = 0.,Vmax = 0.,U,V,W;
gp_XYZ aCoord;
const gp_XYZ aCorner[2] = { aBox.CornerMin(), aBox.CornerMax() };
float LX1[6], LX2[6], LX3[6]; /* Lines along X direction */
float LY1[6], LY2[6], LY3[6]; /* Lines along Y direction */
float LZ1[6], LZ2[6], LZ3[6]; /* Lines along Z direction */
- unsigned char LX1draw, LX2draw, LX3draw; /* Allows drawing of X-line (000 - 100 is forbidden) */
- unsigned char LY1draw, LY2draw, LY3draw; /* Allows drawing of Y-line (000 - 010 is forbidden) */
- unsigned char LZ1draw, LZ2draw, LZ3draw; /* Allows drawing of Z-line (000 - 001 is forbidden) */
+ unsigned char LX1draw = 0, LX2draw = 0, LX3draw = 0; /* Allows drawing of X-line (000 - 100 is forbidden) */
+ unsigned char LY1draw = 0, LY2draw = 0, LY3draw = 0; /* Allows drawing of Y-line (000 - 010 is forbidden) */
+ unsigned char LZ1draw = 0, LZ2draw = 0, LZ3draw = 0; /* Allows drawing of Z-line (000 - 001 is forbidden) */
/* The first axis will be used for drawing the text and the values. */
switch (farestCorner)
if (*gl_lid > GL_LIGHT7) return;
// the light is a headlight ?
- GLint cur_matrix;
+ GLint cur_matrix = 0;
if (lptr->HeadLight)
{
glGetIntegerv(GL_MATRIX_MODE, &cur_matrix);
break;
};
-#ifndef DEB
- Standard_Real X =0., Y =0., Z =0.;
-#else
- Standard_Real X, Y, Z;
-#endif
+ Standard_Real X = 0., Y = 0., Z = 0.;
switch (i) {
if ( i%2 == 0 ) myBuilder.ReverseFace(myFaces[i]);
// pcurves
-#ifndef DEB
+
Primitives_Direction dd1 = Primitives_ZMin, dd2 = Primitives_YMax,
dd3 = Primitives_ZMax,dd4 = Primitives_YMin;
-#else
- Primitives_Direction dd1,dd2,dd3,dd4;
-#endif
+
switch (i/2) {
case 0 :
Standard_Integer i = Primitives_Wedge_NumDir1(d1);
if (myInfinite[i]) return Standard_False;
-#ifndef DEB
Primitives_Direction dd1 = Primitives_XMin,dd2 = Primitives_YMax,dd3 = Primitives_XMax ,dd4 = Primitives_ZMin;
-#else
- Primitives_Direction dd1,dd2,dd3,dd4;
-#endif
+
switch (i/2) {
case 0 :
{
Standard_Integer i = Primitives_Wedge_NumDir1(d1);
-#ifndef DEB
Primitives_Direction dd1 = Primitives_XMin,dd2 = Primitives_YMax,dd3 = Primitives_XMax ,dd4 = Primitives_ZMin;
-#else
- Primitives_Direction dd1,dd2,dd3,dd4;
-#endif
+
if (!WiresBuilt[i]) {
switch (i/2) {
if (!HasEdge(d1,d2)) Standard_DomainError::Raise();
Standard_Integer i = Primitives_Wedge_NumDir2(d1,d2);
-#ifndef DEB
+
Standard_Real X =0., Y =0., Z =0.;
-#else
- Standard_Real X, Y, Z;
-#endif
+
gp_Dir D;
gp_Vec VX = myAxes.XDirection();
gp_Vec VY = myAxes.YDirection();
Standard_Integer i = Primitives_Wedge_NumDir2(d1,d2);
if (!EdgesBuilt[i]) {
-#ifndef DEB
+
Primitives_Direction dd1 = Primitives_XMin ,dd2 = Primitives_XMax;
-#else
- Primitives_Direction dd1,dd2;
-#endif
+
switch (i/4) {
case 0 :
if (!HasVertex(d1,d2,d3)) Standard_DomainError::Raise();
Standard_Integer i = Primitives_Wedge_NumDir3(d1,d2,d3);
-#ifndef DEB
+
Standard_Real X =0., Y =0., Z =0.;
-#else
- Standard_Real X, Y, Z;
-#endif
+
switch (i) {
case 0 :
prevDeb=t;
if (t == LastU) FromLastU=Standard_True;
Standard_Boolean initpoint=Standard_False;
- Standard_Real U, V;
+ Standard_Real U = 0., V = 0.;
gp_Pnt CPoint;
Standard_Real ParT,ParU,ParV;
const Standard_Boolean UCouture,
const Standard_Boolean VCouture )
{
- Standard_Real S, T;
+ Standard_Real S = 0., T = 0.;
gp_Pnt P3d = myCurve->Value(U);
GeomAbs_SurfaceType SType = mySurface->GetType();
//Return curve home
Standard_Real UFirst = F.FirstParameter();
gp_Pnt P3d = C->Value( UFirst );
- Standard_Real u, v;
+ Standard_Real u = 0., v = 0.;
switch (SType)
{
case GeomAbs_Plane:
if((Type != GeomAbs_BSplineSurface) &&
(Type != GeomAbs_BezierSurface) &&
(Type != GeomAbs_OffsetSurface) ) {
- Standard_Real S, T;
+ Standard_Real S = 0., T = 0.;
switch (Type) {
// case GeomAbs_Plane:
// {
{
Standard_Boolean IsTrimmed[2] = {Standard_False, Standard_False};
Standard_Real Vsingular[2]; //for surfaces of revolution
- Standard_Real f, l, dt;
+ Standard_Real f = 0., l = 0., dt = 0.;
const Standard_Real eps = 0.01;
if(mySurface->GetType() == GeomAbs_SurfaceOfRevolution) {
// doit etre une et une seule courbe !!!
// De plus, cette courbe ne doit pas etre Single point
Standard_Integer NbCurves = Projector.NbCurves();
- Standard_Real Udeb,Ufin;
+ Standard_Real Udeb = 0.,Ufin = 0.;
if (NbCurves > 0) {
Projector.Bounds(1,Udeb,Ufin);
}
printf("Usage: %s iges_input [name]\n",argv[0]);
return(1);
}
- Standard_Character *Ch;
+ Standard_Character *Ch = NULL;
if(argc > 2) {
Ch = new Standard_Character[strlen(argv[2])+3];
}
Standard_Boolean found = Standard_False;
- Standard_Integer j, i1, i2, i3;
+ Standard_Integer j, i1 = 0, i2 = 0, i3 = 0;
TopoDS_Edge anEdge;
for(i=1;i<=3;i++) {
TopExp_Explorer anExp1(ArS.Value(i), TopAbs_EDGE);
static void SortEdges3(const TopTools_Array1OfShape& theArS, const TColgp_Array1OfPnt& theArP,
const gp_Ax1& theAx, TColStd_Array1OfInteger& theArI)
{
- Standard_Integer i, j, i1,i2, i3;
+ Standard_Integer i, j, i1 = 0,i2 = 0, i3 = 0;
TopoDS_Shape aV;
Standard_Boolean adjacent = Standard_False;
for(i=1;i<=3;i++) {
// 2. find nearest pair, reorganize ArI
// 3. sort inside pairs
// =======================================
- Standard_Integer i, j, i1,i2, i3, i4;
+ Standard_Integer i, j, i1 = 0,i2 = 0, i3 = 0, i4 = 0;
// 1.
TopoDS_Shape aV1;
for(i=1;i<=4;i++) {
const TopoDS_Shape& aV11 = TopExp::FirstVertex(TopoDS::Edge(theArS.Value(i)));
const TopoDS_Shape& aV12 = TopExp::LastVertex(TopoDS::Edge(theArS.Value(i)));
- Standard_Boolean aDjacent;
+ Standard_Boolean aDjacent = Standard_False;
for(j=1;j<=4;j++) {
if(i==j) continue;
const TopoDS_Shape& aV21 = TopExp::FirstVertex(TopoDS::Edge(theArS.Value(j)));
ArD.SetValue(i, anAx.Direction());
}
Standard_Boolean aDjacent = Standard_False;
- Standard_Integer j, i2, i3; //i2, i3 - indexes of two adjacent faces having the same surface
+ Standard_Integer j, i2 = 0, i3 = 0; //i2, i3 - indexes of two adjacent faces having the same surface
Standard_Integer i1 = 0; //single face
for(i=1;i<=3;i++) {
for(j=1;j<=3;j++) {
TopTools_MapOfShape View;
TopExp_Explorer ShapeExplorer (ShapeIn, KindOfShape);
TopTools_ListOfShape Shapes;
- BRepAlgoAPI_BooleanOperation* pMS;
+ BRepAlgoAPI_BooleanOperation* pMS = NULL;
if (theBool)
pMS = (reinterpret_cast<BRepAlgoAPI_BooleanOperation *>(&MS));
for (; ShapeExplorer.More(); ShapeExplorer.Next ()) {
Standard_Integer i, nbEdgs = aMapEdgeFace.Extent();
TopExp_Explorer anExp;
- TopAbs_Orientation anOrnt;
+ TopAbs_Orientation anOrnt = TopAbs_FORWARD;
for(i = 1; i <= nbEdgs; i++) {
TopoDS_Shape aNewS[2];
Standard_Integer nbModified = 0;
Standard_Integer nbDeleted = 0;
- Standard_Integer iShape;
+ Standard_Integer iShape = 0;
for (i = 0; i < 2; i++) {
const TopoDS_Shape& aOldS = (i==0 ? myS1 : myS2);
Standard_Real& thePar,
Standard_Real& theDist)
{
- Standard_Real aDist, aPar, aTol2;
+ Standard_Real aDist, aPar, aTol2 = 0.;
theDist = RealLast();
gp_Pnt aPnt(BRep_Tool::Pnt(theVer));
Standard_Boolean isContactByVer = Standard_False;
}
// --- own field : name ---
- StepBasic_SiUnitName aName;
+ StepBasic_SiUnitName aName = StepBasic_sunMetre;
if (data->ParamType(num,3) == Interface_ParamEnum) {
Standard_CString text = data->ParamCValue(num,3);
if(!DecodeName(aName,text))
if (!data->CheckNbParams(num,2,ach,"si_unit")) return;
RWStepBasic_RWSiUnit reader;
- StepBasic_SiPrefix aPrefix;
+ StepBasic_SiPrefix aPrefix = StepBasic_spExa;
Standard_Boolean hasAprefix = Standard_False;
if (data->IsParamDefined(num,1)) {
if (data->ParamType(num,1) == Interface_ParamEnum) {
// --- field : prefix ---
RWStepBasic_RWSiUnit reader;
- StepBasic_SiPrefix aPrefix = StepBasic_spExa; // by default
+ StepBasic_SiPrefix aPrefix = StepBasic_spExa;
Standard_Boolean hasAprefix = Standard_False;
if (data->IsParamDefined(num,1)) {
if (data->ParamType(num,1) == Interface_ParamEnum) {
// --- field : prefix ---
RWStepBasic_RWSiUnit reader;
- StepBasic_SiPrefix aPrefix;
+ StepBasic_SiPrefix aPrefix = StepBasic_spExa;
Standard_Boolean hasAprefix = Standard_False;
if (data->IsParamDefined(num,1)) {
if (data->ParamType(num,1) == Interface_ParamEnum) {
if (!data->CheckNbParams(num,2,ach,"si_unit")) return;
RWStepBasic_RWSiUnit reader;
- StepBasic_SiPrefix aPrefix;
+ StepBasic_SiPrefix aPrefix = StepBasic_spExa;
Standard_Boolean hasAprefix = Standard_False;
if (data->IsParamDefined(num,1)) {
if (data->ParamType(num,1) == Interface_ParamEnum) {
data->NamedForComplex("MODIFIED_GEOMETRIC_TOLERANCE",num0,num,ach);
// Own fields of ModifiedGeometricTolerance
- StepDimTol_LimitCondition aModifier;
+ StepDimTol_LimitCondition aModifier = StepDimTol_MaximumMaterialCondition;
if (data->ParamType (num, 1) == Interface_ParamEnum) {
Standard_CString text = data->ParamCValue(num, 1);
if (strcmp(text, ".MAXIMUM_MATERIAL_CONDITION.")==0) aModifier = StepDimTol_MaximumMaterialCondition;
// Own fields of ModifiedGeometricTolerance
- StepDimTol_LimitCondition aModifier;
+ StepDimTol_LimitCondition aModifier = StepDimTol_MaximumMaterialCondition;
if (data->ParamType (num, 5) == Interface_ParamEnum) {
Standard_CString text = data->ParamCValue(num, 5);
if (strcmp(text, ".MAXIMUM_MATERIAL_CONDITION.")==0) aModifier = StepDimTol_MaximumMaterialCondition;
// Inherited fields of ElementDescriptor
- StepElement_ElementOrder aElementDescriptor_TopologyOrder;
+ StepElement_ElementOrder aElementDescriptor_TopologyOrder = StepElement_Linear;
if (data->ParamType (num, 1) == Interface_ParamEnum) {
Standard_CString text = data->ParamCValue(num, 1);
if (strcmp(text, ".LINEAR.")==0) aElementDescriptor_TopologyOrder = StepElement_Linear;
// Own fields of ElementDescriptor
- StepElement_ElementOrder aTopologyOrder;
+ StepElement_ElementOrder aTopologyOrder = StepElement_Linear;
if (data->ParamType (num, 1) == Interface_ParamEnum) {
Standard_CString text = data->ParamCValue(num, 1);
if (strcmp(text, ".LINEAR.") == 0) aTopologyOrder = StepElement_Linear;
// Inherited fields of ElementDescriptor
- StepElement_ElementOrder aElementDescriptor_TopologyOrder;
+ StepElement_ElementOrder aElementDescriptor_TopologyOrder = StepElement_Linear;
if (data->ParamType (num, 1) == Interface_ParamEnum) {
Standard_CString text = data->ParamCValue(num, 1);
if (!strcmp(text, ".LINEAR.")) aElementDescriptor_TopologyOrder = StepElement_Linear;
}
}
- StepElement_Element2dShape aShape;
+ StepElement_Element2dShape aShape = StepElement_Quadrilateral;
if (data->ParamType (num, 4) == Interface_ParamEnum) {
Standard_CString text = data->ParamCValue(num, 4);
if (!strcmp(text, ".QUADRILATERAL.")) aShape = StepElement_Quadrilateral;
// Inherited fields of ElementDescriptor
- StepElement_ElementOrder aElementDescriptor_TopologyOrder;
+ StepElement_ElementOrder aElementDescriptor_TopologyOrder = StepElement_Linear;
if (data->ParamType (num, 1) == Interface_ParamEnum) {
Standard_CString text = data->ParamCValue(num, 1);
if (!strcmp(text, ".LINEAR.")) aElementDescriptor_TopologyOrder = StepElement_Linear;
}
}
- StepElement_Volume3dElementShape aShape;
+ StepElement_Volume3dElementShape aShape = StepElement_Hexahedron;
if (data->ParamType (num, 4) == Interface_ParamEnum) {
Standard_CString text = data->ParamCValue(num, 4);
if (!strcmp(text, ".HEXAHEDRON.")) aShape = StepElement_Hexahedron;
// Own fields of FeaAxis2Placement3d
- StepFEA_CoordinateSystemType aSystemType;
+ StepFEA_CoordinateSystemType aSystemType = StepFEA_Cartesian;
if (data->ParamType (num, 5) == Interface_ParamEnum) {
Standard_CString text = data->ParamCValue(num, 5);
if (strcmp(text, ".CARTESIAN.") == 0) aSystemType = StepFEA_Cartesian;
(Draw_Interpretor& di, Standard_Integer argc, const char** argv)
{
//cky/rln 03.02.99 To eliminate dependence of SWDRAW on TKXSBase (to use only ShapeHealing)
- Standard_Real tolang; // = Interface_Static::RVal("XSTEP.encoderegularity.angle");
+ Standard_Real tolang = Precision::Angular(); // = Interface_Static::RVal("XSTEP.encoderegularity.angle");
// if (argc < 3) di<<"Current value for regularity angle : "<<tolang<<"\n";
if (argc < 3) {
di<<"Donner nom de shape.\n + option : angle en radian, sinon la valeur courante est prise"<<"\n";
Standard_Real& DMin)
{
Standard_Real DMin2 = 0.;
- Standard_Real Xmin,Ymin,Xmax,Ymax;
+ Standard_Real Xmin = 0.,Ymin = 0.,Xmax = 0.,Ymax = 0.;
if(!Bnd_Box2d(mybox2d).IsVoid())
{
Bnd_Box2d(mybox2d).Get(Xmin,Ymin,Xmax,Ymax);
else { nbu = bs->NbUPoles(), nbv = bs->NbVPoles(); }
// Standard_Real dx = 0, dy = 0, dz = 0;
// Standard_Real x,y,z;
- Standard_Real minx,miny,minz,maxx,maxy,maxz;
+ Standard_Real minx = 0.,miny = 0.,minz = 0.,maxx = 0.,maxy = 0.,maxz = 0.;
Standard_Boolean issmall = Standard_True;
for (iu = 1; iu <= nbu; iu ++) {
// Edge on same vertex : small one ?
if (VA.IsSame(VB)) {
- Standard_Real cf,cl;
+ Standard_Real cf = 0.,cl = 0.;
Handle(Geom_Curve) C3D;
if (!BRep_Tool::Degenerated(E)) C3D = BRep_Tool::Curve (E,cf,cl);
if (C3D.IsNull()) continue; // DGNR
Standard_Integer i, np = 0;
Standard_Integer i0 = (uorv == 1 ? poles.LowerCol() : poles.LowerRow());
Standard_Integer i1 = (uorv == 1 ? poles.UpperCol() : poles.UpperRow());
- Standard_Real xmin,ymin,zmin, xmax,ymax,zmax;
+ Standard_Real xmin = 0.,ymin = 0.,zmin = 0., xmax = 0.,ymax = 0.,zmax = 0.;
for (i = i0; i <= i1; i ++) {
if (uorv == 1) MinMaxPnt (poles(rank,i),np,xmin,ymin,zmin, xmax,ymax,zmax);
else MinMaxPnt (poles(i,rank), np, xmin,ymin,zmin, xmax,ymax,zmax);
void ShapeAnalysis_ShapeTolerance::AddTolerance(const TopoDS_Shape& shape,const TopAbs_ShapeEnum type)
{
Standard_Integer nbt = 0;
- Standard_Real tol, cmin,cmoy,cmax;
+ Standard_Real tol, cmin = 0.,cmoy = 0.,cmax = 0.;
TopExp_Explorer myExp;
gp_Pnt2d ShapeAnalysis_Surface::ValueOfUV(const gp_Pnt& P3D,const Standard_Real preci)
{
GeomAdaptor_Surface& SurfAdapt = Adaptor3d()->ChangeSurface();
- Standard_Real S, T;
+ Standard_Real S = 0., T = 0.;
myGap = -1.; // devra etre calcule
Standard_Boolean computed = Standard_True; // a priori
while(!done) {
Standard_Integer resultType = 3;
Standard_Real distmin = RealLast();
- Standard_Integer ledge;
+ Standard_Integer ledge = 0;
Standard_Boolean found = Standard_False;
Standard_Real closeDist = wireFirst.SquareDistance(wireLast);
Standard_Boolean IsEdgeSeam = Standard_False;
Handle(Geom2d_Curve) aCrvRes1, aCrvRes2;
TopAbs_Orientation resOrient;
- Standard_Real newf,newl;
+ Standard_Real newf = 0.,newl = 0.;
// iterates on edges
Standard_Integer i = 1;
for(; i <= edges->Length(); i++) {
GeomAdaptor_Surface& SurfAdapt = NHS->ChangeSurface();
const Standard_Integer NP = 21;
- Standard_Real S, T; // U,V deja fait
+ Standard_Real S = 0., T = 0.; // U,V deja fait
gp_Pnt P3d, P3d2;
Standard_Boolean onSurface = Standard_True;
TopoDS_Vertex firstV, endV;
TopoDS_Edge firstEdge, lastEdge;
Standard_Real tol = 0;
- Standard_Integer iumin, iumax, ivmin, ivmax;
+ Standard_Integer iumin = 0, iumax = 0, ivmin = 0, ivmax = 0;
Standard_Real dsu=0., dsv=0.;
Standard_Boolean canBeClosed = Standard_False;
for(;;) {
TopoDS_Vertex V = sae.FirstVertex ( E2 );
gp_Pnt p = BRep_Tool::Pnt ( V );
- Standard_Real a1, b1, a2, b2;
+ Standard_Real a1 = 0., b1 = 0., a2 = 0., b2 = 0.;
Handle(Geom2d_Curve) c2d1, c2d2;
//:abv 29.08.01: torCuts.sat: distinguish degeneration by U and by V;
// if ( stop < n2 ) { stop = n2; degstop = Standard_True; }
}
else {
- Standard_Real ax1, bx1, ax2, bx2;
+ Standard_Real ax1 = 0., bx1 = 0., ax2 = 0., bx2 = 0.;
Handle(Geom2d_Curve) cx1, cx2;
if ( ( c2d1.IsNull() && ! sae.PCurve ( E1, Face(), c2d1, a1, b1, Standard_True ) ) ||
( c2d2.IsNull() && ! sae.PCurve ( E2, Face(), c2d2, a2, b2, Standard_True ) ) ||
// cycle is to verify fix in case of RemoveLoop
Standard_Real tolfact = 0.1; // factor for shifting by parameter in RemoveLoop
- Standard_Real f2d, l2d;
+ Standard_Real f2d = 0., l2d = 0.;
Handle(Geom2d_Curve) c2d;
Standard_Real newtol=0.; // = Precision();
//=============
//:s2 abv 21 Apr 99: Speculation: try bending pcurves
- Standard_Real bendtol1, bendtol2;
+ Standard_Real bendtol1 = 0., bendtol2 = 0.;
Handle(Geom2d_Curve) bendc1, bendc2;
- Standard_Real bendf1, bendl1, bendf2, bendl2;
+ Standard_Real bendf1 = 0., bendl1 = 0., bendf2 = 0., bendl2 = 0.;
if ( myGeomMode && ! BRep_Tool::IsClosed(E1,face) && ! BRep_Tool::IsClosed(E2,face) ) {
gp_Pnt2d p2d = 0.5 * ( p2d1.XY() + p2d2.XY() );
Standard_Boolean ok1 = TryBendingPCurve (E1, face, p2d, E1.Orientation() == TopAbs_FORWARD,
Standard_Real f, l;
Handle(Geom_Curve) curve3d = BRep_Tool::Curve (anEdge, f, l);
myHasCurve3d = !curve3d.IsNull();
- Standard_Real f2d, l2d;
+ Standard_Real f2d = 0., l2d = 0.;
Handle(Geom2d_Curve) pcurve1;
if ( ! myFace.IsNull() ) { // process free edges
sae.PCurve (anEdge, myFace, pcurve1, f2d, l2d, Standard_False);
// on pcurve(s): all knots
// assume that if seam-edge, its pcurve1 and pcurve2 has the same split knots !!!
- Standard_Real f2d, l2d;
+ Standard_Real f2d = 0., l2d = 0.;
Handle(Geom2d_Curve) pcurve1;
if ( ! myFace.IsNull() ) { // process free edges
ShapeAnalysis_Edge sae;
void ShapeUpgrade_SplitSurfaceAngle::Compute(const Standard_Boolean /*Segment*/)
{
Handle(Geom_Surface) S;
- Standard_Real U1,U2;
+ Standard_Real U1 = 0.,U2 = 0.;
Standard_Boolean isRect = Standard_False;
if(mySurface->IsKind(STANDARD_TYPE(Geom_RectangularTrimmedSurface))){
Handle(Geom_RectangularTrimmedSurface) rts =
//collect NM vertices
- Standard_Real af,al;
+ Standard_Real af = 0.,al = 0.;
Handle(Geom_Curve) c3d;
Adaptor3d_CurveOnSurface AdCS;
if(myEdgeDivide->HasCurve3d())
TopTools_IndexedDataMapOfShapeListOfShape emptyAnc;
myShapeWithAncestors.Prepend(In);
myAncestors .Prepend(emptyAnc);
-#ifdef DEB
- TopAbs_ShapeEnum TA;
-#else
+
TopAbs_ShapeEnum TA=TopAbs_COMPOUND;
-#endif
+
if (TS == TopAbs_VERTEX) TA = TopAbs_EDGE;
else if (TS == TopAbs_EDGE) TA = TopAbs_FACE;
else if (TS == TopAbs_FACE) TA = TopAbs_SOLID;
TopTools_MapOfShape& Neighbourg)
{
TopAbs_ShapeEnum TA = S.ShapeType();
-#ifdef DEB
- TopAbs_ShapeEnum TS;
-#else
TopAbs_ShapeEnum TS=TopAbs_COMPOUND;
-#endif
+
if (TA == TopAbs_FACE) TS = TopAbs_EDGE;
if (TA == TopAbs_EDGE) TS = TopAbs_VERTEX;
if (TA == TopAbs_VERTEX) TS = TopAbs_VERTEX; // szy 30.03.10
// to sort, it is considered that :
// POINT == VERTEX,CURVE == EDGE,SURFACE == FACE
-#ifdef DEB
- TopAbs_ShapeEnum SKtri;
-#else
TopAbs_ShapeEnum SKtri=TopAbs_COMPOUND;
-#endif
+
if (isshape) SKtri = TopOpeBRepDS::KindToShape(K);
else if (isgeome) {
if (K == TopOpeBRepDS_POINT) SKtri = TopAbs_VERTEX;
// find the closest point
Standard_Integer iPoint, iSegment, nbPoints, nbSegments;
-#ifndef DEB
+
const IntRes2d_IntersectionPoint *PClosest = NULL;
-#else
- const IntRes2d_IntersectionPoint *PClosest;
-#endif
+
Standard_Real dMin = RealLast();
nbPoints = myIntersector.NbPoints();
for (iPoint = 1; iPoint <= nbPoints; iPoint++) {
// Modified by skv - Wed Jul 12 15:20:58 2006 OCC12627 End
// transition on the segment
-#ifndef DEB
+
TopAbs_Orientation SegTrans = TopAbs_FORWARD;
-#else
- TopAbs_Orientation SegTrans;
-#endif
+
const IntRes2d_Transition& T1 = PClosest->TransitionOfFirst();
switch (T1.TransitionType()) {
case IntRes2d_In :
myState = myTrans.StateBefore();
}
}
-
-
-
-
-
-
-
-
-
-
-
TopAbs_Orientation anEdgeOri;
Standard_Integer aClosestInd;
IntRes2d_IntersectionPoint aPInter;
- TopAbs_State aState;
+ TopAbs_State aState = TopAbs_UNKNOWN;
Standard_Boolean IsWReject;
Standard_Boolean IsEReject;
Handle(TopOpeBRepDS_CurvePointInterference) epi = Handle(TopOpeBRepDS_CurvePointInterference)::DownCast(I);
const TopOpeBRepDS_Transition& tevi = epi->Transition();
Standard_Integer sevi = epi->Support();
-#ifdef DEB
- Standard_Integer gevi;
-#else
+
Standard_Integer gevi=0;
-#endif
+
if (isvertex1) gevi = myPDS->AddShape(V1,1);
else if (isvertex2) gevi = myPDS->AddShape(V2,2);
Standard_Boolean bevi = Standard_False;
Standard_Boolean pointofsegment = IsPointOfSegment1();
Standard_Boolean pur1d = (pointofsegment && mySameDomain);
-#ifdef DEB
- TopAbs_State staB,staA; TopAbs_ShapeEnum shaB,shaA; Standard_Boolean pextremity;
-#else
TopAbs_State staB=TopAbs_UNKNOWN,staA=TopAbs_UNKNOWN;
TopAbs_ShapeEnum shaB=TopAbs_COMPOUND,shaA=TopAbs_COMPOUND; Standard_Boolean pextremity;
-#endif
TopAbs_State staINON = TopAbs_IN;
Standard_Integer dim = myDimension;
cout<<" "<<G;
const Handle(TopOpeBRepDS_HDataStructure)& HDS = myPFF->HDataStructure();
- Standard_Real tol;
+ Standard_Real tol = Precision::Confusion();
if (GK == TopOpeBRepDS_VERTEX) tol = BRep_Tool::Tolerance(TopoDS::Vertex(HDS->Shape(G)));
else if (GK == TopOpeBRepDS_POINT) tol = HDS->Point(G).Tolerance();
cout<<" tol = "<<tol;
}
else {
Standard_Boolean Odefined = Standard_True;
-#ifdef DEB
- TopAbs_Orientation O;
-#else
+
TopAbs_Orientation O = TopAbs_FORWARD;
-#endif
IntSurf_TypeTrans trans;
trans = (Index == 1) ? L.TransitionOnS1() : L.TransitionOnS2();
TopAbs_Orientation oriE = E.Orientation();
const Handle(Geom_Surface)& S = BRep_Tool::Surface(F);
- Standard_Real U,V;
+ Standard_Real U = 0.,V = 0.;
if (ShapeIndex == 1) VP.ParametersOnS1(U,V);
else if (ShapeIndex == 2) VP.ParametersOnS2(U,V);
(TopOpeBRep_FaceEdgeIntersector& FEINT,
TopOpeBRepDS_DataStructure& BDS) const
{
-#ifdef DEB
- Standard_Integer G;
-#else
Standard_Integer G=0;
-#endif
TopoDS_Vertex V1;
Standard_Boolean isvertexF = FEINT.IsVertex(1,V1);
if (!ok1) return Standard_False;
Standard_Real f,l; FUN_tool_bounds(OOE,f,l);
- TopAbs_State stb,sta;
+ TopAbs_State stb = TopAbs_UNKNOWN,sta = TopAbs_UNKNOWN;
TopOpeBRepTool_makeTransition MKT;
OOdone = MKT.Initialize(OOE,f,l,oopar,F,uv,factor);
if (OOdone) OOdone = MKT.SetRest(E,paronE);
Standard_Integer SI = ShapeIndex();
-#ifdef DEB
- Standard_Boolean condition;
-#else
Standard_Boolean condition=Standard_False;
-#endif
+
if (SI == 1) condition = M_SINON(pos2);
else if (SI == 2) condition = M_SINON(pos1);
else if (SI == 0) condition = M_SINON(pos1) && M_SINON(pos2);
const Standard_Integer sind,const Standard_Real toluv)
//-----------------------------------------------------------------------
{
- Standard_Real u1,v1,u2,v2;
+ Standard_Real u1 = 0.,v1 = 0.,u2 = 0.,v2 = 0.;
if (sind == 1) {
VP1.ParametersOnS1(u1,v1); VP2.ParametersOnS1(u2,v2);
}
//**!
const TopOpeBRepDS_Point& PDS = BDS.Point(GI);
-#ifdef DEB
- Standard_Integer ivp1; TopoDS_Shape v1; Standard_Boolean newv1 = Standard_False; TopOpeBRepDS_Kind k1; Standard_Integer iv1 = 0;
-#else
Standard_Integer ivp1; TopoDS_Shape v1; Standard_Boolean newv1 = Standard_False; TopOpeBRepDS_Kind k1=TopOpeBRepDS_UNKNOWN; Standard_Integer iv1 = 0;
-#endif
+
ivp1 = BREP_findPDSamongIDMOVP(PDS,Mvp1);
if (ivp1) {
v1 = Mvp1.FindKey(ivp1);
k1 = TopOpeBRepDS_VERTEX;
}
-#ifdef DEB
- Standard_Integer ivp2; TopoDS_Shape v2; Standard_Boolean newv2 = Standard_False; TopOpeBRepDS_Kind k2; Standard_Integer iv2 = 0;
-#else
+
Standard_Integer ivp2; TopoDS_Shape v2; Standard_Boolean newv2 = Standard_False; TopOpeBRepDS_Kind k2=TopOpeBRepDS_UNKNOWN; Standard_Integer iv2 = 0;
-#endif
+
ivp2 = BREP_findPDSamongIDMOVP(PDS,Mvp2);
if (ivp2) {
v2 = Mvp2.FindKey(ivp2);
Standard_Real paredge = VP.EdgeParameter(ShapeIndex);
TopoDS_Edge OOedge;
-#ifdef DEB
- Standard_Real OOparedge;
-#else
- Standard_Real OOparedge=0;
-#endif
+
+ Standard_Real OOparedge = 0.;
+
Standard_Boolean hasONedge = (VP.State(OOShapeIndex) == TopAbs_ON);
Standard_Boolean hasOOedge = (on2edges) ? Standard_True : hasONedge;
if ( hasOOedge ) {
}
Standard_Boolean setrest = Standard_False;
- Standard_Integer mkt = 0; Standard_Real par1,par2;
+ Standard_Integer mkt = 0; Standard_Real par1 = 0.,par2 = 0.;
if (on3) {
TopoDS_Edge ei = (rki == 1) ? TopoDS::Edge(VP.ArcOnS1()) : TopoDS::Edge(VP.ArcOnS2());
Standard_Real pari = (rki == 1) ? VP.ParameterOnArc1() : VP.ParameterOnArc2();
//=======================================================================
TopAbs_Orientation TopOpeBRepBuild_Builder::Orient(const TopAbs_Orientation Ori,const Standard_Boolean Reverse)
{
-#ifdef DEB
- TopAbs_Orientation result;
-#else
TopAbs_Orientation result=TopAbs_FORWARD;
-#endif
switch (Reverse) {
case Standard_True : result = TopAbs::Complement(Ori); break;
case Standard_False : result = Ori; break;
// FRA11018 (FOR=f5,EG=e18,EsdEG=e7)
Standard_Boolean espONesd = Standard_False; Standard_Integer Iesd=0;// xpu150698
if (eghassd) espONesd = FUN_ds_ONesd(BDS,GI,EspON,Iesd);// xpu150698
- Standard_Boolean eONsoEsd;
+ Standard_Boolean eONsoEsd = Standard_False;
if (eghassd && (Iesd != 0)) {
const TopoDS_Edge& Esd = TopoDS::Edge(BDS.Shape(Iesd));
Standard_Boolean ok = FUN_tool_curvesSO(eON,Esd,eONsoEsd);
if (ComOfCut) {b3d=Standard_True; b2d=Standard_True;} //xpu200598
gp_Vec ngFS,ngFOR;
- Standard_Real parEG;
+ Standard_Real parEG = 0.;
// bcl1;bcl2; tsp(f9),tspON(e7)
Standard_Boolean sdm = FUN_ds_sdm(BDS,BDS.Shape(iFOR),BDS.Shape(iFS));
Standard_Boolean isfafa = sdm; // such interferences are computed IN fafa case
#ifdef DEB
if (tFOR) cout<<"* yap6 = 1"<<endl;
#endif
- TopAbs_Orientation neworiE;
+ TopAbs_Orientation neworiE = TopAbs_FORWARD;
// FF est samedomain avec FCX
// on evalue la transition de FOR par rapport a la matiere 2d de la face FCX
// au lieu de la transition par rapport a la matiere 3d de la face FS
if (!rk1) return;
TopAbs_Orientation oegFOR;
- Standard_Boolean shareG;
+ Standard_Boolean shareG = Standard_False;
Standard_Boolean ok = Standard_False;
if (EGBoundFCX)
ok = FUN_ds_shareG(myPB->DataStructure(),iFOR,iFCX,GI,TopoDS::Edge(EspON),shareG);
const Standard_Boolean In_RevOri)
{
Standard_Boolean RevOri = In_RevOri;
-
TopAbs_ShapeEnum t = S1.ShapeType();
-#ifdef DEB
- TopAbs_ShapeEnum t1,t11;
-#else
TopAbs_ShapeEnum t1=TopAbs_COMPOUND,t11=TopAbs_COMPOUND;
-#endif
+
if (t == TopAbs_FACE ) {
t1 = TopAbs_WIRE;
t11 = TopAbs_EDGE;
// NYI : SplitCompound appele par SplitShape
TopOpeBRepTool_ShapeExplorer ex1;
-#ifdef DEB
- TopAbs_ShapeEnum t1,tex1;
-#else
+
TopAbs_ShapeEnum t1=TopAbs_COMPOUND,tex1=TopAbs_COMPOUND;
-#endif
+
if ( ! S1null ) {
t1 = tex1 = TopType(S1);
if ( t1 == TopAbs_COMPOUND ) {
}
TopOpeBRepTool_ShapeExplorer ex2;
-#ifdef DEB
- TopAbs_ShapeEnum t2,tex2;
-#else
+
TopAbs_ShapeEnum t2=TopAbs_COMPOUND,tex2=TopAbs_COMPOUND;
-#endif
+
if ( ! S2null ) {
t2 = tex2 = TopType(S2);
if ( t2 == TopAbs_COMPOUND ) {
Handle(Geom2d_Curve) PC2new;
if(C3D.IsNull()) {
- Standard_Real tolreached2d1, tolreached2d2, r1, r2, tol=0;
+ Standard_Real tolreached2d1 = Precision::Confusion(), tolreached2d2 = Precision::Confusion(), r1, r2, tol=Precision::Confusion();
if (comppc1) PC1new = myCurveTool.MakePCurveOnFace(F1,C3D,tolreached2d1);
if (comppc2) PC2new = myCurveTool.MakePCurveOnFace(F2,C3D,tolreached2d2);
Handle(Geom_Curve) C = BRep_Tool::Curve(e,loc,f,l);
if ( !C.IsNull() && C->IsPeriodic()) {
Standard_Real per = C->Period();
-#ifdef DEB
- TopAbs_Orientation oV;
-#else
+
TopAbs_Orientation oV=TopAbs_FORWARD;
-#endif
+
TopExp_Explorer exV(e,TopAbs_VERTEX);
for (; exV.More(); exV.Next()) {
const TopoDS_Vertex& vofe = TopoDS::Vertex(exV.Current());
return Standard_False;
}
const TopoDS_Shape& S =myHDS->Shape(I);
-#ifdef DEB
- TopAbs_ShapeEnum se;
-#else
+
TopAbs_ShapeEnum se=TopAbs_COMPOUND;
-#endif
+
switch (K) {
case TopOpeBRepDS_SOLID : se = TopAbs_SOLID; break;
case TopOpeBRepDS_SHELL : se = TopAbs_SHELL; break;
)
{
#ifdef DEB
- Standard_Integer i,l,lb,n;
+ Standard_Integer i,l,lb = 0,n;
Standard_Integer degree = B->Degree();
Standard_Integer nbpoles = B->NbPoles();
BDS.ShapeInterferences(SE),par1,par2,isonper);
TopOpeBRepTool_makeTransition MKT;
- TopAbs_State stb,sta;
+ TopAbs_State stb = TopAbs_UNKNOWN,sta = TopAbs_UNKNOWN;
ok = MKT.Initialize(SE,par1,par2,par, FCX,OOuv, factor);
if (ok) ok = MKT.SetRest(ES,OOpar);
if (ok) ok = MKT.MkTonE(stb,sta);
Standard_Real factor = 1.e-4;
- TopOpeBRepTool_makeTransition MKT; TopAbs_State stb,sta;
+ TopOpeBRepTool_makeTransition MKT; TopAbs_State stb = TopAbs_UNKNOWN,sta = TopAbs_UNKNOWN;
ok = MKT.Initialize(SE,par1,par2,parE, F,uv, factor);
if (ok) ok = MKT.SetRest(Eline,parline);
if (ok) ok = MKT.MkTonE(stb,sta);
gp_Pnt2d uvFS; Standard_Boolean ok = FUN_tool_parF(E,par,FS,uvFS);
if (!ok) {FUN_Raise(); continue;}
- TopOpeBRepTool_makeTransition MKT; TopAbs_State stb,sta;
+ TopOpeBRepTool_makeTransition MKT; TopAbs_State stb = TopAbs_UNKNOWN,sta = TopAbs_UNKNOWN;
ok = MKT.Initialize(E,par1,par2,par, FS,uvFS, factor);
if (ok) ok = MKT.MkTonE(stb,sta);
if (!ok) {FUN_Raise(); continue;}
gp_Pnt2d uvFS; ok = FUN_tool_paronEF(ES,parES,FS,uvFS);
if (!ok) {FUN_Raise(); continue;}
- TopOpeBRepTool_makeTransition MKT; TopAbs_State stb,sta;
+ TopOpeBRepTool_makeTransition MKT; TopAbs_State stb = TopAbs_UNKNOWN,sta = TopAbs_UNKNOWN;
ok = MKT.Initialize(E,par1,par2,par, FS,uvFS, factor);
if (ok) ok = MKT.SetRest(ES,parES);
if (ok) ok = MKT.MkTonE(stb,sta);
gp_Pnt2d uv; ok = FUN_tool_paronEF(ES,parES,FTRA,uv);
if (!ok) return Standard_False;
- Standard_Real factor = 1.e-2; TopAbs_State stb,sta;
+ Standard_Real factor = 1.e-2; TopAbs_State stb = TopAbs_UNKNOWN,sta = TopAbs_UNKNOWN;
TopOpeBRepTool_makeTransition MKT;
ok = MKT.Initialize(E,f,l,parE, FTRA,uv, factor);
if (ok) ok = MKT.SetRest(ES,parES);
Standard_Boolean idshape = ::FUN_transitionSHAPEEQUAL(T1,T2);
Standard_Boolean idstate = ::FUN_transitionSTATEEQUAL(T1,T2);
Standard_Boolean newV = Standard_True;
- Standard_Boolean oppostate;
+ Standard_Boolean oppostate = Standard_False;
if (newV) {
// sym is not precise enough (croix3_3-> OUT/IN; ON/OUT)
//=======================================================================
TopAbs_Orientation TopOpeBRepDS_Transition::OrientationON(const TopAbs_State S,const TopAbs_ShapeEnum ) const // T) const
{
-#ifdef DEB
- TopAbs_Orientation result;
-#else
TopAbs_Orientation result=TopAbs_FORWARD;
-#endif
if (myStateBefore == TopAbs_ON && myStateAfter == TopAbs_ON) {
#if 0
if (!ok) return Standard_False;
TopOpeBRepTool_makeTransition MKT;
- TopAbs_State stb1,sta1;
+ TopAbs_State stb1 = TopAbs_UNKNOWN,sta1 = TopAbs_UNKNOWN;
ok = MKT.Initialize(SE,pbef,paft,parSE, F,uv, factor);
if (ok) ok = MKT.SetRest(E,parE);
if (ok) ok = MKT.MkTonE(stb1,sta1);
gp_Pnt2d uv; ok = FUN_tool_paronEF(E,pE,F1,uv); if (!ok) {it2.Next();continue;}
Standard_Real factor = 0.789;
TopOpeBRepTool_makeTransition MKT;
- TopAbs_State stb,sta;
+ TopAbs_State stb = TopAbs_UNKNOWN,sta = TopAbs_UNKNOWN;
ok = MKT.Initialize(E,pbef,paft,pE, F1,uv, factor);
if (ok) ok = MKT.SetRest(E1,pE1);
if (ok) ok = MKT.MkTonE(stb,sta);
Standard_Boolean TopOpeBRepTool_STATE::Get(const TopAbs_State S)
{
- Standard_Boolean b;
+ Standard_Boolean b = Standard_False;
switch(S) {
case TopAbs_IN : b = myin; break;
case TopAbs_OUT : b = myout; break;
Handle(Geom_Curve) C = BRep_Tool::Curve(e,loc,f,l);
if ( !C.IsNull() && C->IsPeriodic()) {
Standard_Real per = C->Period();
-#ifdef DEB
- TopAbs_Orientation oV;
-#else
+
TopAbs_Orientation oV=TopAbs_FORWARD;
-#endif
+
TopExp_Explorer exV(e,TopAbs_VERTEX);
for (; exV.More(); exV.Next()) {
const TopoDS_Vertex& vofe = TopoDS::Vertex(exV.Current());
void V3d::ArrowOfRadius(const Handle(Graphic3d_Group)& garrow,const Standard_Real X0,const Standard_Real Y0,const Standard_Real Z0,const Standard_Real Dx,const Standard_Real Dy,const Standard_Real Dz,const Standard_Real Alpha,const Standard_Real Lng)
{
- Standard_Real Xc,Yc,Zc,Xi,Yi,Zi,Xj,Yj,Zj;
- Standard_Real Xn,Yn,Zn,X,Y,Z,X1,Y1,Z1,Norme;
+ Standard_Real Xc, Yc, Zc, Xi, Yi, Zi, Xj, Yj, Zj;
+ Standard_Real Xn, Yn, Zn, X, Y, Z, X1 = 0., Y1 = 0., Z1 = 0., Norme;
const Standard_Integer NbPoints = 10;
// Centre du cercle base de la fleche :
const Standard_Real Dbeta = 2. * M_PI / NFACES;
const Standard_Real Dalpha = 2. * M_PI / NFACES;
- Standard_ShortReal X,Y,Z,X0,Y0,Z0;
+ Standard_ShortReal X,Y,Z,X0 = 0.,Y0 = 0.,Z0 = 0.;
Standard_Real R, Alpha, Beta = 0.;
Standard_Integer i,j ;
for( j=0; j<NFACES/2 ; j++, Beta += Dbeta ) {
Standard_Integer aLastInd = argc - 1;
Standard_Boolean isChanged = Standard_False;
- Standard_Integer aNbUIsos;
- Standard_Integer aNbVIsos;
+ Standard_Integer aNbUIsos = 0;
+ Standard_Integer aNbVIsos = 0;
if (aLastInd >= 3) {
Standard_Boolean isIsoOnPlane = Standard_False;
Standard_Boolean ThereIsCurrent;
Standard_Real value;
Standard_Boolean hascol;
-#ifdef DEB
- Quantity_NameOfColor col;
-#else
+
Quantity_NameOfColor col = Quantity_NOC_BLACK ;
-#endif
// Verification des arguments
if ( argc>3 ) {di<<argv[0]<<" Syntaxe error"<<"\n"; return 1;}
TCollection_AsciiString aName (argv[anArgIter++]);
Handle(AIS_InteractiveObject) anOriginObject;
TCollection_AsciiString aColorString (argv[argc-1]);
- Standard_CString aColorName;
+ Standard_CString aColorName = "";
Standard_Boolean hasColor = Standard_False;
if (aColorString.Search ("color=") != -1)
{
TCollection_AsciiString aName (argv[anArgIter++]);
Handle(AIS_InteractiveObject) anOriginShape;
TCollection_AsciiString aColorString(argv[argc-1]);
- Standard_CString aColorName;
+ Standard_CString aColorName = "";
Standard_Boolean hasColor = Standard_False;
if (aColorString.Search ("color=") != -1)
{
di << "use 'vinit' command before " << argv[0] << "\n";
return 1;
}
-
- Aspect_FillMethod aFillType;
- if (argc == 2)
+ Aspect_FillMethod aFillType = Aspect_FM_NONE;
+ const char* szType = argv[1];
+ if (strcmp(szType, "NONE" ) == 0) aFillType = Aspect_FM_NONE;
+ else if (strcmp(szType, "CENTERED") == 0) aFillType = Aspect_FM_CENTERED;
+ else if (strcmp(szType, "TILED" ) == 0) aFillType = Aspect_FM_TILED;
+ else if (strcmp(szType, "STRETCH" ) == 0) aFillType = Aspect_FM_STRETCH;
+ else
{
- const char* szType = argv[1];
- if (strcmp(szType, "NONE" ) == 0) aFillType = Aspect_FM_NONE;
- else if (strcmp(szType, "CENTERED") == 0) aFillType = Aspect_FM_CENTERED;
- else if (strcmp(szType, "TILED" ) == 0) aFillType = Aspect_FM_TILED;
- else if (strcmp(szType, "STRETCH" ) == 0) aFillType = Aspect_FM_STRETCH;
- else
- {
- di << "Wrong fill type : " << szType << "\n";
- di << "Must be one of CENTERED, TILED, STRETCH, NONE" << "\n";
- return 1;
- }
+ di << "Wrong fill type : " << szType << "\n";
+ di << "Must be one of CENTERED, TILED, STRETCH, NONE" << "\n";
+ return 1;
}
-
Handle(V3d_View) V3dView = ViewerTest::CurrentView();
V3dView->SetBgImageStyle(aFillType, Standard_True);
-
return 0;
}
return 1;
}
Handle(V3d_View) aView = ViewerTest::CurrentView();
- V3d_TypeOfZclipping aZClippingMode;
+ V3d_TypeOfZclipping aZClippingMode = V3d_OFF;
if(argc==1)
{
TCollection_AsciiString aZClippingModeString;
Standard_Real X, Y, Z;
-Standard_Real LightConcentration;
-Standard_Real LightAttenuation1;
-Standard_Real LightAttenuation2;
-Standard_Real LightAngle;
+Standard_Real LightConcentration = 0.;
+Standard_Real LightAttenuation1 = 0.;
+Standard_Real LightAttenuation2 = 0.;
+Standard_Real LightAngle = 0.;
Quantity_Color LightColor;
Graphic3d_Vertex LightPosition;
Graphic3d_Vector LightDirection;
VrmlData_ErrorStatus VrmlData_Material::Write (const char * thePrefix) const
{
- VrmlData_ErrorStatus aStatus;
+ VrmlData_ErrorStatus aStatus = VrmlData_StatusOK;
const VrmlData_Scene& aScene = Scene();
static char header[] = "Material {";
if (aScene.IsDummyWrite() == Standard_False &&
VrmlData_ErrorStatus VrmlData_UnknownNode::Read (VrmlData_InBuffer& theBuffer)
{
- VrmlData_ErrorStatus aStatus;
+ VrmlData_ErrorStatus aStatus = VrmlData_StatusOK;
Standard_Integer aLevelCounter (0);
// This loop searches for any opening brace.
// Such brace increments the level counter. A closing brace decrements
Standard_Boolean isOnlyPos) const
{
Standard_Real aVal[3] = {0., 0., 0.};
- VrmlData_ErrorStatus aStatus;
+ VrmlData_ErrorStatus aStatus = VrmlData_StatusOK;
for (Standard_Integer i = 0; i < 3; i++) {
if (!VrmlData_Node::OK(aStatus, VrmlData_Scene::ReadLine(theBuffer)))
break;
Standard_Boolean isOnlyPos) const
{
Standard_Real aVal[2] = {0., 0.};
- VrmlData_ErrorStatus aStatus;
+ VrmlData_ErrorStatus aStatus = VrmlData_StatusOK;
for (Standard_Integer i = 0; i < 2; i++) {
if (!VrmlData_Node::OK(aStatus, VrmlData_Scene::ReadLine(theBuffer)))
break;
int i;
DWORD dwLen;
HPEN hpo;
- HBRUSH hbo;
+ HBRUSH hbo = NULL;
HFONT hfo;
XFORM lXfm, rXfm, xfm;
PXFORM pXfm;
static void WINAPI _RenderPath ( HDC hdc, LPPOINT lpPts, PBYTE lpType, int nPts ) {
- LPPOINT pp;
+ LPPOINT pp = NULL;
for ( int i = 0; i < nPts; ++i ) {
int Ymin = MIN4( Y1, Y2, Y3, Y4 );
PINT line1, line2, line3, line4;
PPOINT lines;
- HBITMAP hbo2, hBmp;
+ HBITMAP hbo2 = NULL, hBmp = NULL;
if ( fScale ) {
// Mode d emploi (K4B ->) : brepiges shape [+shape][ +shape] nomfic
// c a d tant qu il y a des + on ajoute ce qui suit
- const char* nomfic;
+ const char* nomfic = NULL;
Standard_Integer npris = 0;
Handle(Draw_ProgressIndicator) progress = new Draw_ProgressIndicator ( di, 1 );