mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
Replacing french comments by english one
This commit is contained in:
@@ -4,10 +4,7 @@
|
||||
// Author: Mister rmi
|
||||
// <rmi>
|
||||
|
||||
|
||||
// Modified jmi/rob 29/8/96
|
||||
// appel de Loadmode dans Load d'un objet fait une seule fois.
|
||||
//
|
||||
|
||||
|
||||
#include <SelectMgr_SelectionManager.ixx>
|
||||
#include <SelectMgr_ViewerSelector.hxx>
|
||||
@@ -305,7 +302,6 @@ Activate(const Handle(SelectMgr_SelectableObject)& anObject,
|
||||
|
||||
if (!anObject->HasSelection(aMode)) LoadMode(anObject,aMode);
|
||||
|
||||
// ATTENTION : si la selection est a remettre a jour, on le fait la ....
|
||||
const Handle(SelectMgr_Selection)& Sel = anObject->Selection(aMode);
|
||||
|
||||
switch(Sel->UpdateStatus()){
|
||||
@@ -590,7 +586,7 @@ RecomputeSelection (const Handle(SelectMgr_SelectableObject)& anObject,
|
||||
if( SelectDebugModeOnSM() ) cout<<"===>SelectMgr_SelectionManager::Update"<<endl;
|
||||
|
||||
if(ForceUpdate){
|
||||
if( SelectDebugModeOnSM() ) cout<<"\tRecalcul Complet des selections"<<endl;
|
||||
if( SelectDebugModeOnSM() ) cout<<"\t Global Recalculation of selections"<<endl;
|
||||
if(aMode==-1){
|
||||
anObject->UpdateSelection();
|
||||
anObject->UpdateLocation();
|
||||
@@ -601,10 +597,10 @@ RecomputeSelection (const Handle(SelectMgr_SelectableObject)& anObject,
|
||||
}
|
||||
return;
|
||||
}
|
||||
// l'objet n'est pas connu du SMgr.
|
||||
// objet is not known to SMgr.
|
||||
if (!(myglobal.Contains(anObject) || mylocal.IsBound(anObject))){
|
||||
if( SelectDebugModeOnSM() ) {cout<<"\tObjet non charge dans le SelectionManager"<<endl;
|
||||
cout<<"\t on flagge ses selections eventuelles"<<endl;}
|
||||
if( SelectDebugModeOnSM() ) {cout<<"\t Object not loaded in the SelectionManager"<<endl;
|
||||
cout<<"\t eventual selections are flagged"<<endl;}
|
||||
if( aMode == -1 ){
|
||||
for(anObject->Init();anObject->More();anObject->Next()){
|
||||
if( SelectDebugModeOnSM() ) cout<<"\t\t Mode "<<anObject->CurrentSelection()->Mode()<<" ";
|
||||
@@ -617,13 +613,13 @@ RecomputeSelection (const Handle(SelectMgr_SelectableObject)& anObject,
|
||||
anObject->Selection(aMode)->UpdateStatus(SelectMgr_TOU_Full);
|
||||
}
|
||||
|
||||
// la il l'est, il s'agit de recalculer ce qui doit l'etre
|
||||
// et de flagger ce qui est en sommeil...
|
||||
// recalculate whatever is required
|
||||
// and set flag on top...
|
||||
else{
|
||||
TColStd_MapIteratorOfMapOfTransient It;
|
||||
Handle(Standard_Transient) Tr;
|
||||
Standard_Boolean Found;
|
||||
// on balaye les selections de l'objet
|
||||
// object selections are parsed
|
||||
|
||||
for(anObject->Init();anObject->More();anObject->Next()){
|
||||
const Handle(SelectMgr_Selection)& Sel = anObject->CurrentSelection();
|
||||
@@ -631,7 +627,7 @@ RecomputeSelection (const Handle(SelectMgr_SelectableObject)& anObject,
|
||||
Standard_Integer curmode = Sel->Mode();
|
||||
Found = Standard_False;
|
||||
|
||||
// balayage des selecteurs ...
|
||||
// parsing of selections ...
|
||||
for(It.Initialize(myselectors);It.More();It.Next()){
|
||||
Tr = It.Key();
|
||||
Handle(SelectMgr_ViewerSelector) VS = *((Handle(SelectMgr_ViewerSelector)*)&Tr);
|
||||
@@ -639,7 +635,7 @@ RecomputeSelection (const Handle(SelectMgr_SelectableObject)& anObject,
|
||||
Found = Standard_True;
|
||||
switch(Sel->UpdateStatus()){
|
||||
case SelectMgr_TOU_Full:
|
||||
anObject->UpdateSelection(curmode); // pas de break expres...
|
||||
anObject->UpdateSelection(curmode); // no break on purpose...
|
||||
case SelectMgr_TOU_Partial:
|
||||
anObject->UpdateLocation(Sel);
|
||||
break;
|
||||
@@ -660,10 +656,10 @@ RecomputeSelection (const Handle(SelectMgr_SelectableObject)& anObject,
|
||||
|
||||
//=======================================================================
|
||||
//function : Update
|
||||
//purpose : On recalcule les Selections si elles sont flaggees
|
||||
// "A RECALCULER" et qu'elles sont activees dans un des selecteurs.
|
||||
// Si ForceUpdate = True, et qu'elles sont "A RECALCULER"
|
||||
// On le fait sans se preoccuper de l'etat d'activation.
|
||||
//purpose : Selections are recalculated if they are flagged
|
||||
// "TO RECALCULATE" and activated in one of selectors.
|
||||
// If ForceUpdate = True, and they are "TO RECALCULATE"
|
||||
// This is done without caring for the state of activation.
|
||||
//=======================================================================
|
||||
void SelectMgr_SelectionManager::Update(const Handle(SelectMgr_SelectableObject)& anObject,
|
||||
const Standard_Boolean ForceUpdate)
|
||||
@@ -676,7 +672,7 @@ void SelectMgr_SelectionManager::Update(const Handle(SelectMgr_SelectableObject)
|
||||
if(ForceUpdate){
|
||||
switch(Sel->UpdateStatus()){
|
||||
case SelectMgr_TOU_Full:
|
||||
anObject->UpdateSelection(Sel->Mode()); // pas de break expres...
|
||||
anObject->UpdateSelection(Sel->Mode()); // no break on purpose...
|
||||
case SelectMgr_TOU_Partial:
|
||||
anObject->UpdateLocation(Sel);
|
||||
wasrecomputed = Standard_True;
|
||||
@@ -689,8 +685,8 @@ void SelectMgr_SelectionManager::Update(const Handle(SelectMgr_SelectableObject)
|
||||
Sel->UpdateStatus(SelectMgr_TOU_None);
|
||||
}
|
||||
|
||||
// on regarde quels selecteurs sont concernes par la selection
|
||||
// pour refaire les projections si besoin est.
|
||||
// it is checked which selectors are concerned by the selection
|
||||
// to redo projections if necessary.
|
||||
Handle(Standard_Transient) Tr;
|
||||
for(TColStd_MapIteratorOfMapOfTransient It(myselectors);It.More();It.Next()){
|
||||
Tr = It.Key();
|
||||
@@ -698,7 +694,7 @@ void SelectMgr_SelectionManager::Update(const Handle(SelectMgr_SelectableObject)
|
||||
if(VS->Status(Sel)==SelectMgr_SOS_Activated)
|
||||
switch(Sel->UpdateStatus()){
|
||||
case SelectMgr_TOU_Full:
|
||||
anObject->UpdateSelection(Sel->Mode()); // pas de break expres...
|
||||
anObject->UpdateSelection(Sel->Mode()); // no break on purpose...
|
||||
case SelectMgr_TOU_Partial:
|
||||
anObject->UpdateLocation(Sel);
|
||||
wasrecomputed = Standard_True;
|
||||
@@ -718,7 +714,7 @@ void SelectMgr_SelectionManager::Update(const Handle(SelectMgr_SelectableObject)
|
||||
|
||||
//==================================================
|
||||
// Function: Update
|
||||
// Purpose : Attention, il faut savoir ce que l'on fait....
|
||||
// Purpose : Attention, it is required to know what is done...
|
||||
//==================================================
|
||||
void SelectMgr_SelectionManager::
|
||||
Update(const Handle(SelectMgr_SelectableObject)& anObject,
|
||||
@@ -742,7 +738,7 @@ Update(const Handle(SelectMgr_SelectableObject)& anObject,
|
||||
if(ForceUpdate){
|
||||
switch(Sel->UpdateStatus()){
|
||||
case SelectMgr_TOU_Full:
|
||||
anObject->UpdateSelection(Sel->Mode()); // pas de break expres...
|
||||
anObject->UpdateSelection(Sel->Mode()); // no break on purpose...
|
||||
case SelectMgr_TOU_Partial:
|
||||
anObject->UpdateLocation(Sel);
|
||||
wasrecomputed = Standard_True;
|
||||
|
@@ -380,7 +380,7 @@ void SelectMgr_ViewerSelector::InitSelect(const TColgp_Array1OfPnt2d& aPoly)
|
||||
if (toupdate) UpdateConversion();
|
||||
if (tosort) UpdateSort();
|
||||
if (myactivenb!=0){
|
||||
// on utilise les Bnd box dans un premier temps
|
||||
// the Bnd boxes are used for the first time
|
||||
Bnd_Box2d aBox;
|
||||
Standard_Integer NbPnt = aPoly.Length();
|
||||
Standard_Integer i;
|
||||
@@ -396,10 +396,9 @@ void SelectMgr_ViewerSelector::InitSelect(const TColgp_Array1OfPnt2d& aPoly)
|
||||
|
||||
//==================================================
|
||||
// Function: LoadResult
|
||||
// Purpose : on laisse tomber pour l'instant la taille
|
||||
// de la primitive dans les criteres de tri...
|
||||
// On prend la priorite, la profondeur et
|
||||
// la distance mini au CDG ou Bords...
|
||||
// Purpose : for the moment the size of the primitive
|
||||
// is not taken into account in the search criteriai...
|
||||
// The priority, the depth and the min. distance to CDG or Borders is taken...
|
||||
//==================================================
|
||||
void SelectMgr_ViewerSelector::
|
||||
LoadResult()
|
||||
@@ -488,14 +487,14 @@ void SelectMgr_ViewerSelector::LoadResult(const Bnd_Box2d& abox)
|
||||
}
|
||||
}
|
||||
|
||||
// pas de tri a faire dans le cas d'une selection par rectangle elastique (BUG ANALYST)
|
||||
// do not parse in case of selection by elastic rectangle (BUG ANALYST)
|
||||
if(mystored.IsEmpty()) return;
|
||||
if(myIndexes.IsNull())
|
||||
myIndexes = new TColStd_HArray1OfInteger(1,mystored.Extent());
|
||||
else if(mystored.Extent() !=myIndexes->Length())
|
||||
myIndexes = new TColStd_HArray1OfInteger (1,mystored.Extent());
|
||||
|
||||
// pour travailler plus vite...
|
||||
// to work faster...
|
||||
TColStd_Array1OfInteger& thearr = myIndexes->ChangeArray1();
|
||||
for(Standard_Integer I=1;I<=mystored.Extent();I++)
|
||||
thearr(I)=I;
|
||||
@@ -543,7 +542,7 @@ void SelectMgr_ViewerSelector::LoadResult(const TColgp_Array1OfPnt2d& aPoly)
|
||||
else if(mystored.Extent() !=myIndexes->Length())
|
||||
myIndexes = new TColStd_HArray1OfInteger (1,mystored.Extent());
|
||||
|
||||
// pour travailler plus vite...
|
||||
// to work faster...
|
||||
TColStd_Array1OfInteger& thearr = myIndexes->ChangeArray1();
|
||||
for(Standard_Integer I=1;I<=mystored.Extent();I++)
|
||||
thearr(I)=I;
|
||||
@@ -808,7 +807,7 @@ void SelectMgr_ViewerSelector::Dump(Standard_OStream& S) const
|
||||
TCollection_AsciiString SelectMgr_ViewerSelector::
|
||||
Status(const Handle(SelectMgr_SelectableObject)& SO) const
|
||||
{
|
||||
TCollection_AsciiString Status("Status Objet :\n\t");
|
||||
TCollection_AsciiString Status("Status Object :\n\t");
|
||||
Standard_Boolean Found= Standard_False;
|
||||
for(SO->Init();SO->More();SO->Next()){
|
||||
if(myselections.IsBound(SO->CurrentSelection()))
|
||||
@@ -818,13 +817,13 @@ Status(const Handle(SelectMgr_SelectableObject)& SO) const
|
||||
TCollection_AsciiString(SO->CurrentSelection()->Mode()) +
|
||||
" present - " ;
|
||||
if(myselections(SO->CurrentSelection()))
|
||||
Status = Status + " Actif \n\t";
|
||||
Status = Status + " Active \n\t";
|
||||
else
|
||||
Status = Status + " Inactif \n\t";
|
||||
Status = Status + " Inactive \n\t";
|
||||
}
|
||||
}
|
||||
|
||||
if(!Found) Status = Status + "Non Present dans le selecteur\n\n";
|
||||
if(!Found) Status = Status + "Not Present in the selector\n\n";
|
||||
return Status;
|
||||
}
|
||||
|
||||
@@ -832,11 +831,11 @@ Status(const Handle(SelectMgr_SelectableObject)& SO) const
|
||||
TCollection_AsciiString SelectMgr_ViewerSelector::
|
||||
Status () const
|
||||
{
|
||||
// les primitives sensibles presentes
|
||||
//------------------------------------
|
||||
// sevsitive primitives present
|
||||
//-----------------------------
|
||||
TCollection_AsciiString Status("\t\tSelector Status :\n\t");
|
||||
// les selections
|
||||
//---------------
|
||||
// selections
|
||||
//-----------
|
||||
Standard_Integer NbActive =0,NbPrim=0;
|
||||
Status = Status + "Number of already computed selections : " +
|
||||
TCollection_AsciiString(myselections.Extent());
|
||||
@@ -861,14 +860,13 @@ Status () const
|
||||
|
||||
//=======================================================================
|
||||
//function : SortResult
|
||||
//purpose : on a un certain nombre d'entites rangees avec leur critere
|
||||
// (profondeur, taille, priorite , distance de la souris
|
||||
// par rapport aux bords ou au CDG de la primitive detectee.
|
||||
// on va trier :
|
||||
// les priorites maxi.
|
||||
// puis un savant dosage entre profondeur et distance...
|
||||
// enfin on stocke dans myindexes les rangs en fonction de ce tri.
|
||||
// il ne reste plus qu'a lire
|
||||
//purpose : there is a certain number of entities ranged by criteria
|
||||
// (depth, size, priority, mouse distance from borders or
|
||||
// CDG of the detected primitive. Parsing :
|
||||
// maximum priorities .
|
||||
// then a reasonable compromise between depth and distance...
|
||||
// finally the ranges are stored in myindexes depending on the parsing.
|
||||
// so, it is possible to only read
|
||||
//=======================================================================
|
||||
void SelectMgr_ViewerSelector::SortResult()
|
||||
{
|
||||
@@ -878,10 +876,10 @@ void SelectMgr_ViewerSelector::SortResult()
|
||||
if(myIndexes.IsNull() || anExtent != myIndexes->Length())
|
||||
myIndexes = new TColStd_HArray1OfInteger (1, anExtent);
|
||||
|
||||
// pour travailler plus vite...
|
||||
// to work faster...
|
||||
TColStd_Array1OfInteger& thearr = myIndexes->ChangeArray1();
|
||||
|
||||
// on charge les index de 1 a N
|
||||
// indices from 1 to N are loaded
|
||||
Standard_Integer I ;
|
||||
for (I=1; I <= anExtent; I++)
|
||||
thearr(I)=I;
|
||||
@@ -926,7 +924,7 @@ void SelectMgr_ViewerSelector::SortResult()
|
||||
myprim (I) = myPrimArr (ind);
|
||||
}
|
||||
// OCC4201 (AGV): fin
|
||||
// ne nous restera plus qu'a recuperer les proprietaires correspondant aux index tries...
|
||||
// it is enough to return owners corresponding to parced indices...
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user