1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0028990: Coding Rules - deprecate redundant class Prs3d_Root

Prs3d_Root usage has been replaced by direct calls to Prs3d_Presentation methods.
This commit is contained in:
kgv
2020-08-28 16:02:18 +03:00
parent 68a2329305
commit d6c489212b
79 changed files with 420 additions and 474 deletions

View File

@@ -42,7 +42,6 @@
#include <Prs3d_DimensionAspect.hxx>
#include <Prs3d_LineAspect.hxx>
#include <Prs3d_Presentation.hxx>
#include <Prs3d_Root.hxx>
#include <Quantity_Color.hxx>
#include <TCollection_AsciiString.hxx>
#include <TCollection_ExtendedString.hxx>
@@ -109,7 +108,7 @@ void DsgPrs::ComputeSymbol (const Handle(Prs3d_Presentation)& aPresentation,
{
Handle(Graphic3d_ArrayOfPoints) anArrayOfPoints = new Graphic3d_ArrayOfPoints (1);
anArrayOfPoints->AddVertex (pt1.X(), pt1.Y(), pt1.Z());
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray (anArrayOfPoints);
aPresentation->CurrentGroup()->AddPrimitiveArray (anArrayOfPoints);
}
break;
}
@@ -119,7 +118,7 @@ void DsgPrs::ComputeSymbol (const Handle(Prs3d_Presentation)& aPresentation,
// On dessine un rond
Handle(Graphic3d_ArrayOfPoints) anArrayOfPoints = new Graphic3d_ArrayOfPoints (1);
anArrayOfPoints->AddVertex (pt2.X(), pt2.Y(), pt2.Z());
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray (anArrayOfPoints);
aPresentation->CurrentGroup()->AddPrimitiveArray (anArrayOfPoints);
break;
}

View File

@@ -161,7 +161,7 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
Handle(Graphic3d_ArrayOfPrimitives) aPrims = new Graphic3d_ArrayOfPolylines(12);
for( i = 0; i <= 11; i++ )
aPrims->AddVertex(ElCLib::Value(param + angle/11 * i, aCircle2));
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
DsgPrs::ComputeSymbol(aPresentation, aDimensionAspect, AttachmentPnt,
AttachmentPnt, aDir, aDir, DsgPrs_AS_LASTAR);
@@ -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 (Prs3d_Root::CurrentGroup (aPresentation), aDimensionAspect->TextAspect(), txt, tmpPnt);
Prs3d_Text::Draw (aPresentation->CurrentGroup(), aDimensionAspect->TextAspect(), txt, tmpPnt);
angle = 2. * M_PI - param ;
if( param > OppParam )
@@ -180,7 +180,7 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
aPrims = new Graphic3d_ArrayOfPolylines(12);
for( i = 11; i >= 0; i-- )
aPrims->AddVertex(ElCLib::Value(-angle/11 * i, aCircle2));
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
}
if( AboveInBelowCone( VmaxCircle, VminCircle, myCircle ) == 1 && !IsConeTrimmed ) //above
@@ -204,7 +204,7 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
aPrims->AddVertex(OppositePnt);
aPrims->AddVertex(( aPnt.Distance(P1) < aPnt.Distance(P2) )? P11 : P12);
}
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
}
@@ -230,7 +230,7 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
sprintf(valcar,"%5.2f",theval);
Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
Handle(Graphic3d_Group) aGroup = Prs3d_Root::CurrentGroup (aPresentation);
Handle(Graphic3d_Group) aGroup = aPresentation->CurrentGroup();
aGroup->SetPrimitivesAspect(LA->LineAspect()->Aspect());
gp_Ax2 ax(CenterPoint,axisdir,dir1);
@@ -343,7 +343,7 @@ 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() );
aPresentation->CurrentGroup()->SetPrimitivesAspect( LA->LineAspect()->Aspect() );
gp_Circ AngleCirc, AttachCirc;
Standard_Real FirstParAngleCirc, LastParAngleCirc, FirstParAttachCirc, LastParAttachCirc;
@@ -385,7 +385,7 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
for (Standard_Integer i = 0; i < NodeNumber; i++, FirstParAngleCirc += delta)
aPrims->AddVertex(ElCLib::Value( FirstParAngleCirc, AngleCirc ));
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
aPrims = new Graphic3d_ArrayOfSegments(4);
}
else // null angle
@@ -399,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 (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), aText, OffsetPoint);
Prs3d_Text::Draw (aPresentation->CurrentGroup(), LA->TextAspect(), aText, OffsetPoint);
// Line from AttachmentPoint1 to end of Arrow1
aPrims->AddVertex(AttachmentPoint1);
@@ -408,7 +408,7 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
aPrims->AddVertex(ProjAttachPoint2);
aPrims->AddVertex(EndOfArrow2);
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
// Line or arc from AttachmentPoint2 to its "projection"
if (AttachmentPoint2.Distance( ProjAttachPoint2 ) > Precision::Confusion())
@@ -431,7 +431,7 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
for (Standard_Integer i = 0; i < NodeNumber; i++, FirstParAttachCirc += delta)
aPrims->AddVertex(ElCLib::Value( FirstParAttachCirc, AttachCirc ));
}
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
}
}
@@ -457,7 +457,7 @@ 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());
aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
gp_Dir Norm;
if (!dir1.IsParallel(dir2, Precision::Angular())) {
@@ -515,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 (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), aText,OffsetPoint);
Prs3d_Text::Draw (aPresentation->CurrentGroup(), LA->TextAspect(), aText,OffsetPoint);
Standard_Real length = LA->ArrowAspect()->Length();
if (length < Precision::Confusion()) length = 1.e-04;
@@ -534,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 (Prs3d_Root::CurrentGroup (aPresentation), ptarr, dirarr, LA->ArrowAspect()->Angle(), length);
Prs3d_Arrow::Draw (aPresentation->CurrentGroup(), ptarr, dirarr, LA->ArrowAspect()->Angle(), length);
aPrims->AddBound(2);
aPrims->AddVertex(AttachmentPoint1);
@@ -545,13 +545,13 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
ax1.SetLocation(ptarr);
gp_Dir dirarr2(vecarr);
dirarr2.Rotate(ax1, - beta);
Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), ptarr, dirarr2, LA->ArrowAspect()->Angle(), length);
Prs3d_Arrow::Draw (aPresentation->CurrentGroup(), ptarr, dirarr2, LA->ArrowAspect()->Angle(), length);
aPrims->AddBound(2);
aPrims->AddVertex(AttachmentPoint2);
aPrims->AddVertex(ptarr);
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
}
@@ -576,7 +576,7 @@ 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());
aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
gp_Dir Norm = dir1.Crossed(dir2);
if (Abs(theval) > M_PI) Norm.Reverse();
@@ -626,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 (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), aText, OffsetPoint);
Prs3d_Text::Draw (aPresentation->CurrentGroup(), LA->TextAspect(), aText, OffsetPoint);
Standard_Real length = LA->ArrowAspect()->Length();
if (length < Precision::Confusion()) length = 1.e-04;
@@ -662,7 +662,7 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
aPrims->AddVertex(AttachmentPoint2);
aPrims->AddVertex(ptarr1);
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
// One traces the arrows
DsgPrs::ComputeSymbol(aPresentation,LA,ptarr,ptarr1,dirarr,dirarr2,ArrowPrs);
@@ -692,7 +692,7 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
TCollection_ExtendedString aText(valas);
Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
gp_Dir Norm = dir1.Crossed(dir2);
if (Abs(theval) > M_PI) Norm.Reverse();
@@ -742,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 (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), aText, OffsetPoint);
Prs3d_Text::Draw (aPresentation->CurrentGroup(), LA->TextAspect(), aText, OffsetPoint);
Standard_Real length = LA->ArrowAspect()->Length();
if (length < Precision::Confusion()) length = 1.e-04;
@@ -762,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 (Prs3d_Root::CurrentGroup (aPresentation), ptarr, dirarr, LA->ArrowAspect()->Angle(), length);
Prs3d_Arrow::Draw (aPresentation->CurrentGroup(), ptarr, dirarr, LA->ArrowAspect()->Angle(), length);
aPrims->AddBound(2);
aPrims->AddVertex(AttachmentPoint1);
@@ -773,13 +773,13 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
gp_Dir dirarr2(vecarr);
dirarr2.Rotate(ax1, -beta);
Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), ptarr, dirarr2, LA->ArrowAspect()->Angle(), length);
Prs3d_Arrow::Draw (aPresentation->CurrentGroup(), ptarr, dirarr2, LA->ArrowAspect()->Angle(), length);
aPrims->AddBound(2);
aPrims->AddVertex(AttachmentPoint2);
aPrims->AddVertex(ptarr);
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
}
void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentation,
@@ -791,7 +791,7 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
const DsgPrs_ArrowSide ArrowSide)
{
Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
gp_Dir dir1(gp_Vec(CenterPoint, AttachmentPoint1));
gp_Ax2 ax(CenterPoint,theAxe.Direction(),dir1);
@@ -803,7 +803,7 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
Handle(Graphic3d_ArrayOfPolylines) aPrims = new Graphic3d_ArrayOfPolylines(nbp);
for (Standard_Integer i = 1; i<=nbp; i++)
aPrims->AddVertex(ElCLib::Value(dteta*(i-1),cer));
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
Standard_Real uc1 = 0.;
Standard_Real uc2 = ElCLib::Parameter(cer,AttachmentPoint1.Rotated(theAxe,theval));
@@ -818,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 (Prs3d_Root::CurrentGroup (aPresentation), ptarr, gp_Dir(-vecarr), LA->ArrowAspect()->Angle(), length);
Prs3d_Arrow::Draw (aPresentation->CurrentGroup(), ptarr, gp_Dir(-vecarr), LA->ArrowAspect()->Angle(), length);
break;
}
case DsgPrs_AS_LASTAR:
{
ElCLib::D1(uc2,cer,ptarr,vecarr);
Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), ptarr, gp_Dir(vecarr), LA->ArrowAspect()->Angle(), length);
Prs3d_Arrow::Draw (aPresentation->CurrentGroup(), ptarr, gp_Dir(vecarr), LA->ArrowAspect()->Angle(), length);
break;
}
case DsgPrs_AS_BOTHAR:
{
ElCLib::D1(uc1,cer,ptarr,vecarr);
Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), ptarr, gp_Dir(-vecarr), LA->ArrowAspect()->Angle(), length);
Prs3d_Arrow::Draw (aPresentation->CurrentGroup(), ptarr, gp_Dir(-vecarr), LA->ArrowAspect()->Angle(), length);
ElCLib::D1(uc2,cer,ptarr,vecarr);
Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), ptarr, gp_Dir(vecarr), LA->ArrowAspect()->Angle(), length);
Prs3d_Arrow::Draw (aPresentation->CurrentGroup(), ptarr, gp_Dir(vecarr), LA->ArrowAspect()->Angle(), length);
break;
}
default: break;

