1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +03:00

Coding - Update method guards for consistency #333

Apply new regex replacement with method's guards in .cxx
Update GH workflow with style checking
This commit is contained in:
Pasukhin Dmitry
2025-02-03 12:16:00 +01:00
committed by GitHub
parent 3ce9ec7651
commit 1f386af59f
283 changed files with 4815 additions and 9694 deletions

View File

@@ -243,10 +243,8 @@ void Select3D_InteriorSensitivePointSet::Swap(const Standard_Integer theIdx1,
myPolygonsIdxs->ChangeValue(theIdx2) = aPolygIdx1;
}
// =======================================================================
// function : overlapsElement
// purpose :
// =======================================================================
//=================================================================================================
Standard_Boolean Select3D_InteriorSensitivePointSet::overlapsElement(
SelectBasics_PickResult& thePickResult,
SelectBasics_SelectingVolumeManager& theMgr,
@@ -260,10 +258,8 @@ Standard_Boolean Select3D_InteriorSensitivePointSet::overlapsElement(
return theMgr.OverlapsPolygon(aPoints->Array1(), Select3D_TOS_INTERIOR, thePickResult);
}
// =======================================================================
// function : elementIsInside
// purpose :
// =======================================================================
//=================================================================================================
Standard_Boolean Select3D_InteriorSensitivePointSet::elementIsInside(
SelectBasics_SelectingVolumeManager& theMgr,
Standard_Integer theElemIdx,
@@ -313,10 +309,8 @@ Standard_Integer Select3D_InteriorSensitivePointSet::NbSubElements() const
return myPlanarPolygons.Length();
}
// =======================================================================
// function : DumpJson
// purpose :
// =======================================================================
//=================================================================================================
void Select3D_InteriorSensitivePointSet::DumpJson(Standard_OStream& theOStream,
Standard_Integer theDepth) const
{

View File

@@ -326,10 +326,8 @@ Standard_Boolean Select3D_SensitiveGroup::overlapsElement(
return Standard_False;
}
// =======================================================================
// function : elementIsInside
// purpose :
// =======================================================================
//=================================================================================================
Standard_Boolean Select3D_SensitiveGroup::elementIsInside(
SelectBasics_SelectingVolumeManager& theMgr,
Standard_Integer theElemIdx,
@@ -349,10 +347,8 @@ Standard_Real Select3D_SensitiveGroup::distanceToCOG(SelectBasics_SelectingVolum
return theMgr.DistToGeometryCenter(CenterOfGeometry());
}
// =======================================================================
// function : DumpJson
// purpose :
// =======================================================================
//=================================================================================================
void Select3D_SensitiveGroup::DumpJson(Standard_OStream& theOStream,
Standard_Integer theDepth) const
{

View File

@@ -455,10 +455,8 @@ gp_Pnt Select3D_SensitivePoly::CenterOfGeometry() const
return myCOG;
}
// =======================================================================
// function : DumpJson
// purpose :
// =======================================================================
//=================================================================================================
void Select3D_SensitivePoly::DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN(theOStream)

View File

@@ -167,10 +167,8 @@ private:
NCollection_Array1<Handle(Select3D_SensitivePrimitiveArray)>& myGroups;
};
// =======================================================================
// function : Select3D_SensitivePrimitiveArray
// purpose :
// =======================================================================
//=================================================================================================
Select3D_SensitivePrimitiveArray::Select3D_SensitivePrimitiveArray(
const Handle(SelectMgr_EntityOwner)& theOwnerId)
: Select3D_SensitiveSet(theOwnerId),
@@ -197,10 +195,8 @@ Select3D_SensitivePrimitiveArray::Select3D_SensitivePrimitiveArray(
//
}
// =======================================================================
// function : SetDetectElementMap
// purpose :
// =======================================================================
//=================================================================================================
void Select3D_SensitivePrimitiveArray::SetDetectElementMap(bool theToDetect)
{
if (!theToDetect)
@@ -219,10 +215,8 @@ void Select3D_SensitivePrimitiveArray::SetDetectElementMap(bool theToDetect)
}
}
// =======================================================================
// function : SetDetectNodeMap
// purpose :
// =======================================================================
//=================================================================================================
void Select3D_SensitivePrimitiveArray::SetDetectNodeMap(bool theToDetect)
{
if (!theToDetect)
@@ -241,10 +235,8 @@ void Select3D_SensitivePrimitiveArray::SetDetectNodeMap(bool theToDetect)
}
}
// =======================================================================
// function : InitTriangulation
// purpose :
// =======================================================================
//=================================================================================================
bool Select3D_SensitivePrimitiveArray::InitTriangulation(
const Handle(Graphic3d_Buffer)& theVerts,
const Handle(Graphic3d_IndexBuffer)& theIndices,
@@ -408,10 +400,8 @@ bool Select3D_SensitivePrimitiveArray::InitTriangulation(
return true;
}
// =======================================================================
// function : InitPoints
// purpose :
// =======================================================================
//=================================================================================================
bool Select3D_SensitivePrimitiveArray::InitPoints(const Handle(Graphic3d_Buffer)& theVerts,
const Handle(Graphic3d_IndexBuffer)& theIndices,
const TopLoc_Location& theInitLoc,
@@ -586,10 +576,8 @@ bool Select3D_SensitivePrimitiveArray::InitPoints(const Handle(Graphic3d_Buffer)
return true;
}
// =======================================================================
// function : GetConnected
// purpose :
// =======================================================================
//=================================================================================================
Handle(Select3D_SensitiveEntity) Select3D_SensitivePrimitiveArray::GetConnected()
{
Handle(Select3D_SensitivePrimitiveArray) aNewEntity =
@@ -637,10 +625,8 @@ void Select3D_SensitivePrimitiveArray::Set(const Handle(SelectMgr_EntityOwner)&
}
}
// =======================================================================
// function : BVH
// purpose :
// =======================================================================
//=================================================================================================
void Select3D_SensitivePrimitiveArray::BVH()
{
if (!myContent.IsDirty())
@@ -671,19 +657,15 @@ void Select3D_SensitivePrimitiveArray::BVH()
}
}
// =======================================================================
// function : Size
// purpose :
// =======================================================================
//=================================================================================================
Standard_Integer Select3D_SensitivePrimitiveArray::Size() const
{
return myBvhIndices.NbElements;
}
// =======================================================================
// function : Box
// purpose :
// =======================================================================
//=================================================================================================
Select3D_BndBox3d Select3D_SensitivePrimitiveArray::Box(const Standard_Integer theIdx) const
{
const Standard_Integer anElemIdx = myBvhIndices.Index(theIdx);
@@ -756,10 +738,8 @@ Select3D_BndBox3d Select3D_SensitivePrimitiveArray::Box(const Standard_Integer t
return aBox;
}
// =======================================================================
// function : Center
// purpose :
// =======================================================================
//=================================================================================================
Standard_Real Select3D_SensitivePrimitiveArray::Center(const Standard_Integer theIdx,
const Standard_Integer theAxis) const
{
@@ -775,10 +755,8 @@ Standard_Real Select3D_SensitivePrimitiveArray::Center(const Standard_Integer th
return theAxis == 0 ? aCenter.x() : (theAxis == 1 ? aCenter.y() : aCenter.z());
}
// =======================================================================
// function : Swap
// purpose :
// =======================================================================
//=================================================================================================
void Select3D_SensitivePrimitiveArray::Swap(const Standard_Integer theIdx1,
const Standard_Integer theIdx2)
{
@@ -798,10 +776,8 @@ void Select3D_SensitivePrimitiveArray::Swap(const Standard_Integer theIdx1,
}
}
// =======================================================================
// function : BoundingBox
// purpose :
// =======================================================================
//=================================================================================================
Select3D_BndBox3d Select3D_SensitivePrimitiveArray::BoundingBox()
{
if (!myBndBox.IsValid())
@@ -811,10 +787,8 @@ Select3D_BndBox3d Select3D_SensitivePrimitiveArray::BoundingBox()
return applyTransformation();
}
// =======================================================================
// function : computeBoundingBox
// purpose :
// =======================================================================
//=================================================================================================
void Select3D_SensitivePrimitiveArray::computeBoundingBox()
{
myBndBox.Clear();
@@ -852,10 +826,8 @@ void Select3D_SensitivePrimitiveArray::computeBoundingBox()
}
}
// =======================================================================
// function : applyTransformation
// purpose :
// =======================================================================
//=================================================================================================
Select3D_BndBox3d Select3D_SensitivePrimitiveArray::applyTransformation()
{
if (!HasInitLocation())
@@ -881,10 +853,8 @@ Select3D_BndBox3d Select3D_SensitivePrimitiveArray::applyTransformation()
return aBndBox;
}
// =======================================================================
// function : Matches
// purpose :
// =======================================================================
//=================================================================================================
Standard_Boolean Select3D_SensitivePrimitiveArray::Matches(
SelectBasics_SelectingVolumeManager& theMgr,
SelectBasics_PickResult& thePickResult)
@@ -960,10 +930,8 @@ Standard_Boolean Select3D_SensitivePrimitiveArray::Matches(
return Standard_True;
}
// =======================================================================
// function : overlapsElement
// purpose :
// =======================================================================
//=================================================================================================
Standard_Boolean Select3D_SensitivePrimitiveArray::overlapsElement(
SelectBasics_PickResult& thePickResult,
SelectBasics_SelectingVolumeManager& theMgr,
@@ -1119,20 +1087,16 @@ Standard_Boolean Select3D_SensitivePrimitiveArray::overlapsElement(
return aResult;
}
// =======================================================================
// function : distanceToCOG
// purpose :
// =======================================================================
//=================================================================================================
Standard_Real Select3D_SensitivePrimitiveArray::distanceToCOG(
SelectBasics_SelectingVolumeManager& theMgr)
{
return theMgr.DistToGeometryCenter(myCDG3D);
}
// =======================================================================
// function : elementIsInside
// purpose :
// =======================================================================
//=================================================================================================
Standard_Boolean Select3D_SensitivePrimitiveArray::elementIsInside(
SelectBasics_SelectingVolumeManager& theMgr,
Standard_Integer theElemIdx,
@@ -1232,10 +1196,8 @@ Standard_Boolean Select3D_SensitivePrimitiveArray::elementIsInside(
}
}
// =======================================================================
// function : DumpJson
// purpose :
// =======================================================================
//=================================================================================================
void Select3D_SensitivePrimitiveArray::DumpJson(Standard_OStream& theOStream,
Standard_Integer theDepth) const
{

View File

@@ -17,10 +17,8 @@
IMPLEMENT_STANDARD_RTTIEXT(Select3D_SensitiveSphere, Select3D_SensitiveEntity)
// ==================================================
// Function: Select3D_SensitiveSphere
// Purpose :
// ==================================================
//=================================================================================================
Select3D_SensitiveSphere::Select3D_SensitiveSphere(const Handle(SelectMgr_EntityOwner)& theOwnerId,
const gp_Pnt& theCenter,
const Standard_Real theRadius)
@@ -31,10 +29,8 @@ Select3D_SensitiveSphere::Select3D_SensitiveSphere(const Handle(SelectMgr_Entity
{
}
// ==================================================
// Function: Mathes
// Purpose :
// ==================================================
//=================================================================================================
Standard_Boolean Select3D_SensitiveSphere::Matches(SelectBasics_SelectingVolumeManager& theMgr,
SelectBasics_PickResult& thePickResult)
{
@@ -60,10 +56,8 @@ Standard_Boolean Select3D_SensitiveSphere::Matches(SelectBasics_SelectingVolumeM
return Standard_True;
}
// ==================================================
// Function: GetConnected
// Purpose :
// ==================================================
//=================================================================================================
Handle(Select3D_SensitiveEntity) Select3D_SensitiveSphere::GetConnected()
{
Handle(Select3D_SensitiveEntity) aNewEntity =
@@ -71,10 +65,8 @@ Handle(Select3D_SensitiveEntity) Select3D_SensitiveSphere::GetConnected()
return aNewEntity;
}
// ==================================================
// Function: BoundingBox
// Purpose :
// ==================================================
//=================================================================================================
Select3D_BndBox3d Select3D_SensitiveSphere::BoundingBox()
{
const SelectMgr_Vec3 aMinPnt =

View File

@@ -243,10 +243,8 @@ Select3D_BndBox3d Select3D_SensitiveTriangulation::Box(const Standard_Integer th
return Select3D_BndBox3d(aMinPnt, aMaxPnt);
}
// =======================================================================
// function : Matches
// purpose :
// =======================================================================
//=================================================================================================
Standard_Boolean Select3D_SensitiveTriangulation::Matches(
SelectBasics_SelectingVolumeManager& theMgr,
SelectBasics_PickResult& thePickResult)
@@ -490,10 +488,8 @@ Select3D_BndBox3d Select3D_SensitiveTriangulation::BoundingBox()
return applyTransformation();
}
// =======================================================================
// function : computeBoundingBox
// purpose :
// =======================================================================
//=================================================================================================
void Select3D_SensitiveTriangulation::computeBoundingBox()
{
myBndBox.Clear();
@@ -553,10 +549,8 @@ gp_GTrsf Select3D_SensitiveTriangulation::InvInitLocation() const
return myInvInitLocation;
}
// =======================================================================
// function : DumpJson
// purpose :
// =======================================================================
//=================================================================================================
void Select3D_SensitiveTriangulation::DumpJson(Standard_OStream& theOStream,
Standard_Integer theDepth) const
{

View File

@@ -117,10 +117,8 @@ Standard_Boolean Select3D_SensitiveWire::overlapsElement(
return aSeg->Matches(theMgr, thePickResult);
}
// =======================================================================
// function : elementIsInside
// purpose :
// =======================================================================
//=================================================================================================
Standard_Boolean Select3D_SensitiveWire::elementIsInside(
SelectBasics_SelectingVolumeManager& theMgr,
Standard_Integer theElemIdx,
@@ -216,10 +214,8 @@ gp_Pnt Select3D_SensitiveWire::CenterOfGeometry() const
return myCenter;
}
// =======================================================================
// function : DumpJson
// purpose :
// =======================================================================
//=================================================================================================
void Select3D_SensitiveWire::DumpJson(Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN(theOStream)