mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
Coding - Isolate long attached comments for clang-format #259
Automatically update code with clang-format disabling for avoiding formatting. You can check the python script in GitHub PR
This commit is contained in:
@@ -89,7 +89,9 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
|
||||
gp_Pnt P1 = ElCLib::Value(0., myCircle);
|
||||
gp_Pnt P2 = ElCLib::Value(M_PI, myCircle);
|
||||
|
||||
// clang-format off
|
||||
gce_MakePln mkPln(P1, P2, Apex); // create a plane which defines plane for projection aPosition on it
|
||||
// clang-format on
|
||||
|
||||
gp_Vec aVector( mkPln.Value().Location(), aPosition ); //project aPosition on a plane
|
||||
gp_Vec Normal = mkPln.Value().Axis().Direction();
|
||||
@@ -110,6 +112,7 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
|
||||
OppositePnt = P1;
|
||||
}
|
||||
|
||||
// clang-format off
|
||||
aPnt = AttachmentPnt ; // Creating of circle which defines a plane for a dimension arc
|
||||
gp_Vec Vec(AttachmentPnt, Apex); // Dimension arc is a part of the circle
|
||||
Vec.Scale(2.);
|
||||
@@ -119,6 +122,7 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
|
||||
|
||||
Standard_Integer i;
|
||||
Standard_Real AttParam = ElCLib::Parameter(aCircle2, AttachmentPnt); //must be equal to zero (look circle construction)
|
||||
// clang-format on
|
||||
Standard_Real OppParam = ElCLib::Parameter(aCircle2, OppositePnt);
|
||||
|
||||
while ( AttParam >= 2. * M_PI ) AttParam -= 2. * M_PI;
|
||||
@@ -135,7 +139,9 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
|
||||
|
||||
Standard_Boolean IsArrowOut = Standard_True; //Is arrows inside or outside of the cone
|
||||
if( ElCLib::Parameter(aCircle2, tmpPnt) < OppParam )
|
||||
// clang-format off
|
||||
if( 2. * myCircle.Radius() > 4. * myArrowSize ) IsArrowOut = Standard_False; //four times more than an arrow size
|
||||
// clang-format on
|
||||
|
||||
Standard_Real angle = OppParam - AttParam;
|
||||
Standard_Real param = AttParam;
|
||||
|
@@ -95,7 +95,9 @@ void DsgPrs_EllipseRadiusPresentation::Add (const Handle(Prs3d_Presentation)& aP
|
||||
if(!IsInDomain)
|
||||
{
|
||||
const Standard_Real uLast = ElCLib::Parameter ( anEllipse, anEndOfArrow );
|
||||
// clang-format off
|
||||
const Standard_Real Alpha = DsgPrs::DistanceFromApex(anEllipse, anEndOfArrow, uFirst);//length of ellipse arc
|
||||
// clang-format on
|
||||
gp_Vec Vapex(aCenter, ElCLib::Value( uLast, anEllipse )) ;
|
||||
gp_Vec Vpnt(aCenter, ElCLib::Value( uFirst, anEllipse )) ;
|
||||
gp_Dir dir(Vpnt ^ Vapex);
|
||||
@@ -142,7 +144,9 @@ void DsgPrs_EllipseRadiusPresentation::Add (const Handle(Prs3d_Presentation)& aP
|
||||
aBEllipse.SetMajorRadius(aBEllipse.MajorRadius() + Offset);
|
||||
aBEllipse.SetMinorRadius(aBEllipse.MinorRadius() + Offset);
|
||||
const Standard_Real uLast = ElCLib::Parameter ( aBEllipse, anEndOfArrow );
|
||||
// clang-format off
|
||||
const Standard_Real Alpha = DsgPrs::DistanceFromApex(aBEllipse, anEndOfArrow, uFirst);//length of ellipse arc
|
||||
// clang-format on
|
||||
gp_Pnt p1;
|
||||
aCurve->D0(uFirst, p1);
|
||||
gp_Vec Vapex(aCenter, anEndOfArrow) ;
|
||||
|
@@ -67,7 +67,9 @@ void DsgPrs_MidPointPresentation::Add (const Handle(Prs3d_Presentation)& aPresen
|
||||
|
||||
// segment from mid point to the text position
|
||||
aPrims->AddBound(2);
|
||||
// clang-format off
|
||||
aPrims->AddVertex(Position.IsEqual(MidPoint,rad)? MidPoint : ElCLib::Value(ElCLib::Parameter(aCircleM,Position),aCircleM)); // mid point
|
||||
// clang-format on
|
||||
aPrims->AddVertex(Position); // text position
|
||||
|
||||
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
|
||||
@@ -87,7 +89,9 @@ void DsgPrs_MidPointPresentation::Add (const Handle(Prs3d_Presentation)& aPresen
|
||||
|
||||
// segment from mid point to the geometry
|
||||
Handle(Graphic3d_ArrayOfSegments) aPrims = new Graphic3d_ArrayOfSegments(2);
|
||||
// clang-format off
|
||||
aPrims->AddVertex(ElCLib::Value(ElCLib::Parameter(aCircleM,AttachPoint),aCircleM)); // mid point
|
||||
// clang-format on
|
||||
aPrims->AddVertex(AttachPoint); // attach point to the geometry
|
||||
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
|
||||
}
|
||||
@@ -139,7 +143,9 @@ void DsgPrs_MidPointPresentation::Add (const Handle(Prs3d_Presentation)& aPresen
|
||||
|
||||
// segment from mid point to the text position
|
||||
aPrims->AddBound(2);
|
||||
// clang-format off
|
||||
aPrims->AddVertex(Position.IsEqual(MidPoint,rad)? MidPoint : ElCLib::Value(ElCLib::Parameter(aCircleM,Position),aCircleM)); // mid point
|
||||
// clang-format on
|
||||
aPrims->AddVertex(Position); // text position
|
||||
|
||||
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
|
||||
@@ -213,7 +219,9 @@ void DsgPrs_MidPointPresentation::Add (const Handle(Prs3d_Presentation)& aPresen
|
||||
|
||||
// segment from mid point to the text position
|
||||
aPrims->AddBound(2);
|
||||
// clang-format off
|
||||
aPrims->AddVertex(Position.IsEqual(MidPoint,rad)? MidPoint : ElCLib::Value(ElCLib::Parameter(aCircleM,Position),aCircleM)); // mid point
|
||||
// clang-format on
|
||||
aPrims->AddVertex(Position); // text position
|
||||
|
||||
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
|
||||
@@ -227,7 +235,9 @@ void DsgPrs_MidPointPresentation::Add (const Handle(Prs3d_Presentation)& aPresen
|
||||
{
|
||||
// segment from mid point to the geometry
|
||||
aPrims = new Graphic3d_ArrayOfSegments(2);
|
||||
// clang-format off
|
||||
aPrims->AddVertex(ElCLib::Value(ElCLib::Parameter(aCircleM,AttachPoint),aCircleM)); // mid point
|
||||
// clang-format on
|
||||
aPrims->AddVertex(AttachPoint); // attach point to the geometry
|
||||
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
|
||||
}
|
||||
@@ -289,7 +299,9 @@ void DsgPrs_MidPointPresentation::Add (const Handle(Prs3d_Presentation)& aPresen
|
||||
|
||||
// segment from mid point to the text position
|
||||
aPrims->AddBound(2);
|
||||
// clang-format off
|
||||
aPrims->AddVertex(Position.IsEqual(MidPoint,rad)? MidPoint : ElCLib::Value(ElCLib::Parameter(aCircleM,Position),aCircleM)); // mid point
|
||||
// clang-format on
|
||||
aPrims->AddVertex(Position); // text position
|
||||
|
||||
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
|
||||
@@ -303,7 +315,9 @@ void DsgPrs_MidPointPresentation::Add (const Handle(Prs3d_Presentation)& aPresen
|
||||
{
|
||||
// segment from mid point to the geometry
|
||||
aPrims = new Graphic3d_ArrayOfSegments(2);
|
||||
// clang-format off
|
||||
aPrims->AddVertex(ElCLib::Value(ElCLib::Parameter(aCircleM,AttachPoint),aCircleM)); // mid point
|
||||
// clang-format on
|
||||
aPrims->AddVertex(AttachPoint); // attach point to the geometry
|
||||
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
|
||||
}
|
||||
|
Reference in New Issue
Block a user