//purpose : auxilary
//=======================================================================
// check points coincidence
-static inline Standard_Integer IsCoincided (const gp_Pnt2d &p1, const gp_Pnt2d &p2,
+static inline Standard_Boolean IsCoincided (const gp_Pnt2d &p1, const gp_Pnt2d &p2,
const Standard_Real UResolution,
const Standard_Real VResolution,
const Standard_Real tol)
for ( i=1; i <= indexes.Length() && indexes(i) < index; i++ );
for ( Standard_Integer shift = 1; i <= indexes.Length() && indexes(i) == index; i++ ) {
- while ( shift < nsplit && isreversed != (Standard_Boolean) ( values(i) > params(shift) ) ) shift++;
+ while ( shift < nsplit && isreversed != (values(i) > params(shift)) ) shift++;
indexes.SetValue ( i, index + shift - 1 );
}
for ( ; i <= indexes.Length(); i++ )
B.SameRange(newEdge, Standard_False);
//pdn take into account 0 codes (if ext)
if(code == 0 && wire.Orientation()==TopAbs_EXTERNAL){
- code = ( ( isCutByU == (Standard_Boolean)( j == 1 ) ) ? 1 : 2 );
+ code = ( ( isCutByU == (j == 1) ) ? 1 : 2 );
}
result.AddEdge ( 0, newEdge, iumin, iumax, ivmin, ivmax );
result.AddEdge ( 0, edge, iumin, iumax, ivmin, ivmax );
if(code == 0 && wire.Orientation()==TopAbs_EXTERNAL){
//pdn defining code for intersection of two isos
- code = ( ( isCutByU == (Standard_Boolean)( Abs(firstPar-currPar) < Abs(lastPar-currPar) ) ) ? 2 : 1 );
+ code = ( ( isCutByU == ( Abs(firstPar-currPar) < Abs(lastPar-currPar) ) ) ? 2 : 1 );
}
DefinePatch ( result, code, isCutByU, cutIndex );
}
// Sort by parameter on edge
for ( i = IntEdgePar.Length(); i > start; i-- )
for ( Standard_Integer j = start; j < i; j++ ) {
- if ( isreversed == (Standard_Boolean) ( IntEdgePar(j+1) < IntEdgePar(j) ) ) continue;
+ if ( isreversed == ( IntEdgePar(j+1) < IntEdgePar(j) ) ) continue;
IntLinePar.Exchange ( j, j+1 );
IntEdgePar.Exchange ( j, j+1 );
}
}
// check whether current segment is on the same patch with previous
- Standard_Integer sp = IsSamePatch ( seg, myGrid->NbUPatches(), myGrid->NbVPatches(),
+ Standard_Boolean sp = IsSamePatch ( seg, myGrid->NbUPatches(), myGrid->NbVPatches(),
iumin, iumax, ivmin, ivmax );
// not same patch has lowest priority
if ( ! endV.IsSame ( j ? seg.LastVertex() : seg.FirstVertex() ) ) continue;
// check for misorientation only if nothing better is found
- Standard_Integer misor = ( anOr == ( j ? TopAbs_REVERSED : TopAbs_FORWARD ) );
+ Standard_Boolean misor = ( anOr == ( j ? TopAbs_REVERSED : TopAbs_FORWARD ) );
// if ( misor ) continue; // temporarily, to be improved
// returning back by the same edge is lowest priority
if ( lastEdge.IsSame ( wire->Edge ( j ? wire->NbEdges() : 1 ) ) ) {
if ( ! index && ! canBeClosed ) { // || ( sp && ! samepatch ) ) {
index = i;
- reverse = j;
+ reverse = j != 0;
connected = Standard_True;
misoriented = misor;
samepatch = sp;
continue;
index = i;
- reverse = j;
+ reverse = j != 0;
angle = ang;
mindist = dist;
connected = conn;
for ( Standard_Integer k=1; k <= sbwd->NbEdges(); k++ ) {
if ( !V.IsSame ( sae.FirstVertex ( sbwd->Edge(k) ) ) ) continue; //pdn I suppose that short segment should be inserted into the SAME vertex.
- Standard_Integer sp = IsSamePatch ( wires(j), myGrid->NbUPatches(), myGrid->NbVPatches(),
+ Standard_Boolean sp = IsSamePatch ( wires(j), myGrid->NbUPatches(), myGrid->NbVPatches(),
iumin, iumax, ivmin, ivmax );
if ( samepatch && !sp) continue;
gp_Pnt2d pp;
else
continue;
TopAbs_State state = clas.Perform (unp,Standard_False);
- if ( (Standard_Boolean) ( state == TopAbs_OUT ) == reverse ) {
+ if ((state == TopAbs_OUT) == reverse) {
holes.Append ( loops(j) );
loops.Remove ( j-- );
}