myAISDetectedSeq.Remove( i );
}
- if(myWasLastMain && !myLastinMain.IsNull())
- if(myLastinMain == anIObj)
- myLastinMain.Nullify();
- else
- if(!myWasLastMain && !myLastinColl.IsNull())
- if(myLastinColl == anIObj)
- myLastinColl.Nullify();
+ if(myLastinMain == anIObj)
+ myLastinMain.Nullify();
+ if(myLastinColl == anIObj)
+ myLastinColl.Nullify();
if(myLastPicked == anIObj)
myLastPicked.Nullify();
-- will be hilighted when detected by the selector.
-- ex : be able to select center of a line without
-- displaying all centers before selection process
-
+
Erase( me : mutable;
anIObj : InteractiveObject from AIS2D;
UpdateVwr : Boolean from Standard = Standard_True;
-- or failing that, in other local contexts which allow erasing.
-- If <PutInCollector> is false, the object is erased but
-- not put in the Collector.
-
- EraseMode( me : mutable;
- anIObj : InteractiveObject from AIS2D;
- aMode : Integer from Standard;
- UpdateVwr : Boolean from Standard = Standard_True);
- ---Purpose: Selects an erase mode. Used only if more than one
- -- mode is displayed in the main viewer. If aMode is
- -- the Prs used by default, no erase mode is selected.
EraseAll( me : mutable;
PutInCollector : Boolean from Standard = Standard_True;
}
-void AIS2D_InteractiveContext::EraseMode(
- const Handle(AIS2D_InteractiveObject)& anIObj,
- const Standard_Integer aMode,
- const Standard_Boolean /*UpdateVwr*/ ) {
-
- if ( anIObj.IsNull() ) return;
-
- if ( !myObjects.IsBound( anIObj ) ) return;
-
- if ( anIObj->HasDisplayMode() )
- if ( anIObj->DisplayMode() == aMode ) return;
- else if ( myDisplayMode == aMode) return;
- Handle(AIS2D_GlobalStatus) GStatus = myObjects( anIObj );
- if ( GStatus->GraphicStatus() != AIS2D_DS_Displayed ) return;
- if ( GStatus->IsDModeIn( aMode ) ) {}
-}
-
void AIS2D_InteractiveContext::EraseAll (const Standard_Boolean /*PutInCollector*/,
const Standard_Boolean UpdateVwr)
{
{
Standard_Real DX,DY,DZ;
D.Coord(DX,DY,DZ);
- if (Abs(DX) > gp::Resolution()) {
- if (DX > 0) OpenXmax();
- else OpenXmin();
- }
- if (Abs(DY) > gp::Resolution()) {
- if (DY > 0) OpenYmax();
- else OpenYmin();
- }
- if (Abs(DZ) > gp::Resolution()) {
- if (DZ > 0) OpenZmax();
- else OpenZmin();
- }
+
+ if (DX < -RealEpsilon())
+ OpenXmin();
+ else if (DX > RealEpsilon())
+ OpenXmax();
+
+ if (DY < -RealEpsilon())
+ OpenYmin();
+ else if (DY > RealEpsilon())
+ OpenYmax();
+
+ if (DZ < -RealEpsilon())
+ OpenZmin();
+ else if (DZ > RealEpsilon())
+ OpenZmax();
}
//=======================================================================
{
Standard_Real DX = D.X();
Standard_Real DY = D.Y();
- if (DX < 0)
- if (DX < - gp::Resolution()) OpenXmin();
- else
- if (DX > gp::Resolution()) OpenXmax();
- if (DY < 0)
- if (DY < - gp::Resolution()) OpenYmin();
- else
- if (DY > gp::Resolution()) OpenYmax();
+
+ if (DX < -RealEpsilon())
+ OpenXmin();
+ else if (DX > RealEpsilon())
+ OpenXmax();
+
+ if (DY < -RealEpsilon())
+ OpenYmin();
+ else if (DY > RealEpsilon())
+ OpenYmax();
}
//=======================================================================
Standard_Integer nbp = params->NbParams();
- // Sending of message : Incorrect number of parameters (following the IGES version)
- // Version less than 5.3
- if (theIGESVersion < 11)
- if ((nbp < 24) || (nbp > 25)) {
- // 24 or 25 parameters are expected (parameter 25 is not required)
- Message_Msg Msg39 ("XSTEP_39");
- Msg39.Arg(24);
- Msg39.Arg(25);
- if (nbp < 24) ach->SendFail(Msg39);
- else ach->SendWarning(Msg39);
- }
-
- // Version 5.3
- else if ((nbp < 25) || (nbp > 26)) {
- // 25 or 26 parameters are expected (parameter 25 is not required)
- Message_Msg Msg39 ("XSTEP_39");
- Msg39.Arg(25);
- Msg39.Arg(26);
- if (nbp < 25) ach->SendFail(Msg39);
- else ach->SendWarning(Msg39);
- }
-
for (Standard_Integer i = 1; i <= nbp; i ++) {
Standard_Integer intval = 0; Standard_Real realval = 0.0;
Handle(TCollection_HAsciiString) strval; // doit repartir a null
default : break;
}
}
+
+ // Sending of message : Incorrect number of parameters (following the IGES version)
+ // Version less than 5.3
+ if (theIGESVersion < 11)
+ {
+ if ((nbp < 24) || (nbp > 25)) {
+ // 24 or 25 parameters are expected (parameter 25 is not required)
+ Message_Msg Msg39 ("XSTEP_39");
+ Msg39.Arg(24);
+ Msg39.Arg(25);
+ if (nbp < 24) ach->SendFail(Msg39);
+ else ach->SendWarning(Msg39);
+ }
+ }
+ // Version 5.3
+ else if ((nbp < 25) || (nbp > 26)) {
+ // 25 or 26 parameters are expected (parameter 25 is not required)
+ Message_Msg Msg39 ("XSTEP_39");
+ Msg39.Arg(25);
+ Msg39.Arg(26);
+ if (nbp < 25) ach->SendFail(Msg39);
+ else ach->SendWarning(Msg39);
+ }
//:45 by abv 11.12.97: if UnitFlag is not defined in the file,
// restore it from UnitName. Repris par CKY 13-FEV-1998
Standard_Integer i0 = (uorv == 1 ? poles.LowerCol() : poles.LowerRow());
Standard_Integer i1 = (uorv == 1 ? poles.UpperCol() : poles.UpperRow());
for (Standard_Integer i = i0; i <= i1-1; i ++) {
- if (uorv == 1) if(poles(rank,i).IsEqual(poles(rank, i+1), 1e-15)) return Standard_True;
- else if(poles(i,rank).IsEqual(poles(i+1,rank), 1e-15)) return Standard_True;
+ if (uorv == 1) {
+ if(poles(rank,i).IsEqual(poles(rank, i+1), 1e-15)) return Standard_True;
+ } else
+ if(poles(i,rank).IsEqual(poles(i+1,rank), 1e-15)) return Standard_True;
}
return Standard_False;
}
}
}
else {
- if( remove )
+ if( remove ) {
if( !ownctx.IsNull() ) {
ownctx->Remove (myAIS,Standard_False);
myAIS->SetToUpdate();
}
- else
+ } else
if( !ownctx.IsNull() ) ownctx->Erase (myAIS,Standard_False);
}
}