1
0
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:
bugmaster
2011-04-28 16:28:27 +00:00
committed by bugmaster
parent 94354caf54
commit 81bba7173e
140 changed files with 4625 additions and 4701 deletions

View File

@@ -805,7 +805,7 @@ void AIS_AngleDimension::ComputeTwoEdgesAngle(const Handle(Prs3d_Presentation)&
return;
}
// Temporary: computation of myVal
// myVal = Abs(geom_lin1->Lin().Angle( geom_lin2->Lin())); // Pb avec les angles JPR
// myVal = Abs(geom_lin1->Lin().Angle( geom_lin2->Lin())); // Pb with angles JPR
if (copyOfMyExtShape != 0) myExtShape = copyOfMyExtShape;
@@ -833,7 +833,7 @@ void AIS_AngleDimension::ComputeTwoEdgesAngle(const Handle(Prs3d_Presentation)&
#endif
// Traitement du cas ou les 2 droites sont paralleles
// Processing in case of 2 parallel straight lines
if (lin1_2d->Lin2d().Direction()
.IsParallel(lin2_2d->Lin2d().Direction(),Precision::Angular())) {
ComputeTwoEdgesNullAngle(aPresentation,
@@ -844,7 +844,7 @@ void AIS_AngleDimension::ComputeTwoEdgesAngle(const Handle(Prs3d_Presentation)&
isInfinite1,isInfinite2);
}
// Traitement du cas ou les 2 droites ne sont pas paralleles
// Processing in case of 2 non-parallel straight lines
else {
ComputeTwoEdgesNotNullAngle(aPresentation,
geom_lin1,
@@ -1035,7 +1035,7 @@ void AIS_AngleDimension::ComputeTwoEdgesNotNullAngle(const Handle(Prs3d_Presenta
Standard_Real par = ElCLib::Parameter(circle,curpos);
curpos = ElCLib::Value(par,circle);
// un petit offset comme LengthDimension
// small offset like in LengthDimension
gp_Vec transl(myCenter, curpos);
transl*= 0.3;
curpos.Translate(transl);
@@ -1048,7 +1048,7 @@ void AIS_AngleDimension::ComputeTwoEdgesNotNullAngle(const Handle(Prs3d_Presenta
}
else {
// on projette le point dans le plan
// point is projected on the plane
gp_Pnt2d pointOnPln(ProjLib::Project(myPlane->Pln(),myPosition));
myPosition = BRepAdaptor_Surface(BRepBuilderAPI_MakeFace(myPlane->Pln()).Face()).Value(pointOnPln.X(),pointOnPln.Y());
curpos = myPosition;
@@ -1058,10 +1058,10 @@ void AIS_AngleDimension::ComputeTwoEdgesNotNullAngle(const Handle(Prs3d_Presenta
curpos.SetXYZ(curpos.XYZ()+delta);
dist = curpos.Distance(myCenter);
}
// Pour savoir si on doit prendre la distance -dist ou non
// il faut savoir si on est dans le secteur oppose a l'angle
// ou non : on est dans le secteur oppose si les coordonnees
// de curpos dans le repere (d1,d2) sont negatives
// To learn if it is necessary to take distance -dist or not
// it is necessary to know if we are in the sector opposite to the angle
// if not : we are in the opposite sector if the coordinates
// of curpos in point (d1,d2) are negative
gp_Ax2 ax(myCenter,myFDir.Crossed(mySDir),myFDir);
gp_Circ circle(ax,dist);
#ifdef DEB
@@ -1075,7 +1075,7 @@ void AIS_AngleDimension::ComputeTwoEdgesNotNullAngle(const Handle(Prs3d_Presenta
Standard_Real ufin = uc2;
if (uco > ufin) {
if (Abs(myVal)<PI) {
// test si uco est dans le secteur oppose
// test if uco is in the opposite sector
if (uco > udeb+PI && uco < ufin+PI){
dist = -dist;
}
@@ -1172,14 +1172,14 @@ void AIS_AngleDimension::ComputeTwoEdgesNullAngle(const Handle(Prs3d_Presentatio
gp_Lin gpl2 = l2->Lin();
//------------------------------------------------------------
// Calcul de myCenter
// -> Point situe sur la ligne mediane des 2 droites,
// calcule comme etant le milieu des 2 points les plus
// proches de chaque droite.
// Computation of myCenter
// -> Point located on the median of 2 straight lines,
// is calculated as located between 2 closest points
// of each straight line.
//-----------------------------------------------------------
// theLength : rayon du futur cercle
// theLength : radius of the future circle
Standard_Real theLength = gpl1.Distance(gpl2.Location());
// traitement du cas particulier ou les 2 droites sont confondues
// processing of the particular case when 2 straight lines are coincident
Standard_Boolean SameLines(Standard_False);
if ( theLength <= Precision::Confusion()) {
SameLines = Standard_True;
@@ -1247,9 +1247,9 @@ void AIS_AngleDimension::ComputeTwoEdgesNullAngle(const Handle(Prs3d_Presentatio
if ( V1.CrossMagnitude(V2) < 0 ) theaxis.Reverse();
}
gp_Pnt curpos; // position du curseur
gp_Pnt curpos; // cursor position
TColStd_Array1OfReal tabdist(1,4);
gp_Pnt P1, P2; // points d'intersection du cercle avec les 2 droites
gp_Pnt P1, P2; // points at intersection of the circle with 2 straight lines
if (myAutomaticPosition) {
if (!isInfinite1) {
@@ -1279,9 +1279,9 @@ void AIS_AngleDimension::ComputeTwoEdgesNullAngle(const Handle(Prs3d_Presentatio
myCenter.Translate(gp_Vec(d1)*theLength);
// calcul des points d'attache de la cote
// -> ils sont != des points d'intersection si les
// intersection sont en dehors des limites des edges
// calculate attachments of the face
// -> they are points of intersection if
// intersection is outside of the edges
Standard_Real pparam = ElCLib::Parameter(gpl1,myFAttach);
Standard_Real pparam1 = ElCLib::Parameter(gpl1,ptat11);
Standard_Real pparam2 = ElCLib::Parameter(gpl1,ptat12);
@@ -1315,8 +1315,8 @@ void AIS_AngleDimension::ComputeTwoEdgesNullAngle(const Handle(Prs3d_Presentatio
Handle(Geom_Circle) circle = new Geom_Circle(AX,theLength);
Handle(Geom2d_Curve) geoCurve = GeomAPI::To2d(circle,myPlane->Pln());
Handle(Geom2d_Circle) c2d = *((Handle(Geom2d_Circle)*)& geoCurve);
// calcul du point d'intersection du cercle avec l1
Standard_Real pparam; // parametre du point d'intersection sur l1
// calculate the intersection of circle with l1
Standard_Real pparam; // parameter of the point of intersection on l1
IntAna2d_AnaIntersection inter(l1_2d->Lin2d(),c2d->Circ2d());
gp_Pnt2d pint1(inter.Point(1).Value());
gp_Pnt2d pint2(inter.Point(2).Value());
@@ -1382,18 +1382,18 @@ void AIS_AngleDimension::ComputeTwoEdgesNullAngle(const Handle(Prs3d_Presentatio
gp_Lin Media(myCenter, gpl1.Direction());
Standard_Real pcurpos = ElCLib::Parameter(Media, curpos);
myCenter = ElCLib::Value(pcurpos, Media);
// on translate le centre de facon a avoir un rayon constant!
// the centre is translated to avoid a constant radius!
myCenter.Translate(-theLength*gp_Vec(gpl1.Direction()));
gp_Ax2 AX(myCenter,theaxis,gpl1.Direction());
Handle(Geom_Circle) circle = new Geom_Circle(AX,theLength);
// remise a jour de curpos
// re-update curpos
pcurpos = ElCLib::Parameter(circle->Circ(), curpos);
curpos = ElCLib::Value(pcurpos, circle->Circ());
Handle(Geom2d_Curve) geoCurve = GeomAPI::To2d(circle,myPlane->Pln());
Handle(Geom2d_Circle) c2d = *((Handle(Geom2d_Circle)*)& geoCurve);
// calcul du point d'intersection du cercle avec l1
// calculate the point of intersection of circle with l1
IntAna2d_AnaIntersection inter(l1_2d->Lin2d(),c2d->Circ2d());
gp_Pnt2d pint1(inter.Point(1).Value());
gp_Pnt2d pint2(inter.Point(2).Value());
@@ -1403,9 +1403,9 @@ void AIS_AngleDimension::ComputeTwoEdgesNullAngle(const Handle(Prs3d_Presentatio
else myFAttach = Int2;
P1 = myFAttach;
// calcul du point d'intersection du cercle avec l2
// -> c'est la projection car le cercle a son centre
// au milieu de l1 et l2
// calculate the point of intersection of circle with l2
// -> this is the projection because the centre of circle
// is in the middle of l1 and l2
Standard_Real pparam = ElCLib::Parameter(gpl2,myFAttach);
mySAttach = ElCLib::Value(pparam, gpl2);
@@ -1598,9 +1598,8 @@ void AIS_AngleDimension::Compute3DSelection( const Handle( SelectMgr_Selection )
//=======================================================================
//function : Compute2DSelection
//purpose : calcule les zones de selection sur une cote d'angle entre 2
// edges
// Traitement particulier pour les angles nuls!
//purpose : compute zones of selection on a side of angle between 2 edges
// Special processing of zero angles!
//=======================================================================
void AIS_AngleDimension::Compute2DSelection(const Handle(SelectMgr_Selection)& aSelection)
@@ -1636,7 +1635,7 @@ void AIS_AngleDimension::Compute2DSelection(const Handle(SelectMgr_Selection)& a
}
//----------------------------------------------------------
// Cas classique ( angle != 0 )
// Classic case ( angle != 0 )
else {
if (myFDir.IsParallel(mySDir,Precision::Angular())) {
@@ -1679,7 +1678,7 @@ void AIS_AngleDimension::Compute2DSelection(const Handle(SelectMgr_Selection)& a
if (uco > ufin) {
if (Abs(myVal)<PI) {
// test si uco est dans le secteur oppose
// test if uco is in the opposing sector
if (uco > udeb+PI && uco < ufin+PI){
udeb = udeb + PI;
ufin = ufin + PI;
@@ -1695,7 +1694,7 @@ void AIS_AngleDimension::Compute2DSelection(const Handle(SelectMgr_Selection)& a
p1 = ElCLib::Value(udeb,cer);
p2 = ElCLib::Value(ufin,cer);
//Creation des 2 owners pour chaque partie de la fleche
//Create 2 owners for each part of the arrow
Handle(AIS_DimensionOwner) own1 = new AIS_DimensionOwner(this,7);
Handle(AIS_DimensionOwner) own2 = new AIS_DimensionOwner(this,7);
if (myExtShape != 0) {
@@ -1772,7 +1771,7 @@ void AIS_AngleDimension::ComputeNull2DSelection(
if (uco > ufin) {
if (Abs(myVal)<PI) {
// test si uco est dans le secteur oppose
// test if uco is in the opposing sector
if (uco > udeb+PI && uco < ufin+PI){
udeb = udeb + PI;
ufin = ufin + PI;
@@ -1791,7 +1790,7 @@ void AIS_AngleDimension::ComputeNull2DSelection(
}
}
//Creation des 2 owners pour chaque partie de la fleche
//Create 2 owners for each part of the arrow
Handle(AIS_DimensionOwner) own1 = new AIS_DimensionOwner(this,7);
Handle(AIS_DimensionOwner) own2 = new AIS_DimensionOwner(this,7);
if (myExtShape != 0) {
@@ -1821,7 +1820,7 @@ void AIS_AngleDimension::ComputeNull2DSelection(
aSelection->Add(scurv);
}
else {
// on trace un bout de segment pour permettre la selection
// find end of segment to allow selection
gp_Vec VTrans(myFDir.Crossed(Norm));
Handle(Select3D_SensitiveSegment) seg1;
seg1 = new Select3D_SensitiveSegment(own1,

View File

@@ -173,8 +173,8 @@ void AIS_ConcentricRelation::ComputeTwoEdgesConcentric(const Handle(Prs3d_Presen
myCenter = gcirc1->Location();
// on choisit le rayon egal a 1/5 ieme du rayon du plus petit des
// 2 cercles. On impose une borne sup au rayon( 0.02 au hasard)
// choose the radius equal to 1/5 of the smallest radius of
// 2 circles. Limit is imposed ( 0.02 by chance)
Standard_Real rad1 = gcirc1->Radius();
Standard_Real rad2 = gcirc2->Radius();
myRad = (rad1 > rad2 ) ? rad2 : rad1;
@@ -182,7 +182,7 @@ void AIS_ConcentricRelation::ComputeTwoEdgesConcentric(const Handle(Prs3d_Presen
if (myRad > 15.) myRad =15.;
//Calcul d'un point du cercle de rayon myRad
//Calculate a point of circle of radius myRad
gp_Dir vec(ptat11.XYZ() - myCenter.XYZ() );
gp_Vec vectrans(vec);
myPnt = myCenter.Translated(vectrans.Multiplied(myRad));
@@ -243,21 +243,21 @@ void AIS_ConcentricRelation::ComputeSelection(const Handle(SelectMgr_Selection)&
{
Handle(SelectMgr_EntityOwner) own = new SelectMgr_EntityOwner(this,7);
//Creation de 2 sensitives cercles
// le plus grand
//Creation of 2 sensitive circles
// the greater
gp_Ax2 ax(myCenter, myDir);
Handle(Geom_Circle) Circ = new Geom_Circle(ax, myRad) ;
Handle(Select3D_SensitiveCircle)
sensit = new Select3D_SensitiveCircle (own,
Circ);
aSelection->Add(sensit);
// le plus petit
// the smaller
Circ->SetRadius(myRad/2);
sensit = new Select3D_SensitiveCircle (own,
Circ);
aSelection->Add(sensit);
//Creation de 2 segments sensitifs pour la croix
//Creation of 2 segments sensitive for the cross
Handle(Select3D_SensitiveSegment) seg;
gp_Pnt otherPnt = myPnt.Mirrored(myCenter);
seg = new Select3D_SensitiveSegment(own,

View File

@@ -46,8 +46,8 @@ Standard_Integer AIS_ConnectedInteractive::Signature() const
void AIS_ConnectedInteractive::
Connect(const Handle(AIS_InteractiveObject)& anotherIObj)
{
// Pour Avoir le temps de faire le Disconnect en dessous,
// on garde l'ancien un peu. SMO.
// To have the time to Disconnect below,
// the old is kept for a while.
if(myReference==anotherIObj) return;
myOldReference = myReference;
//Disconnect();
@@ -65,7 +65,7 @@ Connect(const Handle(AIS_InteractiveObject)& anotherIobj,
if(myLocation!=aLocation)
myLocation = aLocation;
if(myReference!=anotherIobj) {
myOldReference = myReference; // necessaire pour pouvoir faire le disconnect en dessous..
myOldReference = myReference; // necessary to disconnect below..
// Disconnect();
myReference = anotherIobj;}

View File

@@ -128,7 +128,7 @@ void AIS_ConnectedShape::Compute(const Handle(Prs3d_Projector)& aProjector,
Aspect_TypeOfDeflection prevdef = defdrawer->TypeOfDeflection();
defdrawer->SetTypeOfDeflection(Aspect_TOD_RELATIVE);
// traitement HLRAngle et HLRDeviationCoefficient()
// process HLRAngle and HLRDeviationCoefficient()
Standard_Real prevangl = myDrawer->HLRAngle();
Standard_Real newangl = defdrawer->HLRAngle();
if (Abs(newangl- prevangl) > Precision::Angular()) {
@@ -182,8 +182,8 @@ void AIS_ConnectedShape::ComputeSelection (const Handle(SelectMgr_Selection)& aS
{
UpdateShape();
aSelection->Clear();
// On regarde s'il n'y a pas des choses a faire sur la reference,
// du type mise a jour...
// It is checked if there is nothing to do with the reference
// of type update...
if(!myReference->HasSelection(aMode))
myReference->UpdateSelection(aMode);
@@ -193,8 +193,8 @@ void AIS_ConnectedShape::ComputeSelection (const Handle(SelectMgr_Selection)& aS
if(RefSel->UpdateStatus()==SelectMgr_TOU_Full)
myReference->UpdateSelection(aMode);
//suivant le type de decomposition, on deduit les primitives connectees.
// il faut suivre l'ordre de creation de StdSelect_BRepSelectionTool...
// depending on the type of decomposition, connected primitives are subtracted
// it is necessary to follow the order of creation of StdSelect_BRepSelectionTool...
TopAbs_ShapeEnum TheType = AIS_Shape::SelectionType(aMode);
Handle(StdSelect_BRepOwner) OWNR;
@@ -235,8 +235,8 @@ void AIS_ConnectedShape::ComputeSelection (const Handle(SelectMgr_Selection)& aS
case TopAbs_SHAPE:
default:
{
// Dans ce cas on n'a qu'un seul proprietaire pour l'ensemble des
// primitives sensibles...
// In case if there is only one owner of the set of
// sensible primitives...
OWNR = new StdSelect_BRepOwner(myOwnSh,this);
Standard_Boolean FirstIncr(Standard_True);
for(RefSel->Init();RefSel->More();RefSel->Next()){
@@ -286,7 +286,7 @@ void AIS_ConnectedShape::UpdateShape(const Standard_Boolean WithTheLocation)
{
if(myReference.IsNull()) return;
// attention grosse ligne...
// attention great line...
if(myReference->Type()!=AIS_KOI_Shape) return;
Standard_Integer Sig = myReference->Signature();

View File

@@ -455,7 +455,7 @@ void AIS_EqualDistanceRelation::ComputeTwoEdgesLength( const Handle( Prs3d_Prese
Position = AIS::ProjectPointOnPlane( Position, Plane->Pln() );
}
// recherche points attache
// find attach points
if (!isInfinite1) {
if (Position.Distance(ptat11) > Position.Distance(ptat12)) FirstAttach = ptat12;
else FirstAttach = ptat11;
@@ -823,8 +823,8 @@ void AIS_EqualDistanceRelation::ComputeOneEdgeOneVertexLength( const Handle( Prs
// computation of Val
Val = FirstAttach.Distance(SecondAttach);
//Display des morceaux de raccordement vers la curve si elle
// n'est pas dans le WP
//Display the pieces of attached to the curve if it is not
// in the WP
if (!isOnPlanEdge) { // add presentation of projection of the edge in WP
AIS::ComputeProjEdgePresentation(aPresentation,aDrawer,theedge,aCurve,ptonedge1,ptonedge2);
}

View File

@@ -175,13 +175,13 @@ Standard_Boolean AIS_ExclusionFilter::IsOk(const Handle(SelectMgr_EntityOwner)&
if(IO.IsNull())
return Standard_False;
// le type de l'ais n'est pas dans la map...
// type of AIS is not in the map...
if(!myStoredTypes.IsBound(IO->Type()))
return myIsExclusionFlagOn ;
// le type de l'ais est dans la map et il n'y a pas de signature precisee
// type of AIS is not in the map and there is no signature indicated
if(myStoredTypes(IO->Type()).IsEmpty())
return !myIsExclusionFlagOn ;
// il y a une ou des signatures precisees...
// one or several signatures are indicated...
if(IsSignatureIn(IO->Type(),IO->Signature()))
return !myIsExclusionFlagOn;

View File

@@ -180,8 +180,8 @@ void AIS_FixRelation::Compute(const Handle(PrsMgr_PresentationManager3d)&,
{
aPresentation->Clear();
// Calcul du point de positionnement du symbole et du
// point d'attache du segment de raccord sur la shape
// Calculate position of the symbol and
// point of attach of the segment on the shape
gp_Pnt curpos;
if (myFShape.ShapeType() == TopAbs_VERTEX)
ComputeVertex(TopoDS::Vertex(myFShape), curpos);
@@ -191,14 +191,14 @@ void AIS_FixRelation::Compute(const Handle(PrsMgr_PresentationManager3d)&,
const gp_Dir& nor = myPlane->Axis().Direction();
// calcul de la presentation
//definition de la taille du symbole
// calculate presentation
// definition of the symbol size
#ifdef BUC60915
if( !myArrowSizeIsDefined )
#endif
myArrowSize = 5.;
//creation du presentable
//creation of the presentation
DsgPrs_FixPresentation::Add(aPresentation,
myDrawer,
myPntAttach,
@@ -255,15 +255,15 @@ void AIS_FixRelation::ComputeSelection(const Handle(SelectMgr_Selection)& aSelec
{
Handle(SelectMgr_EntityOwner) own = new SelectMgr_EntityOwner(this,7);
// creation d'un segment sensible pour le segment de raccordement
// de la shape fixe au symbole 'Fix'
// creation of segment sensible for the linked segment
// of the shape fixed to symbol 'Fix'
Handle(Select3D_SensitiveSegment) seg;
seg = new Select3D_SensitiveSegment(own,
myPntAttach,
myPosition);
aSelection->Add(seg);
// Creation de la zone sensible du symbole 'Fix'
// Creation of the sensible zone of symbol 'Fix'
gp_Dir norm = myPlane->Axis().Direction();
gp_Vec dirac(myPntAttach,myPosition);
@@ -343,7 +343,7 @@ gp_Pnt AIS_FixRelation::ComputePosition(const Handle(Geom_Curve)& curv1,
const gp_Pnt& lastp2) const
{
//---------------------------------------------------------
// calcul du point d'attache
// calculate the point of attach
//---------------------------------------------------------
gp_Pnt curpos;
@@ -391,7 +391,7 @@ gp_Pnt AIS_FixRelation::ComputePosition(const Handle(Geom_Curve)& curv,
const gp_Pnt& lastp) const
{
//---------------------------------------------------------
// calcul du point d'attache
// calculate the point of attach
//---------------------------------------------------------
gp_Pnt curpos;
@@ -435,7 +435,7 @@ void AIS_FixRelation::ComputeEdge(const TopoDS_Edge& FixEdge, gp_Pnt& curpos)
//---------------------------------------------------------
// calcul du point de positionnement du symbole 'fix'
//---------------------------------------------------------
//--> Dans le cas d'une droite
//--> In case of a straight line
if (curEdge->IsKind(STANDARD_TYPE(Geom_Line))){
gp_Lin glin = Handle(Geom_Line)::DownCast(curEdge)->Lin();
Standard_Real pfirst(ElCLib::Parameter(glin,ptbeg));
@@ -443,7 +443,7 @@ void AIS_FixRelation::ComputeEdge(const TopoDS_Edge& FixEdge, gp_Pnt& curpos)
ComputeLinePosition(glin, curpos, pfirst, plast);
}
//--> Dans le cas d'un cercle
//--> In case of a circle
else if (curEdge->IsKind(STANDARD_TYPE(Geom_Circle))) {
gp_Circ gcirc = Handle(Geom_Circle)::DownCast(curEdge)->Circ();
Standard_Real pfirst, plast;
@@ -471,7 +471,7 @@ void AIS_FixRelation::ComputeLinePosition(const gp_Lin& glin,
Standard_Real& plast)
{
if (myAutomaticPosition) {
// le point d'attache est choisi comme milieu du segment
// point of attach is chosen as middle of the segment
myPntAttach = ElCLib::Value((pfirst+ plast)/2, glin);
gp_Dir norm = myPlane ->Axis().Direction();
@@ -485,14 +485,14 @@ void AIS_FixRelation::ComputeLinePosition(const gp_Lin& glin,
pos = myPosition;
Standard_Real linparam = ElCLib::Parameter(glin, pos);
//cas ou la projection de position se situe entre les 2 vertex
// case if the projection of position is located between 2 vertices
// de l'edge
if ( (linparam >= pfirst) && (linparam <= plast) )
myPntAttach = ElCLib::Value(linparam,glin);
// cas ou la projection de Position est en dehors des limites
// de l'edge : alors on choisit comme point d'attache le point
// le plus proche de la projection
// case if the projection of Position is outside of the limits
// of the edge : the point closest to the projection is chosen
// as the attach point
else {
Standard_Real pOnLin;
if (linparam > plast)
@@ -525,7 +525,7 @@ void AIS_FixRelation::ComputeCirclePosition(
Standard_Real& pfirst,
Standard_Real& plast)
{
// reajustement des parametres sur le cercle
// readjust parametres on the circle
if (plast > 2*PI ) {
Standard_Real nbtours = Floor(plast / (2*PI));
plast -= nbtours*2*PI;
@@ -533,8 +533,8 @@ void AIS_FixRelation::ComputeCirclePosition(
}
if (myAutomaticPosition) {
// le point d'attache est le "milieu" du segment (par rapport
// aux parametres des vertex de debut et de fin de l'edge
// the point attach is the "middle" of the segment (relatively
// to the parametres of start and end vertices of the edge
Standard_Real circparam = (pfirst + plast)/2.;
@@ -555,9 +555,9 @@ void AIS_FixRelation::ComputeCirclePosition(
} // if (myAutomaticPosition)
else {
// cas ou la projection de myPosition est en dehors des 2
// vertex de l'edge. Dans ce cas on reajuste le parametre
// dans la portion valable du cercle
// case if the projection of myPosition is outside of 2
// vertices of the edge. In this case the parameter is readjusted
// in the valid part of the circle
pos = myPosition;
Standard_Real circparam = ElCLib::Parameter(gcirc, pos);

View File

@@ -387,7 +387,7 @@ void AIS_IdenticRelation::Compute(const Handle_Prs3d_Projector& aProjector, cons
// "identic" presentation
// note : if we are in the case of lines, we create a segment between
// myFAttach and mySAttach. In the case of Circles, we create
// an arc of circle between the sames points.We Add a segment
// an arc of circle between the sames points. We Add a segment
// to link Position to its projection on the curve described
// before.
//=======================================================================
@@ -452,7 +452,7 @@ void AIS_IdenticRelation::ComputeSelection(const Handle(SelectMgr_Selection)& aS
seg = new Select3D_SensitiveSegment(own, myFAttach, mySAttach);
aSelection->Add(seg);
//attach = projection de Position() sur la curve;
//attach = projection of Position() on the curve;
gp_Vec v1 (myFAttach, mySAttach);
gp_Vec v2 (myFAttach, myPosition);
if ( v1.IsParallel(v2, Precision::Angular()) )
@@ -521,7 +521,7 @@ void AIS_IdenticRelation::ComputeTwoEdgesPresentation(const Handle(Prs3d_Present
// Treatement of the case of circles
else if ( curv1->IsInstance(STANDARD_TYPE(Geom_Circle)) && curv2->IsInstance(STANDARD_TYPE(Geom_Circle)) ) {
//gp_Pnt curpos;
isCircle = Standard_True; // usefull for ComputeSelection
isCircle = Standard_True; // useful for ComputeSelection
const Handle(Geom_Circle)& thecirc = (Handle(Geom_Circle)&) curv1;
ComputeTwoCirclesPresentation(aPrs, thecirc, firstp1, lastp1, firstp2, lastp2);
}
@@ -537,7 +537,7 @@ void AIS_IdenticRelation::ComputeTwoEdgesPresentation(const Handle(Prs3d_Present
else
return;
// Calcul de la presentation des edges projettees
// Calculate presentation of projected edges
if ( (myExtShape != 0) && !extCurv.IsNull()) {
if (myExtShape == 1 )
ComputeProjEdgePresentation(aPrs, TopoDS::Edge(myFShape), curv1, firstp1, lastp1);
@@ -1529,7 +1529,7 @@ void AIS_IdenticRelation::ComputeTwoVerticesPresentation(const Handle(Prs3d_Pres
vals,
myFAttach,
curpos);
// Calcul de la projection du vertex
// Calculate the projection of vertex
if ( myExtShape == 1)
ComputeProjVertexPresentation(aPrs,FVertex,myFAttach);
else if ( myExtShape == 2)
@@ -1551,7 +1551,7 @@ Standard_Real AIS_IdenticRelation::ComputeSegSize() const
//function : ComputeDirection
//purpose : Compute a direction according to the different geometric
// elements connected to the vertex <VERT>, in way to not have
// overlap between the symbol and them.
// overlap between the symbol and them.
//=======================================================================
Standard_Boolean AIS_IdenticRelation::ComputeDirection(const TopoDS_Wire& aWire,
const TopoDS_Vertex& VERT,
@@ -1665,12 +1665,12 @@ void AIS_IdenticRelation::ComputeOneEdgeOVertexPresentation(const Handle(Prs3d_P
if (myFShape.ShapeType() == TopAbs_VERTEX) {
V = TopoDS::Vertex(myFShape);
E = TopoDS::Edge(mySShape);
numedge = 2;// edge = 2 iem shape
numedge = 2;// edge = 2nd shape
}
else {
V = TopoDS::Vertex(mySShape);
E = TopoDS::Edge(myFShape);
numedge = 1; // edge = 1 ere shape
numedge = 1; // edge = 1st shape
}
gp_Pnt ptonedge1,ptonedge2;
Handle(Geom_Curve) aCurve;
@@ -1682,7 +1682,7 @@ void AIS_IdenticRelation::ComputeOneEdgeOVertexPresentation(const Handle(Prs3d_P
aPrs->SetInfiniteState(isInfinite);
AIS::ComputeGeometry(V, myFAttach, myPlane, isOnPlanVertex);
// on considere que seule la courbe peut etre projetee
// only the curve can be projected
if (!isOnPlanEdge && !isOnPlanVertex) return;
if (!isOnPlanEdge) {
@@ -1736,7 +1736,7 @@ void AIS_IdenticRelation::ComputeOneEdgeOVertexPresentation(const Handle(Prs3d_P
myFAttach,
curpos);
if (myExtShape != 0) {
if (!extCurv.IsNull()) { // c'est l'edge qui n'est pas dans le WP
if (!extCurv.IsNull()) { // the edge is not in the WP
ComputeProjEdgePresentation(aPrs,E,(Handle(Geom_Line)&) aCurve,ptonedge1,ptonedge2);
}
}

View File

@@ -860,8 +860,8 @@ Standard_Boolean AIS_InteractiveContext::KeepTemporary(const Handle(AIS_Interact
if(myObjects.IsBound(anIObj)) return Standard_False;
if(WhichContext!=-1 && !myLocalContexts.IsBound(WhichContext)) return Standard_False;
// Protection : si on essaye de conserver un objet temporaire
// qui n'est pas dans le contexte local actif... rob 11-06-97
// Protection : if one tries to preserve a temporary object
// which is not in the local active context... rob 11-06-97
Standard_Integer IsItInLocal = myCurLocalIndex;
Standard_Boolean Found(Standard_False);
@@ -1798,8 +1798,8 @@ void AIS_InteractiveContext::SetDisplayMode(const Handle(AIS_InteractiveObject)&
Handle(AIS_GlobalStatus) STATUS = myObjects(anIObj);
// ENDCLE
#ifndef OCC4373
// l'objet interactif n'avait pas de mode propre : OldMode = Mode Session
// avait deja un mode propre : OldMode = ancien mode Propre
// the interactive object has no mode : OldMode = Mode Session
// already has a mode : OldMode = old mode Propre
Standard_Integer OldMode = anIObj->HasDisplayMode() ? anIObj->DisplayMode(): myDisplayMode;
@@ -2004,7 +2004,7 @@ void AIS_InteractiveContext::SetDeviationCoefficient(
if(!anIObj->HasInteractiveContext())
anIObj->SetContext(this);
// A Modifier apres descente des methodes concernees de AIS_Shape dans InteractiveObject
// To be modified after the related methods of AIS_Shape are passed to InteractiveObject
if(anIObj->Type()!=AIS_KOI_Object && anIObj->Type()!=AIS_KOI_Shape) return;
if(anIObj->Signature()!=0) return;
(*((Handle(AIS_Shape)*)&anIObj))->SetOwnDeviationCoefficient(aCoefficient);
@@ -2047,7 +2047,7 @@ void AIS_InteractiveContext::SetHLRDeviationCoefficient(
if(!anIObj->HasInteractiveContext())
anIObj->SetContext(this);
// A Modifier apres descente des methodes concernees de AIS_Shape dans InteractiveObject
// To be modified after the related methods of AIS_Shape are passed to InteractiveObject
if(anIObj->Type()!=AIS_KOI_Object && anIObj->Type()!=AIS_KOI_Shape) return;
if(anIObj->Signature()!=0) return;
(*((Handle(AIS_Shape)*)&anIObj))->SetOwnHLRDeviationCoefficient(aCoefficient);
@@ -2092,7 +2092,7 @@ void AIS_InteractiveContext::SetDeviationAngle(
if(!anIObj->HasInteractiveContext())
anIObj->SetContext(this);
// A Modifier apres descente des methodes concernees de AIS_Shape dans InteractiveObject
// To be modified after the related methods of AIS_Shape are passed to InteractiveObject
if(anIObj->Type()!=AIS_KOI_Shape) return;
if(anIObj->Signature()!=0) return;
(*((Handle(AIS_Shape)*)&anIObj))->SetOwnDeviationAngle(anAngle);
@@ -2134,7 +2134,7 @@ void AIS_InteractiveContext::SetAngleAndDeviation(
if(!anIObj->HasInteractiveContext())
anIObj->SetContext(this);
// A Modifier apres descente des methodes concernees de AIS_Shape dans InteractiveObject
// To be modified after the related methods of AIS_Shape are passed to InteractiveObject
if(anIObj->Type()!=AIS_KOI_Shape) return;
if(anIObj->Signature()!=0) return;
(*((Handle(AIS_Shape)*)&anIObj))->SetAngleAndDeviation(anAngle);
@@ -2162,7 +2162,7 @@ void AIS_InteractiveContext::SetHLRAngleAndDeviation(
if(!anIObj->HasInteractiveContext())
anIObj->SetContext(this);
// A Modifier apres descente des methodes concernees de AIS_Shape dans InteractiveObject
// To be modified after the related methods of AIS_Shape are passed to InteractiveObject
if(anIObj->Type()!=AIS_KOI_Shape) return;
if(anIObj->Signature()!=0) return;
(*((Handle(AIS_Shape)*)&anIObj))->SetHLRAngleAndDeviation(anAngle);
@@ -2205,7 +2205,7 @@ void AIS_InteractiveContext::SetHLRDeviationAngle(
if(!anIObj->HasInteractiveContext())
anIObj->SetContext(this);
// A Modifier apres descente des methodes concernees de AIS_Shape dans InteractiveObject
// To be modified after the related methods of AIS_Shape are passed to InteractiveObject
if( anIObj->Type()!=AIS_KOI_Shape) return;
if(anIObj->Signature()!=0) return;
(*((Handle(AIS_Shape)*)&anIObj))->SetOwnHLRDeviationAngle(anAngle);
@@ -3004,7 +3004,7 @@ Standard_Boolean AIS_InteractiveContext::IsInLocal(const Handle_AIS_InteractiveO
Standard_Integer& TheIndex) const
{
if(anIObj.IsNull()) return Standard_False;
// s'il existe au point neutre on retourne l'index 0
// if it exists at neutral point 0 index is returned
if(myObjects.IsBound(anIObj)) {
TheIndex = 0;
return Standard_False;
@@ -3048,7 +3048,7 @@ void AIS_InteractiveContext::InitAttributes()
HLA->SetWidth(1);
HLA->SetTypeOfLine(Aspect_TOL_DASH);
// tolerance a 4 pixels...
// tolerance to 4 pixels...
#ifdef BUC60688
SetSensitivity();
#else

View File

@@ -198,12 +198,11 @@ AIS_StatusOfDetection AIS_InteractiveContext::MoveTo(const Standard_Integer XPix
if ( !myLocalContexts( myCurLocalIndex )->Filter()->IsOk( selector->OnePicked() ) )
return AIS_SOD_AllBad;
// si c'est le meme qu'au coup precedent -> fin
// Does nothing if previously detected object is equal to the current one
if ( selector->OnePicked()->Selectable() == myLastPicked )
return AIS_SOD_OnlyOneDetected;
//si le precedent est un objet courant, on ne le desilighte pas, sinon si
// Previously detected object is unhilighted if it is not selected or hilighted
// with selection color if it is selected. Such highlighting with selection color
// is needed only if myToHilightSelected flag is true. In this case previously detected
@@ -233,7 +232,6 @@ AIS_StatusOfDetection AIS_InteractiveContext::MoveTo(const Standard_Integer XPix
myLastinMain = myLastPicked;
else
myLastinColl = myLastPicked;
// si l'objet detecte n'est pas courant, on le hilighte...
#ifdef IMP191001
// Highlight detected object if it is not selected or myToHilightSelected flag is true
if ( !myLastPicked.IsNull() &&
@@ -297,8 +295,8 @@ AIS_StatusOfPick AIS_InteractiveContext::Select(const Standard_Integer XPMin,
const Handle(V3d_View)& aView,
const Standard_Boolean updateviewer)
{
// on prend tous les objets detectes par le selecteur, on vide les precedents objets courants,
// on met les nouveaux...
// all objects detected by the selector are taken, previous current objects are emptied,
// new objects are put...
if(HasOpenedContext())
return myLocalContexts(myCurLocalIndex)->Select(XPMin,YPMin,XPMax,YPMax,aView,updateviewer);
@@ -367,8 +365,8 @@ AIS_StatusOfPick AIS_InteractiveContext::Select(const TColgp_Array1OfPnt2d& aPol
const Handle(V3d_View)& aView,
const Standard_Boolean updateviewer)
{
// on prend tous les objets detectes par le selecteur, on vide les precedents objets courants,
// on met les nouveaux...
// all objects detected by the selector are taken, previous current objects are emptied,
// new objects are put...
if(HasOpenedContext())
return myLocalContexts(myCurLocalIndex)->Select(aPolyline,aView,updateviewer);
@@ -439,7 +437,7 @@ AIS_StatusOfPick AIS_InteractiveContext::Select(const Standard_Boolean updatevie
if(myWasLastMain)
return myLocalContexts(myCurLocalIndex)->Select(updateviewer);
else
// on a picke dans le collecteur, il faut faire un traitement special...
// picking was done in the collector, special processing is required...
{
myLocalContexts(myCurLocalIndex)->SetSelected(myLastPicked,updateviewer);
return AIS_SOP_OneSelected;
@@ -624,7 +622,7 @@ AIS_StatusOfPick AIS_InteractiveContext::ShiftSelect( const TColgp_Array1OfPnt2d
void AIS_InteractiveContext::SetCurrentObject(const Handle(AIS_InteractiveObject)& anIObj,
const Standard_Boolean updateviewer)
{
// traitement d'un cas singulier...
// single case processing...
if(NbCurrents()==1 && anIObj->State()==1){
Quantity_NameOfColor HiCol;
Standard_Boolean HasHiCol;
@@ -660,7 +658,7 @@ void AIS_InteractiveContext::SetCurrentObject(const Handle(AIS_InteractiveObject
sel->Next();
}
// ajout pour ne pas faire d'updateviewer intempestif...
// added to avoid untimely viewer update...
AIS_Selection::ClearAndSelect(anIObj);
anIObj->State(1);
Quantity_NameOfColor HiCol;

View File

@@ -20,6 +20,8 @@
#include <Graphic3d_MapIteratorOfMapOfStructure.hxx>
#include <AIS_Selection.hxx>
static TColStd_ListIteratorOfListOfInteger ItL;
//=======================================================================
//function : OpenLocalContext
//purpose :
@@ -32,8 +34,7 @@ OpenLocalContext(const Standard_Boolean UseDisplayedObjects,
const Standard_Boolean /*BothViewers*/)
{
// on dehilighte les eventuelles entitees detectees juste avant l'ouverture
// du contexte...
// the entities eventually detected just before the context was opened are unhighlighted...
if(!IsCurrent(myLastPicked)){
if(!myLastPicked.IsNull()){
Standard_Integer HiMod = myLastPicked->HasHilightMode()?myLastPicked->HilightMode():0;
@@ -45,7 +46,7 @@ OpenLocalContext(const Standard_Boolean UseDisplayedObjects,
myLocalContexts(myCurLocalIndex)->UnhilightLastDetected(mylastmoveview);
}
// on met a 0 les entites liees a la selection dynamique au point neutre.
// entities connected to dynamic selection at neutral point are set to 0.
myLastinMain.Nullify();
myLastinColl.Nullify();
@@ -62,14 +63,22 @@ OpenLocalContext(const Standard_Boolean UseDisplayedObjects,
UseDisplayedObjects,
AllowShapeDecomposition,
AcceptEraseOfTemporary);
NewLocal->MainSelector()->Set ((myLocalContexts.Extent() > 0)
? myLocalContexts (untilnow)->MainSelector()->Projector()
: myMainSel->Projector());
// rob 16/04/97 Problems of asynchronous orders
if(myLocalContexts.Extent()>0){
const Select3D_Projector& Prj = myLocalContexts(untilnow)->MainSelector()->Projector();
NewLocal->MainSelector()->Set(Prj);
}
else{
const Select3D_Projector& Prj = myMainSel->Projector();
NewLocal->MainSelector()->Set(Prj);
}
NewLocal->MainSelector()->UpdateConversion();
myLocalContexts.Bind(myCurLocalIndex,NewLocal);
#ifdef DEB
cout<<"\tOpen Local Context No "<<myCurLocalIndex<<endl;
if(UseDisplayedObjects){
@@ -83,6 +92,7 @@ OpenLocalContext(const Standard_Boolean UseDisplayedObjects,
cout<<"\t\tNo Objects Were Loaded "<<endl;
#endif
return myCurLocalIndex;
}
//=======================================================================
@@ -111,7 +121,7 @@ void AIS_InteractiveContext::CloseLocalContext(const Standard_Integer Index,
return;
}
// On va fermer le seul contexte local ouvert...
// the only open local context is closed...
if(myLocalContexts.Extent()==1 && GoodIndex == myCurLocalIndex){
Standard_Boolean updateproj = !(myLocalContexts(myCurLocalIndex)->HasSameProjector(myMainSel->Projector()));
@@ -130,12 +140,12 @@ void AIS_InteractiveContext::CloseLocalContext(const Standard_Integer Index,
cout<<"No More Opened Local Context "<<endl;
}
// Sinon on aura encore un contexte local d'ouvert apres la fermeture du courant
// Otherwise the local context will be still open after the current is closed
else{
Handle(StdSelect_ViewerSelector3d) VS = myLocalContexts(GoodIndex)->MainSelector();
myLocalContexts(GoodIndex)->Terminate();
myLocalContexts.UnBind(GoodIndex);
// on ferme le courant...
// the current is closed...
if(GoodIndex==myCurLocalIndex){
myCurLocalIndex = HighestIndex();
const Handle(AIS_LocalContext)& LocCtx = myLocalContexts(myCurLocalIndex);
@@ -257,7 +267,6 @@ Deactivate(const Handle(AIS_InteractiveObject)& anIObj)
{
if(!HasOpenedContext()){
if(!myObjects.IsBound(anIObj)) return;
TColStd_ListIteratorOfListOfInteger ItL;
for(ItL.Initialize(myObjects(anIObj)->SelectionModes());
ItL.More();
ItL.Next()){
@@ -302,9 +311,9 @@ void AIS_InteractiveContext::
ActivatedModes(const Handle(AIS_InteractiveObject)& anIObj,
TColStd_ListOfInteger& theList) const
{
TColStd_ListIteratorOfListOfInteger ItL;
if(!HasOpenedContext()){
if(myObjects.IsBound(anIObj)){
//ItL is a static variable...
for(ItL.Initialize(myObjects(anIObj)->SelectionModes());
ItL.More();
ItL.Next())
@@ -383,7 +392,6 @@ SubIntensityOn(const Handle(AIS_InteractiveObject)& anIObj,
if(myObjects.IsBound(anIObj)){
const Handle(AIS_GlobalStatus)& STAT = myObjects(anIObj);
STAT->SubIntensityOn();
TColStd_ListIteratorOfListOfInteger ItL;
for (ItL.Initialize(STAT->DisplayedModes());ItL.More();ItL.Next())
myMainPM->Color(anIObj,mySubIntensity,ItL.Value());
}
@@ -437,7 +445,6 @@ SubIntensityOff(const Handle(AIS_InteractiveObject)& anIObj,
if(myObjects.IsBound(anIObj)){
const Handle(AIS_GlobalStatus)& STAT = myObjects(anIObj);
STAT->SubIntensityOff();
TColStd_ListIteratorOfListOfInteger ItL;
for (ItL.Initialize(STAT->DisplayedModes());ItL.More();ItL.Next())
myMainPM->Unhighlight(anIObj,ItL.Value());
if(STAT->IsHilighted())
@@ -481,10 +488,11 @@ void AIS_InteractiveContext::SubIntensityOn(const Standard_Boolean updateviewer)
//=======================================================================
void AIS_InteractiveContext::SubIntensityOff(const Standard_Boolean updateviewer)
{
if(!HasOpenedContext()) return;
AIS_DataMapIteratorOfDataMapOfIOStatus It (myObjects);
TColStd_ListIteratorOfListOfInteger ItL;
for(;It.More();It.Next()){
const Handle(AIS_GlobalStatus)& STAT = It.Value();
if(STAT->IsSubIntensityOn())
@@ -492,7 +500,7 @@ void AIS_InteractiveContext::SubIntensityOff(const Standard_Boolean updateviewer
for(ItL.Initialize(STAT->DisplayedModes());ItL.More();ItL.Next())
myMainPM->Unhighlight(It.Key());
}
if(updateviewer) myMainVwr->Update();
}
@@ -768,7 +776,7 @@ Standard_Integer AIS_InteractiveContext::PurgeViewer(const Handle(V3d_Viewer)& V
Standard_Address Add = G->Owner();
if(Add==NULL){
G->Erase();
G->Clear();// ca veut dire qu'elle n'est pas reference comme une presentation d'un InterfactiveObject...
G->Clear();// it means that it is not referenced as a presentation of InterfactiveObject...
NbCleared++;
}
Handle(AIS_InteractiveObject) IO = (AIS_InteractiveObject*)Add;
@@ -868,7 +876,7 @@ void AIS_InteractiveContext::ResetOriginalState(const Standard_Boolean updatevie
{
Standard_Boolean upd_main(Standard_False),upd_col(Standard_False);
TColStd_ListIteratorOfListOfInteger itl;
for (AIS_DataMapIteratorOfDataMapOfIOStatus it(myObjects);it.More();it.Next()){
const Handle(AIS_InteractiveObject)& iobj = it.Key();
const Handle(AIS_GlobalStatus)& STAT = it.Value();
@@ -876,7 +884,7 @@ void AIS_InteractiveContext::ResetOriginalState(const Standard_Boolean updatevie
case AIS_DS_Displayed:{
upd_main = Standard_True;
// partie display...
// part display...
for(itl.Initialize(STAT->DisplayedModes());itl.More();itl.Next())
myMainPM->Display(iobj,itl.Value());
if(STAT->IsHilighted()){
@@ -885,7 +893,7 @@ void AIS_InteractiveContext::ResetOriginalState(const Standard_Boolean updatevie
else
Hilight(iobj,Standard_False);
}
//partie selection
//part selection
for(itl.Initialize(STAT->SelectionModes());itl.More();itl.Next()){
if(itl.Value()!=-1)
mgrSelector->Activate(iobj,itl.Value(),myMainSel);

View File

@@ -97,7 +97,7 @@ AIS_LengthDimension::AIS_LengthDimension (const TopoDS_Face& aFirstFace,
//=======================================================================
//function : Constructor
//purpose : TwoFacesLength dimension (avec position et texte)
//purpose : TwoFacesLength dimension (with position and text)
//=======================================================================
AIS_LengthDimension::AIS_LengthDimension(const TopoDS_Face& aFirstFace,
@@ -129,8 +129,7 @@ AIS_LengthDimension::AIS_LengthDimension(const TopoDS_Face& aFirstFace,
//=======================================================================
//function : AIS_LengthDimension
//purpose : Distance Face - Edge pour chamfrein 3D
// Ajout Jean-Claude Vauthier le 17/06/98
//purpose : Distance Face - Edge for chamfer 3D
//=======================================================================
AIS_LengthDimension::AIS_LengthDimension (const TopoDS_Face& Face,const TopoDS_Edge& Edge,const Standard_Real Val,const TCollection_ExtendedString& Text)
@@ -223,13 +222,13 @@ void AIS_LengthDimension::Compute(const Handle(PrsMgr_PresentationManager3d)&,
switch (myFShape.ShapeType()) {
case TopAbs_FACE:
{
// cas longueur sur une face
// case length on a face
ComputeOneFaceLength(aPresentation);
}
break;
case TopAbs_EDGE:
{
// cas longueur d'un edge
// case length of an edge
ComputeOneEdgeLength(aPresentation);
}
break;
@@ -242,7 +241,7 @@ void AIS_LengthDimension::Compute(const Handle(PrsMgr_PresentationManager3d)&,
case TopAbs_FACE:
{
if (mySShape.ShapeType () == TopAbs_FACE) {
// cas longueur entre deux faces
// case length between two faces
ComputeTwoFacesLength(aPresentation);
}
else if (mySShape.ShapeType () == TopAbs_EDGE) {
@@ -276,7 +275,7 @@ void AIS_LengthDimension::Compute(const Handle(PrsMgr_PresentationManager3d)&,
mySymbolPrs );
}
else if (mySShape.ShapeType() == TopAbs_EDGE) {
// cas longueur entre deux edges
// case length between two edges
#ifdef BUC60915
if( !myArrowSizeIsDefined )
#endif
@@ -471,7 +470,7 @@ void AIS_LengthDimension::ComputeTwoFacesLength( const Handle( Prs3d_Presentatio
myDrawer->LengthAspect()->Arrow1Aspect()->SetLength( myArrowSize );
myDrawer->LengthAspect()->Arrow2Aspect()->SetLength( myArrowSize );
// Recherche du texte de la cote
// Find text of the face
DsgPrs_LengthPresentation::Add( aPresentation,
myDrawer,
@@ -676,18 +675,18 @@ void AIS_LengthDimension::ComputeTwoEdgesLength( const Handle( Prs3d_Presentatio
else {
curpos.SetXYZ((l1.Location().XYZ()+l2.Location().XYZ())/2.);
}
// offset pour eviter confusion Edge et Dimension
// offset to avoid confusion Edge and Dimension
gp_Vec offset(DirAttach);
offset = offset*ArrowSize*(-10.);
curpos.Translate(offset);
Position = curpos;
}
else { // on projette le point dans le plan
else { // the point is projected in the plane
// it is patch!
Position = AIS::ProjectPointOnPlane( Position, Plane->Pln() );
}
// recherche points attache
// find attachment points
if (!isInfinite1) {
if (Position.Distance(ptat11) > Position.Distance(ptat12)) FirstAttach = ptat12;
else FirstAttach = ptat11;
@@ -780,12 +779,12 @@ void AIS_LengthDimension::ComputeOneEdgeOneVertexLength( const Handle( Prs3d_Pre
if (FirstShape.ShapeType() == TopAbs_VERTEX) {
thevertex = TopoDS::Vertex(FirstShape);
theedge = TopoDS::Edge(SecondShape);
numedge = 2;// edge = 2 iem shape
numedge = 2;// edge = 2nd shape
}
else {
thevertex = TopoDS::Vertex(SecondShape);
theedge = TopoDS::Edge(FirstShape);
numedge = 1; // edge = 1 ere shape
numedge = 1; // edge = 1st shape
}
gp_Pnt ptonedge1,ptonedge2;
@@ -798,7 +797,7 @@ void AIS_LengthDimension::ComputeOneEdgeOneVertexLength( const Handle( Prs3d_Pre
aPresentation->SetInfiniteState(isInfinite);
AIS::ComputeGeometry(thevertex, FirstAttach, Plane, isOnPlanVertex);
// on considere que seule la courbe peut etre projetee
// take into consideration that only the curve can be projected
if (!isOnPlanEdge && !isOnPlanVertex)
return;
@@ -826,13 +825,13 @@ void AIS_LengthDimension::ComputeOneEdgeOneVertexLength( const Handle( Prs3d_Pre
if (AutomaticPos) {
gp_Pnt p = ElCLib::Value(ElCLib::Parameter(l,FirstAttach),l);
gp_Pnt curpos((FirstAttach.XYZ()+p.XYZ())/2.);
// offset pour eviter confusion Edge et Dimension
// offset to avoid confusion Edge and Dimension
gp_Vec offset(DirAttach);
offset = offset*ArrowSize*(-10.);
curpos.Translate(offset);
Position = curpos;
}
else { // on projette le point dans le plan
else { // the point is projected in the plane
// it is patch!
Position = AIS::ProjectPointOnPlane( Position, Plane->Pln() );
@@ -943,7 +942,7 @@ void AIS_LengthDimension::ComputeTwoVerticesLength( const Handle( Prs3d_Presenta
if (AutomaticPos) {
if (!samePoint) {
gp_Pnt curpos((FirstAttach.XYZ()+SecondAttach.XYZ())/2.);
// offset pour eviter confusion Edge et Dimension
// offset to avoid confusion Edge and Dimension
gp_Vec offset(DirAttach);
offset = offset*ArrowSize*(-10.);
curpos.Translate(offset);
@@ -968,7 +967,7 @@ void AIS_LengthDimension::ComputeTwoVerticesLength( const Handle( Prs3d_Presenta
arr = la->Arrow2Aspect();
arr->SetLength(ArrowSize);
// Type des fleches
// Type of arrows
if ( ExtShape == 1) SymbolPrs = DsgPrs_AS_FIRSTPT_LASTAR;
else if (ExtShape == 2) SymbolPrs = DsgPrs_AS_FIRSTAR_LASTPT;
@@ -984,7 +983,7 @@ void AIS_LengthDimension::ComputeTwoVerticesLength( const Handle( Prs3d_Presenta
Position,
SymbolPrs);
// Calcul de la projection du vertex
// Calculate the projection of the vertex
if ( ExtShape == 1)
AIS::ComputeProjVertexPresentation(aPresentation, aDrawer, FirstVertex, FirstAttach);
else if ( ExtShape == 2)
@@ -1117,10 +1116,10 @@ void AIS_LengthDimension::ComputeFaceSelection( const Handle( SelectMgr_Selectio
void AIS_LengthDimension::ComputeEdgeVertexSelection(const Handle(SelectMgr_Selection)& aSelection)
{
// ********** NB ->
// dans le cas d'une contrainte par rapport au bord d'une face
// seule la shape de ce contour est valide
// in the case of a constraint relatively to the border of a face
// only the shape of this contour is valid
// Creation de 2 owner pour permettre l'edition de contraintes
// Create 2 owner for edition of constraints
Handle(AIS_DimensionOwner) own1 = new AIS_DimensionOwner(this,7);
Handle(AIS_DimensionOwner) own2 = new AIS_DimensionOwner(this,7);
@@ -1150,8 +1149,8 @@ void AIS_LengthDimension::ComputeEdgeVertexSelection(const Handle(SelectMgr_Sele
if (!Proj1.IsEqual(Proj2,confusion)) L3 = gce_MakeLin(Proj1,Proj2);
else {
// cas ou la dimension est nulle
// on choisit le own1 par defaut
// cas of zero dimension
// own1 is chosen by default
L3 = gce_MakeLin(Proj1,myDirAttach);
Standard_Real size(Min(myVal/100.+1.e-6,myArrowSize+1.e-6));
Handle(Select3D_SensitiveBox) box = new Select3D_SensitiveBox(own1,myPosition.X(),myPosition.Y(),myPosition.Z(),

View File

@@ -164,7 +164,7 @@ Standard_Boolean AIS_LocalContext::Display(const Handle(AIS_InteractiveObject)&
Att->SetDecomposition(Standard_True);
else
Att->SetDecomposition(Standard_False);
// statut temporaire ou non
// status temporary or not
if(myCTX->DisplayStatus(anInteractive) == AIS_DS_None ||
myCTX->DisplayStatus(anInteractive) == AIS_DS_Temporary)
Att->SetTemporary(Standard_True);
@@ -429,23 +429,23 @@ Standard_Boolean AIS_LocalContext::Remove(const Handle(AIS_InteractiveObject)& a
TColStd_ListIteratorOfListOfInteger It;
Standard_Boolean jobdone(Standard_False);
// on regarde quel etaient ses attributs temporaires et on
// remet tout a 0
// it is checked which were the temporary attributes
// and they are set to 0
// desactiver les modes stantard
// desactivate standard modes
if(Att->Decomposed()){
for(It.Initialize(myListOfStandardMode);It.More();It.Next()){
mySM->Deactivate(aSelectable,It.Value(),myMainVS);
}
}
// si objet ou presentations temporaires...
// if object or temporary presentations...
if(Att->IsTemporary())
{
if(Att->IsSubIntensityOn())
myMainPM->Unhighlight(aSelectable,Att->HilightMode());
// enlever quand bug sur clear corrige...
// remove if bug on clear correct...
myMainPM->Erase(aSelectable,Att->DisplayMode());
myMainPM->Clear(aSelectable,Att->DisplayMode());
if(myMainPM->IsDisplayed(aSelectable,Att->HilightMode()))
@@ -453,18 +453,16 @@ Standard_Boolean AIS_LocalContext::Remove(const Handle(AIS_InteractiveObject)& a
// myMainPM->Clear(aSelectable,Att->HilightMode());
jobdone = Standard_True;
}
// si sous intensite
// if below intensity
else
{
if(Att->IsSubIntensityOn())
myCTX->SubIntensityOff(aSelectable);
}
// desactiver les modes propres stockes
// desactivate stored proper modes
for(It.Initialize(Att->SelectionModes());It.More();It.Next()){
mySM->Deactivate(aSelectable,It.Value(),myMainVS);
}
// pop : si je laisses cela plantes dans les elements de construction
// alors a toi de jouer ROB
// RemoveSelected(aSelectable);
if(IsSelected(aSelectable))
@@ -544,17 +542,16 @@ Standard_Boolean AIS_LocalContext::Remove(const Handle(AIS_InteractiveObject)& a
void AIS_LocalContext::ActivateStandardMode(const TopAbs_ShapeEnum aType)
{
//on verifie qu'il n'esiste pas deja dans la liste
//check if it is not in the list
TColStd_ListIteratorOfListOfInteger It(myListOfStandardMode);
for(;It.More();It.Next())
if(It.Value()==aType) return;
Standard_Integer IMode = AIS_Shape::SelectionMode(aType);
// on cree de facon cachee un filtre repondant ok au type
//sauf :
// si le type est shape...
// si des filtres agissent deja sur le type <aType>
// create a hidden filter answering ok to the type except for :
// if the type is shape...
// if the filters already impact at the type <aType>
if(aType != TopAbs_SHAPE){
if(myStdFilters[IMode].IsNull())
myStdFilters[IMode] = new StdSelect_ShapeTypeFilter(aType);
@@ -562,8 +559,8 @@ void AIS_LocalContext::ActivateStandardMode(const TopAbs_ShapeEnum aType)
myFilters->Add(myStdFilters[IMode]);
}
// on active le mode pour tous les objets de type Shape
// acceptant la decomposition en mode standard.
// the mode is activated for all objects of type Shape
// accepting the decomposition in standard mode.
myListOfStandardMode.Append(IMode);
AIS_DataMapIteratorOfDataMapOfSelStat ItM(myActiveObjects);
@@ -620,8 +617,8 @@ void AIS_LocalContext::DeactivateStandardMode(const TopAbs_ShapeEnum aType)
void AIS_LocalContext::AddFilter(const Handle(SelectMgr_Filter)& aFilter)
{
// on regarde si le filtre agit sur un type de sous shape
// active pour lequel on aurait deja mis un filtre de type...
// it is checked if the filter impacts at the type of active sub-shape
// for which a filter of type has been already implemented...
TColStd_ListIteratorOfListOfInteger It(myListOfStandardMode);
@@ -642,12 +639,11 @@ void AIS_LocalContext::RemoveFilter(const Handle(SelectMgr_Filter)& aFilter)
{
if(myFilters->IsIn(aFilter)) myFilters->Remove(aFilter);
// on regarde si le filtre concernait un type standard active.
// si oui , on regarde s'il en existe de semblables encore
// parmi les filtres restant..
// s'il n'en reste pas , on remet le filtre standard
// permettant de continuer a selectionner les modes
// actifs...
// it is checked if the filter for type standard is active.
// if yes, it is checked there are still similarities among the
// remaining filters...
// otherwise, the standard filter is restored to
// continu selecting active modes...
TColStd_ListIteratorOfListOfInteger It(myListOfStandardMode);
TopAbs_ShapeEnum SE;
for(;It.More();It.Next()){
@@ -660,25 +656,22 @@ void AIS_LocalContext::RemoveFilter(const Handle(SelectMgr_Filter)& aFilter)
Standard_Boolean AIS_LocalContext::HasSameProjector(const Handle(Select3D_Projector)& thePrj) const
Standard_Boolean AIS_LocalContext::HasSameProjector(const Select3D_Projector& aPrj) const
{
const Handle(Select3D_Projector)& aCurPrj = myMainVS->Projector();
if (aCurPrj->Perspective() != thePrj->Perspective())
return Standard_False;
if (aCurPrj->Perspective() && aCurPrj->Focus() != thePrj->Focus())
return Standard_False;
const gp_GTrsf& aCurTrsf = aCurPrj->Transformation();
const gp_GTrsf& aPrjTrsf = thePrj->Transformation();
for (Standard_Integer i = 1; i <= 3; ++i)
{
for (Standard_Integer j = 1; j <= 3 ; ++j)
{
if (aCurTrsf.Value (i, j) != aPrjTrsf.Value (i, j))
return Standard_False;
const Select3D_Projector& CurPrj = myMainVS->Projector();
if(CurPrj.Perspective()!=aPrj.Perspective()) return Standard_False;
if(CurPrj.Perspective())
if(CurPrj.Focus()!=aPrj.Focus()) return Standard_False;
gp_GTrsf CurTrsf(CurPrj.Transformation());
gp_GTrsf PrjTrsf(aPrj.Transformation());
for(Standard_Integer i=1;i<=3;i++){
for(Standard_Integer j=1;j<=3;j++){
if(CurTrsf.Value(i,j)!=PrjTrsf.Value(i,j))
return Standard_False;
}
}
return Standard_True;
}
@@ -695,7 +688,7 @@ void AIS_LocalContext::Terminate( const Standard_Boolean updateviewer )
myMapOfOwner.Clear();
mylastindex=0;
// nettoyons le selecteur...
// clear the selector...
myMainVS->Clear();
myCTX->SelectionManager()->Remove(myMainVS);
@@ -815,7 +808,7 @@ void AIS_LocalContext::Unhilight(const Handle(AIS_InteractiveObject)& anObject)
{
if(!myActiveObjects.IsBound(anObject)) return;
// pour voir si d'aventure l'objet est quelque part ailleurs...
// chieck if by hazard the object is somewhere else...
Standard_Integer Indx;
Standard_Boolean IsSomeWhereElse =
myCTX->IsInLocal(anObject,Indx) && Indx != myCTX->IndexOfCurrentLocal();
@@ -1071,7 +1064,7 @@ void AIS_LocalContext::ClearObjects()
const Handle(AIS_LocalStatus)& CurAtt = It.Value();
//TColStd_ListIteratorOfListOfInteger ItL;
// si objet temporaire on efface ses presentations geree par myMainPM
// if object is temporary the presentations managed by myMainPM are removed
AIS_DisplayStatus TheDS = myCTX->DisplayStatus(SO);
if(TheDS != AIS_DS_Displayed){

View File

@@ -110,7 +110,7 @@ AIS_StatusOfDetection AIS_LocalContext::MoveTo(const Standard_Integer Xpix,
const Standard_Integer Ypix,
const Handle(V3d_View)& aview)
{
// d'abord voir ce que le ViewerSelector donne
// check that ViewerSelector gives
if(aview->Viewer()== myCTX->CurrentViewer()) {
#ifdef IMP160701
//Nullify class members storing information about detected AIS objects.
@@ -128,7 +128,7 @@ AIS_StatusOfDetection AIS_LocalContext::MoveTo(const Standard_Integer Xpix,
EO = myMainVS->Picked(i_detect);
if(!EO.IsNull()){
if(myFilters->IsOk(EO)) {
myDetectedSeq.Append(i_detect); // normalement ils sont deja ranges dans le bon ordre...
myDetectedSeq.Append(i_detect); // normallly they are already arranged in correct order...
#ifdef IMP160701
Handle(AIS_InteractiveObject) anObj = Handle(AIS_InteractiveObject)::DownCast(EO->Selectable());
if(!Handle(AIS_Shape)::DownCast(anObj).IsNull())
@@ -138,7 +138,7 @@ AIS_StatusOfDetection AIS_LocalContext::MoveTo(const Standard_Integer Xpix,
}
}
//resultat des courses..
//result of courses..
if(had_nothing || myDetectedSeq.IsEmpty()){
if(mylastindex !=0 && mylastindex <= myMapOfOwner.Extent()){
@@ -153,9 +153,8 @@ AIS_StatusOfDetection AIS_LocalContext::MoveTo(const Standard_Integer Xpix,
return (had_nothing ? AIS_SOD_Nothing : AIS_SOD_AllBad);
}
// quelque chose...
// on passe tous les proprietaires detectes par le selecteur
// aux filtres et on garde les bons..
// all owners detected by the selector are passed to the
// filters and correct ones are preserved...
myCurDetected = 1;
EO = myMainVS->Picked(myDetectedSeq(myCurDetected));
@@ -270,7 +269,7 @@ AIS_StatusOfPick AIS_LocalContext::Select(const Standard_Integer XPMin,
for(myMainVS->Init();myMainVS->More();myMainVS->Next()){
const Handle(SelectMgr_EntityOwner)& OWNR = myMainVS->Picked();
if(myFilters->IsOk(OWNR)){
// rangeons ce proprietaire au chaud, il pourrait servir...
// it can be helpfil to classify this owner immediately...
#ifdef BUC60569
Standard_Integer state = OWNR->State();
if( state < 1 ){
@@ -365,8 +364,8 @@ AIS_StatusOfPick AIS_LocalContext::ShiftSelect(const Standard_Boolean updateview
return AIS_SOP_Error;
}
//==================================================
// Function: les objets deja selectionnes sont deselectionnes
// Purpose : les autres sont selectionnes.
// Function: the already selected objects are unselected
// Purpose : others are selected.
//==================================================
AIS_StatusOfPick AIS_LocalContext::ShiftSelect(const Standard_Integer XPMin,
const Standard_Integer YPMin,
@@ -386,7 +385,7 @@ AIS_StatusOfPick AIS_LocalContext::ShiftSelect(const Standard_Integer XPMin,
#ifdef BUC60774
return LastExt == 0 ? AIS_SOP_NothingSelected:AIS_SOP_Removed;
#else
return AIS_SOP_NothingSelected; // aucun effet si on a clique dans le vide
return AIS_SOP_NothingSelected; // no effet if click on empty space
#endif
AIS_Selection::SetCurrentSelection(mySelName.ToCString());
@@ -448,7 +447,7 @@ AIS_StatusOfPick AIS_LocalContext::Select(const TColgp_Array1OfPnt2d& aPolyline,
for(myMainVS->Init();myMainVS->More();myMainVS->Next()){
const Handle(SelectMgr_EntityOwner)& OWNR = myMainVS->Picked();
if(myFilters->IsOk(OWNR)){
// rangeons ce proprietaire au chaud, il pourrait servir...
// it can be helpfil to classify this owner immediately...
#ifdef BUC60953
Standard_Integer state = OWNR->State();
if( state < 1 ){
@@ -590,7 +589,7 @@ void AIS_LocalContext::HilightPicked(const Standard_Boolean updateviewer)
Handle (PrsMgr_PresentationManager3d) PM = myMainPM;
SelectMgr_DataMapOfObjectOwners aMap;
// pour eviter les Pbs quand on est dans une boucle de recherche des objets selectionnes....
// to avoid problems when there is a loop searching for selected objects...
#if !defined OCC189 && !defined USE_MAP
const TColStd_Array1OfTransient& Obj = Sel->Objects()->Array1();
for(Standard_Integer i =Obj.Lower();i<=Sel->NbStored();i++)
@@ -876,7 +875,7 @@ SelectedApplicative() const
//=======================================================================
//function : UpdateSelection
//purpose : devrait disparaitre ...
//purpose : should disappear...
//=======================================================================
void AIS_LocalContext::UpdateSelected(const Standard_Boolean updateviewer)
{
@@ -955,15 +954,15 @@ void AIS_LocalContext::SetSelected(const Handle(AIS_InteractiveObject)& anIObj,
if(!IsValidForSelection(anIObj)) return;
UnhilightPicked(Standard_False);
//1er cas , on trouve un proprietaire qui a deja <anIObj> comme proprietaire
// et qui ne soit pas decompose...
//1st case, owner already <anIObj> as owner
// and not separated is found...
Handle(AIS_Selection) sel = AIS_Selection::Selection(mySelName.ToCString());
//Standard_Boolean found(Standard_False);
Handle(Standard_Transient) Tr;
Handle(SelectMgr_EntityOwner) EO = FindSelectedOwnerFromIO(anIObj);
if(EO.IsNull()){
//regardons s'il a dans sa selection numero 0 un proprietaire qu'on pourrait triturer...
//check if in selection number 0 there is an owner that can be triturated...
if(anIObj->HasSelection(0)){
const Handle(SelectMgr_Selection)& SIOBJ = anIObj->Selection(0);
SIOBJ->Init();
@@ -997,7 +996,7 @@ void AIS_LocalContext::AddOrRemoveSelected(const Handle(AIS_InteractiveObject)&
{
if(!IsValidForSelection(anIObj)) return;
UnhilightPicked(Standard_False);
// d'abord regardons s'il est selectionne...
// first check if it is selected...
Handle(SelectMgr_EntityOwner) EO;
EO = FindSelectedOwnerFromIO(anIObj);
@@ -1042,7 +1041,7 @@ void AIS_LocalContext::AddOrRemoveSelected(const Handle(AIS_InteractiveObject)&
//=======================================================================
//function : AddOrRemoveSelected
//purpose : A revoir...
//purpose : To check...
//=======================================================================
void AIS_LocalContext::AddOrRemoveSelected(const TopoDS_Shape& Sh,
const Standard_Boolean updateviewer)
@@ -1103,21 +1102,21 @@ void AIS_LocalContext::ManageDetected(const Handle(SelectMgr_EntityOwner)& aPick
// OK...
if(okStatus){
//=======================================================================================================
// 2 cas : a- l'objet est dans la map des pickes:
// 1. c'est le meme index que le dernier detecte: ->On ne fait rien
// 2. sinon :
// - si lastindex = 0 (aucun objet detecte au dernier move)
// on hilighte la prs de l'objet et on met lastindex = index(objet)
// - sinon :
// on "desighlighte" la prs de l'objet correspondant a lastindex
// voire on l'efface si l'objet n'est pas visualise mais juste actif
// puis on hilighte la Prs de l'objet detecte ici et on met lastindex = index(objet)
// b- l'objet n'est pas dans la map des objets pickes
// - si lastindex != 0 (objet detecte au dernier move) on desighlighte ...
// si l'objet a ete decompose, on cree une prs pour la shape detectee et on ajoute
// le couple (Proprietaire,Prs) dans la map.
// sinon on met dans la map le couple(proprietaire, NullPrs) et on hilighte l'objet interactif
// lui meme.
// 2 cases : a- object is in the map of picks:
// 1. this is the same index as the last detected: -> Do nothing
// 2. otherwise :
// - if lastindex = 0 (no object was detected at the last step)
// the object presentation is highlighted and lastindex = index(objet)
// - othrwise :
// the presentation of the object corresponding to lastindex is "unhighlighted"
// it is removed if the object is not visualized but only active
// then the presentation of the detected object is highlighted and lastindex = index(objet)
// b- the object is not in the map of picked objects
// - if lastindex != 0 (object detected at the last step) it is unhighlighted ...
// if the object was decomposed, presentation is created for the detected shape and the couple
// (Proprietaire,Prs)is added in the map.
// otherwise the couple(proprietaire, NullPrs) is placed in the map and the interactive object
// itself is highlighted.
//
//=======================================================================================================
@@ -1237,7 +1236,7 @@ Standard_Boolean AIS_LocalContext::ComesFromDecomposition(const Standard_Integer
{
const Handle(SelectMgr_EntityOwner)& OWN = myMapOfOwner.FindKey(PickedIndex);
Handle(SelectMgr_SelectableObject) aSel = OWN->Selectable();
if (myActiveObjects.IsBound (aSel)) { // debug de jmi
if (myActiveObjects.IsBound (aSel)) { // debug of jmi
const Handle(AIS_LocalStatus)& Stat = myActiveObjects(aSel);
return Stat->Decomposed();
}
@@ -1319,7 +1318,7 @@ Standard_Boolean AIS_LocalContext::IsValidForSelection(const Handle(AIS_Interact
Standard_Integer AIS_LocalContext::HilightNextDetected(const Handle(V3d_View)& V)
{
// on va jusqu'au prochain proprietaire
// go to the next owner
if(myDetectedSeq.IsEmpty()) return Standard_False;
Standard_Integer L = myDetectedSeq.Length();
@@ -1452,8 +1451,7 @@ void AIS_LocalContext::HilightTriangle(const Standard_Integer Rank,
//=======================================================================
//function : FindSelectedOwnerFromIO
//purpose : on regarde si l''un des proprietaires selectionnes represente
// effectivement IObj
//purpose : it is checked if one of the selected owners really presents IObj
//=======================================================================
Handle(SelectMgr_EntityOwner) AIS_LocalContext::FindSelectedOwnerFromIO
(const Handle(AIS_InteractiveObject)& anIObj) const
@@ -1499,7 +1497,7 @@ Handle(SelectMgr_EntityOwner) AIS_LocalContext::FindSelectedOwnerFromIO
//=======================================================================
//function : FindSelectedOwnerFromShape
//purpose : on regarde si l''un des proprietaires selectionnes represente effectivement IObj
//purpose : it is checked if one of the selected owners really presents IObj
//=======================================================================
Handle(SelectMgr_EntityOwner) AIS_LocalContext::FindSelectedOwnerFromShape(const TopoDS_Shape& sh) const
{

View File

@@ -249,7 +249,6 @@ void AIS_Plane::Compute(const Handle(PrsMgr_PresentationManager3d)& ,
else if (aMode == 1){
if (!myIsXYZPlane){
ComputeFrame();
// a mettre ailleurs sans doute...
Handle(Prs3d_PlaneAspect) theaspect = myDrawer->PlaneAspect();
Handle(Graphic3d_Group) TheGroup = Prs3d_Root::CurrentGroup(aPresentation);
gp_Pnt p1;
@@ -341,8 +340,8 @@ void AIS_Plane::SetSize(const Standard_Real aLength)
void AIS_Plane::SetSize(const Standard_Real aXLength,
const Standard_Real aYLength)
{
//si le plan a deja une couleur ou une taille propre,
//il y a deja un PlaneAspect et un DatumAspect specifique
//if the plane already has a proper color or size,
//there is already a specific PlaneAspect and DatumAspect
Handle(Prs3d_PlaneAspect) PA;
Handle(Prs3d_DatumAspect) DA;
@@ -376,7 +375,7 @@ void AIS_Plane::SetSize(const Standard_Real aXLength,
//=======================================================================
//function : UnsetSize
//purpose : S'il ya une couleur, on recupere la taille du drawer du context...
//purpose : If there is a color, the size is restaured from the drawer of the context...
//=======================================================================
void AIS_Plane::UnsetSize()
{
@@ -430,7 +429,7 @@ void AIS_Plane::SetColor(const Quantity_NameOfColor aCol)
void AIS_Plane::SetColor(const Quantity_Color &aCol)
#endif
{
// si le plan a deja sa propre taille, il y a un deja planeaspect cree
// if the plane already has its proper size, there is an already created planeaspect
// Standard_Boolean yenadeja = hasOwnColor || myHasOwnSize;
Handle(Prs3d_PlaneAspect) PA;
Handle(Prs3d_DatumAspect) DA;

View File

@@ -64,7 +64,7 @@ AIS_PlaneTrihedron::AIS_PlaneTrihedron(const Handle(Geom_Plane)& aPlane)
DA->SecondAxisAspect()->SetColor(col);
DA->SetDrawFirstAndSecondAxis(Standard_True);
DA->SetDrawThirdAxis(Standard_False);
myDrawer->SetDatumAspect(DA); // odl - on en cree un specifique puisqu'on le modifie
myDrawer->SetDatumAspect(DA); // odl - specific is created because it is modified
myShapes[0] = Position();
myShapes[1] = XAxis();
myShapes[2] = YAxis();

View File

@@ -33,7 +33,6 @@
#define MaxSizeOfResult 100000
#endif
// beurk mais moins qu''avant.... rob
static void AIS_Sel_CurrentSelection (Handle(AIS_Selection)& InputSel)
{
static Handle(AIS_Selection) theCurrentSelection;
@@ -120,7 +119,7 @@ Standard_Boolean AIS_Selection::Find(const Standard_CString aName)
//=======================================================================
Standard_Boolean AIS_Selection::SetCurrentSelection (const Standard_CString aName)
{
AIS_Selection::CreateSelection(aName); // juste pour voir... ?????????????
AIS_Selection::CreateSelection(aName);
Handle(AIS_Selection) anAISSelection = AIS_Selection::Selection(aName) ;
@@ -193,7 +192,7 @@ AIS_SelectStatus AIS_Selection::Select(const Handle(Standard_Transient)& anObjec
if(arr(i)==anObject)
Found=i;
}
// Il n''est pas dedans, on le rajoute....
// If it is not inside, it is added...
#ifdef BUC60953
if ( !selected || Found == -1 ) {
@@ -202,7 +201,6 @@ AIS_SelectStatus AIS_Selection::Select(const Handle(Standard_Transient)& anObjec
#endif
if((S->myNb)+1>arr.Length()){
Handle(TColStd_HArray1OfTransient) NiouTab = new TColStd_HArray1OfTransient(1,arr.Length()+MaxSizeOfResult);
// oui bon, mais...
for(i=arr.Lower();i<=S->myNb;i++){
const Handle(Standard_Transient)& T = S->myresult->Value(i);
NiouTab->SetValue(i,T);
@@ -215,7 +213,7 @@ AIS_SelectStatus AIS_Selection::Select(const Handle(Standard_Transient)& anObjec
S->myresult->SetValue(S->myNb,anObject);
return AIS_SS_Added;
}
// il etait dedans on l''enleve...
// it was inside and it is removed...
for(i=Found;i<=S->myNb;i++)
arr(i)=arr(i+1);
S->myNb--;
@@ -288,7 +286,6 @@ AIS_SelectStatus AIS_Selection::AddSelect(const Handle(Standard_Transient)& anOb
Standard_Integer i;
if((S->myNb)+1>arr.Length()){
Handle(TColStd_HArray1OfTransient) NiouTab = new TColStd_HArray1OfTransient(1,arr.Length()+MaxSizeOfResult);
// oui bon, mais...
for(i=arr.Lower();i<=S->myNb;i++){
const Handle(Standard_Transient)& T = S->myresult->Value(i);
NiouTab->SetValue(i,T);

View File

@@ -2,12 +2,6 @@
// Created: Fri Dec 20 17:18:37 1996
// Author: Robert COUBLANC
// <rob@robox.paris1.matra-dtv.fr>
// Modified: Christiane ARMAND: 5/05/97: dans le compute on prend en
// compte le cas des objets infinis
// ROB : introduction des primitives connectees
// Pour le calcul des faces sensibles...
// oct-03-97 ROB : en fonction du type de shapes, on change les coeffs de polygonisation...
// (correction du Pb des cercles pas assez discretises...)
#define BUC60577 //GG_191099 Draw correct bounding box and Menage ...
@@ -241,7 +235,7 @@ void AIS_Shape::Compute(const Handle(PrsMgr_PresentationManager3d)& /*aPresentat
}
if (IsInfinite()) aPrs->SetInfiniteState(Standard_True); //pas de prise en compte lors du FITALL
if (IsInfinite()) aPrs->SetInfiniteState(Standard_True); //not taken in account duting FITALL
switch (aMode) {
case 0:{
try { OCC_CATCH_SIGNALS StdPrs_WFDeflectionShape::Add(aPrs,myshape,myDrawer); }
@@ -250,7 +244,7 @@ void AIS_Shape::Compute(const Handle(PrsMgr_PresentationManager3d)& /*aPresentat
cout << "AIS_Shape::Compute() failed"<< endl;
#endif
cout << "a Shape should be incorrect : No Compute can be maked on it "<< endl;
// on calcule une presentation de la boite englobante
// presentation of the bounding box is calculated
// Compute(aPresentationManager,aPrs,2);
}
break;
@@ -275,7 +269,7 @@ void AIS_Shape::Compute(const Handle(PrsMgr_PresentationManager3d)& /*aPresentat
BRepTools::Clean(myshape);
}
//shading seulement a partir de face...
//shading only on face...
if ((Standard_Integer) myshape.ShapeType()>4)
StdPrs_WFDeflectionShape::Add(aPrs,myshape,myDrawer);
else {
@@ -306,7 +300,7 @@ void AIS_Shape::Compute(const Handle(PrsMgr_PresentationManager3d)& /*aPresentat
}
case 2:
{
// boite englobante
// bounding box
if (IsInfinite()) StdPrs_WFDeflectionShape::Add(aPrs,myshape,myDrawer);
else DisplayBox(aPrs,BoundingBox(),myDrawer);
}
@@ -379,7 +373,7 @@ void AIS_Shape::Compute(const Handle(Prs3d_Projector)& aProjector,
Aspect_TypeOfDeflection prevdef = defdrawer->TypeOfDeflection();
defdrawer->SetTypeOfDeflection(Aspect_TOD_RELATIVE);
// coefficients pour le calcul
// coefficients for calculation
Standard_Real prevangle, newangle ,prevcoeff,newcoeff ;
if (OwnHLRDeviationAngle(newangle,prevangle) || OwnHLRDeviationCoefficient(newcoeff, prevcoeff))
@@ -486,7 +480,7 @@ void AIS_Shape::ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,
#else
TopExp_Explorer anExplor (myshape, TopAbs_VERTEX);
#endif
if (!anExplor.More()) // Shape vide -> Assemblage vide.
if (!anExplor.More()) // empty Shape -> empty Assembly.
return;
}
@@ -500,12 +494,12 @@ void AIS_Shape::ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,
}
#endif
// POP on protege contre un plantage dans les couches basses
// POP protection against crash in low layers
Standard_Real aDeflection = myDrawer->MaximalChordialDeviation();
if (myDrawer->TypeOfDeflection() == Aspect_TOD_RELATIVE)
{
// On calcule la fleche en fonction des min max globaux de la piece:
// Vector is calculated depending on global min max of the part:
Bnd_Box aBndBox; //= BoundingBox(); ?
BRepBndLib::Add (shape, aBndBox);
if (!aBndBox.IsVoid())
@@ -583,7 +577,7 @@ void AIS_Shape::SetColor(const Quantity_Color &aCol)
myOwnColor = aCol;
if(!myDrawer->HasShadingAspect()){
Handle(Prs3d_ShadingAspect) asp = new Prs3d_ShadingAspect();
// recuperons le materiau reference...
// retrieve the reference materials...
if(myDrawer->HasLink()){
const Handle(Prs3d_Drawer)& refdr = myDrawer->Link();
Graphic3d_MaterialAspect theRefMat =
@@ -611,7 +605,7 @@ void AIS_Shape::SetColor(const Quantity_Color &aCol)
myDrawer->SetUnFreeBoundaryAspect(new Prs3d_LineAspect(aCol,Aspect_TOL_SOLID,WW));
myDrawer->SetSeenLineAspect(new Prs3d_LineAspect(aCol,Aspect_TOL_SOLID,WW));
// modif du shading rapide...
// fast shading modification...
if(!GetContext().IsNull()){
if( GetContext()->MainPrsMgr()->HasPresentation(this,1)){
Handle(Prs3d_Presentation) P = GetContext()->MainPrsMgr()->CastPresentation(this,1)->Presentation();
@@ -623,13 +617,6 @@ void AIS_Shape::SetColor(const Quantity_Color &aCol)
#else
a4bis->SetInteriorColor(Quantity_Color(aCol)); // Already done above in SetColor(...)
//***test rob : pour avoir la vraie couleur demandee en shading ***
// mais du coup, le shading est "plat" ...****
// Graphic3d_MaterialAspect FMAT = a4bis->FrontMaterial();
// FMAT.SetColor(Quantity_Color(aCol));
// a4bis->SetFrontMaterial(FMAT);
//******
P->SetPrimitivesAspect(myDrawer->ShadingAspect()->Aspect());
G->SetGroupPrimitivesAspect(myDrawer->ShadingAspect()->Aspect());
#endif
@@ -646,7 +633,6 @@ void AIS_Shape::SetColor(const Quantity_Color &aCol)
void AIS_Shape::UnsetColor()
{
// Evitons les stupidites...
if(!HasColor() ){ myToRecomputeModes.Clear();
return;}
@@ -757,8 +743,8 @@ void AIS_Shape::SetWidth(const Standard_Real W)
#endif
}
myOwnWidth = W;
LoadRecomputable(0); // signifier qu'il faut recalculer uniquement le wireframe....
LoadRecomputable(2); // et la boite englobante...
LoadRecomputable(0); // means that it is necessary to recompute only the wireframe....
LoadRecomputable(2); // and the bounding box...
}
@@ -817,7 +803,7 @@ void AIS_Shape::SetMaterial(const Graphic3d_NameOfMaterial aMat)
G->SetGroupPrimitivesAspect(a4bis);
}
}
myRecomputeEveryPrs =Standard_False; // aucun mode a recalculer :uniquement update viewer
myRecomputeEveryPrs =Standard_False; // no mode to recalculate :only viewer update
myToRecomputeModes.Clear();
}
//=======================================================================
@@ -845,7 +831,7 @@ void AIS_Shape::SetMaterial(const Graphic3d_MaterialAspect& aMat)
G->SetGroupPrimitivesAspect(a4bis);
}
}
myRecomputeEveryPrs =Standard_False; // aucun mode a recalculer :uniquement update viewer
myRecomputeEveryPrs =Standard_False; // no mode to recalculate :only viewer update
myToRecomputeModes.Clear();
}
@@ -887,7 +873,7 @@ void AIS_Shape::UnsetMaterial()
G->SetGroupPrimitivesAspect(a4bis);
}
}
myRecomputeEveryPrs =Standard_False; // aucun mode a recalculer :uniquement update viewer
myRecomputeEveryPrs =Standard_False; // no mode to recalculate :only viewer update
myToRecomputeModes.Clear();
}
@@ -920,7 +906,7 @@ void AIS_Shape::SetTransparency(const Standard_Real AValue)
G->SetGroupPrimitivesAspect(a4bis);
}
}
myRecomputeEveryPrs =Standard_False; // aucun mode a recalculer :uniquement update viewer
myRecomputeEveryPrs =Standard_False; // no mode to recalculate :only viewer update
myToRecomputeModes.Clear();
}
@@ -956,7 +942,7 @@ void AIS_Shape::UnsetTransparency()
#endif
}
}
myRecomputeEveryPrs =Standard_False; // aucun mode a recalculer :uniquement update viewer
myRecomputeEveryPrs =Standard_False; // no mode to recalculate :only viewer update
myToRecomputeModes.Clear();
}
@@ -983,7 +969,7 @@ const Bnd_Box& AIS_Shape::BoundingBox()
#else
TopExp_Explorer anExplor (myshape, TopAbs_VERTEX);
#endif
if (!anExplor.More()) { // Shape vide -> Assemblage vide.
if (!anExplor.More()) { // empty Shape -> empty Assembly.
myBB.SetVoid();
return myBB;
}

View File

@@ -318,8 +318,8 @@ void AIS_TangentRelation::ComputeTwoEdgesTangent(const Handle(Prs3d_Presentation
}
gp_Vec theVector;
gp_Pnt pint3d; // le point de tangence
gp_Dir theDir; // la direction de la tangente
gp_Pnt pint3d; // tangency point
gp_Dir theDir; // tangency direction
Standard_Real par_inter = 0.0; // parameter of tangency point
if (found)
@@ -327,18 +327,18 @@ void AIS_TangentRelation::ComputeTwoEdgesTangent(const Handle(Prs3d_Presentation
pint3d = BRep_Tool::Pnt(VCom);
}
//Sinon, on le cherche comme si on savait que les 2 curves
// sont tangentes ( ce qui dooit etre le cas, tant pis pour les autres)
// Otherwise it is found as if it was known that 2 curves
// are tangents (which must be the cases)
switch (typArg)
{
case 12: // line circle
{
case 12: // circle line
{
const Handle(Geom_Line)& line = (Handle(Geom_Line)&) copy1;
const Handle(Geom_Circle)& circle = (Handle(Geom_Circle)&) copy2;
if ( !found )
{
// il suffit de projeter le centre du cercle sur la droite
// it is enough to project the circus center on the straight line
par_inter = ElCLib::Parameter(line->Lin(), circle->Location());
pint3d = ElCLib::Value(par_inter, line->Lin());
}
@@ -360,7 +360,7 @@ void AIS_TangentRelation::ComputeTwoEdgesTangent(const Handle(Prs3d_Presentation
if (!found)
{
// il suffit de projeter le centre du cercle sur la droite
// it is enough to project the circus center on the straight line
par_inter = ElCLib::Parameter(line->Lin(), circle->Location());
pint3d = ElCLib::Value(par_inter, line->Lin());
}

View File

@@ -342,10 +342,8 @@ void AIS_TexturedShape::Compute(const Handle(PrsMgr_PresentationManager3d)& /*aP
BRepTools::Update(myshape);
Handle(Graphic3d_StructureManager) aStrucMana = GetContext()->MainPrsMgr()->StructureManager();
{
Handle(Prs3d_ShadingAspect) aPrs3d_ShadingAspect = new Prs3d_ShadingAspect;
myAspect = aPrs3d_ShadingAspect->Aspect();
}
myAspect = (new Prs3d_ShadingAspect())->Aspect();
if (!DoMapTexture)
{
myAspect->SetTextureMapOff();
@@ -423,21 +421,21 @@ void AIS_TexturedShape::Compute(const Handle(PrsMgr_PresentationManager3d)& /*aP
dVmax = (Vmax - Vmin);
Handle(Graphic3d_Group) mygroup = Prs3d_Root::CurrentGroup(aPrs);
Standard_Integer nnn = myT->NbTriangles(); // nnn : nombre de triangles
Standard_Integer nt, n1, n2, n3 = 0; // nt : triangle courant
// ni : sommet i du triangle courant
Standard_Integer nnn = myT->NbTriangles(); // nnn : number of triangles
Standard_Integer nt, n1, n2, n3 = 0; // nt : current triangle
// ni : top i of the current triangle
for (nt = 1; nt <= nnn; nt++)
{
#ifdef DEBUG
cout << "On traite actuellement le triangle : "<< nt <<"\n";
#endif
if (SST.Orientation(myFace) == TopAbs_REVERSED) // si la face est "reversed"
triangles(nt).Get(n1,n3,n2); // le triangle est n1,n3,n2
if (SST.Orientation(myFace) == TopAbs_REVERSED) // if the face is "reversed"
triangles(nt).Get(n1,n3,n2); // the triangle is n1,n3,n2
else
triangles(nt).Get(n1,n2,n3); // le triangle est n1,n2,n3
triangles(nt).Get(n1,n2,n3); // the triangle is n1,n2,n3
if (TriangleIsValid (Nodes(n1),Nodes(n2),Nodes(n3)) )
{ // Associates a vertexNT to each node
{ // Associates vertexNT to each node
Graphic3d_Array1OfVertexNT Points(1,3);
Aspect_Array1OfEdge aretes(1,3);

View File

@@ -100,8 +100,8 @@ void AIS_Trihedron::SetSize(const Standard_Real aValue)
//=======================================================================
//function : UnsetSize
//purpose : si l'objet a 1 couleur, on reprend la taille
// du drawer par defaut. sinon on nullifie le DatumAspect
//purpose : if the object has 1 color, the default size of the
// drawer is reproduced, otherwise DatumAspect becomes null
//=======================================================================
void AIS_Trihedron::UnsetSize()
@@ -232,7 +232,6 @@ void AIS_Trihedron::Compute(
{
aPresentation->Clear();
//CTS16254 : pas de prise en compte des axes lors du FITALL (fpo 18/07)
aPresentation->SetInfiniteState (Standard_True);
switch(aMode){
case 0:
@@ -266,14 +265,14 @@ void AIS_Trihedron::Compute(const Handle_Prs3d_Projector& aProjector,
void AIS_Trihedron::ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,
const Standard_Integer aMode)
{
// recuperation des points extremites du triedre.
// retrieve the tops of the trihedron.
Standard_Integer Prior;
Handle(SelectMgr_EntityOwner) eown;
TColgp_Array1OfPnt PP(1,4),PO(1,4);
ExtremityPoints(PP);
switch (aMode) {
case 0:
{ // triedre complet 1 seul proprietaire : this... priorite 5 (meme que faces)
{ // complete triedron only 1 owner : this... priority 5 (same as faces)
Prior = 5;
eown = new SelectMgr_EntityOwner(this,Prior);
for (Standard_Integer i=1; i<=3;i++)
@@ -281,7 +280,7 @@ void AIS_Trihedron::ComputeSelection(const Handle(SelectMgr_Selection)& aSelecti
break;
}
case 1:
{ //origine :
{ //origin :
Prior = 8;
eown= new SelectMgr_EntityOwner(myShapes[0],Prior);
@@ -290,7 +289,7 @@ void AIS_Trihedron::ComputeSelection(const Handle(SelectMgr_Selection)& aSelecti
break;
}
case 2:
{ //axes ... priorite 7
{ //axes ... priority 7
Prior = 7;
for (Standard_Integer i=1; i<=3;i++){
eown= new SelectMgr_EntityOwner(myShapes[i],Prior);
@@ -301,7 +300,7 @@ void AIS_Trihedron::ComputeSelection(const Handle(SelectMgr_Selection)& aSelecti
}
case 3:
{ // plans principaux priorite 6
{ // main planes priority 6
// PO(1) = PP(1);
// PO(4) = PP(1);
Prior =5;