0027756: Visualization - add Draw() method taking Graphic3d_Group to tools Prs3d_Arro...
authorkgv <kgv@opencascade.com>
Wed, 10 Aug 2016 07:55:07 +0000 (10:55 +0300)
committerbugmaster <bugmaster@opencascade.com>
Thu, 11 Aug 2016 09:41:24 +0000 (12:41 +0300)
and deprecate Draw() methods taking Prs3d_Presentation.

40 files changed:
samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Direction.cpp
samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Text.cpp
samples/mfc/standard/02_Modeling/src/ISession_Direction.cpp
samples/mfc/standard/Common/Primitive/Sample2D_Text.cpp
src/AIS/AIS_ColorScale.cxx
src/AIS/AIS_Dimension.cxx
src/AIS/AIS_TextLabel.cxx
src/DsgPrs/DsgPrs.cxx
src/DsgPrs/DsgPrs_AnglePresentation.cxx
src/DsgPrs/DsgPrs_Chamf2dPresentation.cxx
src/DsgPrs/DsgPrs_DatumPrs.cxx
src/DsgPrs/DsgPrs_DiameterPresentation.cxx
src/DsgPrs/DsgPrs_EllipseRadiusPresentation.cxx
src/DsgPrs/DsgPrs_EqualDistancePresentation.cxx
src/DsgPrs/DsgPrs_EqualRadiusPresentation.cxx
src/DsgPrs/DsgPrs_FilletRadiusPresentation.cxx
src/DsgPrs/DsgPrs_IdenticPresentation.cxx
src/DsgPrs/DsgPrs_LengthPresentation.cxx
src/DsgPrs/DsgPrs_MidPointPresentation.cxx
src/DsgPrs/DsgPrs_OffsetPresentation.cxx
src/DsgPrs/DsgPrs_ParalPresentation.cxx
src/DsgPrs/DsgPrs_RadiusPresentation.cxx
src/DsgPrs/DsgPrs_ShapeDirPresentation.cxx
src/DsgPrs/DsgPrs_SymbPresentation.cxx
src/DsgPrs/DsgPrs_SymmetricPresentation.cxx
src/DsgPrs/DsgPrs_TangentPresentation.cxx
src/DsgPrs/DsgPrs_XYZAxisPresentation.cxx
src/Prs3d/FILES
src/Prs3d/Prs3d_Arrow.cxx
src/Prs3d/Prs3d_Arrow.hxx
src/Prs3d/Prs3d_Root.cxx [deleted file]
src/Prs3d/Prs3d_Root.hxx
src/Prs3d/Prs3d_Text.cxx
src/Prs3d/Prs3d_Text.hxx
src/QABugs/QABugs_19.cxx
src/StdPrs/StdPrs_Curve.cxx
src/StdPrs/StdPrs_DeflectionCurve.cxx
src/StdPrs/StdPrs_Plane.cxx
src/StdPrs/StdPrs_PoleCurve.cxx
src/XCAFPrs/XCAFPrs_AISObject.cxx