View File

@@ -38,17 +38,17 @@ void DsgPrs_Chamf2dPresentation::Add(
{
Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
Handle(Graphic3d_ArrayOfSegments) aPrims = new Graphic3d_ArrayOfSegments(2);
aPrims->AddVertex(aPntAttach);
aPrims->AddVertex(aPntEnd);
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
gp_Dir ArrowDir(aPntAttach.XYZ()-aPntEnd.XYZ());
Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), aPntAttach, ArrowDir, LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
Prs3d_Arrow::Draw (aPresentation->CurrentGroup(), aPntAttach, ArrowDir, LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), aText, aPntEnd);
Prs3d_Text::Draw (aPresentation->CurrentGroup(), LA->TextAspect(), aText, aPntEnd);
}
@@ -67,14 +67,14 @@ void DsgPrs_Chamf2dPresentation::Add(
{
Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
Handle(Graphic3d_ArrayOfSegments) aPrims = new Graphic3d_ArrayOfSegments(2);
aPrims->AddVertex(aPntAttach);
aPrims->AddVertex(aPntEnd);
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), aText, aPntEnd);
Prs3d_Text::Draw (aPresentation->CurrentGroup(), LA->TextAspect(), aText, aPntEnd);
gp_Dir ArrowDir(aPntAttach.XYZ()-aPntEnd.XYZ());
gp_Dir ArrowDir1 = ArrowDir;

View File

