Prs3d_Root usage has been replaced by direct calls to Prs3d_Presentation methods.
*Message_Printer* interface has been changed, so that sub-classes now have to implement only single method *Message_Printer::send()* accepting TCollection_AsciiString argument and having no Endl flag, which has been removed.
Old three Message_Printer::Send() methods remain defined virtual with unused last argument and redirecting to new send() method by default.
+@subsection upgrade_750_prd3d_root Prs3d_Root deprecation
+
+Redundant class Prs3d_Root has been marked as deprecated - Prs3d_Presentation::NewGroup() should be called directly.
+
@subsection upgrade_750_draw_hotkeys Draw Harness hotkeys
Draw Harness hotkeys **W** (Wireframe) and **S** (Shaded) have been re-mapped to **Ctrl+W** and **Ctrl+S**.
const Handle(Prs3d_Presentation)& thePrs,
const Standard_Integer )
{
- Handle(Graphic3d_Group) aPrsGroup = Prs3d_Root::CurrentGroup (thePrs);
+ Handle(Graphic3d_Group) aPrsGroup = thePrs->CurrentGroup();
aPrsGroup->SetGroupPrimitivesAspect (myDrawer->LineAspect()->Aspect());
aPrsGroup->SetGroupPrimitivesAspect (myDrawer->PointAspect()->Aspect());
Handle(Graphic3d_ArrayOfSegments) aPrims = new Graphic3d_ArrayOfSegments (2);
aPrims->AddVertex (myPnt);
aPrims->AddVertex (aLastPoint);
- Prs3d_Root::CurrentGroup (aPresentation)->SetPrimitivesAspect (myDrawer->LineAspect()->Aspect());
- Prs3d_Root::CurrentGroup (aPresentation)->AddPrimitiveArray (aPrims);
+ aPresentation->CurrentGroup()->SetPrimitivesAspect (myDrawer->LineAspect()->Aspect());
+ aPresentation->CurrentGroup()->AddPrimitiveArray (aPrims);
// Draw arrow
- Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation),
+ Prs3d_Arrow::Draw (aPresentation->CurrentGroup(),
aLastPoint,
myDir,
anArrowAspect->Angle(),
if (myText.Length() != 0)
{
gp_Pnt aTextPosition = aLastPoint;
- Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (aPresentation),
+ Prs3d_Text::Draw (aPresentation->CurrentGroup(),
myDrawer->TextAspect(),
myText,
aTextPosition);
#include <Precision.hxx>
#include <Prs3d_Arrow.hxx>
#include <Prs3d_Drawer.hxx>
-#include <Prs3d_Root.hxx>
#include <Prs3d_Text.hxx>
#include <Prs3d_ArrowAspect.hxx>
#include <Prs3d_IsoAspect.hxx>
Handle(Graphic3d_ArrayOfSegments) aPrims = new Graphic3d_ArrayOfSegments (2);
aPrims->AddVertex (myStartPnt);
aPrims->AddVertex (myEndPnt);
- Prs3d_Root::CurrentGroup (aPresentation)->SetPrimitivesAspect (myDrawer->LineAspect()->Aspect());
- Prs3d_Root::CurrentGroup (aPresentation)->AddPrimitiveArray (aPrims);
+ aPresentation->CurrentGroup()->SetPrimitivesAspect (myDrawer->LineAspect()->Aspect());
+ aPresentation->CurrentGroup()->AddPrimitiveArray (aPrims);
// Draw arrow
- Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation),
+ Prs3d_Arrow::Draw (aPresentation->CurrentGroup(),
myEndPnt,
gp_Dir (gp_Vec(myStartPnt, myEndPnt)),
anArrowAspect->Angle(),
#include <Plate_GtoCConstraint.hxx>
#include <Prs3d_Arrow.hxx>
#include <Prs3d_LineAspect.hxx>
-#include <Prs3d_Root.hxx>
#include <GeomPlate_Surface.hxx>
#include <GeomProjLib.hxx>
#include <GCE2d_MakeSegment.hxx>
anArrow->AddVertex(aPoint);
anArrow->AddVertex(aRight);
- Prs3d_Root::CurrentGroup(thePresentation)->AddPrimitiveArray(anArrow);
+ thePresentation->CurrentGroup()->AddPrimitiveArray(anArrow);
}
}
{
case TopAbs_FORWARD: {
- Prs3d_Root::CurrentGroup(thePresentation)->SetPrimitivesAspect(aLineAspect_FORWARD);
+ thePresentation->CurrentGroup()->SetPrimitivesAspect(aLineAspect_FORWARD);
DrawMarker(aTrimmedCurve, thePresentation);
break;
}
case TopAbs_REVERSED: {
- Prs3d_Root::CurrentGroup(thePresentation)->SetPrimitivesAspect(aLineAspect_REVERSED);
+ thePresentation->CurrentGroup()->SetPrimitivesAspect(aLineAspect_REVERSED);
DrawMarker(aTrimmedCurve, thePresentation);
break;
}
case TopAbs_INTERNAL: {
- Prs3d_Root::CurrentGroup(thePresentation)->SetPrimitivesAspect(aLineAspect_INTERNAL);
+ thePresentation->CurrentGroup()->SetPrimitivesAspect(aLineAspect_INTERNAL);
DrawMarker(aTrimmedCurve, thePresentation);
mySeq_INTERNAL.Append(aCurve3d);
}
case TopAbs_EXTERNAL: {
- Prs3d_Root::CurrentGroup(thePresentation)->SetPrimitivesAspect(aLineAspect_EXTERNAL);
+ thePresentation->CurrentGroup()->SetPrimitivesAspect(aLineAspect_EXTERNAL);
DrawMarker(aTrimmedCurve, thePresentation);
break;
}
ex.Next();
}
//add all primitives to the presentation
- Prs3d_Root::CurrentGroup(thePresentation)->SetPrimitivesAspect(aLineAspect_FORWARD);
- Prs3d_Root::CurrentGroup(thePresentation)->AddPrimitiveArray(myForwardArray);
+ thePresentation->CurrentGroup()->SetPrimitivesAspect(aLineAspect_FORWARD);
+ thePresentation->CurrentGroup()->AddPrimitiveArray(myForwardArray);
- Prs3d_Root::CurrentGroup(thePresentation)->SetPrimitivesAspect(aLineAspect_REVERSED);
- Prs3d_Root::CurrentGroup(thePresentation)->AddPrimitiveArray(myReversedArray);
+ thePresentation->CurrentGroup()->SetPrimitivesAspect(aLineAspect_REVERSED);
+ thePresentation->CurrentGroup()->AddPrimitiveArray(myReversedArray);
- Prs3d_Root::CurrentGroup(thePresentation)->SetPrimitivesAspect(aLineAspect_INTERNAL);
- Prs3d_Root::CurrentGroup(thePresentation)->AddPrimitiveArray(myInternalArray);
+ thePresentation->CurrentGroup()->SetPrimitivesAspect(aLineAspect_INTERNAL);
+ thePresentation->CurrentGroup()->AddPrimitiveArray(myInternalArray);
- Prs3d_Root::CurrentGroup(thePresentation)->SetPrimitivesAspect(aLineAspect_EXTERNAL);
- Prs3d_Root::CurrentGroup(thePresentation)->AddPrimitiveArray(myExternalArray);
+ thePresentation->CurrentGroup()->SetPrimitivesAspect(aLineAspect_EXTERNAL);
+ thePresentation->CurrentGroup()->AddPrimitiveArray(myExternalArray);
}
//Method for advanced customizable selection of picked object
aSelectionPrs->Clear();
FillData();
- Prs3d_Root::NewGroup ( aSelectionPrs );
- Handle (Graphic3d_Group) aSelectGroup = Prs3d_Root::CurrentGroup ( aSelectionPrs);
+ Handle (Graphic3d_Group) aSelectGroup = aSelectionPrs->NewGroup();
for(Standard_Integer i=1; i<=aLength; ++i)
{
FillData();
//Direct highlighting
- Prs3d_Root::NewGroup ( aHighlightPrs );
- Handle (Graphic3d_Group) aHilightGroup = Prs3d_Root::CurrentGroup(aHighlightPrs);
+ Handle (Graphic3d_Group) aHilightGroup = aHighlightPrs->NewGroup();
Handle(Graphic3d_AspectLine3d) aLineAspect =
new Graphic3d_AspectLine3d(theStyle->Color(), Aspect_TOL_SOLID,2);
switch(theOwner->Priority())
if(myMarkerType == Aspect_TOM_USERDEFINED)
{
Handle(Graphic3d_AspectMarker3d) aMarker = new Graphic3d_AspectMarker3d(Aspect_TOM_POINT,myColor,myIndex);
- Prs3d_Root::CurrentGroup(aPresentation)->SetGroupPrimitivesAspect(aMarker);
- Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray (myArrayOfPoints);
+ aPresentation->CurrentGroup()->SetGroupPrimitivesAspect(aMarker);
+ aPresentation->CurrentGroup()->AddPrimitiveArray (myArrayOfPoints);
}
else
{
Handle(Graphic3d_AspectMarker3d) aMarker = new Graphic3d_AspectMarker3d(myMarkerType,myColor,myIndex);
- Prs3d_Root::CurrentGroup (aPresentation)->SetPrimitivesAspect(aMarker);
+ aPresentation->CurrentGroup()->SetPrimitivesAspect(aMarker);
Handle(Graphic3d_ArrayOfPoints) anArrayOfPoints = new Graphic3d_ArrayOfPoints (1);
anArrayOfPoints->AddVertex (myXPosition, myYPosition, 0);
- Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray (anArrayOfPoints);
+ aPresentation->CurrentGroup()->AddPrimitiveArray (anArrayOfPoints);
}
}
#include <gp_Pnt2d.hxx>
#include <OpenGl_GraphicDriver.hxx>
-#include <Prs3d_Root.hxx>
#include <Prs3d_Drawer.hxx>
#include <Prs3d_IsoAspect.hxx>
#include <Prs3d_ShadingAspect.hxx>
Handle(Graphic3d_StructureManager) aStrucMana = GetContext()->MainPrsMgr()->StructureManager();
- Handle(Graphic3d_Group) mygroup = Prs3d_Root::CurrentGroup(aPresentation);
+ Handle(Graphic3d_Group) mygroup = aPresentation->CurrentGroup();
myAspect = (new Prs3d_ShadingAspect())->Aspect();
Graphic3d_MaterialAspect material = myAspect->FrontMaterial();
material.SetAmbientColor (Quantity_NOC_BLACK);
} // end of "if the triangle is valid
} // end of the "parcours" of the triangles
- Prs3d_Root::CurrentGroup (aPresentation)->AddPrimitiveArray (aOP);
+ aPresentation->CurrentGroup()->AddPrimitiveArray (aOP);
mygroup->SetGroupPrimitivesAspect(myAspect);
}// end of the exploration of the shape in faces
#include <Graphic3d_ArrayOfTriangles.hxx>
#include <Graphic3d_Text.hxx>
#include <Prs3d_LineAspect.hxx>
-#include <Prs3d_Root.hxx>
#include <Prs3d_ShadingAspect.hxx>
#include <Prs3d_Text.hxx>
#include <Prs3d_TextAspect.hxx>
#include <Prs3d_IsoAspect.hxx>
#include <Prs3d_Presentation.hxx>
#include <Prs3d_ShadingAspect.hxx>
-#include <Prs3d_Root.hxx>
#include <PrsMgr_PresentationManager3d.hxx>
#include <Standard_ErrorHandler.hxx>
#include <StdSelect_BRepSelectionTool.hxx>
#include <gce_MakeDir.hxx>
#include <IntAna_IntConicQuad.hxx>
#include <Prs3d_Arrow.hxx>
-#include <Prs3d_Root.hxx>
#include <Prs3d_ShadingAspect.hxx>
#include <Prs3d_ToolDisk.hxx>
#include <Prs3d_ToolSector.hxx>
myHighlightTranslator->Clear();
}
{
- Handle(Graphic3d_Group) aGroup = Prs3d_Root::CurrentGroup (myHighlightTranslator);
+ Handle(Graphic3d_Group) aGroup = myHighlightTranslator->CurrentGroup();
aGroup->SetGroupPrimitivesAspect (theAspect->Aspect());
aGroup->AddPrimitiveArray (myTriangleArray);
}
myHighlightScaler->Clear();
}
{
- Handle(Graphic3d_Group) aGroup = Prs3d_Root::CurrentGroup (myHighlightScaler);
+ Handle(Graphic3d_Group) aGroup = myHighlightScaler->CurrentGroup();
aGroup->SetGroupPrimitivesAspect (theAspect->Aspect());
aGroup->AddPrimitiveArray (myCube.Array());
}
myHighlightRotator->Clear();
}
{
- Handle(Graphic3d_Group) aGroup = Prs3d_Root::CurrentGroup (myHighlightRotator);
+ Handle(Graphic3d_Group) aGroup = myHighlightRotator->CurrentGroup();
aGroup->SetGroupPrimitivesAspect (theAspect->Aspect());
aGroup->AddPrimitiveArray (myCircle.Array());
}
myHighlightDragger->Clear();
}
{
- Handle(Graphic3d_Group) aGroup = Prs3d_Root::CurrentGroup(myHighlightDragger);
+ Handle(Graphic3d_Group) aGroup = myHighlightDragger->CurrentGroup();
aGroup->SetGroupPrimitivesAspect(aFillArea);
aGroup->AddPrimitiveArray(mySector.Array());
}
{
ComputeFrame();
Handle(Prs3d_PlaneAspect) theaspect = myDrawer->PlaneAspect();
- Handle(Graphic3d_Group) TheGroup = Prs3d_Root::CurrentGroup(aPresentation);
+ Handle(Graphic3d_Group) TheGroup = aPresentation->CurrentGroup();
TheGroup->SetPrimitivesAspect(myDrawer->ShadingAspect()->Aspect());
gp_Pnt p1;
const Standard_Real Xmax = 0.5*Standard_Real(theaspect->PlaneXLength());
StdPrs_Point::Add(aPresentation,myComponent,myDrawer);
else if (aMode== -99)
{
- Handle(Graphic3d_Group) TheGroup = Prs3d_Root::CurrentGroup(aPresentation);
+ Handle(Graphic3d_Group) TheGroup = aPresentation->CurrentGroup();
TheGroup->SetPrimitivesAspect (myHilightDrawer->PointAspect()->Aspect());
Handle(Graphic3d_ArrayOfPoints) aPoint = new Graphic3d_ArrayOfPoints (1);
aPoint->AddVertex (myComponent->X(),myComponent->Y(),myComponent->Z());
#include <Prs3d_Drawer.hxx>
#include <Prs3d_PointAspect.hxx>
#include <Prs3d_Presentation.hxx>
-#include <Prs3d_Root.hxx>
#include <Prs3d_ShadingAspect.hxx>
#include <PrsMgr_Presentations.hxx>
#include <Select3D_SensitiveBox.hxx>
#include <Graphic3d_TransModeFlags.hxx>
#include <Graphic3d_ZLayerId.hxx>
#include <Prs3d_LineAspect.hxx>
-#include <Prs3d_Root.hxx>
#include <Prs3d_ShadingAspect.hxx>
#include <SelectMgr_EntityOwner.hxx>
#include <V3d_Viewer.hxx>
#include <Prs3d_Drawer.hxx>
#include <Prs3d_IsoAspect.hxx>
#include <Prs3d_Presentation.hxx>
-#include <Prs3d_Root.hxx>
#include <Prs3d_ShadingAspect.hxx>
#include <Prs3d_BndBox.hxx>
#include <StdPrs_ToolTriangulatedShape.hxx>
if (myHasFlipping)
{
gp_Ax2 aFlippingAxes (aCenterOfLabel, myOrientation3D.Direction(), myOrientation3D.XDirection());
- Prs3d_Root::CurrentGroup (thePrs)->SetFlippingOptions (Standard_True, aFlippingAxes);
+ thePrs->CurrentGroup()->SetFlippingOptions (Standard_True, aFlippingAxes);
}
gp_Ax2 anOrientation = myOrientation3D;
anOrientation.SetLocation (aPosition);
{
aHasOwnAnchor = Standard_False; // always not using own anchor if flipping
}
- Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (thePrs), anAsp, myText, anOrientation, aHasOwnAnchor);
+ Prs3d_Text::Draw (thePrs->CurrentGroup(), anAsp, myText, anOrientation, aHasOwnAnchor);
if (myHasFlipping && isInit)
{
- Prs3d_Root::CurrentGroup (thePrs)->SetFlippingOptions (Standard_False, gp_Ax2());
+ thePrs->CurrentGroup()->SetFlippingOptions (Standard_False, gp_Ax2());
}
}
else
{
- Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (thePrs), anAsp, myText, aPosition);
+ Prs3d_Text::Draw (thePrs->CurrentGroup(), anAsp, myText, aPosition);
}
if (isInit)
gp_Pnt aMinPnt = gp_Pnt (-aDx, -aDy, 0.0).Transformed (aLabelPlane);
gp_Pnt aMaxPnt = gp_Pnt ( aDx, aDy, 0.0).Transformed (aLabelPlane);
- Graphic3d_BndBox4f& aBox = Prs3d_Root::CurrentGroup (thePrs)->ChangeBoundingBox();
+ Graphic3d_BndBox4f& aBox = thePrs->CurrentGroup()->ChangeBoundingBox();
aBox.Add (Graphic3d_Vec4 ((float) aMinPnt.X(), (float) aMinPnt.Y(), (float) aMinPnt.Z(), 1.0));
aBox.Add (Graphic3d_Vec4 ((float) aMaxPnt.X(), (float) aMaxPnt.Y(), (float) aMaxPnt.Z(), 1.0));
}
#include <Precision.hxx>
#include <Prs3d_Drawer.hxx>
#include <Prs3d_Presentation.hxx>
-#include <Prs3d_Root.hxx>
#include <Prs3d_LineAspect.hxx>
#include <Prs3d_ShadingAspect.hxx>
#include <PrsMgr_PresentationManager3d.hxx>
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <AIS_DisplayMode.hxx>
#include <AIS_Triangulation.hxx>
+
+#include <AIS_DisplayMode.hxx>
#include <AIS_InteractiveObject.hxx>
#include <Standard_Type.hxx>
#include <Poly_Array1OfTriangle.hxx>
#include <Poly_Triangulation.hxx>
#include <Prs3d_Drawer.hxx>
-#include <Prs3d_Root.hxx>
#include <Prs3d_ShadingAspect.hxx>
#include <TShort_Array1OfShortReal.hxx>
#include <TColgp_Array1OfPnt.hxx>
Handle(Graphic3d_ArrayOfTriangles) anArray = new Graphic3d_ArrayOfTriangles (myNbNodes, myNbTriangles * 3,
hasVNormals, hasVColors, Standard_False);
- Handle(Graphic3d_Group) TheGroup = Prs3d_Root::CurrentGroup(aPresentation);
+ Handle(Graphic3d_Group) TheGroup = aPresentation->CurrentGroup();
Handle(Graphic3d_AspectFillArea3d) aspect = myDrawer->ShadingAspect()->Aspect();
Standard_Integer i;
aPresentation->Clear();
const Prs3d_DatumParts aPart = anOwner->DatumPart();
- Handle(Graphic3d_Group) aGroup = Prs3d_Root::CurrentGroup (aPresentation);
+ Handle(Graphic3d_Group) aGroup = aPresentation->CurrentGroup();
if (aPart >= Prs3d_DP_XOYAxis && aPart <= Prs3d_DP_XOZAxis)
{
// planes selection is equal in both shading and wireframe mode
// display origin
{
// Origin is visualized only in shading mode
- Handle(Graphic3d_Group) aGroup = Prs3d_Root::NewGroup (thePrs);
+ Handle(Graphic3d_Group) aGroup = thePrs->NewGroup();
const Prs3d_DatumParts aPart = Prs3d_DP_Origin;
if (anAspect->DrawDatumPart(aPart))
{
continue;
}
- Handle(Graphic3d_Group) anAxisGroup = Prs3d_Root::NewGroup (thePrs);
+ Handle(Graphic3d_Group) anAxisGroup = thePrs->NewGroup();
myPartToGroup.Bind (aPart, anAxisGroup);
if (isShadingMode)
{
continue;
}
- Handle(Graphic3d_Group) anArrowGroup = Prs3d_Root::NewGroup (thePrs);
+ Handle(Graphic3d_Group) anArrowGroup = thePrs->NewGroup();
anArrowGroup->SetGroupPrimitivesAspect (anAspect->ArrowAspect()->Aspect());
anArrowGroup->AddPrimitiveArray (arrayOfPrimitives (anArrowPart));
}
case Prs3d_DP_ZAxis: aDir = aComponent->Direction(); break;
default: break;
}
- Handle(Graphic3d_Group) aLabelGroup = Prs3d_Root::NewGroup (thePrs);
+ Handle(Graphic3d_Group) aLabelGroup = thePrs->NewGroup();
const gp_Pnt aPoint = anOrigin.XYZ() + aDir.XYZ() * anAxisLength;
Prs3d_Text::Draw (aLabelGroup, anAspect->TextAspect(), aLabel, aPoint);
}
continue;
}
- Handle(Graphic3d_Group) aGroup = Prs3d_Root::NewGroup (thePrs);
+ Handle(Graphic3d_Group) aGroup = thePrs->NewGroup();
myPartToGroup.Bind (aPart, aGroup);
aGroup->AddPrimitiveArray (arrayOfPrimitives (aPart));
#include <Prs3d.hxx>
#include <Prs3d_Arrow.hxx>
#include <Prs3d_DatumAspect.hxx>
-#include <Prs3d_Root.hxx>
#include <Prs3d_Text.hxx>
#include <Prs3d_ToolDisk.hxx>
#include <Prs3d_ToolSphere.hxx>
#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>
{
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;
}
// 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;
}
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);
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 )
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
aPrims->AddVertex(OppositePnt);
aPrims->AddVertex(( aPnt.Distance(P1) < aPnt.Distance(P2) )? P11 : P12);
}
- Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+ aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
}
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);
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;
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
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);
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())
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);
}
}
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())) {
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;
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);
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);
}
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();
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;
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);
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();
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;
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);
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,
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);
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));
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;
{
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);
}
{
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;
// 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>
#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,
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);
aPrims->AddVertex(p1);
aPrims->AddVertex(p2);
- Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+ aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
}
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();
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);
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);
}
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
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());
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 );
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));
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)
{
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);
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)
{
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);
#include <Prs3d_DimensionAspect.hxx>
#include <Prs3d_LineAspect.hxx>
#include <Prs3d_Presentation.hxx>
-#include <Prs3d_Root.hxx>
#include <Prs3d_Text.hxx>
#include <TCollection_ExtendedString.hxx>
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 );
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 );
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);
}
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);
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());
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()){
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;
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())
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
#include <Prs3d_DimensionAspect.hxx>
#include <Prs3d_LineAspect.hxx>
#include <Prs3d_Presentation.hxx>
-#include <Prs3d_Root.hxx>
#include <Prs3d_Text.hxx>
#include <TCollection_ExtendedString.hxx>
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 );
}
//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 ===
}
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,
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 );
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 );
#include <Prs3d_DimensionAspect.hxx>
#include <Prs3d_LineAspect.hxx>
#include <Prs3d_Presentation.hxx>
-#include <Prs3d_Root.hxx>
//=======================================================================
//function : 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);
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);
}
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);
}
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);
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);
}
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);
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
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);
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
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);
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
#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>
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);
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);
aPrims->AddVertex(AttachmentPoint2);
aPrims->AddVertex(Proj2);
- Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+ aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
}
//==================================================================================
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;
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);
aPrims->AddVertex(AttachmentPoint2);
aPrims->AddVertex(EndOfArrow2);
- Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+ aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
}
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);
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);
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;
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;
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())
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);
}
}
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;
#include <Prs3d_DimensionAspect.hxx>
#include <Prs3d_LineAspect.hxx>
#include <Prs3d_Presentation.hxx>
-#include <Prs3d_Root.hxx>
#include <Prs3d_Text.hxx>
#include <TCollection_ExtendedString.hxx>
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;
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);
}
}
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 )
{
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()) )
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);
}
}
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);
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 )
{
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()) )
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);
}
}
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);
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 )
{
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()) )
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);
}
}
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);
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
{
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);
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,
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);
}
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);
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;
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);
aPrims->AddVertex(AttachmentPoint2);
aPrims->AddVertex(Proj2);
- Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+ aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
}
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);
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);
{
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);
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);
}
}
}
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;
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);
}
//=======================================================================
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);
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)
#include <Prs3d_LineAspect.hxx>
#include <Prs3d_PlaneAspect.hxx>
#include <Prs3d_Presentation.hxx>
-#include <Prs3d_Root.hxx>
#include <Prs3d_ShadingAspect.hxx>
//=======================================================================
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);
}
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);
}
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);
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);
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);
aPrims->AddVertex(Sym_pint);
aPrims->AddVertex(P2);
- Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+ aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
}
/*===================================
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);
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);
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 |
//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);
aPrims->AddVertex(pm.Translated(vsym));
aPrims->AddVertex(pm.Translated(vsym.Reversed()));
- Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+ aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
}
//===================================================================
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();
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;
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());
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 |
//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);
aPrims->AddVertex(pm.Translated(vsym));
aPrims->AddVertex(pm.Translated(vsym.Reversed()));
- Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+ aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
}
//===================================================================
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()))
{
//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);
aPrims->AddVertex(sgP21);
aPrims->AddVertex(sgP22);
- Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+ aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
}
//==============================================================
// OTHER CASES :
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);
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 |
//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);
aPrims->AddVertex(pm.Translated(vsym));
aPrims->AddVertex(pm.Translated(vsym.Reversed()));
- Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
- }
+ aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
+ }
}
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());
}
#include <Prs3d_ArrowAspect.hxx>
#include <Prs3d_LineAspect.hxx>
#include <Prs3d_Presentation.hxx>
-#include <Prs3d_Root.hxx>
#include <Prs3d_TextAspect.hxx>
//=======================================================================
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);
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);
}
}
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);
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());
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);
}
}
#include <Prs3d_LineAspect.hxx>
#include <Prs3d_PlaneAspect.hxx>
#include <Prs3d_Presentation.hxx>
-#include <Prs3d_Root.hxx>
//=======================================================================
//function : 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);
#include <MeshVS_MeshPrsBuilder.hxx>
#include <Prs3d_LineAspect.hxx>
#include <Prs3d_Presentation.hxx>
-#include <Prs3d_Root.hxx>
#include <Prs3d_ShadingAspect.hxx>
#include <Quantity_Color.hxx>
#include <Standard_Type.hxx>
Handle(Graphic3d_Group) aGGroup, aGroup2, aLGroup, aSGroup;
if (!aTwoColorsOfElements.IsEmpty())
{
- aGroup2 = Prs3d_Root::NewGroup (Prs);
+ aGroup2 = Prs->NewGroup();
}
if (!aColorsOfElements.IsEmpty())
{
Handle(Graphic3d_AspectFillArea3d) aGroupFillAspect = new Graphic3d_AspectFillArea3d (Aspect_IS_SOLID, anInteriorColor, anEdgeColor,
anEdgeType, anEdgeWidth, aMaterial[0], aMaterial[1]);
- aGGroup = Prs3d_Root::NewGroup (Prs);
- aLGroup = Prs3d_Root::NewGroup (Prs);
+ aGGroup = Prs->NewGroup();
+ aLGroup = Prs->NewGroup();
aGGroup->SetClosed (toSupressBackFaces == Standard_True);
aGGroup->SetGroupPrimitivesAspect (aGroupFillAspect);
}
if (anEdgeOn)
{
Handle(Graphic3d_AspectLine3d) anEdgeAspect = new Graphic3d_AspectLine3d (anEdgeColor, anEdgeType, anEdgeWidth);
- aSGroup = Prs3d_Root::NewGroup (Prs);
+ aSGroup = Prs->NewGroup();
aSGroup->SetGroupPrimitivesAspect (anEdgeAspect);
}
#include <Prs3d_LineAspect.hxx>
#include <Prs3d_PointAspect.hxx>
#include <Prs3d_Presentation.hxx>
-#include <Prs3d_Root.hxx>
#include <Prs3d_ShadingAspect.hxx>
#include <PrsMgr_PresentationManager3d.hxx>
#include <Select3D_SensitiveBox.hxx>
#include <Graphic3d_Group.hxx>
#include <MeshVS_Mesh.hxx>
#include <MeshVS_MeshEntityOwner.hxx>
-#include <Prs3d_Root.hxx>
#include <PrsMgr_PresentationManager.hxx>
#include <PrsMgr_PresentationManager3d.hxx>
#include <SelectMgr_SelectableObject.hxx>
#include <Prs3d_LineAspect.hxx>
#include <Prs3d_PointAspect.hxx>
#include <Prs3d_Presentation.hxx>
-#include <Prs3d_Root.hxx>
#include <Prs3d_ShadingAspect.hxx>
#include <Quantity_NameOfColor.hxx>
#include <Select3D_SensitivePoint.hxx>
if ( k>0 )
{
- Prs3d_Root::NewGroup ( Prs );
- Handle (Graphic3d_Group) aNodeGroup = Prs3d_Root::CurrentGroup ( Prs );
+ Handle (Graphic3d_Group) aNodeGroup = Prs->NewGroup();
aNodeGroup->SetPrimitivesAspect ( aNodeMark );
aNodeGroup->AddPrimitiveArray (aNodePoints);
}
if ( !aSource->GetGeom ( ID, IsElement, aCoords, NbNodes, aType ) )
return;
- Prs3d_Root::NewGroup ( Prs );
- Handle (Graphic3d_Group) aHilightGroup = Prs3d_Root::CurrentGroup ( Prs );
+ Handle (Graphic3d_Group) aHilightGroup = Prs->NewGroup();
switch ( aType )
{
if ( IsPolygons && theFillAsp->FrontMaterial().Transparency()<0.01 )
{
- Prs3d_Root::NewGroup ( Prs );
- Handle (Graphic3d_Group) aGroup = Prs3d_Root::CurrentGroup ( Prs );
+ Handle (Graphic3d_Group) aGroup = Prs->NewGroup();
aGroup->SetClosed (isSupressBackFaces == Standard_True);
Handle(Graphic3d_AspectFillArea3d) aFillAsp = new Graphic3d_AspectFillArea3d (*theFillAsp);
//if ( IsPolygonsEdgesOff )
if ( IsPolylines && !IsPolygonsEdgesOff )
{
- Prs3d_Root::NewGroup ( Prs );
- Handle (Graphic3d_Group) aLGroup = Prs3d_Root::CurrentGroup ( Prs );
+ Handle (Graphic3d_Group) aLGroup = Prs->NewGroup();
if ( IsSelected )
aLGroup->SetPrimitivesAspect ( theLineAsp );
if ( IsLinkPolylines )
{
- Prs3d_Root::NewGroup ( Prs );
- Handle (Graphic3d_Group) aBeamGroup = Prs3d_Root::CurrentGroup ( Prs );
+ Handle (Graphic3d_Group) aBeamGroup = Prs->NewGroup();
if ( !IsSelected )
aBeamGroup->SetPrimitivesAspect ( theFillAsp );
aBeamGroup->SetPrimitivesAspect ( theLineAsp );
if ( IsPolygons && theFillAsp->FrontMaterial().Transparency()>=0.01 )
{
- Prs3d_Root::NewGroup ( Prs );
- Handle (Graphic3d_Group) aGroup = Prs3d_Root::CurrentGroup ( Prs );
+ Handle (Graphic3d_Group) aGroup = Prs->NewGroup();
aGroup->SetClosed (isSupressBackFaces == Standard_True);
Handle(Graphic3d_AspectFillArea3d) aFillAsp = new Graphic3d_AspectFillArea3d (*theFillAsp);
//if ( IsPolygonsEdgesOff )
#include <Prs3d_Drawer.hxx>
#include <Prs3d_LineAspect.hxx>
#include <Prs3d_Presentation.hxx>
-#include <Prs3d_Root.hxx>
#include <Prs3d_ShadingAspect.hxx>
#include <PrsMgr_PresentationManager3d.hxx>
#include <Quantity_Array1OfColor.hxx>
Handle(Graphic3d_AspectLine3d) anLAsp =
new Graphic3d_AspectLine3d( anEdgeColor, anEdgeType, anEdgeWidth );
- Handle(Graphic3d_Group) aGroup1 = Prs3d_Root::NewGroup (Prs);
+ Handle(Graphic3d_Group) aGroup1 = Prs->NewGroup();
Standard_Boolean toSupressBackFaces = Standard_False;
aDrawer->GetBoolean (MeshVS_DA_SupressBackFaces, toSupressBackFaces);
if (aShowEdges)
{
- Prs3d_Root::NewGroup ( Prs );
- Handle(Graphic3d_Group) aGroup2 = Prs3d_Root::CurrentGroup ( Prs );
+ Handle(Graphic3d_Group) aGroup2 = Prs->NewGroup();
Handle(Graphic3d_AspectFillArea3d) anAspCopy = new Graphic3d_AspectFillArea3d (*anAsp);
anAspCopy->SetTextureMapOff();
#include <MeshVS_Drawer.hxx>
#include <MeshVS_Mesh.hxx>
#include <Prs3d_Presentation.hxx>
-#include <Prs3d_Root.hxx>
#include <Select3D_SensitiveEntity.hxx>
IMPLEMENT_STANDARD_RTTIEXT(MeshVS_PrsBuilder,Standard_Transient)
#include <MeshVS_Mesh.hxx>
#include <MeshVS_TextPrsBuilder.hxx>
#include <Prs3d_Presentation.hxx>
-#include <Prs3d_Root.hxx>
#include <Prs3d_TextAspect.hxx>
#include <Quantity_Color.hxx>
#include <Standard_Type.hxx>
#include <MeshVS_VectorPrsBuilder.hxx>
#include <Precision.hxx>
#include <Prs3d_Presentation.hxx>
-#include <Prs3d_Root.hxx>
#include <Quantity_Color.hxx>
#include <Standard_Type.hxx>
#include <TColgp_Array1OfPnt.hxx>
}
}
- Prs3d_Root::NewGroup ( Prs );
- Handle (Graphic3d_Group) aVGroup = Prs3d_Root::CurrentGroup ( Prs );
+ Handle (Graphic3d_Group) aVGroup = Prs->NewGroup();
Quantity_Color aColor;
aDrawer->GetColor ( MeshVS_DA_VectorColor, aColor );
#ifndef _Prs3d_Arrow_HeaderFile
#define _Prs3d_Arrow_HeaderFile
-#include <Prs3d_Root.hxx>
-
#include <Graphic3d_ArrayOfTriangles.hxx>
#include <Graphic3d_ArrayOfSegments.hxx>
+#include <Prs3d_Presentation.hxx>
class gp_Ax1;
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
+class Prs3d_Arrow
{
public:
+ DEFINE_STANDARD_ALLOC
//! Defines the representation of the arrow as shaded triangulation.
//! @param theAxis axis definition (arrow origin and direction)
const Standard_Real theAngle,
const Standard_Real theLength)
{
- Draw (Prs3d_Root::CurrentGroup (thePrs), theLocation, theDirection, theAngle, theLength);
+ Draw (thePrs->CurrentGroup(), theLocation, theDirection, theAngle, theLength);
}
};
{
if (!theBndBox.IsVoid())
{
- Handle(Graphic3d_Group) aGroup = Prs3d_Root::CurrentGroup (thePresentation);
+ Handle(Graphic3d_Group) aGroup = thePresentation->CurrentGroup();
aGroup->SetGroupPrimitivesAspect (new Graphic3d_AspectLine3d (theDrawer->LineAspect()->Aspect()->Color(),
Aspect_TOL_DOTDASH,
theDrawer->LineAspect()->Aspect()->Width()));
{
if (!theBndBox.IsVoid())
{
- Handle(Graphic3d_Group) aGroup = Prs3d_Root::CurrentGroup (thePresentation);
+ Handle(Graphic3d_Group) aGroup = thePresentation->CurrentGroup();
aGroup->SetGroupPrimitivesAspect (new Graphic3d_AspectLine3d (theDrawer->LineAspect()->Aspect()->Color(),
Aspect_TOL_DOTDASH,
theDrawer->LineAspect()->Aspect()->Width()));
#include <Graphic3d_Group.hxx>
#include <Prs3d_Drawer.hxx>
#include <Prs3d_PointAspect.hxx>
-#include <Prs3d_Root.hxx>
template <class AnyPoint, class PointTool>
-class Prs3d_Point : Prs3d_Root
+class Prs3d_Point
{
public:
DEFINE_STANDARD_ALLOC
public:
Standard_EXPORT static void Add
- (const Handle (Prs3d_Presentation)& thePresentation,
+ (const Handle (Prs3d_Presentation)& thePrs,
const AnyPoint& thePoint,
const Handle (Prs3d_Drawer)& theDrawer)
{
- Handle(Graphic3d_Group) aGroup = Prs3d_Root::CurrentGroup(thePresentation);
+ Handle(Graphic3d_Group) aGroup = thePrs->CurrentGroup();
aGroup->SetPrimitivesAspect(theDrawer->PointAspect()->Aspect());
DrawPoint(thePoint, aGroup);
}
DEFINE_STANDARD_ALLOC
- //! 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_DEPRECATED("This method is deprecated - Prs3d_Presentation::CurrentGroup() should be called instead")
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.
+ Standard_DEPRECATED("This method is deprecated - Prs3d_Presentation::NewGroup() should be called instead")
static Handle(Graphic3d_Group) NewGroup (const Handle(Prs3d_Presentation)& thePrs3d)
{
return thePrs3d->NewGroup();
#ifndef _Prs3d_Text_HeaderFile
#define _Prs3d_Text_HeaderFile
-#include <Prs3d_Root.hxx>
+#include <gp_Ax2.hxx>
#include <Prs3d_Drawer.hxx>
+#include <Prs3d_Presentation.hxx>
#include <Prs3d_TextAspect.hxx>
-#include <gp_Ax2.hxx>
-
class TCollection_ExtendedString;
class gp_Pnt;
//! A framework to define the display of texts.
-class Prs3d_Text : public Prs3d_Root
+class Prs3d_Text
{
public:
const TCollection_ExtendedString& theText,
const gp_Pnt& theAttachmentPoint)
{
- Draw (Prs3d_Root::CurrentGroup (thePrs), theDrawer->TextAspect(), theText, theAttachmentPoint);
+ Draw (thePrs->CurrentGroup(), theDrawer->TextAspect(), theText, theAttachmentPoint);
}
//! Alias to another method Draw() for backward compatibility.
const gp_Ax2& theOrientation,
const Standard_Boolean theHasOwnAnchor = Standard_True)
{
- Draw (Prs3d_Root::CurrentGroup (thePrs), theAspect, theText, theOrientation, theHasOwnAnchor);
+ Draw (thePrs->CurrentGroup(), theAspect, theText, theOrientation, theHasOwnAnchor);
}
//! Alias to another method Draw() for backward compatibility.
const TCollection_ExtendedString& theText,
const gp_Pnt& theAttachmentPoint)
{
- Draw (Prs3d_Root::CurrentGroup (thePrs), theAspect, theText, theAttachmentPoint);
+ Draw (thePrs->CurrentGroup(), theAspect, theText, theAttachmentPoint);
}
};
#include <Graphic3d_ArrayOfPolylines.hxx>
#include <IntAna2d_AnaIntersection.hxx>
#include <ProjLib.hxx>
-#include <Prs3d_Root.hxx>
#include <Prs3d_ShadingAspect.hxx>
#include <PrsMgr_PresentationManager3d.hxx>
#include <Select3D_SensitiveGroup.hxx>
// add display presentation
if (!myDrawer->DimensionAspect()->IsText3d() && theMode == ComputeMode_All)
{
- Prs3d_Root::CurrentGroup (thePresentation)->SetStencilTestOptions (Standard_True);
+ thePresentation->CurrentGroup()->SetStencilTestOptions (Standard_True);
}
Handle(Graphic3d_AspectLine3d) aDimensionLineStyle = myDrawer->DimensionAspect()->LineAspect()->Aspect();
- Prs3d_Root::CurrentGroup (thePresentation)->SetPrimitivesAspect (aDimensionLineStyle);
- Prs3d_Root::CurrentGroup (thePresentation)->AddPrimitiveArray (aPrimSegments);
+ thePresentation->CurrentGroup()->SetPrimitivesAspect (aDimensionLineStyle);
+ thePresentation->CurrentGroup()->AddPrimitiveArray (aPrimSegments);
if (!myDrawer->DimensionAspect()->IsText3d() && theMode == ComputeMode_All)
{
- Prs3d_Root::CurrentGroup (thePresentation)->SetStencilTestOptions (Standard_False);
+ thePresentation->CurrentGroup()->SetStencilTestOptions (Standard_False);
}
}
// Parameters for presentation
Handle(Prs3d_DimensionAspect) aDimensionAspect = myDrawer->DimensionAspect();
- Prs3d_Root::CurrentGroup(thePresentation)->SetPrimitivesAspect (aDimensionAspect->LineAspect()->Aspect());
+ thePresentation->CurrentGroup()->SetPrimitivesAspect (aDimensionAspect->LineAspect()->Aspect());
Standard_Real anArrowLength = aDimensionAspect->ArrowAspect()->Length();
aSecondArrowEnd = aSecondAttach.Translated (-aSecondArrowVec);
// Group1: stenciling text and the angle dimension arc
- Prs3d_Root::NewGroup (thePresentation);
+ thePresentation->NewGroup();
Standard_Integer aHPosition = aLabelPosition & LabelPosition_HMask;
// dimension arc without text
if ((theMode == ComputeMode_All || theMode == ComputeMode_Line) && aHPosition != LabelPosition_HCenter)
{
- Prs3d_Root::NewGroup (thePresentation);
+ thePresentation->NewGroup();
DrawArc (thePresentation,
(isArrowsExternal || !isArrowVisible(PrsDim_TypeOfAngleArrowVisibility_First)) ? aFirstAttach : aFirstArrowEnd,
// arrows and arrow extensions
if (theMode == ComputeMode_All || theMode == ComputeMode_Line)
{
- Prs3d_Root::NewGroup (thePresentation);
+ thePresentation->NewGroup();
if (isArrowVisible(PrsDim_TypeOfAngleArrowVisibility_First))
DrawArrow (thePresentation, aFirstArrowBegin, gp_Dir (aFirstArrowVec));
if ((theMode == ComputeMode_All || theMode == ComputeMode_Line) && isArrowsExternal)
{
- Prs3d_Root::NewGroup (thePresentation);
+ thePresentation->NewGroup();
if (aHPosition != LabelPosition_Left && isArrowVisible(PrsDim_TypeOfAngleArrowVisibility_First))
{
// flyouts
if (theMode == ComputeMode_All)
{
- Prs3d_Root::NewGroup (thePresentation);
+ thePresentation->NewGroup();
Handle(Graphic3d_ArrayOfSegments) aPrimSegments = new Graphic3d_ArrayOfSegments (4);
aPrimSegments->AddVertex (myCenterPoint);
aPrimSegments->AddVertex (aSecondAttach);
Handle(Graphic3d_AspectLine3d) aFlyoutStyle = myDrawer->DimensionAspect()->LineAspect()->Aspect();
- Prs3d_Root::CurrentGroup (thePresentation)->SetPrimitivesAspect (aFlyoutStyle);
- Prs3d_Root::CurrentGroup (thePresentation)->AddPrimitiveArray (aPrimSegments);
+ thePresentation->CurrentGroup()->SetPrimitivesAspect (aFlyoutStyle);
+ thePresentation->CurrentGroup()->AddPrimitiveArray (aPrimSegments);
}
mySelectionGeom.IsComputed = Standard_True;
#include <Prs3d_Drawer.hxx>
#include <Prs3d_LineAspect.hxx>
#include <Prs3d_Presentation.hxx>
-#include <Prs3d_Root.hxx>
#include <Prs3d_ShadingAspect.hxx>
#include <Prs3d_Text.hxx>
#include <SelectMgr_EntityOwner.hxx>
const gp_Pnt& theLocation,
const gp_Dir& theDirection)
{
- Handle(Graphic3d_Group) aGroup = Prs3d_Root::NewGroup (thePresentation);
+ Handle(Graphic3d_Group) aGroup = thePresentation->NewGroup();
Standard_Real aLength = myDrawer->DimensionAspect()->ArrowAspect()->Length();
Standard_Real anAngle = myDrawer->DimensionAspect()->ArrowAspect()->Angle();
aGroup->AddPrimitiveArray (anEdges);
}
}
- Prs3d_Root::CurrentGroup (thePresentation)->SetFlippingOptions (Standard_False, gp_Ax2());
+ thePresentation->CurrentGroup()->SetFlippingOptions (Standard_False, gp_Ax2());
mySelectionGeom.TextPos = aCenterOfLabel;
mySelectionGeom.TextDir = aTextDir;
aFillAspect->SetInteriorStyle (Aspect_IS_POINT);
// create separate group for frame elements
- Handle(Graphic3d_Group) aFrameGroup = Prs3d_Root::NewGroup (thePresentation);
+ Handle(Graphic3d_Group) aFrameGroup = thePresentation->NewGroup();
aFrameGroup->AddPrimitiveArray (aFrame);
aFrameGroup->SetGroupPrimitivesAspect (aFillAspect);
// create separate group for text elements
- Handle(Graphic3d_Group) aTextGroup = Prs3d_Root::NewGroup (thePresentation);
+ Handle(Graphic3d_Group) aTextGroup = thePresentation->NewGroup();
TCollection_ExtendedString aString ("YOU SHOULD SEE THIS TEXT", Standard_True);
- Prs3d_Text::Draw (Prs3d_Root::CurrentGroup (thePresentation), myDrawer->TextAspect(), aString, gp_Ax2 (gp::Origin(), gp::DZ()));
+ Prs3d_Text::Draw (aTextGroup, myDrawer->TextAspect(), aString, gp_Ax2 (gp::Origin(), gp::DZ()));
}
virtual void ComputeSelection (const Handle(SelectMgr_Selection)& /*theSelection*/,
const Handle (Prs3d_Drawer)& aDrawer,
const Standard_Boolean drawCurve)
{
- Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(aDrawer->LineAspect()->Aspect());
+ aPresentation->CurrentGroup()->SetPrimitivesAspect(aDrawer->LineAspect()->Aspect());
Standard_Real V1, V2;
FindLimits(aCurve, aDrawer->MaximalParameterValue(), V1, V2);
const Standard_Integer NbPoints = aDrawer->Discretisation();
TColgp_SequenceOfPnt Pnts;
- DrawCurve(aCurve,Prs3d_Root::CurrentGroup(aPresentation),NbPoints,V1,V2,Pnts,drawCurve);
+ DrawCurve(aCurve,aPresentation->CurrentGroup(),NbPoints,V1,V2,Pnts,drawCurve);
if (aDrawer->LineArrowDraw()) {
gp_Pnt Location;
gp_Vec Direction;
aCurve.D1(aCurve.LastParameter(),Location,Direction);
- Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), Location, gp_Dir(Direction),
+ Prs3d_Arrow::Draw (aPresentation->CurrentGroup(), Location, gp_Dir(Direction),
aDrawer->ArrowAspect()->Angle(),
aDrawer->ArrowAspect()->Length());
}
FindLimits(aCurve, aDrawer->MaximalParameterValue(), V1, V2);
const Standard_Integer NbPoints = aDrawer->Discretisation();
- DrawCurve(aCurve,Prs3d_Root::CurrentGroup(aPresentation),NbPoints,V1,V2,Points,drawCurve);
+ DrawCurve(aCurve,aPresentation->CurrentGroup(),NbPoints,V1,V2,Points,drawCurve);
}
//==================================================================
const Standard_Integer NbPoints,
const Standard_Boolean drawCurve)
{
- DrawCurve(aCurve,Prs3d_Root::CurrentGroup(aPresentation),NbPoints,U1,U2,Points,drawCurve);
+ DrawCurve(aCurve,aPresentation->CurrentGroup(),NbPoints,U1,U2,Points,drawCurve);
}
//==================================================================
const Handle (Prs3d_Drawer)& aDrawer,
const Standard_Boolean drawCurve)
{
- Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(aDrawer->LineAspect()->Aspect());
+ aPresentation->CurrentGroup()->SetPrimitivesAspect(aDrawer->LineAspect()->Aspect());
Standard_Real V1 = U1;
Standard_Real V2 = U2;
const Standard_Integer NbPoints = aDrawer->Discretisation();
TColgp_SequenceOfPnt Pnts;
- DrawCurve(aCurve,Prs3d_Root::CurrentGroup(aPresentation),NbPoints,V1,V2,Pnts,drawCurve);
+ DrawCurve(aCurve,aPresentation->CurrentGroup(),NbPoints,V1,V2,Pnts,drawCurve);
if (aDrawer->LineArrowDraw()) {
gp_Pnt Location;
gp_Vec Direction;
aCurve.D1(aCurve.LastParameter(),Location,Direction);
- Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), Location, gp_Dir(Direction),
+ Prs3d_Arrow::Draw (aPresentation->CurrentGroup(), Location, gp_Dir(Direction),
aDrawer->ArrowAspect()->Angle(),
aDrawer->ArrowAspect()->Length());
}
Handle(Graphic3d_Group) aGroup;
if (theToDrawCurve)
{
- aGroup = Prs3d_Root::CurrentGroup(aPresentation);
+ aGroup = aPresentation->CurrentGroup();
aGroup->SetPrimitivesAspect (aDrawer->LineAspect()->Aspect());
}
Handle(Graphic3d_Group) aGroup;
if (theToDrawCurve)
{
- aGroup = Prs3d_Root::CurrentGroup (aPresentation);
+ aGroup = aPresentation->CurrentGroup();
aGroup->SetPrimitivesAspect(aDrawer->LineAspect()->Aspect());
}
Handle(Graphic3d_Group) aGroup;
if (theToDrawCurve)
{
- aGroup = Prs3d_Root::CurrentGroup (aPresentation);
+ aGroup = aPresentation->CurrentGroup();
}
drawCurve (aCurve, aGroup, aDeflection, anAngle, U1, U2, Points);
Handle(Graphic3d_Group) aGroup;
if (theToDrawCurve)
{
- aGroup = Prs3d_Root::CurrentGroup (aPresentation);
+ aGroup = aPresentation->CurrentGroup();
}
TColgp_SequenceOfPnt Points;
Handle(Graphic3d_Group) aGroup;
if (theToDrawCurve)
{
- aGroup = Prs3d_Root::CurrentGroup (aPresentation);
+ aGroup = aPresentation->CurrentGroup();
}
drawCurve (aCurve, aGroup, aDeflection, aDrawer->DeviationAngle(), V1, V2, Points);
}
aTrsf.SetTransformation (anAx3);
const HLRAlgo_Projector aProj (aTrsf, !theProjector->IsOrthographic(), theProjector->Scale());
- Handle(Graphic3d_Group) aGroup = Prs3d_Root::CurrentGroup(aPresentation);
+ Handle(Graphic3d_Group) aGroup = aPresentation->CurrentGroup();
TopExp_Explorer ex;
Standard_Real anU1, anU2;
BRepAdaptor_Curve aCurve;
Standard_Real aDeviation = theDrawer->MaximalChordialDeviation();
- Handle(Graphic3d_Group) aGroup = Prs3d_Root::CurrentGroup(thePresentation);
+ Handle(Graphic3d_Group) aGroup = thePresentation->CurrentGroup();
aGroup->SetPrimitivesAspect(theDrawer->SeenLineAspect()->Aspect());
const Adaptor3d_Surface& aPlane,
const Handle (Prs3d_Drawer)& aDrawer)
{
-// Prs3d_Root::NewGroup(aPresentation);
- Handle(Graphic3d_Group) TheGroup = Prs3d_Root::CurrentGroup(aPresentation);
+// aPresentation->NewGroup();
+ Handle(Graphic3d_Group) TheGroup = aPresentation->CurrentGroup();
if (aPlane.GetType() != GeomAbs_Plane) return;
Handle(Geom_Plane) thegeom = new Geom_Plane(aPlane.Plane());
aPrims->AddVertex(loc);
aPrims->AddVertex(p1);
TheGroup->AddPrimitiveArray(aPrims);
- Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), p1, norm, ang, len);
+ Prs3d_Arrow::Draw (aPresentation->CurrentGroup(), p1, norm, ang, len);
}
if (theaspect->DisplayEdgesArrows()) {
Handle(Graphic3d_ArrayOfSegments) aPrims = new Graphic3d_ArrayOfSegments(8);
p1 = loc.Translated(trans);
aPrims->AddVertex(loc);
aPrims->AddVertex(p1);
- Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), p1, norm, ang, len);
+ Prs3d_Arrow::Draw (aPresentation->CurrentGroup(), p1, norm, ang, len);
//
thegeom->D0(-Xmax,Ymax,loc);
p1 = loc.Translated(trans);
aPrims->AddVertex(loc);
aPrims->AddVertex(p1);
- Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), p1, norm, ang, len);
+ Prs3d_Arrow::Draw (aPresentation->CurrentGroup(), p1, norm, ang, len);
//
thegeom->D0(Xmax,Ymax,loc);
p1 = loc.Translated(trans);
aPrims->AddVertex(loc);
aPrims->AddVertex(p1);
- Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), p1, norm, ang, len);
+ Prs3d_Arrow::Draw (aPresentation->CurrentGroup(), p1, norm, ang, len);
//
thegeom->D0(Xmax,-Ymax,loc);
p1 = loc.Translated(trans);
aPrims->AddVertex(loc);
aPrims->AddVertex(p1);
- Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation), p1, norm, ang, len);
+ Prs3d_Arrow::Draw (aPresentation->CurrentGroup(), p1, norm, ang, len);
//
TheGroup->AddPrimitiveArray(aPrims);
}
const Adaptor3d_Curve& aCurve,
const Handle (Prs3d_Drawer)& aDrawer)
{
- Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(aDrawer->LineAspect()->Aspect());
+ aPresentation->CurrentGroup()->SetPrimitivesAspect(aDrawer->LineAspect()->Aspect());
GeomAbs_CurveType CType = aCurve.GetType();
if (CType == GeomAbs_BezierCurve || CType == GeomAbs_BSplineCurve) {
Handle(Graphic3d_ArrayOfPolylines) aPrims = new Graphic3d_ArrayOfPolylines(Nb);
for (i = 1; i <= Nb; i++)
aPrims->AddVertex(Bz->Pole(i));
- Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+ aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
}
else if (CType == GeomAbs_BSplineCurve) {
Handle(Geom_BSplineCurve) Bs = aCurve.BSpline();
Handle(Graphic3d_ArrayOfPolylines) aPrims = new Graphic3d_ArrayOfPolylines(Nb);
for (i = 1; i <= Nb; i++)
aPrims->AddVertex(Bs->Pole(i));
- Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+ aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
}
}
gp_Pnt Location;
gp_Vec Direction;
aCurve.D1(aCurve.LastParameter(),Location,Direction);
- Prs3d_Arrow::Draw (Prs3d_Root::CurrentGroup (aPresentation),
+ Prs3d_Arrow::Draw (aPresentation->CurrentGroup(),
Location,
gp_Dir(Direction),
aDrawer->ArrowAspect()->Angle(),
return Standard_False;
}
- Handle(Graphic3d_Group) aGroup = Prs3d_Root::NewGroup (thePrs);
+ Handle(Graphic3d_Group) aGroup = thePrs->NewGroup();
aGroup->SetClosed (theIsClosed);
aGroup->SetGroupPrimitivesAspect (theDrawer->ShadingAspect()->Aspect());
aGroup->AddPrimitiveArray (aPArray);
N2 = N2 < 3 ? 3 : N2;
// If the surface is closed, the faces from back-side are not traced:
- Handle(Graphic3d_Group) aGroup = Prs3d_Root::CurrentGroup (thePrs);
+ Handle(Graphic3d_Group) aGroup = thePrs->CurrentGroup();
aGroup->SetGroupPrimitivesAspect (theDrawer->ShadingAspect()->Aspect());
aGroup->SetClosed (theSurface.IsUClosed() && theSurface.IsVClosed());
// *********************
//
if ( !(UClosed && VClosed) ) {
-
- (Prs3d_Root::CurrentGroup(aPresentation))->SetPrimitivesAspect
- (aDrawer->FreeBoundaryAspect()->Aspect());
+ aPresentation->CurrentGroup()->SetPrimitivesAspect (aDrawer->FreeBoundaryAspect()->Aspect());
if ( !UClosed )
{
anIso.Load(GeomAbs_IsoU,U1,V1,V2);
//
Standard_Integer fin = aDrawer->UIsoAspect()->Number();
if ( fin != 0) {
-
- (Prs3d_Root::CurrentGroup(aPresentation))->SetPrimitivesAspect
- (aDrawer->UIsoAspect()->Aspect());
+ aPresentation->CurrentGroup()->SetPrimitivesAspect (aDrawer->UIsoAspect()->Aspect());
Standard_Real du= UClosed ? (U2-U1)/fin : (U2-U1)/(1+fin);
for (Standard_Integer i=1; i<=fin;i++){
}
fin = aDrawer->VIsoAspect()->Number();
if ( fin != 0) {
-
- (Prs3d_Root::CurrentGroup(aPresentation))->SetPrimitivesAspect
- (aDrawer->VIsoAspect()->Aspect());
+ aPresentation->CurrentGroup()->SetPrimitivesAspect (aDrawer->VIsoAspect()->Aspect());
Standard_Real dv= VClosed ?(V2-V1)/fin : (V2-V1)/(1+fin);
for (Standard_Integer i=1; i<=fin;i++){
}
}
}
-
-
-
-
const Standard_Integer n = A.ColLength();
const Standard_Integer m = A.RowLength();
- Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(aDrawer->UIsoAspect()->Aspect());
+ aPresentation->CurrentGroup()->SetPrimitivesAspect(aDrawer->UIsoAspect()->Aspect());
Handle(Graphic3d_ArrayOfPolylines) aPrims = new Graphic3d_ArrayOfPolylines(n*m,n);
for (i=1; i<=n; i++){
aPrims->AddBound(m);
for (j=1; j<=m; j++)
aPrims->AddVertex(A(i,j));
}
- Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+ aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
- Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(aDrawer->VIsoAspect()->Aspect());
+ aPresentation->CurrentGroup()->SetPrimitivesAspect(aDrawer->VIsoAspect()->Aspect());
aPrims = new Graphic3d_ArrayOfPolylines(n*m,m);
for (j=1; j<=m; j++){
aPrims->AddBound(n);
for (i=1; i<=n; i++)
aPrims->AddVertex(A(i,j));
}
- Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
+ aPresentation->CurrentGroup()->AddPrimitiveArray(aPrims);
}
//
if (!(UClosed && VClosed))
{
- Prs3d_Root::CurrentGroup (aPresentation)->SetPrimitivesAspect (aDrawer->FreeBoundaryAspect()->Aspect());
+ aPresentation->CurrentGroup()->SetPrimitivesAspect (aDrawer->FreeBoundaryAspect()->Aspect());
if (!UClosed)
{
anIso.Load (GeomAbs_IsoU, U1, V1, V2);
Standard_Integer fin = aDrawer->UIsoAspect()->Number();
if (fin != 0)
{
- Prs3d_Root::CurrentGroup (aPresentation)->SetPrimitivesAspect (aDrawer->UIsoAspect()->Aspect());
+ aPresentation->CurrentGroup()->SetPrimitivesAspect (aDrawer->UIsoAspect()->Aspect());
Standard_Real du= UClosed ? (U2-U1) / fin : (U2-U1) / (1 + fin);
for (Standard_Integer i = 1; i <= fin; i++)
fin = aDrawer->VIsoAspect()->Number();
if (fin != 0)
{
- Prs3d_Root::CurrentGroup (aPresentation)->SetPrimitivesAspect (aDrawer->VIsoAspect()->Aspect());
+ aPresentation->CurrentGroup()->SetPrimitivesAspect (aDrawer->VIsoAspect()->Aspect());
Standard_Real dv = VClosed ? (V2 - V1) / fin : (V2 - V1) / (1 + fin);
for (Standard_Integer i = 1; i <= fin; i++)
for(int i=1; i<=Pnts->Length(); i++)
UIsoArray->AddVertex(Pnts->Value(i));
}
- Handle(Graphic3d_Group) TheGroup = Prs3d_Root::NewGroup(aPresentation);
+ Handle(Graphic3d_Group) TheGroup = aPresentation->NewGroup();
TheGroup->SetPrimitivesAspect(aDrawer->UIsoAspect()->Aspect());
TheGroup->AddPrimitiveArray(UIsoArray);
}
for(int i=1; i<=Pnts->Length(); i++)
VIsoArray->AddVertex(Pnts->Value(i));
}
- Handle(Graphic3d_Group) TheGroup = Prs3d_Root::NewGroup(aPresentation);
+ Handle(Graphic3d_Group) TheGroup = aPresentation->NewGroup();
TheGroup->SetPrimitivesAspect(aDrawer->VIsoAspect()->Aspect());
TheGroup->AddPrimitiveArray(VIsoArray);
}
for(int i=1; i<=Pnts->Length(); i++)
freeArray->AddVertex(Pnts->Value(i));
}
- Handle(Graphic3d_Group) TheGroup = Prs3d_Root::NewGroup(aPresentation);
+ Handle(Graphic3d_Group) TheGroup = aPresentation->NewGroup();
TheGroup->SetPrimitivesAspect(aDrawer->FreeBoundaryAspect()->Aspect());
TheGroup->AddPrimitiveArray(freeArray);
}
aPresentation->Clear();
if (!myMarkerAspect.IsNull())
{
- Prs3d_Root::CurrentGroup (aPresentation)->SetGroupPrimitivesAspect (myMarkerAspect);
+ aPresentation->CurrentGroup()->SetGroupPrimitivesAspect (myMarkerAspect);
}
- Prs3d_Root::CurrentGroup (aPresentation)->AddPrimitiveArray (anArray);
+ aPresentation->CurrentGroup()->AddPrimitiveArray (anArray);
}
void ViewerTest_MarkersArrayObject::ComputeSelection (const Handle(SelectMgr_Selection)& theSelection,
DBRep_DrawableShape::addSurfaceNormals (aNormalMap, myshape, NormalLength, NbAlongU, NbAlongV);
}
- Handle(Graphic3d_Group) aPrsGroup = Prs3d_Root::NewGroup (thePrs);
+ Handle(Graphic3d_Group) aPrsGroup = thePrs->NewGroup();
aPrsGroup->SetGroupPrimitivesAspect (myDrawer->ArrowAspect()->Aspect());
const Standard_Real aArrowAngle = myDrawer->ArrowAspect()->Angle();
#include <OSD_OpenFile.hxx>
#include <Prs3d_Drawer.hxx>
#include <Prs3d_Presentation.hxx>
-#include <Prs3d_Root.hxx>
#include <Prs3d_LineAspect.hxx>
#include <Prs3d_ShadingAspect.hxx>
#include <Select3D_SensitiveCurve.hxx>
#include <Prs3d_ShadingAspect.hxx>
#include <Prs3d_Drawer.hxx>
#include <Prs3d_LineAspect.hxx>
-#include <Prs3d_Root.hxx>
#include <Prs3d_Text.hxx>
#include <Select3D_SensitivePrimitiveArray.hxx>
#include <TColStd_HSequenceOfAsciiString.hxx>
Quantity_Color aColor (Quantity_NOC_RED);
Standard_Integer aWidth, aHeight;
ViewerTest::CurrentView()->Window()->Size (aWidth, aHeight);
- Handle (Graphic3d_Group) aGroup = Prs3d_Root::CurrentGroup (thePresentation);
+ Handle(Graphic3d_Group) aGroup = thePresentation->CurrentGroup();
Handle(Graphic3d_ArrayOfPolylines) aPrim = new Graphic3d_ArrayOfPolylines(5);
aPrim->AddVertex(myX1, aHeight-myY1, 0.);
aPrim->AddVertex(myX2, aHeight-myY2, 0.);
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 (Prs3d_Root::CurrentGroup (aPrs), anAspect, aName->Get(), aPnt);
+ Prs3d_Text::Draw (aPrs->CurrentGroup(), anAspect, aName->Get(), aPnt);
}
}
}