index 94b21f1..fe084f1 100755 (executable)
@@ -87,7 +87,7 @@ void ISession_Direction::Compute (const Handle(PrsMgr_PresentationManager3d)& /*
   Prs3d_Root::CurrentGroup (aPresentation)->SetPrimitivesAspect (myDrawer->LineAspect()->Aspect());
   Prs3d_Root::CurrentGroup (aPresentation)->AddPrimitiveArray (aPrims);
   // Draw arrow
-  Prs3d_Arrow::Draw (aPresentation,
+  Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation),
                      aLastPoint,
                      myDir,
                      anArrowAspect->Angle(),
@@ -97,7 +97,7 @@ void ISession_Direction::Compute (const Handle(PrsMgr_PresentationManager3d)& /*
   if (myText.Length() != 0)
   {
     gp_Pnt aTextPosition = aLastPoint;
-    Prs3d_Text::Draw (aPresentation,
+    Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation),
                       myDrawer->TextAspect(),
                       myText,
                       aTextPosition);
index f12e597..29a5286 100755 (executable)
@@ -64,7 +64,7 @@ void ISession_Text::Compute(const Handle(PrsMgr_PresentationManager3d)& /*aPrese
                             const Handle(Prs3d_Presentation)& aPresentation,
                             const Standard_Integer /*aMode*/)
 {
-    Prs3d_Text::Draw(aPresentation,myDrawer,MyText,gp_Pnt(  MyX ,MyY,MyZ ));
+  Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), myDrawer->TextAspect(), MyText, gp_Pnt(MyX, MyY, MyZ));
 }
 
 void ISession_Text::Compute(const Handle(Prs3d_Projector)& /*aProjector*/,
index 6743c63..833f4ba 100755 (executable)
@@ -45,7 +45,7 @@ void ISession_Direction::Compute(const Handle(PrsMgr_PresentationManager3d)& /*a
   Prs3d_Root::CurrentGroup (aPresentation)->SetPrimitivesAspect (myDrawer->LineAspect()->Aspect());
   Prs3d_Root::CurrentGroup (aPresentation)->AddPrimitiveArray (aPrims);
   // Draw arrow
-  Prs3d_Arrow::Draw (aPresentation,
+  Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation),
                      myEndPnt,
                      gp_Dir (gp_Vec(myStartPnt, myEndPnt)),
                      anArrowAspect->Angle(),
index 607f698..db2bebe 100755 (executable)
@@ -47,5 +47,5 @@ void Sample2D_Text::Compute (const Handle(PrsMgr_PresentationManager3d)& /*aPres
   asp->Aspect()->SetTextAngle(myAngle);
   asp->Aspect()->SetTextFontAspect(myFontAspect);
   asp->SetHeight(myHeight);
-  Prs3d_Text::Draw(aPresentation, asp, myText, myPosition);
+  Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), asp, myText, myPosition);
 }
index daadd8a..b8fada3 100644 (file)
@@ -762,7 +762,7 @@ void AIS_ColorScale::drawText (const Handle(Prs3d_Presentation)& thePresentation
   anAspect->Aspect()->SetTextZoomable (Standard_True);
   anAspect->Aspect()->SetTextAngle (0.0);
   anAspect->Aspect()->SetTextFontAspect (Font_FA_Regular);
-  Prs3d_Text::Draw (thePresentation, anAspect, theText,gp_Pnt (theX,theY,0.0));
+  Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (thePresentation), anAspect, theText,gp_Pnt (theX,theY,0.0));
 }
 
 //=======================================================================
index 8139c05..a9fd50d 100755 (executable)
@@ -340,20 +340,19 @@ void AIS_Dimension::DrawArrow (const Handle(Prs3d_Presentation)& thePresentation
                                const gp_Pnt& theLocation,
                                const gp_Dir& theDirection)
 {
-  Prs3d_Root::NewGroup (thePresentation);
+  Handle(Graphic3d_Group) aGroup = Prs3d_Root::NewGroup (thePresentation);
 
   Quantity_Length aLength = myDrawer->DimensionAspect()->ArrowAspect()->Length();
   Standard_Real   anAngle = myDrawer->DimensionAspect()->ArrowAspect()->Angle();
 
   if (myDrawer->DimensionAspect()->IsArrows3d())
   {
-    Prs3d_Arrow::Draw (thePresentation,
+    Prs3d_Arrow::Draw (aGroup,
                        theLocation,
                        theDirection,
                        anAngle,
                        aLength);
-
-    Prs3d_Root::CurrentGroup (thePresentation)->SetGroupPrimitivesAspect (myDrawer->DimensionAspect()->ArrowAspect()->Aspect());
+    aGroup->SetGroupPrimitivesAspect (myDrawer->DimensionAspect()->ArrowAspect()->Aspect());
   }
   else
   {
@@ -379,8 +378,8 @@ void AIS_Dimension::DrawArrow (const Handle(Prs3d_Presentation)& thePresentation
     aShadingStyle->SetColor (myDrawer->DimensionAspect()->ArrowAspect()->Aspect()->Color());
     aShadingStyle->SetMaterial (aShadeMat);
 
-    Prs3d_Root::CurrentGroup (thePresentation)->SetPrimitivesAspect (aShadingStyle->Aspect());
-    Prs3d_Root::CurrentGroup (thePresentation)->AddPrimitiveArray (anArrow);
+    aGroup->SetPrimitivesAspect (aShadingStyle->Aspect());
+    aGroup->AddPrimitiveArray (anArrow);
   }
 
   SelectionGeometry::Arrow& aSensitiveArrow = mySelectionGeom.NewArrow();
@@ -532,7 +531,7 @@ void AIS_Dimension::drawText (const Handle(Prs3d_Presentation)& thePresentation,
   // generate primitives for 2D text
   myDrawer->DimensionAspect()->TextAspect()->Aspect()->SetDisplayType (Aspect_TODT_DIMENSION);
 
-  Prs3d_Text::Draw (thePresentation,
+  Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (thePresentation),
                     myDrawer->DimensionAspect()->TextAspect(),
                     theText,
                     theTextPos);
index 863ec5f..6033cc0 100644 (file)
@@ -298,7 +298,7 @@ void AIS_TextLabel::Compute (const Handle(PrsMgr_PresentationManager3d)& /*thePr
 
         gp_Ax2 anOrientation = myOrientation3D;
         anOrientation.SetLocation (aPosition);
-        Prs3d_Text::Draw (thePrs, anAsp, myText, myOrientation3D, !myHasFlipping);
+        Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (thePrs), anAsp, myText, myOrientation3D, !myHasFlipping);
         if (myHasFlipping && isInit)
         {
           Prs3d_Root::CurrentGroup (thePrs)->SetFlippingOptions (Standard_False, gp_Ax2());
@@ -306,7 +306,7 @@ void AIS_TextLabel::Compute (const Handle(PrsMgr_PresentationManager3d)& /*thePr
       }
       else
       {
-        Prs3d_Text::Draw (thePrs, anAsp, myText, Position());
+        Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (thePrs), anAsp, myText, Position());
       }
 
       break;
index bbb3d5b..9acb962 100644 (file)
@@ -70,8 +70,7 @@ void DsgPrs::ComputeSymbol (const Handle(Prs3d_Presentation)& aPresentation,
     }
   case DsgPrs_AS_FIRSTAR:
     {
-
-      Prs3d_Arrow::Draw(aPresentation,
+      Prs3d_Arrow::Draw(Prs3d_Root::CurrentGroup (aPresentation),
                    pt1,
                    dir1,
                    LA->ArrowAspect()->Angle(),
@@ -81,7 +80,7 @@ void DsgPrs::ComputeSymbol (const Handle(Prs3d_Presentation)& aPresentation,
   case DsgPrs_AS_LASTAR:
     {
 
-      Prs3d_Arrow::Draw(aPresentation,
+      Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation),
                    pt2,
                    dir2,
                    LA->ArrowAspect()->Angle(),
@@ -91,12 +90,12 @@ void DsgPrs::ComputeSymbol (const Handle(Prs3d_Presentation)& aPresentation,
 
   case DsgPrs_AS_BOTHAR:
     {
-      Prs3d_Arrow::Draw(aPresentation,
+      Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation),
                    pt1,
                    dir1,
                    LA->ArrowAspect()->Angle(),
                    LA->ArrowAspect()->Length());  
-      Prs3d_Arrow::Draw(aPresentation,
+      Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation),
                    pt2,
                    dir2,
                    LA->ArrowAspect()->Angle(),
@@ -145,7 +144,7 @@ void DsgPrs::ComputeSymbol (const Handle(Prs3d_Presentation)& aPresentation,
   case DsgPrs_AS_FIRSTAR_LASTPT:
     {
       // an Arrow
-      Prs3d_Arrow::Draw(aPresentation,
+      Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation),
                         pt1,
                         dir1,
                         LA->ArrowAspect()->Angle(),
@@ -167,7 +166,7 @@ void DsgPrs::ComputeSymbol (const Handle(Prs3d_Presentation)& aPresentation,
         Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray (anArrayOfPoints);
       }
       // an Arrow
-      Prs3d_Arrow::Draw(aPresentation,
+      Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation),
                         pt2,
                         dir2,
                         LA->ArrowAspect()->Angle(),
index d85b204..f71d8d7 100644 (file)
@@ -171,7 +171,7 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
   param = ElCLib::Parameter(aCircle2, tmpPnt);
   tmpPnt = ElCLib::Value(param, aCircle2);
   tmpPnt = tmpPnt.Translated(gp_Vec(0, 0, -2));
-  Prs3d_Text::Draw(aPresentation, aDimensionAspect->TextAspect(), txt, tmpPnt);   //add the TCollection_ExtendedString
+  Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), aDimensionAspect->TextAspect(), txt, tmpPnt);
 
   angle = 2. * M_PI - param ; 
   if( param > OppParam )
@@ -230,7 +230,8 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
   sprintf(valcar,"%5.2f",theval);
 
   Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
-  Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
+  Handle(Graphic3d_Group) aGroup = Prs3d_Root::CurrentGroup (aPresentation);
+  aGroup->SetPrimitivesAspect(LA->LineAspect()->Aspect());
 
   gp_Ax2 ax(CenterPoint,axisdir,dir1);
   gp_Circ cer(ax,CenterPoint.Distance(OffsetPoint));
@@ -277,7 +278,7 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
   for (Standard_Integer i = 1; i<=nbp; i++)
     aPrims->AddVertex(ElCLib::Value(udeb+ dteta*(i-1),cer));
 
-  Prs3d_Text::Draw(aPresentation,LA->TextAspect(),aText,OffsetPoint);
+  Prs3d_Text::Draw (aGroup, LA->TextAspect(), aText, OffsetPoint);
   
   Standard_Real length = LA->ArrowAspect()->Length();
   if (length <  Precision::Confusion()) length = 1.e-04;
@@ -297,7 +298,7 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
   gp_Vec v2(ptarr,ptarr3);
   const Standard_Real beta = v1.Angle(v2);
   dirarr.Rotate(ax1, beta);
-  Prs3d_Arrow::Draw(aPresentation,ptarr,dirarr,LA->ArrowAspect()->Angle(),length);
+  Prs3d_Arrow::Draw (aGroup, ptarr, dirarr, LA->ArrowAspect()->Angle(), length);
 
   aPrims->AddBound(2);
   aPrims->AddVertex(AttachmentPoint1);
@@ -308,13 +309,13 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
   ax1.SetLocation(ptarr);
   gp_Dir dirarr2(vecarr);
   dirarr2.Rotate(ax1,-beta);
-  Prs3d_Arrow::Draw(aPresentation,ptarr,dirarr2,LA->ArrowAspect()->Angle(),length);
+  Prs3d_Arrow::Draw (aGroup, ptarr, dirarr2, LA->ArrowAspect()->Angle(), length);
 
   aPrims->AddBound(2);
   aPrims->AddVertex(AttachmentPoint2);
   aPrims->AddVertex(ptarr);
 
-  Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+  aGroup->AddPrimitiveArray (aPrims);
 }
 
 
@@ -398,7 +399,7 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
   DsgPrs::ComputeSymbol( aPresentation, LA, EndOfArrow1, EndOfArrow2, DirOfArrow1, DirOfArrow2, ArrowPrs );
   
   // Drawing the text
-  Prs3d_Text::Draw( aPresentation, LA->TextAspect(), aText, OffsetPoint );
+  Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), aText, OffsetPoint);
   
   // Line from AttachmentPoint1 to end of Arrow1
   aPrims->AddVertex(AttachmentPoint1);
@@ -514,7 +515,7 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
   for (Standard_Integer i = 1; i<=nbp; i++)
     aPrims->AddVertex(ElCLib::Value(udeb+ dteta*(i-1),cer));
   
-  Prs3d_Text::Draw(aPresentation,LA->TextAspect(),aText,OffsetPoint);
+  Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), aText,OffsetPoint);
   
   Standard_Real length = LA->ArrowAspect()->Length();
   if (length <  Precision::Confusion()) length = 1.e-04;
@@ -533,7 +534,7 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
   gp_Vec v2(ptarr,ptarr3);
   const Standard_Real beta = v1.Angle(v2);
   dirarr.Rotate(ax1, beta);
-  Prs3d_Arrow::Draw(aPresentation,ptarr,dirarr,LA->ArrowAspect()->Angle(),length);
+  Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), ptarr, dirarr, LA->ArrowAspect()->Angle(), length);
 
   aPrims->AddBound(2);
   aPrims->AddVertex(AttachmentPoint1);
@@ -544,7 +545,7 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
   ax1.SetLocation(ptarr);
   gp_Dir dirarr2(vecarr);
   dirarr2.Rotate(ax1,  - beta);
-  Prs3d_Arrow::Draw(aPresentation,ptarr,dirarr2,LA->ArrowAspect()->Angle(),length);  
+  Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), ptarr, dirarr2, LA->ArrowAspect()->Angle(), length);
   
   aPrims->AddBound(2);
   aPrims->AddVertex(AttachmentPoint2);
@@ -625,7 +626,7 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
   for (Standard_Integer i = 1; i<=nbp; i++)
     aPrims->AddVertex(ElCLib::Value(udeb+ dteta*(i-1),cer));
 
-  Prs3d_Text::Draw(aPresentation,LA->TextAspect(),aText,OffsetPoint);
+  Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), aText, OffsetPoint);
   
   Standard_Real length = LA->ArrowAspect()->Length();
   if (length <  Precision::Confusion()) length = 1.e-04;
@@ -741,7 +742,7 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
   for (Standard_Integer i = 1; i<=nbp; i++)
     aPrims->AddVertex(ElCLib::Value(udeb+ dteta*(i-1),cer));
 
-  Prs3d_Text::Draw(aPresentation,LA->TextAspect(),aText,OffsetPoint);
+  Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), aText, OffsetPoint);
 
   Standard_Real length = LA->ArrowAspect()->Length();
   if (length <  Precision::Confusion()) length = 1.e-04;
@@ -761,7 +762,7 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
   const Standard_Real beta = v1.Angle(v2);
   dirarr.Rotate(ax1, beta);
 
-  Prs3d_Arrow::Draw(aPresentation,ptarr,dirarr,LA->ArrowAspect()->Angle(),length);
+  Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), ptarr, dirarr, LA->ArrowAspect()->Angle(), length);
 
   aPrims->AddBound(2);
   aPrims->AddVertex(AttachmentPoint1);
@@ -772,7 +773,7 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
   gp_Dir dirarr2(vecarr);
   dirarr2.Rotate(ax1, -beta);
 
-  Prs3d_Arrow::Draw(aPresentation,ptarr,dirarr2,LA->ArrowAspect()->Angle(),length);
+  Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), ptarr, dirarr2, LA->ArrowAspect()->Angle(), length);
   
   aPrims->AddBound(2);
   aPrims->AddVertex(AttachmentPoint2);
@@ -817,21 +818,21 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
     case DsgPrs_AS_FIRSTAR:
     {
       ElCLib::D1(uc1,cer,ptarr,vecarr);
-      Prs3d_Arrow::Draw(aPresentation,ptarr,gp_Dir(-vecarr),LA->ArrowAspect()->Angle(),length);
+      Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), ptarr, gp_Dir(-vecarr), LA->ArrowAspect()->Angle(), length);
       break;
     }
     case DsgPrs_AS_LASTAR:
     {
       ElCLib::D1(uc2,cer,ptarr,vecarr);
-      Prs3d_Arrow::Draw(aPresentation,ptarr,gp_Dir(vecarr),LA->ArrowAspect()->Angle(),length);
+      Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), ptarr, gp_Dir(vecarr), LA->ArrowAspect()->Angle(), length);
       break;
     }
     case DsgPrs_AS_BOTHAR:
     {
       ElCLib::D1(uc1,cer,ptarr,vecarr);
-      Prs3d_Arrow::Draw(aPresentation,ptarr,gp_Dir(-vecarr),LA->ArrowAspect()->Angle(),length);
+      Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), ptarr, gp_Dir(-vecarr), LA->ArrowAspect()->Angle(), length);
       ElCLib::D1(uc2,cer,ptarr,vecarr);
-      Prs3d_Arrow::Draw(aPresentation,ptarr,gp_Dir(vecarr),LA->ArrowAspect()->Angle(),length);
+      Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), ptarr, gp_Dir(vecarr), LA->ArrowAspect()->Angle(), length);
       break;
     }
     default: break;
index aa88f78..83be363 100644 (file)
@@ -46,9 +46,9 @@ void DsgPrs_Chamf2dPresentation::Add(
   Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
 
   gp_Dir ArrowDir(aPntAttach.XYZ()-aPntEnd.XYZ());
-  Prs3d_Arrow::Draw(aPresentation,aPntAttach,ArrowDir,LA->ArrowAspect()->Angle(),LA->ArrowAspect()->Length());
+  Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), aPntAttach, ArrowDir, LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
                     
-  Prs3d_Text::Draw(aPresentation,LA->TextAspect(),aText,aPntEnd);
+  Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), aText, aPntEnd);
 }
 
 
@@ -74,7 +74,7 @@ void DsgPrs_Chamf2dPresentation::Add(
   aPrims->AddVertex(aPntEnd);
   Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
 
-  Prs3d_Text::Draw(aPresentation,LA->TextAspect(),aText,aPntEnd);
+  Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), aText, aPntEnd);
 
   gp_Dir ArrowDir(aPntAttach.XYZ()-aPntEnd.XYZ());
   gp_Dir ArrowDir1 = ArrowDir;
index 13e5dd8..698192a 100755 (executable)
@@ -55,7 +55,7 @@ void DsgPrs_DatumPrs::Add (const Handle(Prs3d_Presentation)& thePresentation,
     aGroup->AddPrimitiveArray(aPrims);
 
     aGroup->SetPrimitivesAspect(theDrawer->ArrowAspect()->Aspect());
-    Prs3d_Arrow::Draw(thePresentation,aPoint1,aXDir,anArrowAngle,anAxisLength/10.);
+    Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (thePresentation), aPoint1, aXDir, anArrowAngle, anAxisLength/10.);
     aGroup->SetPrimitivesAspect(theDrawer->TextAspect()->Aspect());
     Graphic3d_Vertex aVertex1(aPoint1.X(),aPoint1.Y(),aPoint1.Z());
     if (toDrawLabels)
@@ -73,7 +73,7 @@ void DsgPrs_DatumPrs::Add (const Handle(Prs3d_Presentation)& thePresentation,
     aGroup->AddPrimitiveArray(aPrims);
 
     aGroup->SetPrimitivesAspect(theDrawer->ArrowAspect()->Aspect());
-    Prs3d_Arrow::Draw(thePresentation,aPoint2,aYDir,anArrowAngle,anAxisLength/10.);
+    Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (thePresentation), aPoint2, aYDir, anArrowAngle, anAxisLength/10.);
     aGroup->SetPrimitivesAspect(theDrawer->TextAspect()->Aspect());
     Graphic3d_Vertex aVertex2(aPoint2.X(),aPoint2.Y(),aPoint2.Z());
     if (toDrawLabels)
@@ -93,7 +93,7 @@ void DsgPrs_DatumPrs::Add (const Handle(Prs3d_Presentation)& thePresentation,
     aGroup->AddPrimitiveArray(aPrims);
 
     aGroup->SetPrimitivesAspect(theDrawer->ArrowAspect()->Aspect());
-    Prs3d_Arrow::Draw(thePresentation,aPoint3,aZDir,anArrowAngle,anAxisLength/10.);
+    Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (thePresentation), aPoint3, aZDir, anArrowAngle, anAxisLength/10.);
     aGroup->SetPrimitivesAspect(theDrawer->TextAspect()->Aspect());
     Graphic3d_Vertex aVertex3(aPoint3.X(),aPoint3.Y(),aPoint3.Z());
     if (toDrawLabels)
index c13f8da..ecd6d42 100644 (file)
@@ -79,7 +79,7 @@ void DsgPrs_DiameterPresentation::Add (const Handle(Prs3d_Presentation)& aPresen
   TCollection_ExtendedString Text = aText;
   if(IsDiamSymbol) 
     Text = TCollection_ExtendedString("\330  ") +  aText; // VRO (2007-05-17) inserted a blank.
-  Prs3d_Text::Draw(aPresentation, LA->TextAspect(), Text, AttachmentPoint);
+  Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), Text, AttachmentPoint);
 
   // arrows
   gp_Dir arrdir (vecrap);
@@ -191,7 +191,7 @@ void DsgPrs_DiameterPresentation::Add (const Handle(Prs3d_Presentation)& aPresen
   TCollection_ExtendedString Text = aText;
   if(IsDiamSymbol)
     Text = TCollection_ExtendedString("\330 ") +  Text;//  => \330 | \370?
-  Prs3d_Text::Draw(aPresentation,LA->TextAspect(),Text,DrawPosition);
+  Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), Text, DrawPosition);
 
   // Add presentation of arrow 
   gp_Dir DirOfArrow(gp_Vec(DrawPosition, EndOfArrow).XYZ()); 
index 110ab77..e6deeea 100644 (file)
@@ -71,7 +71,7 @@ void DsgPrs_EllipseRadiusPresentation::Add (const Handle(Prs3d_Presentation)& aP
   // value
   TCollection_ExtendedString Text(IsMaxRadius? "a = " : "b = ");
   Text += aText;
-  Prs3d_Text::Draw(aPresentation, LA->TextAspect(), Text, aPosition );
+  Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), Text, aPosition);
 
   // arrows
   gp_Dir arrdir( gp_Vec( aCenter, anEndOfArrow));
index ba6c1d9..b255d3b 100644 (file)
@@ -112,7 +112,7 @@ void DsgPrs_EqualDistancePresentation::Add( const Handle( Prs3d_Presentation )&
   TCollection_ExtendedString aText("==");
 
   //Draw the text
-  Prs3d_Text::Draw(aPresentation,LA->TextAspect(), aText, aTextPos);
+  Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation),LA->TextAspect(), aText, aTextPos);
 }
 
 
index e52bc93..b3349ea 100644 (file)
@@ -91,6 +91,6 @@ void DsgPrs_EqualRadiusPresentation::Add( const Handle( Prs3d_Presentation )& aP
   }
   
   //Draw the text
-  Prs3d_Text::Draw(aPresentation, LA->TextAspect(),aText, aTextPos);
+  Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), aText, aTextPos);
 //ota === end ===     
 }
index ca38183..6c4ffe2 100644 (file)
@@ -119,7 +119,7 @@ void DsgPrs_FilletRadiusPresentation::Add (const Handle(Prs3d_Presentation)& aPr
   Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
 
   // Drawing the text
-  Prs3d_Text::Draw(aPresentation, LA->TextAspect(), aText, DrawPosition);
+  Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), aText, DrawPosition);
    
   // Add presentation of arrows
   DsgPrs::ComputeSymbol( aPresentation, LA, EndOfArrow, EndOfArrow, DirOfArrow, DirOfArrow, ArrowPrs );
index 67d4aa0..9c197a6 100644 (file)
@@ -60,7 +60,7 @@ void DsgPrs_IdenticPresentation::Add( const Handle(Prs3d_Presentation)& aPresent
   Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray (anArrayOfPoints);
 
   // texte 
-  Prs3d_Text::Draw(aPresentation,LA->TextAspect(),aText,aPntOffset);
+  Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), aText, aPntOffset);
 }
 
 
@@ -96,7 +96,7 @@ void DsgPrs_IdenticPresentation::Add( const Handle(Prs3d_Presentation)& aPresent
   Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
 
   // texte 
-  Prs3d_Text::Draw(aPresentation,LA->TextAspect(),aText,aPntOffset);
+  Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), aText, aPntOffset);
 }
 
 
@@ -144,7 +144,7 @@ void DsgPrs_IdenticPresentation::Add(const Handle(Prs3d_Presentation)& aPresenta
   Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
 
   // texte 
-  Prs3d_Text::Draw(aPresentation,LA->TextAspect(),aText,aPntOffset);
+  Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), aText, aPntOffset);
 }
 
 // jfa 16/10/2000
@@ -193,7 +193,7 @@ void DsgPrs_IdenticPresentation::Add(const Handle(Prs3d_Presentation)& aPresenta
   Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
 
   // texte 
-  Prs3d_Text::Draw(aPresentation,LA->TextAspect(),aText,aPntOffset);
+  Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), aText, aPntOffset);
 }
 // jfa 16/10/2000 end
 
@@ -238,6 +238,6 @@ void DsgPrs_IdenticPresentation::Add(const Handle(Prs3d_Presentation)& aPresenta
   Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
 
   // texte 
-  Prs3d_Text::Draw(aPresentation,LA->TextAspect(),aText,aPntOffset);
+  Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), aText, aPntOffset);
 }
 // jfa 10/10/2000 end
index cae16ab..6518940 100644 (file)
@@ -91,18 +91,18 @@ void DsgPrs_LengthPresentation::Add (const Handle(Prs3d_Presentation)& aPresenta
     arrdir.Reverse();
 
   // arrow 1 : 2nd group
-  Prs3d_Arrow::Draw(aPresentation,Proj1,arrdir, LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
+  Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), Proj1, arrdir, LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
 
   Prs3d_Root::NewGroup(aPresentation);
   Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
   
   // arrow 2 : 3rd group
-  Prs3d_Arrow::Draw(aPresentation,Proj2,arrdir.Reversed(), LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
+  Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), Proj2, arrdir.Reversed(), LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
 
   Prs3d_Root::NewGroup(aPresentation);
   
   // text : 4th group
-  Prs3d_Text::Draw(aPresentation,LA->TextAspect(),aText,offp);
+  Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), aText, offp);
   
   Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
 
@@ -175,7 +175,7 @@ void DsgPrs_LengthPresentation::Add( const Handle(Prs3d_Presentation)& aPresenta
   DsgPrs::ComputeSymbol( aPresentation, LA, EndOfArrow1, EndOfArrow2, DirOfArrow1, DirOfArrow1.Reversed(), ArrowPrs );
  
   // Drawing the text
-  Prs3d_Text::Draw( aPresentation, LA->TextAspect(), aText, OffsetPoint );
+  Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), aText, OffsetPoint);
 
   // Line from AttachmentPoint1 to end of Arrow1
   aPrims->AddVertex(AttachmentPoint1);
@@ -258,7 +258,7 @@ void DsgPrs_LengthPresentation::Add (const Handle(Prs3d_Presentation)& aPresenta
   Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
 
   // text 
-  Prs3d_Text::Draw(aPresentation,LA->TextAspect(),aText,offp);
+  Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), aText, offp);
 
   // symbols at the extremities of the face
   DsgPrs::ComputeSymbol(aPresentation,LA,Proj1,Proj2,arrdir,arrdir.Reversed(),ArrowPrs);
@@ -326,7 +326,7 @@ void DsgPrs_LengthPresentation::Add( const Handle(Prs3d_Presentation)& aPresenta
   DsgPrs::ComputeSymbol( aPresentation, LA, AttachmentPoint1, EndOfArrow2, DirOfArrow1, DirOfArrow1.Reversed(), ArrowPrs );
  
   // Drawing the text
-  Prs3d_Text::Draw( aPresentation, LA->TextAspect(), aText, OffsetPoint );
+  Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), aText, OffsetPoint);
  
   // Two curves from end of Arrow2 to AttachmentPoint2
   Standard_Real Alpha, delta;
@@ -375,21 +375,21 @@ void DsgPrs_LengthPresentation::Add (const Handle(Prs3d_Presentation)& aPrs,
   switch(ArrowPrs)
   {
     case DsgPrs_AS_LASTAR:
-    Prs3d_Arrow::Draw(aPrs,Pt2,gp_Dir(gp_Vec(Pt1,Pt2)), 
+    Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPrs), Pt2, gp_Dir(gp_Vec(Pt1,Pt2)), 
                      aDrawer->DimensionAspect()->ArrowAspect()->Angle(),
                      aDrawer->DimensionAspect()->ArrowAspect()->Length());
     break;
     case DsgPrs_AS_FIRSTAR:
-    Prs3d_Arrow::Draw(aPrs,Pt1,gp_Dir(gp_Vec(Pt2,Pt1)), 
+    Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPrs), Pt1, gp_Dir(gp_Vec(Pt2,Pt1)), 
                      aDrawer->DimensionAspect()->ArrowAspect()->Angle(),
                      aDrawer->DimensionAspect()->ArrowAspect()->Length());
     break;
     case DsgPrs_AS_BOTHAR:
     V = gp_Vec(Pt1,Pt2);
-    Prs3d_Arrow::Draw(aPrs,Pt2,gp_Dir(V), 
+    Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPrs), Pt2, gp_Dir(V), 
                      aDrawer->DimensionAspect()->ArrowAspect()->Angle(),
                      aDrawer->DimensionAspect()->ArrowAspect()->Length());
-    Prs3d_Arrow::Draw(aPrs,Pt1,gp_Dir(V.Reversed()), 
+    Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPrs), Pt1, gp_Dir(V.Reversed()), 
                      aDrawer->DimensionAspect()->ArrowAspect()->Angle(),
                      aDrawer->DimensionAspect()->ArrowAspect()->Length());
     break;
index 7b155aa..e4a037c 100644 (file)
@@ -80,7 +80,7 @@ void DsgPrs_MidPointPresentation::Add (const Handle(Prs3d_Presentation)& aPresen
 
     // texte 
     TCollection_ExtendedString aText(" (+)");
-    Prs3d_Text::Draw(aPresentation,LA->TextAspect(),aText,Position);
+    Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), aText, Position);
   }
 
   if ( !AttachPoint.IsEqual(MidPoint, Precision::Confusion()) )
@@ -152,7 +152,7 @@ void DsgPrs_MidPointPresentation::Add (const Handle(Prs3d_Presentation)& aPresen
 
     // texte
     TCollection_ExtendedString aText (" (+)");
-    Prs3d_Text::Draw(aPresentation,LA->TextAspect(),aText,Position);
+    Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), aText, Position);
   }
 
   if ( !AttachPoint.IsEqual(MidPoint, Precision::Confusion()) )
@@ -226,7 +226,7 @@ void DsgPrs_MidPointPresentation::Add (const Handle(Prs3d_Presentation)& aPresen
 
     // texte 
     TCollection_ExtendedString aText (" (+)");
-    Prs3d_Text::Draw(aPresentation,LA->TextAspect(),aText,Position);
+    Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), aText, Position);
   }
 
   if ( !AttachPoint.IsEqual(MidPoint, Precision::Confusion()) )
@@ -302,7 +302,7 @@ void DsgPrs_MidPointPresentation::Add (const Handle(Prs3d_Presentation)& aPresen
 
     // texte 
     TCollection_ExtendedString aText (" (+)");
-    Prs3d_Text::Draw(aPresentation,LA->TextAspect(),aText,Position);
+    Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), aText, Position);
   }
 
   if ( !AttachPoint.IsEqual(MidPoint, Precision::Confusion()) )
index a650414..64e3f71 100644 (file)
@@ -98,8 +98,8 @@ void DsgPrs_OffsetPresentation::Add (const Handle(Prs3d_Presentation)& aPresenta
 
   if (DimNulle)
   {
-    Prs3d_Arrow::Draw(aPresentation,offp,L4.Direction(),LA->ArrowAspect()->Angle(),LA->ArrowAspect()->Length());
-    Prs3d_Arrow::Draw(aPresentation,offp,L4.Direction().Reversed(),LA->ArrowAspect()->Angle(),LA->ArrowAspect()->Length());
+    Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), offp, L4.Direction(), LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
+    Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), offp, L4.Direction().Reversed(), LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
   }
   else
   {
@@ -110,7 +110,7 @@ void DsgPrs_OffsetPresentation::Add (const Handle(Prs3d_Presentation)& aPresenta
       arrdir.Reverse();
 
     // fleche 1 : 2eme groupe
-    Prs3d_Arrow::Draw(aPresentation,Proj1,arrdir,LA->ArrowAspect()->Angle(),LA->ArrowAspect()->Length());
+    Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), Proj1, arrdir, LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
 
     Prs3d_Root::NewGroup(aPresentation);
     Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
@@ -126,7 +126,7 @@ void DsgPrs_OffsetPresentation::Add (const Handle(Prs3d_Presentation)& aPresenta
     Prs3d_Root::NewGroup(aPresentation);
 
     // texte : 4eme groupe
-    Prs3d_Text::Draw(aPresentation,LA->TextAspect(),aText,offp);
+    Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), aText, offp);
   }
 
   Prs3d_Root::NewGroup(aPresentation);
index e48e7b5..c391aa0 100644 (file)
@@ -87,18 +87,18 @@ void DsgPrs_ParalPresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
     arrdir.Reverse();
 
   // arrow 1 : 2nd group
-  Prs3d_Arrow::Draw(aPresentation,Proj1,arrdir,LA->ArrowAspect()->Angle(),LA->ArrowAspect()->Length());
+  Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), Proj1, arrdir, LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
 
   Prs3d_Root::NewGroup(aPresentation);
   Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
   
   // arrow 2 : 3rd group
-  Prs3d_Arrow::Draw(aPresentation,Proj2,arrdir.Reversed(),LA->ArrowAspect()->Angle(),LA->ArrowAspect()->Length());
+  Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), Proj2, arrdir.Reversed(), LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
 
   Prs3d_Root::NewGroup(aPresentation);
   
   // text : 4th group
-  Prs3d_Text::Draw(aPresentation,LA->TextAspect(),aText,offp);
+  Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), aText, offp);
 
   Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
 
@@ -180,7 +180,7 @@ void DsgPrs_ParalPresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
   Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
 
   // text 
-  Prs3d_Text::Draw(aPresentation,LA->TextAspect(),aText,offp);
+  Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), aText, offp);
   
   //arrows
   DsgPrs::ComputeSymbol(aPresentation,LA,Proj1,Proj2,arrdir,arrdir.Reversed(),ArrowPrs);
index dc60814..48dd7cb 100644 (file)
@@ -121,10 +121,10 @@ void DsgPrs_RadiusPresentation::Add (const Handle(Prs3d_Presentation)& aPresenta
     arrdir.Reverse();
 
   // fleche
-  Prs3d_Arrow::Draw(aPresentation,ptoncirc,arrdir,LA->ArrowAspect()->Angle(),LA->ArrowAspect()->Length());
+  Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), ptoncirc, arrdir, LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
 
   // texte
-  Prs3d_Text::Draw(aPresentation,LA->TextAspect(),aText,attpoint);
+  Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), aText, attpoint);
 }
 
 //=======================================================================
@@ -155,7 +155,7 @@ void DsgPrs_RadiusPresentation::Add( const Handle(Prs3d_Presentation)& aPresenta
   Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
 
   // text
-  Prs3d_Text::Draw( aPresentation, LA->TextAspect(), aText, AttachmentPoint );
+  Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), aText, AttachmentPoint);
 
   gp_Dir ArrowDir = gce_MakeDir( LineOrigin , LineEnd );
   if (reverseArrow)
index 5b483d3..88fcd4f 100644 (file)
@@ -257,5 +257,5 @@ void DsgPrs_ShapeDirPresentation::Add(const Handle(Prs3d_Presentation)& prs,
   aPrims->AddVertex(pt2);
   Prs3d_Root::CurrentGroup(prs)->AddPrimitiveArray(aPrims);
 
-  Prs3d_Arrow::Draw(prs, pt2, dir, M_PI/180.*10., leng*0.3);
+  Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (prs), pt2, dir, M_PI/180.*10., leng*0.3);
 }
index ae6f94b..98cb2e5 100644 (file)
@@ -37,7 +37,7 @@ void DsgPrs_SymbPresentation::Add (const Handle(Prs3d_Presentation)& aPresentati
   Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
   Handle(Prs3d_TextAspect) TA = LA->TextAspect();
   TA->SetColor(Quantity_NOC_GREEN);
-  Prs3d_Text::Draw(aPresentation,TA,aText, OffsetPoint);
+  Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), TA, aText, OffsetPoint);
   
   // 2eme groupe : marker
   Handle(Geom_CartesianPoint) theP = new Geom_CartesianPoint(OffsetPoint);
index d1aba85..3e429ae 100644 (file)
@@ -334,10 +334,10 @@ void DsgPrs_SymmetricPresentation::Add (const Handle(Prs3d_Presentation)& aPrese
   gp_Dir arrdir = L3.Direction().Reversed();
   if (outside) arrdir.Reverse();
   // arrow 1 ----
-  Prs3d_Arrow::Draw(aPresentation,P1,arrdir,LA->ArrowAspect()->Angle(),LA->ArrowAspect()->Length());
+  Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), P1, arrdir, LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
   
   // arrow 2 ----
-  Prs3d_Arrow::Draw(aPresentation,P2,arrdir.Reversed(),LA->ArrowAspect()->Angle(),LA->ArrowAspect()->Length());
+  Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), P2, arrdir.Reversed(), LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
 
   //-------------------------------------------------------------------------------------
   //|                                SYMBOL OF SYMMETRY                                 |
@@ -581,10 +581,10 @@ void DsgPrs_SymmetricPresentation::Add (const Handle(Prs3d_Presentation)& aPrese
   gp_Dir arrdir = L3.Direction().Reversed();
   if (outside) arrdir.Reverse();
   // arrow 1 ----
-  Prs3d_Arrow::Draw(aPresentation,P1,arrdir,LA->ArrowAspect()->Angle(),LA->ArrowAspect()->Length());
+  Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), P1, arrdir, LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
   
   // arrow 2 ----
-  Prs3d_Arrow::Draw(aPresentation,P2,arrdir.Reversed(),LA->ArrowAspect()->Angle(),LA->ArrowAspect()->Length());
+  Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), P2, arrdir.Reversed(), LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
 
   //-------------------------------------------------------------------------------------
   //|                                SYMBOL OF SYMMETRY                                 |
@@ -797,10 +797,10 @@ void DsgPrs_SymmetricPresentation::Add (const Handle(Prs3d_Presentation)& aPrese
     gp_Dir arrdir = L3.Direction().Reversed();
     if (outside) arrdir.Reverse();
     // arrow 1 ----
-    Prs3d_Arrow::Draw(aPresentation,P1,arrdir,LA->ArrowAspect()->Angle(),LA->ArrowAspect()->Length());
+    Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), P1, arrdir, LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
   
     // arrow 2 ----
-    Prs3d_Arrow::Draw(aPresentation,P2,arrdir.Reversed(),LA->ArrowAspect()->Angle(),LA->ArrowAspect()->Length());
+    Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), P2, arrdir.Reversed(), LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
     
     //==== POINTS ================
     //Marker of localization of attachment points:
index bf3cf4d..417c9ec 100644 (file)
@@ -62,10 +62,10 @@ void DsgPrs_TangentPresentation::Add (const Handle(Prs3d_Presentation)& aPresent
   // fleche 1 : 
   Prs3d_Root::NewGroup(aPresentation);
   Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
-  Prs3d_Arrow::Draw(aPresentation,p1,aDirection,LA->ArrowAspect()->Angle(),LA->ArrowAspect()->Length());
+  Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), p1, aDirection, LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
 
   // fleche 2
   Prs3d_Root::NewGroup(aPresentation);
   Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
-  Prs3d_Arrow::Draw(aPresentation,p2,aDirection.Reversed(),LA->ArrowAspect()->Angle(),LA->ArrowAspect()->Length());
+  Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), p2, aDirection.Reversed(), LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
 }
index 5b45c32..e169657 100644 (file)
@@ -48,7 +48,7 @@ void DsgPrs_XYZAxisPresentation::Add(
   aPrims->AddVertex(aPlast);
   G->AddPrimitiveArray(aPrims);
  
-  Prs3d_Arrow::Draw(aPresentation,aPlast,aDir,M_PI/180.*10.,aVal/10.);
+  Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), aPlast,aDir, M_PI/180.*10., aVal/10.);
 
   Graphic3d_Vertex a2(aPlast.X(),aPlast.Y(),aPlast.Z());
   Prs3d_Root::CurrentGroup(aPresentation)->Text(aText,a2,1./81.);
@@ -74,7 +74,7 @@ void DsgPrs_XYZAxisPresentation::Add(const Handle(Prs3d_Presentation)& aPresenta
   G->AddPrimitiveArray(aPrims);
 
   G->SetPrimitivesAspect( anArrowAspect->Aspect() );
-  Prs3d_Arrow::Draw(aPresentation,aPlast,aDir,M_PI/180.*10.,aVal/10.);
+  Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), aPlast, aDir, M_PI/180.*10., aVal/10.);
 
   G->SetPrimitivesAspect(aTextAspect->Aspect());
   Graphic3d_Vertex a2(aPlast.X(),aPlast.Y(),aPlast.Z());
index daa96b6..4bd4270 100755 (executable)
@@ -37,7 +37,6 @@ Prs3d_PresentationShadow.cxx
 Prs3d_PresentationShadow.hxx
 Prs3d_Projector.cxx
 Prs3d_Projector.hxx
-Prs3d_Root.cxx
 Prs3d_Root.hxx
 Prs3d_ShadingAspect.cxx
 Prs3d_ShadingAspect.hxx
index 369c69d..619d6aa 100644 (file)
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <Prs3d_Arrow.hxx>
 
 #include <gp_Dir.hxx>
 #include <gp_Pnt.hxx>
 #include <Graphic3d_ArrayOfPolylines.hxx>
 #include <Graphic3d_ArrayOfSegments.hxx>
 #include <Graphic3d_Group.hxx>
-#include <Prs3d_Arrow.hxx>
 #include <Prs3d_Presentation.hxx>
 
 //=======================================================================
 //function : Draw
 //purpose  : 
 //=======================================================================
-void Prs3d_Arrow::Draw(const Handle(Prs3d_Presentation)& aPresentation,
+void Prs3d_Arrow::Draw(const Handle(Graphic3d_Group)& theGroup,
                        const gp_Pnt& aLocation,
                        const gp_Dir& aDirection,
                        const Quantity_PlaneAngle anAngle,
@@ -82,19 +82,6 @@ void Prs3d_Arrow::Draw(const Handle(Prs3d_Presentation)& aPresentation,
   }
   aPrims2->AddVertex(p1);
 
-  Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims1);
-  Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims2);
-}
-
-//=======================================================================
-//function : Fill
-//purpose  : 
-//=======================================================================
-
-void Prs3d_Arrow::Fill(const Handle(Prs3d_Presentation)& /*aPresentation*/,
-                       const gp_Pnt& /*aLocation*/,
-                       const gp_Dir& /*aDirection*/,
-                       const Quantity_PlaneAngle /*anAngle*/,
-                       const Quantity_Length /*aLength*/)
-{
+  theGroup->AddPrimitiveArray (aPrims1);
+  theGroup->AddPrimitiveArray (aPrims2);
 }
index 21942cc..6e81362 100644 (file)
 #ifndef _Prs3d_Arrow_HeaderFile
 #define _Prs3d_Arrow_HeaderFile
 
-#include <Standard.hxx>
-#include <Standard_DefineAlloc.hxx>
-#include <Standard_Handle.hxx>
-
 #include <Prs3d_Root.hxx>
 #include <Quantity_PlaneAngle.hxx>
 #include <Quantity_Length.hxx>
-class Prs3d_Presentation;
+
 class gp_Pnt;
 class gp_Dir;
 
-
-//! provides class methods to draw an arrow at a given
-//! location, along a given direction and using a given
-//! angle.
-class Prs3d_Arrow  : public Prs3d_Root
+//! Provides class methods to draw an arrow at a given location, along a given direction and using a given angle.
+class Prs3d_Arrow : public Prs3d_Root
 {
 public:
 
   DEFINE_STANDARD_ALLOC
 
-  
-  //! Defines the representation of the arrow defined by
-  //! the location point aLocation, the direction
-  //! aDirection and the length aLength.
-  //! The angle anAngle defines the angle of opening of the arrow head.
-  //! The presentation object aPresentation stores the
-  //! information defined in this framework.
-  Standard_EXPORT static void Draw (const Handle(Prs3d_Presentation)& aPresentation, const gp_Pnt& aLocation, const gp_Dir& aDirection, const Quantity_PlaneAngle anAngle, const Quantity_Length aLength);
-  
-  //! Defines the representation of the arrow defined by
-  //! the location point aLocation, the direction vector
-  //! aDirection and the length aLength.
-  //! The angle anAngle defines the angle of opening of
-  //! the arrow head, and the drawer aDrawer specifies
-  //! the display attributes which arrows will have.
-  //! With this syntax, no presentation object is created.
-  Standard_EXPORT static void Fill (const Handle(Prs3d_Presentation)& aPresentation, const gp_Pnt& aLocation, const gp_Dir& aDirection, const Quantity_PlaneAngle anAngle, const Quantity_Length aLength);
-
-
-
-
-protected:
-
-
-
-
-
-private:
-
-
-
-
+  //! Defines the representation of the arrow.
+  //! Note that this method does NOT assign any presentation aspects to the primitives group!
+  //! @param theGroup     presentation group to add primitives
+  //! @param theLocation  location of the arrow tip
+  //! @param theDirection direction of the arrow
+  //! @param theAngle     angle of opening of the arrow head
+  //! @param theLength    length of the arrow (from the tip)
+  Standard_EXPORT static void Draw (const Handle(Graphic3d_Group)& theGroup,
+                                    const gp_Pnt& theLocation,
+                                    const gp_Dir& theDirection,
+                                    const Quantity_PlaneAngle theAngle,
+                                    const Quantity_Length theLength);
+
+  //! Alias to another method Draw() for backward compatibility.
+  Standard_DEPRECATED("Prs3d_Arrow::Draw() taking Graphic3d_Group should be used instead")
+  static void Draw (const Handle(Prs3d_Presentation)& thePrs,
+                    const gp_Pnt& theLocation,
+                    const gp_Dir& theDirection,
+                    const Quantity_PlaneAngle theAngle,
+                    const Quantity_Length theLength)
+  {
+    Draw (Prs3d_Root::CurrentGroup (thePrs), theLocation, theDirection, theAngle, theLength);
+  }
 
 };
 
-
-
-
-
-
-
 #endif // _Prs3d_Arrow_HeaderFile
diff --git a/src/Prs3d/Prs3d_Root.cxx b/src/Prs3d/Prs3d_Root.cxx
deleted file mode 100644 (file)
index 5167050..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright (c) 1995-1999 Matra Datavision
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-
-#include <Graphic3d_Group.hxx>
-#include <Prs3d_Presentation.hxx>
-#include <Prs3d_Root.hxx>
-
-Handle (Graphic3d_Group) Prs3d_Root::CurrentGroup (const Handle (Prs3d_Presentation)& Prs3d) 
-{
-  return Prs3d->CurrentGroup();
-}
-Handle (Graphic3d_Group) Prs3d_Root::NewGroup (const Handle (Prs3d_Presentation)& Prs3d) 
-{
-  return Prs3d->NewGroup();
-}
index 011a8c7..691c9ae 100644 (file)
 #ifndef _Prs3d_Root_HeaderFile
 #define _Prs3d_Root_HeaderFile
 
+#include <Graphic3d_Group.hxx>
+#include <Prs3d_Presentation.hxx>
 #include <Standard.hxx>
 #include <Standard_DefineAlloc.hxx>
 #include <Standard_Handle.hxx>
 
-class Graphic3d_Group;
-class Prs3d_Presentation;
-
-
-//! A root class for the standard presentation algorithms
-//! of the StdPrs package.
+//! A root class for the standard presentation algorithms of the StdPrs package.
 class Prs3d_Root 
 {
 public:
 
   DEFINE_STANDARD_ALLOC
 
-  
-  //! Returns the current group of primititves inside graphic
-  //! objects in the display.
-  //! A group also contains the attributes whose ranges are
-  //! limited to the primitives in it.
-  Standard_EXPORT static Handle(Graphic3d_Group) CurrentGroup (const Handle(Prs3d_Presentation)& Prs3d);
-  
-  //! Returns the new group of primitives inside graphic
-  //! objects in the display.
+  //! Returns the current (last created) group of primititves inside graphic objects in the display.
   //! A group also contains the attributes whose ranges are limited to the primitives in it.
-  Standard_EXPORT static Handle(Graphic3d_Group) NewGroup (const Handle(Prs3d_Presentation)& Prs3d);
-
-
-
-
-protected:
-
-
-
-
-
-private:
-
-
-
+  static Handle(Graphic3d_Group) CurrentGroup (const Handle(Prs3d_Presentation)& thePrs3d)
+  {
+    return thePrs3d->CurrentGroup();
+  }
 
+  //! Returns the new group of primitives inside graphic objects in the display.
+  //! A group also contains the attributes whose ranges are limited to the primitives in it.
+  static Handle(Graphic3d_Group) NewGroup (const Handle(Prs3d_Presentation)& thePrs3d)
+  {
+    return thePrs3d->NewGroup();
+  }
 
 };
 
-
-
-
-
-
-
 #endif // _Prs3d_Root_HeaderFile
index a3bca42..f6705af 100644 (file)
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <Prs3d_Text.hxx>
 
 #include <gp_Pnt.hxx>
 #include <Graphic3d_Group.hxx>
 #include <Graphic3d_Vertex.hxx>
 #include <Prs3d_Presentation.hxx>
-#include <Prs3d_Text.hxx>
 #include <Prs3d_TextAspect.hxx>
 #include <TCollection_AsciiString.hxx>
 #include <TCollection_ExtendedString.hxx>
 
-void Prs3d_Text::Draw (
-                      const Handle(Prs3d_Presentation)& aPresentation,
-                      const Handle(Prs3d_TextAspect)& anAspect,
-                      const TCollection_ExtendedString& aText,
-                      const gp_Pnt& AttachmentPoint) {
-
-
-  Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(anAspect->Aspect());
-  Standard_Real x,y,z;
-  AttachmentPoint.Coord(x,y,z);
+// =======================================================================
+// function : Draw
+// purpose  :
+// =======================================================================
+void Prs3d_Text::Draw (const Handle(Graphic3d_Group)& theGroup,
+                       const Handle(Prs3d_TextAspect)& theAspect,
+                       const TCollection_ExtendedString& theText,
+                       const gp_Pnt& theAttachmentPoint)
+{
+  Standard_Real x, y, z;
+  theAttachmentPoint.Coord(x,y,z);
 
-  
-// POP Graphic3d_Grup accepte de l'extended
-  Prs3d_Root::CurrentGroup(aPresentation)->Text(
-//                     TCollection_AsciiString(aText).ToCString(),
-                     aText,
-                    Graphic3d_Vertex(x,y,z),
-                     anAspect->Height(),
-                     anAspect->Angle(),
-                     anAspect->Orientation(),
-                     anAspect->HorizontalJustification(),
-                     anAspect->VerticalJustification());
+  theGroup->SetPrimitivesAspect (theAspect->Aspect());
+  theGroup->Text (theText,
+                  Graphic3d_Vertex(x,y,z),
+                  theAspect->Height(),
+                  theAspect->Angle(),
+                  theAspect->Orientation(),
+                  theAspect->HorizontalJustification(),
+                  theAspect->VerticalJustification());
 }
 
-
-void Prs3d_Text::Draw (
-                      const Handle(Prs3d_Presentation)& aPresentation,
-                      const Handle(Prs3d_Drawer)& aDrawer,
-                      const TCollection_ExtendedString& aText,
-                      const gp_Pnt& AttachmentPoint) {
-
-  
-  Prs3d_Text::Draw(aPresentation,aDrawer->TextAspect(),aText,AttachmentPoint);
-  }
-
 // =======================================================================
 // function : Draw
 // purpose  :
 // =======================================================================
-void Prs3d_Text::Draw (const Handle(Prs3d_Presentation)& thePresentation,
+void Prs3d_Text::Draw (const Handle(Graphic3d_Group)&    theGroup,
                        const Handle(Prs3d_TextAspect)&   theAspect,
                        const TCollection_ExtendedString& theText,
                        const gp_Ax2&                     theOrientation,
                        const Standard_Boolean            theHasOwnAnchor)
 {
-  Prs3d_Root::CurrentGroup (thePresentation)->SetPrimitivesAspect (theAspect->Aspect());
-  Prs3d_Root::CurrentGroup (thePresentation)->Text (theText,
-                                                    theOrientation,
-                                                    theAspect->Height(),
-                                                    theAspect->Angle(),
-                                                    theAspect->Orientation(),
-                                                    theAspect->HorizontalJustification(),
-                                                    theAspect->VerticalJustification(),
-                                                    Standard_True,
-                                                    theHasOwnAnchor);
+  theGroup->SetPrimitivesAspect (theAspect->Aspect());
+  theGroup->Text (theText,
+                  theOrientation,
+                  theAspect->Height(),
+                  theAspect->Angle(),
+                  theAspect->Orientation(),
+                  theAspect->HorizontalJustification(),
+                  theAspect->VerticalJustification(),
+                  Standard_True,
+                  theHasOwnAnchor);
 }
index 4118618..ea2f98c 100644 (file)
 #ifndef _Prs3d_Text_HeaderFile
 #define _Prs3d_Text_HeaderFile
 
-#include <Standard.hxx>
-#include <Standard_DefineAlloc.hxx>
-#include <Standard_Handle.hxx>
-
 #include <Prs3d_Root.hxx>
 #include <Prs3d_Drawer.hxx>
 #include <Prs3d_TextAspect.hxx>
 
 #include <gp_Ax2.hxx>
 
-class Prs3d_Presentation;
 class TCollection_ExtendedString;
 class gp_Pnt;
 
 //! A framework to define the display of texts.
-class Prs3d_Text  : public Prs3d_Root
+class Prs3d_Text : public Prs3d_Root
 {
 public:
 
   DEFINE_STANDARD_ALLOC
 
-  
-  //! Defines the display of the text aText at the point AttachmentPoint.
-  //! The drawer aDrawer specifies the display attributes which texts will have.
-  //! The presentation object aPresentation stores the
-  //! information defined in this framework.
-  //! static void Draw (const Handle(Prs3d_Presentation)&
-  //! aPresentation, const Handle(Prs3d_TextAspect)&
-  //! anAspect, const TCollection_ExtendedString& aText,
-  //! const gp_Pnt& AttachmentPoint);
-  Standard_EXPORT static void Draw (const Handle(Prs3d_Presentation)& aPresentation, const Handle(Prs3d_Drawer)& aDrawer, const TCollection_ExtendedString& aText, const gp_Pnt& AttachmentPoint);
-
-  //! Draws theText label with the location and the orientation
-  //! specified in the model 3D space through theOrientation argument.
-  Standard_EXPORT static void Draw (const Handle(Prs3d_Presentation)& thePresentation,
+  //! Defines the display of the text.
+  //! @param theGroup  group to add primitives
+  //! @param theAspect presentation attributes
+  //! @param theText   text to draw
+  //! @param theAttachmentPoint attachment point
+  Standard_EXPORT static void Draw (const Handle(Graphic3d_Group)& theGroup,
+                                    const Handle(Prs3d_TextAspect)& theAspect,
+                                    const TCollection_ExtendedString& theText,
+                                    const gp_Pnt& theAttachmentPoint);
+
+  //! Draws the text label.
+  //! @param theGroup       group to add primitives
+  //! @param theAspect      presentation attributes
+  //! @param theText        text to draw
+  //! @param theOrientation location and orientation specified in the model 3D space
+  //! @param theHasOwnAnchor 
+  Standard_EXPORT static void Draw (const Handle(Graphic3d_Group)&    theGroup,
                                     const Handle(Prs3d_TextAspect)&   theAspect,
                                     const TCollection_ExtendedString& theText,
                                     const gp_Ax2&                     theOrientation,
                                     const Standard_Boolean            theHasOwnAnchor = Standard_True);
-  
-  //! Defines the display of the text aText at the point
-  //! AttachmentPoint.
-  //! The text aspect object anAspect specifies the display
-  //! attributes which texts will have.
-  //! The presentation object aPresentation stores the
-  //! information defined in this framework.
-  //! This syntax could be used if you had not already
-  //! defined text display attributes in a drawer or if you
-  //! wanted to exceptionally overide the definition
-  //! provided in your drawer.
-  Standard_EXPORT static void Draw (const Handle(Prs3d_Presentation)& aPresentation, const Handle(Prs3d_TextAspect)& anAspect, const TCollection_ExtendedString& aText, const gp_Pnt& AttachmentPoint);
-
-
-
-
-protected:
-
-
-
-
-
-private:
-
-
 
+public:
 
+  //! Alias to another method Draw() for backward compatibility.
+  Standard_DEPRECATED("Prs3d_Text::Draw() taking Graphic3d_Group should be used instead")
+  static void Draw (const Handle(Prs3d_Presentation)& thePrs,
+                    const Handle(Prs3d_Drawer)& theDrawer,
+                    const TCollection_ExtendedString& theText,
+                    const gp_Pnt& theAttachmentPoint)
+  {
+    Draw (Prs3d_Root::CurrentGroup (thePrs), theDrawer->TextAspect(), theText, theAttachmentPoint);
+  }
+
+  //! Alias to another method Draw() for backward compatibility.
+  Standard_DEPRECATED("Prs3d_Text::Draw() taking Graphic3d_Group should be used instead")
+  static void Draw (const Handle(Prs3d_Presentation)& thePrs,
+                    const Handle(Prs3d_TextAspect)&   theAspect,
+                    const TCollection_ExtendedString& theText,
+                    const gp_Ax2&                     theOrientation,
+                    const Standard_Boolean            theHasOwnAnchor = Standard_True)
+  {
+    Draw (Prs3d_Root::CurrentGroup (thePrs), theAspect, theText, theOrientation, theHasOwnAnchor);
+  }
+
+  //! Alias to another method Draw() for backward compatibility.
+  Standard_DEPRECATED("Prs3d_Text::Draw() taking Graphic3d_Group should be used instead")
+  static void Draw (const Handle(Prs3d_Presentation)& thePrs,
+                    const Handle(Prs3d_TextAspect)& theAspect,
+                    const TCollection_ExtendedString& theText,
+                    const gp_Pnt& theAttachmentPoint)
+  {
+    Draw (Prs3d_Root::CurrentGroup (thePrs), theAspect, theText, theAttachmentPoint);
+  }
 
 };
 
-
-
-
-
-
-
 #endif // _Prs3d_Text_HeaderFile
index 38cf028..7829841 100644 (file)
@@ -5222,7 +5222,7 @@ public:
     // create separate group for text elements
     Handle(Graphic3d_Group) aTextGroup = Prs3d_Root::NewGroup (thePresentation);
     TCollection_ExtendedString aString ("YOU SHOULD SEE THIS TEXT", Standard_True);
-    Prs3d_Text::Draw (thePresentation, myDrawer->TextAspect(), aString, gp_Ax2 (gp::Origin(), gp::DZ()));
+    Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (thePresentation), myDrawer->TextAspect(), aString, gp_Ax2 (gp::Origin(), gp::DZ()));
   }
 
   virtual void ComputeSelection (const Handle(SelectMgr_Selection)& /*theSelection*/,
index 3171a7d..023db04 100644 (file)
@@ -232,7 +232,7 @@ void StdPrs_Curve::Add (const Handle (Prs3d_Presentation)& aPresentation,
     gp_Pnt Location;
     gp_Vec Direction;
     aCurve.D1(aCurve.LastParameter(),Location,Direction);
-    Prs3d_Arrow::Draw (aPresentation,Location,gp_Dir(Direction),
+    Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), Location, gp_Dir(Direction),
                        aDrawer->ArrowAspect()->Angle(),
                        aDrawer->ArrowAspect()->Length());
   }
@@ -298,7 +298,7 @@ void StdPrs_Curve::Add (const Handle (Prs3d_Presentation)& aPresentation,
     gp_Pnt Location;
     gp_Vec Direction;
     aCurve.D1(aCurve.LastParameter(),Location,Direction);
-    Prs3d_Arrow::Draw (aPresentation,Location,gp_Dir(Direction),
+    Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), Location, gp_Dir(Direction),
                        aDrawer->ArrowAspect()->Angle(),
                        aDrawer->ArrowAspect()->Length());
   }
index 5111b19..9b1369b 100644 (file)
@@ -308,7 +308,7 @@ void StdPrs_DeflectionCurve::Add (const Handle (Prs3d_Presentation)& aPresentati
       gp_Pnt Location;
       gp_Vec Direction;
       aCurve.D1(V2, Location,Direction);
-      Prs3d_Arrow::Draw (aPresentation,
+      Prs3d_Arrow::Draw (aGroup,
                          Location,
                          gp_Dir(Direction),
                          aDrawer->ArrowAspect()->Angle(),
@@ -355,7 +355,7 @@ void StdPrs_DeflectionCurve::Add (const Handle (Prs3d_Presentation)& aPresentati
     gp_Pnt Location;
     gp_Vec Direction;
     aCurve.D1(V2, Location,Direction);
-    Prs3d_Arrow::Draw (aPresentation,
+    Prs3d_Arrow::Draw (aGroup,
                        Location,
                        gp_Dir(Direction),
                        aDrawer->ArrowAspect()->Angle(),
index 7a0dc50..7e0f97e 100644 (file)
@@ -96,7 +96,7 @@ void StdPrs_Plane::Add (const Handle (Prs3d_Presentation)& aPresentation,
     aPrims->AddVertex(loc);
     aPrims->AddVertex(p1);
     TheGroup->AddPrimitiveArray(aPrims);
-    Prs3d_Arrow::Draw(aPresentation,p1,norm,ang,len);
+    Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), p1, norm, ang, len);
   }
   if (theaspect->DisplayEdgesArrows()) {
     Handle(Graphic3d_ArrayOfSegments) aPrims = new Graphic3d_ArrayOfSegments(8);
@@ -105,25 +105,25 @@ void StdPrs_Plane::Add (const Handle (Prs3d_Presentation)& aPresentation,
     p1 = loc.Translated(trans);
     aPrims->AddVertex(loc);
     aPrims->AddVertex(p1);
-    Prs3d_Arrow::Draw(aPresentation,p1,norm,ang,len);
+    Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), p1, norm, ang, len);
     //
     thegeom->D0(-Xmax,Ymax,loc);
     p1 = loc.Translated(trans);
     aPrims->AddVertex(loc);
     aPrims->AddVertex(p1);
-    Prs3d_Arrow::Draw(aPresentation,p1,norm,ang,len);
+    Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), p1, norm, ang, len);
     //
     thegeom->D0(Xmax,Ymax,loc);
     p1 = loc.Translated(trans);
     aPrims->AddVertex(loc);
     aPrims->AddVertex(p1);
-    Prs3d_Arrow::Draw(aPresentation,p1,norm,ang,len);
+    Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), p1, norm, ang, len);
     //
     thegeom->D0(Xmax,-Ymax,loc);
     p1 = loc.Translated(trans);
     aPrims->AddVertex(loc);
     aPrims->AddVertex(p1);
-    Prs3d_Arrow::Draw(aPresentation,p1,norm,ang,len);
+    Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), p1, norm, ang, len);
     //
     TheGroup->AddPrimitiveArray(aPrims);
   }
index 66d0ab8..2537d9d 100644 (file)
@@ -65,7 +65,7 @@ void StdPrs_PoleCurve::Add (const Handle (Prs3d_Presentation)& aPresentation,
     gp_Pnt Location;
     gp_Vec Direction;
     aCurve.D1(aCurve.LastParameter(),Location,Direction);
-    Prs3d_Arrow::Draw (aPresentation,
+    Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation),
                       Location,
                       gp_Dir(Direction),
                       aDrawer->ArrowAspect()->Angle(),
index eb2f9e6..4b9607a 100644 (file)
@@ -77,7 +77,7 @@ static void DisplayText (const TDF_Label& aLabel,
        Standard_Real aXmin, aYmin, aZmin, aXmax, aYmax, aZmax;
        aBox.Get (aXmin, aYmin, aZmin, aXmax, aYmax, aZmax);
        gp_Pnt aPnt (0.5 * (aXmin + aXmax), 0.5 * (aYmin + aYmax), 0.5 * (aZmin + aZmax));
-       Prs3d_Text::Draw( aPrs, anAspect, aName->Get(), aPnt);
+       Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPrs), anAspect, aName->Get(), aPnt);
       }
     }
   }