@@ -14,7 +14,6 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <DsgPrs_ConcentricPresentation.hxx>
#include <ElCLib.hxx>
#include <gp_Circ.hxx>
@@ -26,7 +25,6 @@
#include <Prs3d_DimensionAspect.hxx>
#include <Prs3d_LineAspect.hxx>
#include <Prs3d_Presentation.hxx>
#include <Prs3d_Root.hxx>
void DsgPrs_ConcentricPresentation::Add(
const Handle(Prs3d_Presentation)& aPresentation,
@@ -43,7 +41,7 @@ void DsgPrs_ConcentricPresentation::Add(
const Standard_Integer nbp = 50;
const Standard_Real dteta = (2. * M_PI)/nbp;
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
Handle(Graphic3d_ArrayOfPolylines) aPrims = new Graphic3d_ArrayOfPolylines(2*nbp+6,4);
@@ -90,5 +88,5 @@ void DsgPrs_ConcentricPresentation::Add(
aPrims->AddVertex(p1);
aPrims->AddVertex(p2);
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
}

View File

@@ -34,7 +34,7 @@ void DsgPrs_DatumPrs::Add (const Handle(Prs3d_Presentation)& thePresentation,
const Handle(Prs3d_Drawer)& theDrawer)
{
Handle(Prs3d_DatumAspect) aDatumAspect = theDrawer->DatumAspect();
Handle(Graphic3d_Group) aGroup = Prs3d_Root::CurrentGroup (thePresentation);
Handle(Graphic3d_Group) aGroup = thePresentation->CurrentGroup();
gp_Ax2 anAxis (theDatum);
gp_Pnt anOrigin = anAxis.Location();

View File

@@ -48,7 +48,7 @@ void DsgPrs_DiameterPresentation::Add (const Handle(Prs3d_Presentation)& aPresen
const Standard_Boolean IsDiamSymbol )
{
Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
Standard_Real parat = ElCLib::Parameter(aCircle, AttachmentPoint);
gp_Pnt ptoncirc = ElCLib::Value (parat, aCircle);
@@ -73,13 +73,13 @@ void DsgPrs_DiameterPresentation::Add (const Handle(Prs3d_Presentation)& aPresen
Handle(Graphic3d_ArrayOfSegments) aPrims = new Graphic3d_ArrayOfSegments(2);
aPrims->AddVertex(pt1);
aPrims->AddVertex(OppositePoint);
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
// value
TCollection_ExtendedString Text = aText;
if(IsDiamSymbol)
Text = TCollection_ExtendedString("\330 ") + aText; // VRO (2007-05-17) inserted a blank.
Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), Text, AttachmentPoint);
Prs3d_Text::Draw (aPresentation->CurrentGroup(), LA->TextAspect(), Text, AttachmentPoint);
// arrows
gp_Dir arrdir (vecrap);
@@ -144,7 +144,7 @@ void DsgPrs_DiameterPresentation::Add (const Handle(Prs3d_Presentation)& aPresen
}
Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
Standard_Real parEndOfArrow = ElCLib::Parameter(aCircle,AttachmentPoint);
gp_Pnt EndOfArrow;
gp_Pnt DrawPosition = AttachmentPoint;// point of attachment
@@ -185,13 +185,13 @@ void DsgPrs_DiameterPresentation::Add (const Handle(Prs3d_Presentation)& aPresen
Handle(Graphic3d_ArrayOfSegments) aPrims = new Graphic3d_ArrayOfSegments(2);
aPrims->AddVertex(DrawPosition);
aPrims->AddVertex(EndOfArrow);
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
// text
TCollection_ExtendedString Text = aText;
if(IsDiamSymbol)
Text = TCollection_ExtendedString("\330 ") + Text;// => \330 | \370?
Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), Text, DrawPosition);
Prs3d_Text::Draw (aPresentation->CurrentGroup(), LA->TextAspect(), Text, DrawPosition);
// Add presentation of arrow
gp_Dir DirOfArrow(gp_Vec(DrawPosition, EndOfArrow).XYZ());

View File

@@ -57,7 +57,7 @@ void DsgPrs_EllipseRadiusPresentation::Add (const Handle(Prs3d_Presentation)& aP
const DsgPrs_ArrowSide ArrowPrs)
{
Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
const Standard_Real dist = aCenter.Distance( aPosition );
const Standard_Boolean inside = ( dist <= theval );
@@ -66,12 +66,12 @@ void DsgPrs_EllipseRadiusPresentation::Add (const Handle(Prs3d_Presentation)& aP
Handle(Graphic3d_ArrayOfSegments) aPrims = new Graphic3d_ArrayOfSegments(2);
aPrims->AddVertex(aCenter);
aPrims->AddVertex(EndPoint);
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
// value
TCollection_ExtendedString Text(IsMaxRadius? "a = " : "b = ");
Text += aText;
Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), Text, aPosition);
Prs3d_Text::Draw (aPresentation->CurrentGroup(), LA->TextAspect(), Text, aPosition);
// arrows
gp_Dir arrdir( gp_Vec( aCenter, anEndOfArrow));
@@ -99,7 +99,7 @@ void DsgPrs_EllipseRadiusPresentation::Add (const Handle(Prs3d_Presentation)& aP
const DsgPrs_ArrowSide ArrowPrs)
{
Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
if(!IsInDomain)
{
@@ -115,7 +115,7 @@ void DsgPrs_EllipseRadiusPresentation::Add (const Handle(Prs3d_Presentation)& aP
Handle(Graphic3d_ArrayOfPolylines) aPrims = new Graphic3d_ArrayOfPolylines(NodeNumber);
for (Standard_Integer i = 0 ; i < NodeNumber; i++, parFirst += delta)
aPrims->AddVertex(ElCLib::Value( parFirst, anEllipse ));
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
}
DsgPrs_EllipseRadiusPresentation::Add(aPresentation, aDrawer, theval, aText,
aPosition, anEndOfArrow, aCenter, IsMaxRadius, ArrowPrs);
@@ -141,7 +141,7 @@ void DsgPrs_EllipseRadiusPresentation::Add (const Handle(Prs3d_Presentation)& aP
const DsgPrs_ArrowSide ArrowPrs)
{
Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
if(!IsInDomain)
{
@@ -167,7 +167,7 @@ void DsgPrs_EllipseRadiusPresentation::Add (const Handle(Prs3d_Presentation)& aP
aCurve->D0( parFirst, p1 );
aPrims->AddVertex(p1);
}
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
}
DsgPrs_EllipseRadiusPresentation::Add(aPresentation, aDrawer, theval, aText,
aPosition, anEndOfArrow, aCenter, IsMaxRadius, ArrowPrs);

View File

@@ -32,7 +32,6 @@
#include <Prs3d_DimensionAspect.hxx>
#include <Prs3d_LineAspect.hxx>
#include <Prs3d_Presentation.hxx>
#include <Prs3d_Root.hxx>
#include <Prs3d_Text.hxx>
#include <TCollection_ExtendedString.hxx>
@@ -48,7 +47,7 @@ void DsgPrs_EqualDistancePresentation::Add( const Handle( Prs3d_Presentation )&
const Handle( Geom_Plane )& Plane )
{
Handle( Prs3d_DimensionAspect ) LA = aDrawer->DimensionAspect();
Prs3d_Root::CurrentGroup( aPresentation )->SetPrimitivesAspect( LA->LineAspect()->Aspect() );
aPresentation->CurrentGroup()->SetPrimitivesAspect( LA->LineAspect()->Aspect() );
// Line between two middles
gp_Pnt Middle12( (Point1.XYZ() + Point2.XYZ()) * 0.5 ), Middle34( (Point3.XYZ() + Point4.XYZ()) * 0.5 );
@@ -56,7 +55,7 @@ void DsgPrs_EqualDistancePresentation::Add( const Handle( Prs3d_Presentation )&
Handle(Graphic3d_ArrayOfSegments) aPrims = new Graphic3d_ArrayOfSegments(2);
aPrims->AddVertex(Middle12);
aPrims->AddVertex(Middle34);
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
// Add presentation of arrows (points)
gp_Dir aDir( 0, 0, 1 );
@@ -112,7 +111,7 @@ void DsgPrs_EqualDistancePresentation::Add( const Handle( Prs3d_Presentation )&
TCollection_ExtendedString aText("==");
//Draw the text
Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation),LA->TextAspect(), aText, aTextPos);
Prs3d_Text::Draw (aPresentation->CurrentGroup(),LA->TextAspect(), aText, aTextPos);
}
@@ -132,7 +131,7 @@ void DsgPrs_EqualDistancePresentation::Add( const Handle( Prs3d_Presentation )&
gp_Pnt& aProj2)
{
const Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
gp_Lin L1 (aPoint1,aDirection);
gp_Lin L2 (aPoint2,aDirection);
@@ -144,7 +143,7 @@ void DsgPrs_EqualDistancePresentation::Add( const Handle( Prs3d_Presentation )&
aPrims->AddVertex(aProj1);
aPrims->AddVertex(aProj2);
aPrims->AddVertex(aPoint2);
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
//add arrows presentation
gp_Dir aDir(aProj2.XYZ() - aProj1.XYZ());
@@ -170,7 +169,7 @@ void DsgPrs_EqualDistancePresentation::Add( const Handle( Prs3d_Presentation )&
const DsgPrs_ArrowSide anArrowSide)
{
const Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
Standard_Real aPar11, aPar12, aPar21, aPar22;
if(aCirc1.Radius() > Precision::Confusion()){
@@ -193,7 +192,7 @@ void DsgPrs_EqualDistancePresentation::Add( const Handle( Prs3d_Presentation )&
Handle(Graphic3d_ArrayOfPrimitives) aPrims = new Graphic3d_ArrayOfSegments(2);
aPrims->AddVertex(aPoint2);
aPrims->AddVertex(aPoint4);
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
Standard_Integer i, aNodeNb;
Standard_Real aDelta, aCurPar;
@@ -208,7 +207,7 @@ void DsgPrs_EqualDistancePresentation::Add( const Handle( Prs3d_Presentation )&
for (i = 1; i<= aNodeNb; aCurPar += aDelta, i++)
aPrims->AddVertex(ElCLib::Value( aCurPar, aCirc1));
aPrims->AddVertex(aPoint2);
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
}
if (aPar22 < aPar21) aPar22 += 2.*M_PI;
if ( Abs(aPar22 - aPar21) > Precision::Confusion())
@@ -221,7 +220,7 @@ void DsgPrs_EqualDistancePresentation::Add( const Handle( Prs3d_Presentation )&
for (i = 1; i<= aNodeNb; aCurPar += aDelta, i++)
aPrims->AddVertex(ElCLib::Value( aCurPar, aCirc2));
aPrims->AddVertex(aPoint4);
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
}
//get the direction of interval

View File

@@ -29,7 +29,6 @@
#include <Prs3d_DimensionAspect.hxx>
#include <Prs3d_LineAspect.hxx>
#include <Prs3d_Presentation.hxx>
#include <Prs3d_Root.hxx>
#include <Prs3d_Text.hxx>
#include <TCollection_ExtendedString.hxx>
@@ -42,14 +41,14 @@ void DsgPrs_EqualRadiusPresentation::Add( const Handle( Prs3d_Presentation )& aP
const Handle( Geom_Plane )& Plane )
{
Handle( Prs3d_DimensionAspect ) LA = aDrawer->DimensionAspect();
Prs3d_Root::CurrentGroup( aPresentation )->SetPrimitivesAspect( LA->LineAspect()->Aspect() );
aPresentation->CurrentGroup()->SetPrimitivesAspect( LA->LineAspect()->Aspect() );
Handle(Graphic3d_ArrayOfPolylines) aPrims = new Graphic3d_ArrayOfPolylines(4);
aPrims->AddVertex(FirstPoint);
aPrims->AddVertex(FirstCenter);
aPrims->AddVertex(SecondCenter);
aPrims->AddVertex(SecondPoint);
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
// Add presentation of arrows
gp_Dir FirstDir = gce_MakeDir( FirstCenter, FirstPoint ), SecondDir = gce_MakeDir( SecondCenter, SecondPoint );
@@ -91,6 +90,6 @@ void DsgPrs_EqualRadiusPresentation::Add( const Handle( Prs3d_Presentation )& aP
}
//Draw the text
Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), aText, aTextPos);
Prs3d_Text::Draw (aPresentation->CurrentGroup(), LA->TextAspect(), aText, aTextPos);
//ota === end ===
}

View File

@@ -71,7 +71,7 @@ void DsgPrs_FilletRadiusPresentation::Add (const Handle(Prs3d_Presentation)& aPr
gp_Circ FilletCirc;
// gp_Pnt NewPosition, EndOfArrow;
Handle( Prs3d_DimensionAspect ) LA = aDrawer->DimensionAspect();
Prs3d_Root::CurrentGroup( aPresentation )->SetPrimitivesAspect( LA->LineAspect()->Aspect() );
aPresentation->CurrentGroup()->SetPrimitivesAspect( LA->LineAspect()->Aspect() );
Standard_Real ArrowLength = LA->ArrowAspect()->Length();
DsgPrs::ComputeFilletRadiusPresentation( ArrowLength,
@@ -101,7 +101,7 @@ void DsgPrs_FilletRadiusPresentation::Add (const Handle(Prs3d_Presentation)& aPr
Handle(Graphic3d_ArrayOfPolylines) aPrims = new Graphic3d_ArrayOfPolylines(NodeNumber);
for (Standard_Integer i = 0 ; i < NodeNumber; i++, FirstParCirc += delta)
aPrims->AddVertex(ElCLib::Value( FirstParCirc, FilletCirc ));
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
HasCircle = Standard_True;
Handle(Geom_Circle) Circle = new Geom_Circle( FilletCirc );
@@ -116,10 +116,10 @@ void DsgPrs_FilletRadiusPresentation::Add (const Handle(Prs3d_Presentation)& aPr
Handle(Graphic3d_ArrayOfSegments) aPrims = new Graphic3d_ArrayOfSegments(2);
aPrims->AddVertex(DrawPosition);
aPrims->AddVertex(EndOfArrow);
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
// Drawing the text
Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), aText, DrawPosition);
Prs3d_Text::Draw (aPresentation->CurrentGroup(), LA->TextAspect(), aText, DrawPosition);
// Add presentation of arrows
DsgPrs::ComputeSymbol( aPresentation, LA, EndOfArrow, EndOfArrow, DirOfArrow, DirOfArrow, ArrowPrs );

View File

@@ -28,7 +28,6 @@
#include <Prs3d_DimensionAspect.hxx>
#include <Prs3d_LineAspect.hxx>
#include <Prs3d_Presentation.hxx>
#include <Prs3d_Root.hxx>
//=======================================================================
//function : Add
@@ -43,7 +42,7 @@ void DsgPrs_FixPresentation::Add(
const Standard_Real symbsize)
{
Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
Handle(Graphic3d_ArrayOfSegments) aPrims = new Graphic3d_ArrayOfSegments(10);
@@ -90,14 +89,14 @@ void DsgPrs_FixPresentation::Add(
aPrims->AddVertex(PF);
aPrims->AddVertex(PL);
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
Prs3d_Root::NewGroup(aPresentation);
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
aPresentation->NewGroup();
aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
Quantity_Color aColor = LA->LineAspect()->Aspect()->Color();
Handle(Graphic3d_AspectMarker3d) aMarkerAsp = new Graphic3d_AspectMarker3d (Aspect_TOM_O, aColor, 1.0);
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect (aMarkerAsp);
aPresentation->CurrentGroup()->SetPrimitivesAspect (aMarkerAsp);
Handle(Graphic3d_ArrayOfPoints) anArrayOfPoints = new Graphic3d_ArrayOfPoints (1);
anArrayOfPoints->AddVertex (aPntAttach.X(), aPntAttach.Y(), aPntAttach.Z());
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray (anArrayOfPoints);
aPresentation->CurrentGroup()->AddPrimitiveArray (anArrayOfPoints);
}

View File

@@ -43,24 +43,24 @@ void DsgPrs_IdenticPresentation::Add( const Handle(Prs3d_Presentation)& aPresent
const gp_Pnt& aPntOffset)
{
Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
Handle(Graphic3d_ArrayOfSegments) aPrims = new Graphic3d_ArrayOfSegments(2);
aPrims->AddVertex(aPntAttach);
aPrims->AddVertex(aPntOffset);
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
Prs3d_Root::NewGroup(aPresentation);
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
aPresentation->NewGroup();
aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
Quantity_Color aColor = LA->LineAspect()->Aspect()->Color();
Handle(Graphic3d_AspectMarker3d) aMarkerAsp = new Graphic3d_AspectMarker3d (Aspect_TOM_O, aColor, 1.0);
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect (aMarkerAsp);
aPresentation->CurrentGroup()->SetPrimitivesAspect (aMarkerAsp);
Handle(Graphic3d_ArrayOfPoints) anArrayOfPoints = new Graphic3d_ArrayOfPoints (1);
anArrayOfPoints->AddVertex (aPntAttach.X(), aPntAttach.Y(), aPntAttach.Z());
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray (anArrayOfPoints);
aPresentation->CurrentGroup()->AddPrimitiveArray (anArrayOfPoints);
// texte
Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), aText, aPntOffset);
Prs3d_Text::Draw (aPresentation->CurrentGroup(), LA->TextAspect(), aText, aPntOffset);
}
@@ -72,7 +72,7 @@ void DsgPrs_IdenticPresentation::Add( const Handle(Prs3d_Presentation)& aPresent
const gp_Pnt& aPntOffset)
{
Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
Handle(Graphic3d_ArrayOfSegments) aPrims = new Graphic3d_ArrayOfSegments(4);
@@ -93,10 +93,10 @@ void DsgPrs_IdenticPresentation::Add( const Handle(Prs3d_Presentation)& aPresent
else
aPrims->AddVertex(aSAttach);
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
// texte
Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), aText, aPntOffset);
Prs3d_Text::Draw (aPresentation->CurrentGroup(), LA->TextAspect(), aText, aPntOffset);
}
@@ -110,7 +110,7 @@ void DsgPrs_IdenticPresentation::Add(const Handle(Prs3d_Presentation)& aPresenta
const gp_Pnt& aPntOffset)
{
Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
gp_Ax2 ax = theAxe;
ax.SetLocation(aCenter);
@@ -141,10 +141,10 @@ void DsgPrs_IdenticPresentation::Add(const Handle(Prs3d_Presentation)& aPresenta
for (Standard_Integer i = 1; i<=nbp; i++)
aPrims->AddVertex(ElCLib::Value(pFAttach + dteta*(i-1),CC));
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
// texte
Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), aText, aPntOffset);
Prs3d_Text::Draw (aPresentation->CurrentGroup(), LA->TextAspect(), aText, aPntOffset);
}
// jfa 16/10/2000
@@ -159,7 +159,7 @@ void DsgPrs_IdenticPresentation::Add(const Handle(Prs3d_Presentation)& aPresenta
const gp_Pnt& aPntOnCirc)
{
Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
gp_Ax2 ax = theAxe;
ax.SetLocation(aCenter);
@@ -190,10 +190,10 @@ void DsgPrs_IdenticPresentation::Add(const Handle(Prs3d_Presentation)& aPresenta
for (Standard_Integer i = 1; i<=nbp; i++)
aPrims->AddVertex(ElCLib::Value(pFAttach + dteta*(i-1),CC));
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
// texte
Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), aText, aPntOffset);
Prs3d_Text::Draw (aPresentation->CurrentGroup(), LA->TextAspect(), aText, aPntOffset);
}
// jfa 16/10/2000 end
@@ -208,7 +208,7 @@ void DsgPrs_IdenticPresentation::Add(const Handle(Prs3d_Presentation)& aPresenta
const gp_Pnt& aPntOnElli)
{
Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
Standard_Real pFAttach = ElCLib::Parameter(anEllipse, aFAttach);
Standard_Real pSAttach = ElCLib::Parameter(anEllipse, aSAttach);
@@ -235,9 +235,9 @@ void DsgPrs_IdenticPresentation::Add(const Handle(Prs3d_Presentation)& aPresenta
for (Standard_Integer i = 1; i<=nbp; i++)
aPrims->AddVertex(ElCLib::Value(pFAttach + dteta*(i-1),anEllipse));
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
// texte
Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), aText, aPntOffset);
Prs3d_Text::Draw (aPresentation->CurrentGroup(), LA->TextAspect(), aText, aPntOffset);
}
// jfa 10/10/2000 end

View File

@@ -34,7 +34,6 @@
#include <Prs3d_DimensionAspect.hxx>
#include <Prs3d_LineAspect.hxx>
#include <Prs3d_Presentation.hxx>
#include <Prs3d_Root.hxx>
#include <Prs3d_Text.hxx>
#include <TCollection_AsciiString.hxx>
#include <TCollection_ExtendedString.hxx>
@@ -48,7 +47,7 @@ void DsgPrs_LengthPresentation::Add (const Handle(Prs3d_Presentation)& aPresenta
const gp_Pnt& OffsetPoint)
{
Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
gp_Lin L1 (AttachmentPoint1,aDirection);
gp_Lin L2 (AttachmentPoint2,aDirection);
@@ -91,20 +90,20 @@ void DsgPrs_LengthPresentation::Add (const Handle(Prs3d_Presentation)& aPresenta
arrdir.Reverse();
// arrow 1 : 2nd group
Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), Proj1, arrdir, LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
Prs3d_Arrow::Draw (aPresentation->CurrentGroup(), Proj1, arrdir, LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
Prs3d_Root::NewGroup(aPresentation);
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
aPresentation->NewGroup();
aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
// arrow 2 : 3rd group
Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), Proj2, arrdir.Reversed(), LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
Prs3d_Arrow::Draw (aPresentation->CurrentGroup(), Proj2, arrdir.Reversed(), LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
Prs3d_Root::NewGroup(aPresentation);
aPresentation->NewGroup();
// text : 4th group
Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), aText, offp);
Prs3d_Text::Draw (aPresentation->CurrentGroup(), LA->TextAspect(), aText, offp);
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
// processing of call 1 : 5th group
aPrims->AddVertex(AttachmentPoint1);
@@ -114,7 +113,7 @@ void DsgPrs_LengthPresentation::Add (const Handle(Prs3d_Presentation)& aPresenta
aPrims->AddVertex(AttachmentPoint2);
aPrims->AddVertex(Proj2);
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
}
//==================================================================================
@@ -133,7 +132,7 @@ void DsgPrs_LengthPresentation::Add( const Handle(Prs3d_Presentation)& aPresenta
const DsgPrs_ArrowSide ArrowPrs )
{
Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
gp_Pnt EndOfArrow1, EndOfArrow2;
gp_Dir DirOfArrow1;
@@ -175,7 +174,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 (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), aText, OffsetPoint);
Prs3d_Text::Draw (aPresentation->CurrentGroup(), LA->TextAspect(), aText, OffsetPoint);
// Line from AttachmentPoint1 to end of Arrow1
aPrims->AddVertex(AttachmentPoint1);
@@ -185,7 +184,7 @@ void DsgPrs_LengthPresentation::Add( const Handle(Prs3d_Presentation)& aPresenta
aPrims->AddVertex(AttachmentPoint2);
aPrims->AddVertex(EndOfArrow2);
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
}
@@ -204,7 +203,7 @@ void DsgPrs_LengthPresentation::Add (const Handle(Prs3d_Presentation)& aPresenta
const DsgPrs_ArrowSide ArrowPrs)
{
Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
gp_Lin L1 (AttachmentPoint1,aDirection);
gp_Lin L2 (AttachmentPoint2,aDirection);
@@ -255,10 +254,10 @@ void DsgPrs_LengthPresentation::Add (const Handle(Prs3d_Presentation)& aPresenta
aPrims->AddVertex(AttachmentPoint2);
aPrims->AddVertex(Proj2);
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
// text
Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), aText, offp);
Prs3d_Text::Draw (aPresentation->CurrentGroup(), LA->TextAspect(), aText, offp);
// symbols at the extremities of the face
DsgPrs::ComputeSymbol(aPresentation,LA,Proj1,Proj2,arrdir,arrdir.Reversed(),ArrowPrs);
@@ -281,7 +280,7 @@ void DsgPrs_LengthPresentation::Add( const Handle(Prs3d_Presentation)& aPresenta
const DsgPrs_ArrowSide ArrowPrs )
{
Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
gp_Pnt EndOfArrow2;
gp_Dir DirOfArrow1;
@@ -320,13 +319,13 @@ void DsgPrs_LengthPresentation::Add( const Handle(Prs3d_Presentation)& aPresenta
Handle(Graphic3d_ArrayOfPrimitives) aPrims = new Graphic3d_ArrayOfSegments(2);
aPrims->AddVertex(FirstPoint);
aPrims->AddVertex(LastPoint);
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
// Add presentation of arrows
DsgPrs::ComputeSymbol( aPresentation, LA, AttachmentPoint1, EndOfArrow2, DirOfArrow1, DirOfArrow1.Reversed(), ArrowPrs );
// Drawing the text
Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), aText, OffsetPoint);
Prs3d_Text::Draw (aPresentation->CurrentGroup(), LA->TextAspect(), aText, OffsetPoint);
// Two curves from end of Arrow2 to AttachmentPoint2
Standard_Real Alpha, delta;
@@ -340,7 +339,7 @@ void DsgPrs_LengthPresentation::Add( const Handle(Prs3d_Presentation)& aPresenta
aPrims = new Graphic3d_ArrayOfPolylines(NodeNumber);
for (Standard_Integer i = 1; i <= NodeNumber; i++, FirstU += delta)
aPrims->AddVertex(VCurve->Value( FirstU ));
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
}
Alpha = Abs( deltaV );
if (Alpha > Precision::Angular() && Alpha<Precision::Infinite())
@@ -350,7 +349,7 @@ void DsgPrs_LengthPresentation::Add( const Handle(Prs3d_Presentation)& aPresenta
aPrims = new Graphic3d_ArrayOfPolylines(NodeNumber);
for (Standard_Integer i = 1; i <= NodeNumber; i++, FirstV += delta)
aPrims->AddVertex(UCurve->Value( FirstV ));
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
}
}
@@ -369,27 +368,27 @@ void DsgPrs_LengthPresentation::Add (const Handle(Prs3d_Presentation)& aPrs,
Handle(Graphic3d_ArrayOfSegments) aPrims = new Graphic3d_ArrayOfSegments(2);
aPrims->AddVertex(Pt1);
aPrims->AddVertex(Pt2);
Prs3d_Root::CurrentGroup(aPrs)->AddPrimitiveArray(aPrims);
aPrs->CurrentGroup()->AddPrimitiveArray(aPrims);
gp_Vec V ;
switch(ArrowPrs)
{
case DsgPrs_AS_LASTAR:
Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPrs), Pt2, gp_Dir(gp_Vec(Pt1,Pt2)),
Prs3d_Arrow::Draw (aPrs->CurrentGroup(), Pt2, gp_Dir(gp_Vec(Pt1,Pt2)),
aDrawer->DimensionAspect()->ArrowAspect()->Angle(),
aDrawer->DimensionAspect()->ArrowAspect()->Length());
break;
case DsgPrs_AS_FIRSTAR:
Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPrs), Pt1, gp_Dir(gp_Vec(Pt2,Pt1)),
Prs3d_Arrow::Draw (aPrs->CurrentGroup(), 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 (Prs3d_Root::CurrentGroup (aPrs), Pt2, gp_Dir(V),
Prs3d_Arrow::Draw (aPrs->CurrentGroup(), Pt2, gp_Dir(V),
aDrawer->DimensionAspect()->ArrowAspect()->Angle(),
aDrawer->DimensionAspect()->ArrowAspect()->Length());
Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPrs), Pt1, gp_Dir(V.Reversed()),
Prs3d_Arrow::Draw (aPrs->CurrentGroup(), Pt1, gp_Dir(V.Reversed()),
aDrawer->DimensionAspect()->ArrowAspect()->Angle(),
aDrawer->DimensionAspect()->ArrowAspect()->Length());
break;

View File

@@ -32,7 +32,6 @@
#include <Prs3d_DimensionAspect.hxx>
#include <Prs3d_LineAspect.hxx>
#include <Prs3d_Presentation.hxx>
#include <Prs3d_Root.hxx>
#include <Prs3d_Text.hxx>
#include <TCollection_ExtendedString.hxx>
@@ -59,8 +58,8 @@ void DsgPrs_MidPointPresentation::Add (const Handle(Prs3d_Presentation)& aPresen
if ( first )
{
// center of the symmetry - circle around the MidPoint
Prs3d_Root::NewGroup(aPresentation);
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
aPresentation->NewGroup();
aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
const Standard_Real alpha = 2. * M_PI;
const Standard_Integer nbp = 100;
@@ -76,26 +75,26 @@ void DsgPrs_MidPointPresentation::Add (const Handle(Prs3d_Presentation)& aPresen
aPrims->AddVertex(Position.IsEqual(MidPoint,rad)? MidPoint : ElCLib::Value(ElCLib::Parameter(aCircleM,Position),aCircleM)); // mid point
aPrims->AddVertex(Position); // text position
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
// texte
TCollection_ExtendedString aText(" (+)");
Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), aText, Position);
Prs3d_Text::Draw (aPresentation->CurrentGroup(), LA->TextAspect(), aText, Position);
}
if ( !AttachPoint.IsEqual(MidPoint, Precision::Confusion()) )
{
if ( !first )
{
Prs3d_Root::NewGroup(aPresentation);
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
aPresentation->NewGroup();
aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
}
// segment from mid point to the geometry
Handle(Graphic3d_ArrayOfSegments) aPrims = new Graphic3d_ArrayOfSegments(2);
aPrims->AddVertex(ElCLib::Value(ElCLib::Parameter(aCircleM,AttachPoint),aCircleM)); // mid point
aPrims->AddVertex(AttachPoint); // attach point to the geometry
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
}
}
@@ -123,13 +122,13 @@ void DsgPrs_MidPointPresentation::Add (const Handle(Prs3d_Presentation)& aPresen
gp_Circ aCircleM (ax,rad);
// segment on line
Prs3d_Root::NewGroup(aPresentation);
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
aPresentation->NewGroup();
aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
Handle(Graphic3d_ArrayOfPrimitives) aPrims = new Graphic3d_ArrayOfSegments(2);
aPrims->AddVertex(Point1);
aPrims->AddVertex(Point2);
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
if ( first )
{
@@ -148,11 +147,11 @@ void DsgPrs_MidPointPresentation::Add (const Handle(Prs3d_Presentation)& aPresen
aPrims->AddVertex(Position.IsEqual(MidPoint,rad)? MidPoint : ElCLib::Value(ElCLib::Parameter(aCircleM,Position),aCircleM)); // mid point
aPrims->AddVertex(Position); // text position
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
// texte
TCollection_ExtendedString aText (" (+)");
Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), aText, Position);
Prs3d_Text::Draw (aPresentation->CurrentGroup(), LA->TextAspect(), aText, Position);
}
if ( !AttachPoint.IsEqual(MidPoint, Precision::Confusion()) )
@@ -161,7 +160,7 @@ void DsgPrs_MidPointPresentation::Add (const Handle(Prs3d_Presentation)& aPresen
aPrims = new Graphic3d_ArrayOfSegments(2);
aPrims->AddVertex(ElCLib::Value(ElCLib::Parameter(aCircleM,AttachPoint),aCircleM));
aPrims->AddVertex(AttachPoint); // attach point to the geometry
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
}
}
@@ -189,8 +188,8 @@ void DsgPrs_MidPointPresentation::Add (const Handle(Prs3d_Presentation)& aPresen
gp_Circ aCircleM (ax,rad);
// segment on circle
Prs3d_Root::NewGroup(aPresentation);
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
aPresentation->NewGroup();
aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
const Standard_Real pf = ElCLib::Parameter(aCircle,Point1);
const Standard_Real pl = ElCLib::Parameter(aCircle,Point2);
@@ -203,7 +202,7 @@ void DsgPrs_MidPointPresentation::Add (const Handle(Prs3d_Presentation)& aPresen
Handle(Graphic3d_ArrayOfPrimitives) aPrims = new Graphic3d_ArrayOfPolylines(nbp);
for (Standard_Integer i = 1; i <= nbp; i++)
aPrims->AddVertex(ElCLib::Value(pf + dteta*(i-1),aCircle));
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
if ( first )
{
@@ -222,11 +221,11 @@ void DsgPrs_MidPointPresentation::Add (const Handle(Prs3d_Presentation)& aPresen
aPrims->AddVertex(Position.IsEqual(MidPoint,rad)? MidPoint : ElCLib::Value(ElCLib::Parameter(aCircleM,Position),aCircleM)); // mid point
aPrims->AddVertex(Position); // text position
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
// texte
TCollection_ExtendedString aText (" (+)");
Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), aText, Position);
Prs3d_Text::Draw (aPresentation->CurrentGroup(), LA->TextAspect(), aText, Position);
}
if ( !AttachPoint.IsEqual(MidPoint, Precision::Confusion()) )
@@ -235,7 +234,7 @@ void DsgPrs_MidPointPresentation::Add (const Handle(Prs3d_Presentation)& aPresen
aPrims = new Graphic3d_ArrayOfSegments(2);
aPrims->AddVertex(ElCLib::Value(ElCLib::Parameter(aCircleM,AttachPoint),aCircleM)); // mid point
aPrims->AddVertex(AttachPoint); // attach point to the geometry
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
}
}
@@ -265,8 +264,8 @@ void DsgPrs_MidPointPresentation::Add (const Handle(Prs3d_Presentation)& aPresen
gp_Circ aCircleM (ax,rad);
// segment on ellipse
Prs3d_Root::NewGroup(aPresentation);
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
aPresentation->NewGroup();
aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
const Standard_Real pf = ElCLib::Parameter(aCircle,Point1);
const Standard_Real pl = ElCLib::Parameter(aCircle,Point2);
@@ -279,7 +278,7 @@ void DsgPrs_MidPointPresentation::Add (const Handle(Prs3d_Presentation)& aPresen
Handle(Graphic3d_ArrayOfPrimitives) aPrims = new Graphic3d_ArrayOfPolylines(nbp);
for (Standard_Integer i = 1; i <= nbp; i++)
aPrims->AddVertex(ElCLib::Value(pf + dteta*(i-1),aCircle));
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
if ( first )
{
@@ -298,11 +297,11 @@ void DsgPrs_MidPointPresentation::Add (const Handle(Prs3d_Presentation)& aPresen
aPrims->AddVertex(Position.IsEqual(MidPoint,rad)? MidPoint : ElCLib::Value(ElCLib::Parameter(aCircleM,Position),aCircleM)); // mid point
aPrims->AddVertex(Position); // text position
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
// texte
TCollection_ExtendedString aText (" (+)");
Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), aText, Position);
Prs3d_Text::Draw (aPresentation->CurrentGroup(), LA->TextAspect(), aText, Position);
}
if ( !AttachPoint.IsEqual(MidPoint, Precision::Confusion()) )
@@ -311,6 +310,6 @@ void DsgPrs_MidPointPresentation::Add (const Handle(Prs3d_Presentation)& aPresen
aPrims = new Graphic3d_ArrayOfSegments(2);
aPrims->AddVertex(ElCLib::Value(ElCLib::Parameter(aCircleM,AttachPoint),aCircleM)); // mid point
aPrims->AddVertex(AttachPoint); // attach point to the geometry
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
}
}

View File

@@ -46,7 +46,7 @@ void DsgPrs_OffsetPresentation::Add (const Handle(Prs3d_Presentation)& aPresenta
const gp_Pnt& OffsetPoint)
{
Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
gp_Lin L1 (AttachmentPoint1,aDirection);
gp_Lin L2 (AttachmentPoint2,aDirection2);
@@ -93,13 +93,13 @@ void DsgPrs_OffsetPresentation::Add (const Handle(Prs3d_Presentation)& aPresenta
aPrims->AddVertex(PointMin);
aPrims->AddVertex(PointMax);
Prs3d_Root::NewGroup(aPresentation);
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
aPresentation->NewGroup();
aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
if (DimNulle)
{
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());
Prs3d_Arrow::Draw (aPresentation->CurrentGroup(), offp, L4.Direction(), LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
Prs3d_Arrow::Draw (aPresentation->CurrentGroup(), offp, L4.Direction().Reversed(), LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
}
else
{
@@ -110,27 +110,27 @@ void DsgPrs_OffsetPresentation::Add (const Handle(Prs3d_Presentation)& aPresenta
arrdir.Reverse();
// fleche 1 : 2eme groupe
Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), Proj1, arrdir, LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
Prs3d_Arrow::Draw (aPresentation->CurrentGroup(), Proj1, arrdir, LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
Prs3d_Root::NewGroup(aPresentation);
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
aPresentation->NewGroup();
aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
// ball 1 : 3eme groupe
Quantity_Color aColor = LA->LineAspect()->Aspect()->Color();
Handle(Graphic3d_AspectMarker3d) aMarkerAsp = new Graphic3d_AspectMarker3d (Aspect_TOM_O, aColor, 1.0);
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect (aMarkerAsp);
aPresentation->CurrentGroup()->SetPrimitivesAspect (aMarkerAsp);
Handle(Graphic3d_ArrayOfPoints) anArrayOfPoints = new Graphic3d_ArrayOfPoints (1);
anArrayOfPoints->AddVertex (Proj2.X(), Proj2.Y(), Proj2.Z());
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray (anArrayOfPoints);
aPresentation->CurrentGroup()->AddPrimitiveArray (anArrayOfPoints);
Prs3d_Root::NewGroup(aPresentation);
aPresentation->NewGroup();
// texte : 4eme groupe
Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), aText, offp);
Prs3d_Text::Draw (aPresentation->CurrentGroup(), LA->TextAspect(), aText, offp);
}
Prs3d_Root::NewGroup(aPresentation);
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
aPresentation->NewGroup();
aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
// trait de rappel 1 : 5eme groupe
aPrims->AddVertex(AttachmentPoint1);
@@ -140,7 +140,7 @@ void DsgPrs_OffsetPresentation::Add (const Handle(Prs3d_Presentation)& aPresenta
aPrims->AddVertex(AttachmentPoint2);
aPrims->AddVertex(Proj2);
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
}
void DsgPrs_OffsetPresentation::AddAxes (const Handle(Prs3d_Presentation)& aPresentation,
@@ -165,47 +165,47 @@ void DsgPrs_OffsetPresentation::AddAxes (const Handle(Prs3d_Presentation)& aPres
Handle(Graphic3d_AspectLine3d) AxeAsp = new Graphic3d_AspectLine3d (acolor, atype, awidth);
AxeAsp->SetType( Aspect_TOL_DOTDASH);
Prs3d_Root::NewGroup(aPresentation);
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(AxeAsp);
aPresentation->NewGroup();
aPresentation->CurrentGroup()->SetPrimitivesAspect(AxeAsp);
// trait d'axe : 1er groupe
Handle(Graphic3d_ArrayOfSegments) aPrims = new Graphic3d_ArrayOfSegments(2);
aPrims->AddVertex(AttachmentPoint1);
aPrims->AddVertex(Proj1);
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
Prs3d_Root::NewGroup(aPresentation);
aPresentation->NewGroup();
Handle(Graphic3d_AspectLine3d) Axe2Asp = new Graphic3d_AspectLine3d (acolor, atype, awidth);
Axe2Asp->SetType ( Aspect_TOL_DOTDASH);
Axe2Asp->SetWidth ( 4.);
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(Axe2Asp);
aPresentation->CurrentGroup()->SetPrimitivesAspect(Axe2Asp);
// trait d'axe: 2eme groupe
aPrims = new Graphic3d_ArrayOfSegments(2);
aPrims->AddVertex(AttachmentPoint2);
aPrims->AddVertex(Proj2);
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
// anneau : 3eme et 4eme groupes
Handle(Graphic3d_ArrayOfPoints) anArrayOfPoints = new Graphic3d_ArrayOfPoints (1);
anArrayOfPoints->AddVertex (Proj2.X(), Proj2.Y(), Proj2.Z());
Prs3d_Root::NewGroup(aPresentation);
aPresentation->NewGroup();
Handle(Graphic3d_AspectMarker3d) MarkerAsp = new Graphic3d_AspectMarker3d();
MarkerAsp->SetType(Aspect_TOM_O);
MarkerAsp->SetScale(4.);
//MarkerAsp->SetColor(Quantity_Color(Quantity_NOC_RED));
MarkerAsp->SetColor(acolor);
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(MarkerAsp);
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray (anArrayOfPoints);
aPresentation->CurrentGroup()->SetPrimitivesAspect(MarkerAsp);
aPresentation->CurrentGroup()->AddPrimitiveArray (anArrayOfPoints);
Prs3d_Root::NewGroup(aPresentation);
aPresentation->NewGroup();
Handle(Graphic3d_AspectMarker3d) Marker2Asp = new Graphic3d_AspectMarker3d();
Marker2Asp->SetType(Aspect_TOM_O);
Marker2Asp->SetScale(2.);
//Marker2Asp->SetColor(Quantity_Color(Quantity_NOC_GREEN));
Marker2Asp->SetColor(acolor);
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(Marker2Asp);
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray (anArrayOfPoints);
aPresentation->CurrentGroup()->SetPrimitivesAspect(Marker2Asp);
aPresentation->CurrentGroup()->AddPrimitiveArray (anArrayOfPoints);
}

View File

@@ -43,7 +43,7 @@ void DsgPrs_ParalPresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
const gp_Pnt& OffsetPoint)
{
Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
gp_Lin L1 (AttachmentPoint1,aDirection);
gp_Lin L2 (AttachmentPoint2,aDirection);
gp_Pnt Proj1 = ElCLib::Value(ElCLib::Parameter(L1,OffsetPoint),L1);
@@ -77,8 +77,8 @@ void DsgPrs_ParalPresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
aPrims->AddVertex(PointMin);
aPrims->AddVertex(PointMax);
Prs3d_Root::NewGroup(aPresentation);
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
aPresentation->NewGroup();
aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
if (dist < (LA->ArrowAspect()->Length()+LA->ArrowAspect()->Length()))
outside = Standard_True;
@@ -87,20 +87,20 @@ void DsgPrs_ParalPresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
arrdir.Reverse();
// arrow 1 : 2nd group
Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), Proj1, arrdir, LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
Prs3d_Arrow::Draw (aPresentation->CurrentGroup(), Proj1, arrdir, LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
Prs3d_Root::NewGroup(aPresentation);
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
aPresentation->NewGroup();
aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
// arrow 2 : 3rd group
Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), Proj2, arrdir.Reversed(), LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
Prs3d_Arrow::Draw (aPresentation->CurrentGroup(), Proj2, arrdir.Reversed(), LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
Prs3d_Root::NewGroup(aPresentation);
aPresentation->NewGroup();
// text : 4th group
Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), aText, offp);
Prs3d_Text::Draw (aPresentation->CurrentGroup(), LA->TextAspect(), aText, offp);
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
// processing of call 1 : 5th group
aPrims->AddVertex(AttachmentPoint1);
@@ -110,7 +110,7 @@ void DsgPrs_ParalPresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
aPrims->AddVertex(AttachmentPoint2);
aPrims->AddVertex(Proj2);
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
}
@@ -128,7 +128,7 @@ void DsgPrs_ParalPresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
const DsgPrs_ArrowSide ArrowPrs)
{
Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
gp_Lin L1 (AttachmentPoint1,aDirection);
gp_Lin L2 (AttachmentPoint2,aDirection);
@@ -177,10 +177,10 @@ void DsgPrs_ParalPresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
aPrims->AddVertex(AttachmentPoint2);
aPrims->AddVertex(Proj2);
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
// text
Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), aText, offp);
Prs3d_Text::Draw (aPresentation->CurrentGroup(), LA->TextAspect(), aText, offp);
//arrows
DsgPrs::ComputeSymbol(aPresentation,LA,Proj1,Proj2,arrdir,arrdir.Reversed(),ArrowPrs);

View File

@@ -50,7 +50,7 @@ void DsgPrs_PerpenPresentation::Add (const Handle(Prs3d_Presentation)& aPresenta
{
Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
LA->LineAspect()->SetTypeOfLine(Aspect_TOL_SOLID); // ou DOT ou DOTDASH
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
// segments
Handle(Graphic3d_ArrayOfPrimitives) aPrims = new Graphic3d_ArrayOfPolylines(6,2);
@@ -75,26 +75,26 @@ void DsgPrs_PerpenPresentation::Add (const Handle(Prs3d_Presentation)& aPresenta
aPrims->AddVertex(p_symb);
aPrims->AddVertex(pAx22);
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
// points attache
if (intOut1 || intOut2)
{
LA->LineAspect()->SetTypeOfLine(Aspect_TOL_DOT); // ou DOT ou DOTDASH
Prs3d_Root::NewGroup(aPresentation);
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
aPresentation->NewGroup();
aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
if (intOut1) {
aPrims = new Graphic3d_ArrayOfSegments(2);
aPrims->AddVertex(pAx1);
aPrims->AddVertex(pnt1);
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
}
if (intOut2) {
aPrims = new Graphic3d_ArrayOfSegments(2);
aPrims->AddVertex(pAx2);
aPrims->AddVertex(pnt2);
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
}
}
}

View File

@@ -70,7 +70,7 @@ void DsgPrs_RadiusPresentation::Add (const Handle(Prs3d_Presentation)& aPresenta
lpara -= 2.*M_PI;
}
Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
Standard_Real parat = ElCLib::Parameter(aCircle,AttachmentPoint);
gp_Pnt attpoint = AttachmentPoint;
@@ -114,17 +114,17 @@ void DsgPrs_RadiusPresentation::Add (const Handle(Prs3d_Presentation)& aPresenta
Handle(Graphic3d_ArrayOfSegments) aPrims = new Graphic3d_ArrayOfSegments(2);
aPrims->AddVertex(firstpoint);
aPrims->AddVertex(drawtopoint);
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
gp_Dir arrdir = L.Direction();
if (reverseArrow)
arrdir.Reverse();
// fleche
Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), ptoncirc, arrdir, LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
Prs3d_Arrow::Draw (aPresentation->CurrentGroup(), ptoncirc, arrdir, LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
// texte
Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), aText, attpoint);
Prs3d_Text::Draw (aPresentation->CurrentGroup(), LA->TextAspect(), aText, attpoint);
}
//=======================================================================
@@ -144,7 +144,7 @@ void DsgPrs_RadiusPresentation::Add( const Handle(Prs3d_Presentation)& aPresenta
const Standard_Boolean reverseArrow)
{
Handle( Prs3d_DimensionAspect ) LA = aDrawer->DimensionAspect();
Prs3d_Root::CurrentGroup( aPresentation )->SetPrimitivesAspect( LA->LineAspect()->Aspect() );
aPresentation->CurrentGroup()->SetPrimitivesAspect( LA->LineAspect()->Aspect() );
gp_Pnt LineOrigin, LineEnd;
DsgPrs::ComputeRadiusLine(Center, EndOfArrow, AttachmentPoint, drawFromCenter, LineOrigin, LineEnd);
@@ -152,10 +152,10 @@ void DsgPrs_RadiusPresentation::Add( const Handle(Prs3d_Presentation)& aPresenta
Handle(Graphic3d_ArrayOfSegments) aPrims = new Graphic3d_ArrayOfSegments(2);
aPrims->AddVertex(LineOrigin);
aPrims->AddVertex(LineEnd);
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
// text
Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation), LA->TextAspect(), aText, AttachmentPoint);
Prs3d_Text::Draw (aPresentation->CurrentGroup(), LA->TextAspect(), aText, AttachmentPoint);
gp_Dir ArrowDir = gce_MakeDir( LineOrigin , LineEnd );
if (reverseArrow)

View File

@@ -22,7 +22,6 @@
#include <Prs3d_LineAspect.hxx>
#include <Prs3d_PlaneAspect.hxx>
#include <Prs3d_Presentation.hxx>
#include <Prs3d_Root.hxx>
#include <Prs3d_ShadingAspect.hxx>
//=======================================================================
@@ -35,14 +34,14 @@ void DsgPrs_ShadedPlanePresentation::Add(const Handle(Prs3d_Presentation)& aPres
const gp_Pnt& aPt2,
const gp_Pnt& aPt3)
{
Handle(Graphic3d_Group) TheGroup = Prs3d_Root::CurrentGroup(aPresentation);
TheGroup->SetPrimitivesAspect(aDrawer->PlaneAspect()->EdgesAspect()->Aspect());
TheGroup->SetPrimitivesAspect(aDrawer->ShadingAspect()->Aspect());
Handle(Graphic3d_Group) aGroup = aPresentation->CurrentGroup();
aGroup->SetPrimitivesAspect(aDrawer->PlaneAspect()->EdgesAspect()->Aspect());
aGroup->SetPrimitivesAspect(aDrawer->ShadingAspect()->Aspect());
Handle(Graphic3d_ArrayOfPolygons) aPrims = new Graphic3d_ArrayOfPolygons(4);
aPrims->AddVertex(aPt1);
aPrims->AddVertex(aPt2);
aPrims->AddVertex(aPt3);
aPrims->AddVertex(aPt1);
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
aGroup->AddPrimitiveArray(aPrims);
}

View File

@@ -249,12 +249,12 @@ void DsgPrs_ShapeDirPresentation::Add(const Handle(Prs3d_Presentation)& prs,
gp_Pnt pt2(pt.XYZ()+leng*dir.XYZ());
Prs3d_Root::CurrentGroup(prs)->SetPrimitivesAspect(drawer->LineAspect()->Aspect());
prs->CurrentGroup()->SetPrimitivesAspect(drawer->LineAspect()->Aspect());
Handle(Graphic3d_ArrayOfSegments) aPrims = new Graphic3d_ArrayOfSegments(2);
aPrims->AddVertex(pt);
aPrims->AddVertex(pt2);
Prs3d_Root::CurrentGroup(prs)->AddPrimitiveArray(aPrims);
prs->CurrentGroup()->AddPrimitiveArray(aPrims);
Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (prs), pt2, dir, M_PI/180.*10., leng*0.3);
Prs3d_Arrow::Draw (prs->CurrentGroup(), pt2, dir, M_PI/180.*10., leng*0.3);
}

