Coding - Method guard iterative update (#674)

- Standardizes comment formatting by replacing detailed comment blocks with a uniform "//=================================================================================================" separator
- Removes redundant "function:" and "purpose:" fields that often contained minimal or no useful information
- Maintains code functionality while improving visual consistency across the codebase
This commit is contained in:
Pasukhin Dmitry
2025-08-15 17:14:53 +01:00
committed by GitHub
parent 02f6fa7be2
commit ae4de70f98
365 changed files with 3229 additions and 9377 deletions

View File

@@ -600,10 +600,7 @@ void BRep_Builder::NaturalRestriction(const TopoDS_Face& F, const Standard_Boole
F.TShape()->Modified(Standard_True);
}
//=======================================================================
// function : MakeEdge
// purpose : make undefined edge
//=======================================================================
//=================================================================================================
void BRep_Builder::MakeEdge(TopoDS_Edge& E) const
{

View File

@@ -20,10 +20,7 @@
#include <BRep_TVertex.hxx>
#include <BRep_Tool.hxx>
//=======================================================================
// function : MakeFace
// purpose :
//=======================================================================
//=================================================================================================
inline void BRep_Builder::MakeFace(TopoDS_Face& F) const
{
@@ -31,10 +28,7 @@ inline void BRep_Builder::MakeFace(TopoDS_Face& F) const
MakeShape(F, TF);
}
//=======================================================================
// function : MakeEdge
// purpose : make edge from curve
//=======================================================================
//=================================================================================================
inline void BRep_Builder::MakeEdge(TopoDS_Edge& E,
const Handle(Geom_Curve)& C,
@@ -44,10 +38,7 @@ inline void BRep_Builder::MakeEdge(TopoDS_Edge& E,
UpdateEdge(E, C, TopLoc_Location(), Tol);
}
//=======================================================================
// function : MakeEdge
// purpose : make edge from curve
//=======================================================================
//=================================================================================================
inline void BRep_Builder::MakeEdge(TopoDS_Edge& E, const Handle(Poly_Polygon3D)& P) const
{
@@ -82,10 +73,7 @@ inline void BRep_Builder::MakeEdge(TopoDS_Edge& E,
UpdateEdge(E, P, T, L);
}
//=======================================================================
// function : MakeEdge
// purpose : make edge from curve
//=======================================================================
//=================================================================================================
inline void BRep_Builder::MakeEdge(TopoDS_Edge& E,
const Handle(Geom_Curve)& C,
@@ -96,10 +84,7 @@ inline void BRep_Builder::MakeEdge(TopoDS_Edge& E,
UpdateEdge(E, C, L, Tol);
}
//=======================================================================
// function : UpdateEdge
// purpose :
//=======================================================================
//=================================================================================================
inline void BRep_Builder::UpdateEdge(const TopoDS_Edge& E,
const Handle(Geom_Curve)& C,
@@ -108,10 +93,7 @@ inline void BRep_Builder::UpdateEdge(const TopoDS_Edge& E,
UpdateEdge(E, C, TopLoc_Location(), Tol);
}
//=======================================================================
// function : UpdateEdge
// purpose :
//=======================================================================
//=================================================================================================
inline void BRep_Builder::UpdateEdge(const TopoDS_Edge& E,
const Handle(Geom2d_Curve)& C,
@@ -122,10 +104,7 @@ inline void BRep_Builder::UpdateEdge(const TopoDS_Edge& E,
UpdateEdge(E, C, BRep_Tool::Surface(F, l), l, Tol);
}
//=======================================================================
// function : UpdateEdge
// purpose :
//=======================================================================
//=================================================================================================
inline void BRep_Builder::UpdateEdge(const TopoDS_Edge& E,
const Handle(Geom2d_Curve)& C1,
@@ -137,20 +116,14 @@ inline void BRep_Builder::UpdateEdge(const TopoDS_Edge& E,
UpdateEdge(E, C1, C2, BRep_Tool::Surface(F, l), l, Tol);
}
//=======================================================================
// function : UpdateEdge
// purpose :
//=======================================================================
//=================================================================================================
inline void BRep_Builder::UpdateEdge(const TopoDS_Edge& E, const Handle(Poly_Polygon3D)& P) const
{
UpdateEdge(E, P, TopLoc_Location());
}
//=======================================================================
// function : UpdateEdge
// purpose :
//=======================================================================
//=================================================================================================
inline void BRep_Builder::UpdateEdge(const TopoDS_Edge& E,
const Handle(Poly_PolygonOnTriangulation)& P,
@@ -159,10 +132,7 @@ inline void BRep_Builder::UpdateEdge(const TopoDS_Edge&
UpdateEdge(E, P, T, TopLoc_Location());
}
//=======================================================================
// function : UpdateEdge
// purpose :
//=======================================================================
//=================================================================================================
inline void BRep_Builder::UpdateEdge(const TopoDS_Edge& E,
const Handle(Poly_PolygonOnTriangulation)& P1,
@@ -172,10 +142,7 @@ inline void BRep_Builder::UpdateEdge(const TopoDS_Edge&
UpdateEdge(E, P1, P2, T, TopLoc_Location());
}
//=======================================================================
// function : Range
// purpose :
//=======================================================================
//=================================================================================================
inline void BRep_Builder::Range(const TopoDS_Edge& E,
const TopoDS_Face& F,
@@ -186,10 +153,7 @@ inline void BRep_Builder::Range(const TopoDS_Edge& E,
Range(E, BRep_Tool::Surface(F, l), l, First, Last);
}
//=======================================================================
// function : MakeVertex
// purpose : undefined vertex
//=======================================================================
//=================================================================================================
inline void BRep_Builder::MakeVertex(TopoDS_Vertex& V) const
{
@@ -197,10 +161,7 @@ inline void BRep_Builder::MakeVertex(TopoDS_Vertex& V) const
MakeShape(V, TV);
}
//=======================================================================
// function : MakeVertex
// purpose : vertex from 3d point
//=======================================================================
//=================================================================================================
inline void BRep_Builder::MakeVertex(TopoDS_Vertex& V,
const gp_Pnt& P,

View File

@@ -14,10 +14,7 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
//=======================================================================
// function : SetUVPoints2
// purpose :
//=======================================================================
//=================================================================================================
inline void BRep_CurveOnClosedSurface::SetUVPoints2(const gp_Pnt2d& P1, const gp_Pnt2d& P2)
{
@@ -25,10 +22,7 @@ inline void BRep_CurveOnClosedSurface::SetUVPoints2(const gp_Pnt2d& P1, const gp
myUV22 = P2;
}
//=======================================================================
// function : UVPoints2
// purpose :
//=======================================================================
//=================================================================================================
inline void BRep_CurveOnClosedSurface::UVPoints2(gp_Pnt2d& P1, gp_Pnt2d& P2) const
{

View File

@@ -14,10 +14,7 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
//=======================================================================
// function : SetUVPoints
// purpose :
//=======================================================================
//=================================================================================================
inline void BRep_CurveOnSurface::SetUVPoints(const gp_Pnt2d& P1, const gp_Pnt2d& P2)
{
@@ -25,10 +22,7 @@ inline void BRep_CurveOnSurface::SetUVPoints(const gp_Pnt2d& P1, const gp_Pnt2d&
myUV2 = P2;
}
//=======================================================================
// function : UVPoints
// purpose :
//=======================================================================
//=================================================================================================
inline void BRep_CurveOnSurface::UVPoints(gp_Pnt2d& P1, gp_Pnt2d& P2) const
{

View File

@@ -14,20 +14,14 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
//=======================================================================
// function : Location
// purpose :
//=======================================================================
//=================================================================================================
inline const TopLoc_Location& BRep_CurveRepresentation::Location() const
{
return myLocation;
}
//=======================================================================
// function : Location
// purpose :
//=======================================================================
//=================================================================================================
inline void BRep_CurveRepresentation::Location(const TopLoc_Location& L)
{

View File

@@ -14,10 +14,7 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
//=======================================================================
// function : SetRange
// purpose :
//=======================================================================
//=================================================================================================
inline void BRep_GCurve::SetRange(const Standard_Real First, const Standard_Real Last)
{
@@ -26,10 +23,7 @@ inline void BRep_GCurve::SetRange(const Standard_Real First, const Standard_Real
Update();
}
//=======================================================================
// function : Range
// purpose :
//=======================================================================
//=================================================================================================
inline void BRep_GCurve::Range(Standard_Real& First, Standard_Real& Last) const
{
@@ -37,30 +31,21 @@ inline void BRep_GCurve::Range(Standard_Real& First, Standard_Real& Last) const
Last = myLast;
}
//=======================================================================
// function : First
// purpose :
//=======================================================================
//=================================================================================================
inline Standard_Real BRep_GCurve::First() const
{
return myFirst;
}
//=======================================================================
// function : Last
// purpose :
//=======================================================================
//=================================================================================================
inline Standard_Real BRep_GCurve::Last() const
{
return myLast;
}
//=======================================================================
// function : First
// purpose :
//=======================================================================
//=================================================================================================
inline void BRep_GCurve::First(const Standard_Real F)
{
@@ -68,10 +53,7 @@ inline void BRep_GCurve::First(const Standard_Real F)
Update();
}
//=======================================================================
// function : Last
// purpose :
//=======================================================================
//=================================================================================================
inline void BRep_GCurve::Last(const Standard_Real L)
{

View File

@@ -14,40 +14,28 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
//=======================================================================
// function : Location
// purpose :
//=======================================================================
//=================================================================================================
inline const TopLoc_Location& BRep_PointRepresentation::Location() const
{
return myLocation;
}
//=======================================================================
// function : Location
// purpose :
//=======================================================================
//=================================================================================================
inline void BRep_PointRepresentation::Location(const TopLoc_Location& L)
{
myLocation = L;
}
//=======================================================================
// function : Parameter
// purpose :
//=======================================================================
//=================================================================================================
inline Standard_Real BRep_PointRepresentation::Parameter() const
{
return myParameter;
}
//=======================================================================
// function : Parameter
// purpose :
//=======================================================================
//=================================================================================================
inline void BRep_PointRepresentation::Parameter(const Standard_Real P)
{

View File

@@ -14,30 +14,21 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
//=======================================================================
// function : Tolerance
// purpose :
//=======================================================================
//=================================================================================================
inline Standard_Real BRep_TEdge::Tolerance() const
{
return myTolerance;
}
//=======================================================================
// function : Tolerance
// purpose :
//=======================================================================
//=================================================================================================
inline void BRep_TEdge::Tolerance(const Standard_Real T)
{
myTolerance = T;
}
//=======================================================================
// function : UpdateTolerance
// purpose :
//=======================================================================
//=================================================================================================
inline void BRep_TEdge::UpdateTolerance(const Standard_Real T)
{
@@ -45,20 +36,14 @@ inline void BRep_TEdge::UpdateTolerance(const Standard_Real T)
myTolerance = T;
}
//=======================================================================
// function : Curves
// purpose :
//=======================================================================
//=================================================================================================
inline const BRep_ListOfCurveRepresentation& BRep_TEdge::Curves() const
{
return myCurves;
}
//=======================================================================
// function : ChangeCurves
// purpose :
//=======================================================================
//=================================================================================================
inline BRep_ListOfCurveRepresentation& BRep_TEdge::ChangeCurves()
{

View File

@@ -14,30 +14,21 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
//=======================================================================
// function : Tolerance
// purpose :
//=======================================================================
//=================================================================================================
inline Standard_Real BRep_TVertex::Tolerance() const
{
return myTolerance;
}
//=======================================================================
// function : Tolerance
// purpose :
//=======================================================================
//=================================================================================================
inline void BRep_TVertex::Tolerance(const Standard_Real T)
{
myTolerance = T;
}
//=======================================================================
// function : UpdateTolerance
// purpose :
//=======================================================================
//=================================================================================================
inline void BRep_TVertex::UpdateTolerance(const Standard_Real T)
{
@@ -45,40 +36,28 @@ inline void BRep_TVertex::UpdateTolerance(const Standard_Real T)
myTolerance = T;
}
//=======================================================================
// function : Pnt
// purpose :
//=======================================================================
//=================================================================================================
inline const gp_Pnt& BRep_TVertex::Pnt() const
{
return myPnt;
}
//=======================================================================
// function : Pnt
// purpose :
//=======================================================================
//=================================================================================================
inline void BRep_TVertex::Pnt(const gp_Pnt& P)
{
myPnt = P;
}
//=======================================================================
// function : Points
// purpose :
//=======================================================================
//=================================================================================================
inline const BRep_ListOfPointRepresentation& BRep_TVertex::Points() const
{
return myPoints;
}
//=======================================================================
// function : ChangePoints
// purpose :
//=======================================================================
//=================================================================================================
inline BRep_ListOfPointRepresentation& BRep_TVertex::ChangePoints()
{

View File

@@ -340,10 +340,8 @@ Standard_Boolean BRepTools_History::prepareModified(const TopoDS_Shape& theIniti
return Standard_True;
}
//==============================================================================
// data : myEmptyList
// purpose :
//==============================================================================
//=================================================================================================
const TopTools_ListOfShape BRepTools_History::myEmptyList;
//=================================================================================================
@@ -353,30 +351,22 @@ const TopTools_ListOfShape& BRepTools_History::emptyList()
return myEmptyList;
}
//==============================================================================
// data : myMsgUnsupportedType
// purpose :
//==============================================================================
//=================================================================================================
const char* BRepTools_History::myMsgUnsupportedType = "Error: unsupported shape type.";
//==============================================================================
// data : myMsgGeneratedAndRemoved
// purpose :
//==============================================================================
//=================================================================================================
const char* BRepTools_History::myMsgGeneratedAndRemoved =
"Error: a shape is generated and removed simultaneously.";
//==============================================================================
// data : myMsgModifiedAndRemoved
// purpose :
//==============================================================================
//=================================================================================================
const char* BRepTools_History::myMsgModifiedAndRemoved =
"Error: a shape is modified and removed simultaneously.";
//==============================================================================
// data : myMsgGeneratedAndModified
// purpose :
//==============================================================================
//=================================================================================================
const char* BRepTools_History::myMsgGeneratedAndModified =
"Error: a shape is generated and modified "
"from the same shape simultaneously.";

View File

@@ -16,10 +16,7 @@
#include <Standard_NoSuchObject.hxx>
//=======================================================================
// function : ModifiedShape
// purpose :
//=======================================================================
//=================================================================================================
inline const TopoDS_Shape& BRepTools_Modifier::ModifiedShape(const TopoDS_Shape& S) const
{
@@ -30,10 +27,8 @@ inline const TopoDS_Shape& BRepTools_Modifier::ModifiedShape(const TopoDS_Shape&
return myMap(S);
}
//=======================================================================
// function : IsDone
// purpose :
//=======================================================================
//=================================================================================================
inline Standard_Boolean BRepTools_Modifier::IsDone() const
{
return myDone;

View File

@@ -25,10 +25,7 @@
#include <TopoDS_CompSolid.hxx>
#include <TopoDS_Compound.hxx>
//=======================================================================
// function : MakeWire
// purpose : Make an empty wire
//=======================================================================
//=================================================================================================
inline void TopoDS_Builder::MakeWire(TopoDS_Wire& W) const
{
@@ -36,10 +33,7 @@ inline void TopoDS_Builder::MakeWire(TopoDS_Wire& W) const
MakeShape(W, TW);
}
//=======================================================================
// function : MakeShell
// purpose : Make an empty Shell
//=======================================================================
//=================================================================================================
inline void TopoDS_Builder::MakeShell(TopoDS_Shell& S) const
{
@@ -47,10 +41,7 @@ inline void TopoDS_Builder::MakeShell(TopoDS_Shell& S) const
MakeShape(S, TS);
}
//=======================================================================
// function : MakeSolid
// purpose : Make an empty Solid
//=======================================================================
//=================================================================================================
inline void TopoDS_Builder::MakeSolid(TopoDS_Solid& S) const
{

View File

@@ -14,47 +14,32 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
//=======================================================================
// function : TopoDS_HShape
// purpose :
//=======================================================================
//=================================================================================================
inline TopoDS_HShape::TopoDS_HShape() {}
//=======================================================================
// function : TopoDS_HShape
// purpose :
//=======================================================================
//=================================================================================================
inline TopoDS_HShape::TopoDS_HShape(const TopoDS_Shape& aShape)
: myShape(aShape)
{
}
//=======================================================================
// function : Shape
// purpose :
//=======================================================================
//=================================================================================================
inline void TopoDS_HShape::Shape(const TopoDS_Shape& aShape)
{
myShape = aShape;
}
//=======================================================================
// function : Shape
// purpose :
//=======================================================================
//=================================================================================================
inline const TopoDS_Shape& TopoDS_HShape::Shape() const
{
return myShape;
}
//=======================================================================
// function : ChangeShape
// purpose :
//=======================================================================
//=================================================================================================
inline TopoDS_Shape& TopoDS_HShape::ChangeShape()
{