mirror of
https://github.com/Open-Cascade-SAS/OCCT.git
synced 2026-08-31 07:17:46 +08:00
Coding - Apply Clang-Tidy automatic fixes (#1245)
Flags: aChecks="modernize-deprecated-headers,modernize-redundant-void-arg,modernize-use-bool-literals,modernize-use-equals-default,modernize-use-equals-delete,modernize-use-nullptr,modernize-use-override,performance-avoid-endl,performance-move-constructor-init,readability-braces-around-statements,readability-delete-null-pointer,readability-redundant-control-flow,readability-redundant-declaration,readability-redundant-function-ptr-dereference,readability-redundant-member-init,readability-redundant-string-init,readability-static-accessed-through-instance" clang-tidy version: 22.1.3
This commit is contained in:
@@ -39,17 +39,29 @@ GeomAbs_Shape BRepLProp::Continuity(const BRepAdaptor_Curve& C1,
|
||||
GeomAbs_Shape cont1 = C1.Continuity(), cont2 = C2.Continuity();
|
||||
int n1 = 0, n2 = 0;
|
||||
if (cont1 >= 5)
|
||||
{
|
||||
n1 = 3;
|
||||
}
|
||||
else if (cont1 == 4)
|
||||
{
|
||||
n1 = 2;
|
||||
}
|
||||
else if (cont1 == 2)
|
||||
{
|
||||
n1 = 1;
|
||||
}
|
||||
if (cont2 >= 5)
|
||||
{
|
||||
n2 = 3;
|
||||
}
|
||||
else if (cont2 == 4)
|
||||
{
|
||||
n2 = 2;
|
||||
}
|
||||
else if (cont2 == 2)
|
||||
{
|
||||
n2 = 1;
|
||||
}
|
||||
BRepLProp_CLProps clp1(C1, u1, n1, tl);
|
||||
BRepLProp_CLProps clp2(C2, u2, n2, tl);
|
||||
if (!(clp1.Value().IsEqual(clp2.Value(), tl)))
|
||||
@@ -62,9 +74,13 @@ GeomAbs_Shape BRepLProp::Continuity(const BRepAdaptor_Curve& C1,
|
||||
d1 = clp1.D1();
|
||||
d2 = clp2.D1();
|
||||
if (C1.Edge().Orientation() == TopAbs_REVERSED)
|
||||
{
|
||||
d1.Reverse();
|
||||
}
|
||||
if (C2.Edge().Orientation() == TopAbs_REVERSED)
|
||||
{
|
||||
d2.Reverse();
|
||||
}
|
||||
if (d1.IsEqual(d2, tl, ta))
|
||||
{
|
||||
cont = GeomAbs_C1;
|
||||
@@ -74,9 +90,13 @@ GeomAbs_Shape BRepLProp::Continuity(const BRepAdaptor_Curve& C1,
|
||||
clp1.Tangent(dir1);
|
||||
clp2.Tangent(dir2);
|
||||
if (C1.Edge().Orientation() == TopAbs_REVERSED)
|
||||
{
|
||||
dir1.Reverse();
|
||||
}
|
||||
if (C2.Edge().Orientation() == TopAbs_REVERSED)
|
||||
{
|
||||
dir2.Reverse();
|
||||
}
|
||||
if (dir1.IsEqual(dir2, ta))
|
||||
{
|
||||
cont = GeomAbs_G1;
|
||||
@@ -100,7 +120,9 @@ GeomAbs_Shape BRepLProp::Continuity(const BRepAdaptor_Curve& C1,
|
||||
const TopoDS_Edge& E1 = C1.Edge();
|
||||
const TopoDS_Edge& E2 = C2.Edge();
|
||||
if (E1.IsSame(E2) && C1.IsPeriodic() && cont >= GeomAbs_G1)
|
||||
{
|
||||
cont = GeomAbs_CN;
|
||||
}
|
||||
return cont;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user