View 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 (Prs3d_Root::CurrentGroup (aPresentation), TA, aText, OffsetPoint);
Prs3d_Text::Draw (aPresentation->CurrentGroup(), TA, aText, OffsetPoint);
// 2eme groupe : marker
Handle(Geom_CartesianPoint) theP = new Geom_CartesianPoint(OffsetPoint);

View File

@@ -59,7 +59,7 @@ void DsgPrs_SymmetricPresentation::Add (const Handle(Prs3d_Presentation)& aPrese
const gp_Pnt& OffsetPoint)
{
Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
gp_Pnt ProjOffsetPoint = ElCLib::Value(ElCLib::Parameter(aAxis,OffsetPoint),aAxis);
gp_Pnt PjAttachPnt1 = ElCLib::Value(ElCLib::Parameter(aAxis,AttachmentPoint1),aAxis);
@@ -158,8 +158,8 @@ void DsgPrs_SymmetricPresentation::Add (const Handle(Prs3d_Presentation)& aPrese
if(aAxis.Distance(P1) > D1*(1 + coeff) && !Cross){
//==== PROCESSING OF FACE ===========
Prs3d_Root::NewGroup(aPresentation);
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
aPresentation->NewGroup();
aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
Pj_P1 = ElCLib::Value(ElCLib::Parameter(aAxis,P1),aAxis);
gp_Vec Vp(Pj_P1,P1);
@@ -222,7 +222,7 @@ void DsgPrs_SymmetricPresentation::Add (const Handle(Prs3d_Presentation)& aPrese
aPrims->AddVertex(Sym_pint);
aPrims->AddVertex(P2);
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
}
/*===================================
@@ -236,8 +236,8 @@ void DsgPrs_SymmetricPresentation::Add (const Handle(Prs3d_Presentation)& aPrese
else if (aAxis.Distance(P1) < D1*(1 - coeff) || Cross) {
//------ PROCESSING OF FACE ------------
Prs3d_Root::NewGroup(aPresentation);
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
aPresentation->NewGroup();
aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
Pj_P1 = ElCLib::Value(ElCLib::Parameter(aAxis,P1),aAxis);
gp_Vec VpInf(Pj_P1,P1);
@@ -301,13 +301,13 @@ void DsgPrs_SymmetricPresentation::Add (const Handle(Prs3d_Presentation)& aPrese
aPrims->AddVertex(Sym_pint);
aPrims->AddVertex(P2);
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
}
else {
//==== PROCESSING OF FACE ===========
Prs3d_Root::NewGroup(aPresentation);
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
aPresentation->NewGroup();
aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
Handle(Graphic3d_ArrayOfSegments) aPrims = new Graphic3d_ArrayOfSegments(6);
@@ -322,21 +322,21 @@ void DsgPrs_SymmetricPresentation::Add (const Handle(Prs3d_Presentation)& aPrese
aPrims->AddVertex(AttachmentPoint2);
aPrims->AddVertex(P2);
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
}
//==== ARROWS ================
Prs3d_Root::NewGroup(aPresentation);
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
aPresentation->NewGroup();
aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
if (dist < (LA->ArrowAspect()->Length()+LA->ArrowAspect()->Length())) outside = Standard_True;
gp_Dir arrdir = L3.Direction().Reversed();
if (outside) arrdir.Reverse();
// arrow 1 ----
Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), P1, arrdir, LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
Prs3d_Arrow::Draw (aPresentation->CurrentGroup(), P1, arrdir, LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
// arrow 2 ----
Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), P2, arrdir.Reversed(), LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
Prs3d_Arrow::Draw (aPresentation->CurrentGroup(), P2, arrdir.Reversed(), LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
//-------------------------------------------------------------------------------------
//| SYMBOL OF SYMMETRY |
@@ -371,8 +371,8 @@ void DsgPrs_SymmetricPresentation::Add (const Handle(Prs3d_Presentation)& aPrese
//Calculate the extremities of the symbol axis
gp_Vec vecAxe = vecA.Multiplied(.7);
Prs3d_Root::NewGroup(aPresentation);
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
aPresentation->NewGroup();
aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
Handle(Graphic3d_ArrayOfPolylines) aPrims = new Graphic3d_ArrayOfPolylines(13,5);
@@ -426,7 +426,7 @@ void DsgPrs_SymmetricPresentation::Add (const Handle(Prs3d_Presentation)& aPrese
aPrims->AddVertex(pm.Translated(vsym));
aPrims->AddVertex(pm.Translated(vsym.Reversed()));
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
}
//===================================================================
@@ -442,7 +442,7 @@ void DsgPrs_SymmetricPresentation::Add (const Handle(Prs3d_Presentation)& aPrese
const gp_Pnt& OffsetPoint)
{
Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
gp_Pnt OffsetPnt(OffsetPoint.X(),OffsetPoint.Y(),OffsetPoint.Z());
gp_Pnt Center1 = aCircle1.Location();
@@ -491,7 +491,7 @@ void DsgPrs_SymmetricPresentation::Add (const Handle(Prs3d_Presentation)& aPrese
Handle(Graphic3d_ArrayOfPrimitives) aPrims = new Graphic3d_ArrayOfSegments(2);
aPrims->AddVertex(PointMin);
aPrims->AddVertex(PointMax);
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
//==== PROCESSING OF CALL 1 =====
Standard_Integer nbp = 10;
@@ -530,7 +530,7 @@ void DsgPrs_SymmetricPresentation::Add (const Handle(Prs3d_Presentation)& aPrese
Standard_Integer i;
for(i = 2; i <= nbp; i++, alphaIter += Dalpha)
aPrims->AddVertex(ElCLib::Value(ParamPAttach1 + alphaIter,aCircle1));
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
//==== PROCESSING OF CALL 2 =====
gp_Pnt Center2 = ProjCenter1.Translated(Vp.Reversed());
@@ -570,20 +570,20 @@ void DsgPrs_SymmetricPresentation::Add (const Handle(Prs3d_Presentation)& aPrese
alphaIter = Dalpha;
for(i = 2; i <= nbp; i++, alphaIter += Dalpha)
aPrims->AddVertex(ElCLib::Value(ParamPAttach2 + alphaIter,aCircle2));
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
//==== ARROWS ================
Prs3d_Root::NewGroup(aPresentation);
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
aPresentation->NewGroup();
aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
if (dist < (LA->ArrowAspect()->Length()+LA->ArrowAspect()->Length())) outside = Standard_True;
gp_Dir arrdir = L3.Direction().Reversed();
if (outside) arrdir.Reverse();
// arrow 1 ----
Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), P1, arrdir, LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
Prs3d_Arrow::Draw (aPresentation->CurrentGroup(), P1, arrdir, LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
// arrow 2 ----
Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), P2, arrdir.Reversed(), LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
Prs3d_Arrow::Draw (aPresentation->CurrentGroup(), P2, arrdir.Reversed(), LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
//-------------------------------------------------------------------------------------
//| SYMBOL OF SYMMETRY |
@@ -609,8 +609,8 @@ void DsgPrs_SymmetricPresentation::Add (const Handle(Prs3d_Presentation)& aPrese
//Calculation of extremas of the axis of the symbol
gp_Vec vecAxe = vecA.Multiplied(.7);
Prs3d_Root::NewGroup(aPresentation);
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
aPresentation->NewGroup();
aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
aPrims = new Graphic3d_ArrayOfPolylines(13,5);
@@ -665,7 +665,7 @@ void DsgPrs_SymmetricPresentation::Add (const Handle(Prs3d_Presentation)& aPrese
aPrims->AddVertex(pm.Translated(vsym));
aPrims->AddVertex(pm.Translated(vsym.Reversed()));
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
}
//===================================================================
@@ -680,7 +680,7 @@ void DsgPrs_SymmetricPresentation::Add (const Handle(Prs3d_Presentation)& aPrese
const gp_Pnt& OffsetPoint)
{
Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
if (AttachmentPoint1.IsEqual(AttachmentPoint2,Precision::Confusion()))
{
@@ -690,15 +690,15 @@ void DsgPrs_SymmetricPresentation::Add (const Handle(Prs3d_Presentation)& aPrese
//Marker of localisation of the face
Quantity_Color aColor = LA->LineAspect()->Aspect()->Color();
Handle(Graphic3d_AspectMarker3d) aMarkerAsp = new Graphic3d_AspectMarker3d (Aspect_TOM_O, aColor, 1.0);
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect (aMarkerAsp);
aPresentation->CurrentGroup()->SetPrimitivesAspect (aMarkerAsp);
Handle(Graphic3d_ArrayOfPoints) anArrayOfPoints = new Graphic3d_ArrayOfPoints (1);
anArrayOfPoints->AddVertex (AttachmentPoint1.X(), AttachmentPoint1.Y(), AttachmentPoint1.Z());
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray (anArrayOfPoints);
aPresentation->CurrentGroup()->AddPrimitiveArray (anArrayOfPoints);
//Trace of the linking segment
Prs3d_Root::NewGroup(aPresentation);
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
aPresentation->NewGroup();
aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
Handle(Graphic3d_ArrayOfSegments) aPrims = new Graphic3d_ArrayOfSegments(8);
@@ -737,7 +737,7 @@ void DsgPrs_SymmetricPresentation::Add (const Handle(Prs3d_Presentation)& aPrese
aPrims->AddVertex(sgP21);
aPrims->AddVertex(sgP22);
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
}
//==============================================================
// OTHER CASES :
@@ -773,8 +773,8 @@ void DsgPrs_SymmetricPresentation::Add (const Handle(Prs3d_Presentation)& aPrese
gp_Pnt PointMax = ElCLib::Value(parmax,L3);
//==== PROCESSING OF FACE ===========
Prs3d_Root::NewGroup(aPresentation);
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
aPresentation->NewGroup();
aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
Handle(Graphic3d_ArrayOfPrimitives) aPrims = new Graphic3d_ArrayOfSegments(6);
@@ -789,36 +789,36 @@ void DsgPrs_SymmetricPresentation::Add (const Handle(Prs3d_Presentation)& aPrese
aPrims->AddVertex(AttachmentPoint2);
aPrims->AddVertex(P2);
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
//==== ARROWS ================
if (dist < (LA->ArrowAspect()->Length()+LA->ArrowAspect()->Length())) outside = Standard_True;
gp_Dir arrdir = L3.Direction().Reversed();
if (outside) arrdir.Reverse();
// arrow 1 ----
Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), P1, arrdir, LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
Prs3d_Arrow::Draw (aPresentation->CurrentGroup(), P1, arrdir, LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
// arrow 2 ----
Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), P2, arrdir.Reversed(), LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
Prs3d_Arrow::Draw (aPresentation->CurrentGroup(), P2, arrdir.Reversed(), LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
//==== POINTS ================
//Marker of localization of attachment points:
Prs3d_Root::NewGroup(aPresentation);
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
aPresentation->NewGroup();
aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
Quantity_Color aColor = LA->LineAspect()->Aspect()->Color();
Handle(Graphic3d_AspectMarker3d) aMarkerAspAtt = new Graphic3d_AspectMarker3d (Aspect_TOM_O, aColor, 1.0);
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect (aMarkerAspAtt);
aPresentation->CurrentGroup()->SetPrimitivesAspect (aMarkerAspAtt);
Handle(Graphic3d_ArrayOfPoints) anArrayOfPoints1 = new Graphic3d_ArrayOfPoints (1);
anArrayOfPoints1->AddVertex (AttachmentPoint1.X(), AttachmentPoint1.Y(), AttachmentPoint1.Z());
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray (anArrayOfPoints1);
aPresentation->CurrentGroup()->AddPrimitiveArray (anArrayOfPoints1);
Prs3d_Root::NewGroup(aPresentation);
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect (aMarkerAspAtt);
aPresentation->NewGroup();
aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
aPresentation->CurrentGroup()->SetPrimitivesAspect (aMarkerAspAtt);
Handle(Graphic3d_ArrayOfPoints) anArrayOfPoints2 = new Graphic3d_ArrayOfPoints (1);
anArrayOfPoints2->AddVertex (AttachmentPoint2.X(), AttachmentPoint2.Y(), AttachmentPoint2.Z());
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray (anArrayOfPoints2);
aPresentation->CurrentGroup()->AddPrimitiveArray (anArrayOfPoints2);
//-------------------------------------------------------------------------------------
//| SYMBOL OF SYMMETRY |
@@ -842,8 +842,8 @@ void DsgPrs_SymmetricPresentation::Add (const Handle(Prs3d_Presentation)& aPrese
//Calculate the extremas of the axis of the symbol
gp_Vec vecAxe = vecA.Multiplied(.7);
Prs3d_Root::NewGroup(aPresentation);
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
aPresentation->NewGroup();
aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
aPrims = new Graphic3d_ArrayOfPolylines(13,5);
@@ -898,6 +898,6 @@ void DsgPrs_SymmetricPresentation::Add (const Handle(Prs3d_Presentation)& aPrese
aPrims->AddVertex(pm.Translated(vsym));
aPrims->AddVertex(pm.Translated(vsym.Reversed()));
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
}
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
}
}

View File

@@ -52,20 +52,20 @@ void DsgPrs_TangentPresentation::Add (const Handle(Prs3d_Presentation)& aPresent
ARR2->SetLength(length/5);
// Array1OfVertex
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
Handle(Graphic3d_ArrayOfSegments) aPrims = new Graphic3d_ArrayOfSegments(2);
aPrims->AddVertex(p1);
aPrims->AddVertex(p2);
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
// fleche 1 :
Prs3d_Root::NewGroup(aPresentation);
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), p1, aDirection, LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
aPresentation->NewGroup();
aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
Prs3d_Arrow::Draw (aPresentation->CurrentGroup(), 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 (Prs3d_Root::CurrentGroup (aPresentation), p2, aDirection.Reversed(), LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
aPresentation->NewGroup();
aPresentation->CurrentGroup()->SetPrimitivesAspect(LA->LineAspect()->Aspect());
Prs3d_Arrow::Draw (aPresentation->CurrentGroup(), p2, aDirection.Reversed(), LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
}

View File

@@ -25,7 +25,6 @@
#include <Prs3d_ArrowAspect.hxx>
#include <Prs3d_LineAspect.hxx>
#include <Prs3d_Presentation.hxx>
#include <Prs3d_Root.hxx>
#include <Prs3d_TextAspect.hxx>
//=======================================================================
@@ -41,7 +40,7 @@ void DsgPrs_XYZAxisPresentation::Add(
const gp_Pnt& aPfirst,
const gp_Pnt& aPlast)
{
Handle(Graphic3d_Group) G = Prs3d_Root::CurrentGroup(aPresentation);
Handle(Graphic3d_Group) G = aPresentation->CurrentGroup();
G->SetPrimitivesAspect(aLineAspect->Aspect());
Handle(Graphic3d_ArrayOfSegments) aPrims = new Graphic3d_ArrayOfSegments(2);
@@ -49,14 +48,14 @@ void DsgPrs_XYZAxisPresentation::Add(
aPrims->AddVertex(aPlast);
G->AddPrimitiveArray(aPrims);
Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), aPlast,aDir, M_PI/180.*10., aVal/10.);
Prs3d_Arrow::Draw (aPresentation->CurrentGroup(), aPlast,aDir, M_PI/180.*10., aVal/10.);
if (*theText != '\0')
{
Handle(Graphic3d_Text) aText = new Graphic3d_Text (1.0f/81.0f);
aText->SetText (theText);
aText->SetPosition (aPlast);
Prs3d_Root::CurrentGroup(aPresentation)->AddText (aText);
aPresentation->CurrentGroup()->AddText (aText);
}
}
@@ -71,7 +70,7 @@ void DsgPrs_XYZAxisPresentation::Add(const Handle(Prs3d_Presentation)& aPresenta
const gp_Pnt& aPfirst,
const gp_Pnt& aPlast)
{
Handle(Graphic3d_Group) G = Prs3d_Root::CurrentGroup(aPresentation);
Handle(Graphic3d_Group) G = aPresentation->CurrentGroup();
G->SetPrimitivesAspect(aLineAspect->Aspect());
Handle(Graphic3d_ArrayOfSegments) aPrims = new Graphic3d_ArrayOfSegments(2);
@@ -80,7 +79,7 @@ void DsgPrs_XYZAxisPresentation::Add(const Handle(Prs3d_Presentation)& aPresenta
G->AddPrimitiveArray(aPrims);
G->SetPrimitivesAspect( anArrowAspect->Aspect() );
Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), aPlast, aDir, anArrowAspect->Angle(), aVal/10.);
Prs3d_Arrow::Draw (aPresentation->CurrentGroup(), aPlast, aDir, anArrowAspect->Angle(), aVal/10.);
G->SetPrimitivesAspect(aTextAspect->Aspect());
@@ -89,6 +88,6 @@ void DsgPrs_XYZAxisPresentation::Add(const Handle(Prs3d_Presentation)& aPresenta
Handle(Graphic3d_Text) aText = new Graphic3d_Text (1.0f/81.0f);
aText->SetText (theText);
aText->SetPosition (aPlast);
Prs3d_Root::CurrentGroup(aPresentation)->AddText(aText);
aPresentation->CurrentGroup()->AddText(aText);
}
}

View File

@@ -22,7 +22,6 @@
#include <Prs3d_LineAspect.hxx>
#include <Prs3d_PlaneAspect.hxx>
#include <Prs3d_Presentation.hxx>
#include <Prs3d_Root.hxx>
//=======================================================================
//function : Add
@@ -35,7 +34,7 @@ void DsgPrs_XYZPlanePresentation::Add(
const gp_Pnt& aPt2,
const gp_Pnt& aPt3)
{
Handle(Graphic3d_Group) TheGroup = Prs3d_Root::CurrentGroup(aPresentation);
Handle(Graphic3d_Group) TheGroup = aPresentation->CurrentGroup();
TheGroup->SetPrimitivesAspect(aDrawer->PlaneAspect()->EdgesAspect()->Aspect());
Handle(Graphic3d_ArrayOfPolylines) aPrims = new Graphic3d_ArrayOfPolylines(4);