mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-09-03 14:10:33 +03:00
# Correction of code style
This commit is contained in:
@@ -137,26 +137,26 @@ namespace
|
|||||||
bool CheckSelfIntersectArea (Standard_Integer idx1, Standard_Integer idx2, const gp_Pnt2d & intPnt)
|
bool CheckSelfIntersectArea (Standard_Integer idx1, Standard_Integer idx2, const gp_Pnt2d & intPnt)
|
||||||
{
|
{
|
||||||
gp_XY aPrevVec;
|
gp_XY aPrevVec;
|
||||||
Standard_Real aSumS = 0.;
|
Standard_Real aSumS = 0.;
|
||||||
const gp_XY& aRefPnt = intPnt.Coord ();
|
const gp_XY& aRefPnt = intPnt.Coord ();
|
||||||
Standard_Integer start = -1;
|
Standard_Integer aStart = -1;
|
||||||
Standard_Integer end = -1;
|
Standard_Integer aEnd = -1;
|
||||||
|
|
||||||
// we should consider the shortest loop
|
// we should consider the shortest loop
|
||||||
if ((idx2 - idx1) < (mySegments->Size () - idx2 + idx1))
|
if ((idx2 - idx1) < (mySegments->Size () - idx2 + idx1))
|
||||||
{
|
{
|
||||||
start = idx1;
|
aStart = idx1;
|
||||||
end = idx2;
|
aEnd = idx2;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
start = idx2;
|
aStart = idx2;
|
||||||
end = idx1;
|
aEnd = idx1;
|
||||||
}
|
}
|
||||||
|
|
||||||
while (start < end)
|
while (aStart < aEnd)
|
||||||
{
|
{
|
||||||
const BRepMesh_FaceChecker::Segment& aSeg = mySegments->Value (start);
|
const BRepMesh_FaceChecker::Segment& aSeg = mySegments->Value (aStart);
|
||||||
gp_XY aCurVec = aSeg.Point2->XY () - aRefPnt;
|
gp_XY aCurVec = aSeg.Point2->XY () - aRefPnt;
|
||||||
|
|
||||||
if (aCurVec.SquareModulus () > gp::Resolution () && aPrevVec.SquareModulus () > gp::Resolution ())
|
if (aCurVec.SquareModulus () > gp::Resolution () && aPrevVec.SquareModulus () > gp::Resolution ())
|
||||||
@@ -166,10 +166,10 @@ namespace
|
|||||||
|
|
||||||
aPrevVec = aCurVec;
|
aPrevVec = aCurVec;
|
||||||
|
|
||||||
++start;
|
++aStart;
|
||||||
if (start > mySegments->Upper ())
|
if (aStart > mySegments->Upper ())
|
||||||
{
|
{
|
||||||
start = mySegments->Lower ();
|
aStart = mySegments->Lower ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -197,7 +197,8 @@ namespace
|
|||||||
return Standard_False;
|
return Standard_False;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mySelfSegmentIndex != -1 && CheckSelfIntersectArea (mySelfSegmentIndex, theSegmentIndex, aIntPnt))
|
if (mySelfSegmentIndex != -1 &&
|
||||||
|
CheckSelfIntersectArea (mySelfSegmentIndex, theSegmentIndex, aIntPnt))
|
||||||
{
|
{
|
||||||
return Standard_False;
|
return Standard_False;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user