Coding - Translate French comments and modernize constants (#932)

This commit performs safe code cleanup across multiple modules:

1. French to English comment translations:
   - ApplicationFramework: TNaming, TDF, TDataStd packages
   - ModelingAlgorithms: BRepFill, TopOpeBRepBuild, TopOpeBRepTool,
     NLPlate, FairCurve, IntSurf, Contap, ShapeFix, MAT2d, LocOpe
   - ModelingData: ProjLib, GeomLib, GeomConvert, IntAna, AppDef,
     GCPnts, Hermit, BinTools, LProp
   - Visualization: PrsDim, AIS, V3d packages

2. Constexpr modernization:
   - Convert static const variables to constexpr
   - Replace #define macros with constexpr variables
   - Add anonymous namespaces for internal constants
   - Affected files: V3d_View, V3d_CircularGrid, V3d_RectangularGrid,
     Graphic3d_FrameStats, PrsDim_*, Convert_*ToBSplineSurface,
     math_BrentMinimum, and others

3. Code organization:
   - Wrap file-scope constants in anonymous namespaces
   - Use consistent naming convention (THE_* prefix)

No functional changes - all modifications are comment-only or
compile-time constant improvements that preserve identical runtime
behavior.
This commit is contained in:
Pasukhin Dmitry
2025-12-17 10:23:13 +00:00
committed by GitHub
parent 4727f7c049
commit 1d8add2970
66 changed files with 362 additions and 348 deletions
@@ -2089,7 +2089,7 @@ void BRepFill_CompatibleWires::ComputeOrigin(const Standard_Boolean /*polar*/)
else
{
// recherche du vertex correspondant a la projection conique
// search for the vertex corresponding to the conical projection
Standard_Real angmin, angV, eta = Precision::Angular();
TopoDS_Vertex Vopti;
angmin = M_PI / 2;
@@ -2170,7 +2170,7 @@ void BRepFill_CompatibleWires::ComputeOrigin(const Standard_Boolean /*polar*/)
}
else
{
// cas general
// general case
gp_Pnt Pbout = Pnext;
TopoDS_Edge E1, E2;
TopoDS_Vertex V1, V2;
@@ -2207,7 +2207,7 @@ void BRepFill_CompatibleWires::ComputeOrigin(const Standard_Boolean /*polar*/)
if (std::abs(Pbout.Distance(P1) - Pbout.Distance(P2)) < Precision::Confusion())
{
// cas limite ; on se decale un peu
// edge case; shifting a bit
Pbout = PPn;
BRepAdaptor_Curve Curve1(E1);
P1 = Curve1.Value(U1);
@@ -2215,11 +2215,11 @@ void BRepFill_CompatibleWires::ComputeOrigin(const Standard_Boolean /*polar*/)
P2 = Curve2.Value(U2);
}
// calcul de rangdeb
// compute rangdeb
rangdeb = 0;
if (Pbout.Distance(P1) < Pbout.Distance(P2))
{
// P1 est plus proche; parcours = False
// P1 is closer; parcours = False
parcours = Standard_False;
rang = 0;
for (anExp.Init(wire); anExp.More(); anExp.Next())
@@ -2403,7 +2403,7 @@ void BRepFill_CompatibleWires::SearchOrigin()
if (ang < -M_PI/2.0)
ang = -M_PI - ang;
if (std::abs(ang-M_PI/2.0)<Precision::Angular()) {
// cas d'ambiguite
// ambiguity case
gp_Vec Vtrans(P0.Location(),P.Location()),Vsign;
Standard_Real alpha,beta,sign=1;
Vsign.SetLinearForm(Vtrans.Dot(vec1),vec2,-Vtrans.Dot(vec2),vec1);
@@ -22,9 +22,9 @@
#define MYBB ((TopOpeBRepBuild_BlockBuilder*)myBlockBuilder)
// sourvenir d'un raise sur FrozenShape lors du Add(myShell,aFace)
// avec un shell qui a ete deja ete place dans le solide interne du
// TopOpeBRepTool_SolidClassifier par LoadShell.
// reminder of a raise on FrozenShape during Add(myShell,aFace)
// with a shell that has already been placed in the internal solid of
// TopOpeBRepTool_SolidClassifier by LoadShell.
#ifdef OCCT_DEBUG
// static Standard_Integer dddjyl = 0;
@@ -235,7 +235,7 @@ void TopOpeBRepBuild_FuseFace::PerformFace()
return;
}
// boucle sur les listes des faces de 1 face de LRF
// loop over the face lists for each face in LRF
for (itt1.Initialize(mapFacLFac); itt1.More(); itt1.Next())
{
@@ -591,7 +591,7 @@ void TopOpeBRepBuild_FuseFace::PerformEdge()
// TopAbs_Orientation ori,ori1;
// Niveau 1
// boucle sur les listes des faces de 1 face de LRF
// loop over the face lists for each face in LRF
for (it1.Initialize(myLFF); it1.More(); it1.Next())
{
@@ -685,7 +685,7 @@ void TopOpeBRepBuild_FuseFace::ClearEdge()
TopTools_ListOfShape myLFFnew;
// Niveau 1
// boucle sur les listes des faces de 1 face de LRF
// loop over the face lists for each face in LRF
for (it1.Initialize(myLFF); it1.More(); it1.Next())
{
@@ -110,9 +110,9 @@ TopAbs_State TopOpeBRepTool_SolidClassifier::Classify(const TopoDS_Solid& SOL,
const TopoDS_Shape& fres = myPClassifier->Face();
if (fres.IsNull())
{
// NYI : en cas d'elimination des faces EXTERNAL et INTERNAL par le
// classifier BRepClass3d_SolidClassifier, traiter quand meme ces faces
// pour generer l'etat ON/Solid quand le point est IN/face INTERNAL ou EXTERNAL
// NYI: in case of elimination of EXTERNAL and INTERNAL faces by the
// BRepClass3d_SolidClassifier classifier, still handle these faces
// to generate ON/Solid state when the point is IN/face INTERNAL or EXTERNAL
return myState;
}
TopAbs_Orientation ofres = fres.Orientation();