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

0024133: Development of improvement of dimensions implementation; new length, radius,diameter and angle dimensions.

Some corrections; test cases were added; coding standards in MFC samples & presentations
Request stencil buffer for Linux.
correct test cases; correct compilation errors
compilation warnings (gcc/Linux)
This commit is contained in:
aba
2013-10-31 16:49:38 +04:00
committed by bugmaster
parent 7c633a3eab
commit a6eb515f9d
137 changed files with 7591 additions and 6616 deletions

View File

@@ -86,15 +86,7 @@ AS_FIRSTAR_LASTPT,AS_FIRSTPT_LASTAR;
imported DatumPrs;
ComputeSymbol(aPresentation: Presentation from Prs3d;
anAspect: AngleAspect from Prs3d;
pt1,pt2:Pnt from gp;
dir1,dir2: Dir from gp;
ArrowSide: ArrowSide from DsgPrs);
---Purpose: draws symbols ((one or two) arrows,(one or two)points
-- at thebeginning and at the end of the dimension
ComputeSymbol(aPresentation: Presentation from Prs3d;
anAspect: LengthAspect from Prs3d;
anAspect: DimensionAspect from Prs3d;
pt1,pt2:Pnt from gp;
dir1,dir2: Dir from gp;
ArrowSide: ArrowSide from DsgPrs;

View File

@@ -47,14 +47,14 @@
#include <gce_MakeLin.hxx>
void DsgPrs::ComputeSymbol (const Handle(Prs3d_Presentation)& aPresentation,
const Handle(Prs3d_AngleAspect)& LA,
const Handle(Prs3d_DimensionAspect)& LA,
const gp_Pnt& pt1,
const gp_Pnt& pt2,
const gp_Dir& dir1,
const gp_Dir& dir2,
const DsgPrs_ArrowSide ArrowSide)
const DsgPrs_ArrowSide ArrowSide,
const Standard_Boolean drawFromCenter)
{
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
@@ -64,6 +64,7 @@ void DsgPrs::ComputeSymbol (const Handle(Prs3d_Presentation)& aPresentation,
LA->LineAspect()->Aspect()->Values (aColor, aType, aWidth);
Handle(Graphic3d_AspectMarker3d) aMarkerAsp = new Graphic3d_AspectMarker3d (Aspect_TOM_O, aColor, 1.0);
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect (aMarkerAsp);
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
switch(ArrowSide) {
case DsgPrs_AS_NONE:
@@ -109,9 +110,12 @@ void DsgPrs::ComputeSymbol (const Handle(Prs3d_Presentation)& aPresentation,
case DsgPrs_AS_FIRSTPT:
{
Handle(Graphic3d_ArrayOfPoints) anArrayOfPoints = new Graphic3d_ArrayOfPoints (1);
anArrayOfPoints->AddVertex (pt1.X(), pt1.Y(), pt1.Z());
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray (anArrayOfPoints);
if(drawFromCenter)
{
Handle(Graphic3d_ArrayOfPoints) anArrayOfPoints = new Graphic3d_ArrayOfPoints (1);
anArrayOfPoints->AddVertex (pt1.X(), pt1.Y(), pt1.Z());
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray (anArrayOfPoints);
}
break;
}
@@ -126,12 +130,18 @@ void DsgPrs::ComputeSymbol (const Handle(Prs3d_Presentation)& aPresentation,
case DsgPrs_AS_BOTHPT:
{
Handle(Graphic3d_ArrayOfPoints) anArrayOfPoints1 = new Graphic3d_ArrayOfPoints (1);
anArrayOfPoints1->AddVertex (pt1.X(), pt1.Y(), pt1.Z());
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray (anArrayOfPoints1);
Handle(Graphic3d_ArrayOfPoints) anArrayOfPoints2 = new Graphic3d_ArrayOfPoints (1);
anArrayOfPoints2->AddVertex (pt2.X(), pt2.Y(), pt2.Z());
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray (anArrayOfPoints2);
if(drawFromCenter)
{
Handle(Graphic3d_ArrayOfPoints) anArrayOfPoints1 = new Graphic3d_ArrayOfPoints (1);
anArrayOfPoints1->AddVertex (pt1.X(), pt1.Y(), pt1.Z());
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray (anArrayOfPoints1);
}
if(drawFromCenter)
{
Handle(Graphic3d_ArrayOfPoints) anArrayOfPoints2 = new Graphic3d_ArrayOfPoints (1);
anArrayOfPoints2->AddVertex (pt2.X(), pt2.Y(), pt2.Z());
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray (anArrayOfPoints2);
}
break;
}
@@ -153,10 +163,12 @@ void DsgPrs::ComputeSymbol (const Handle(Prs3d_Presentation)& aPresentation,
case DsgPrs_AS_FIRSTPT_LASTAR:
{
// a Round
Handle(Graphic3d_ArrayOfPoints) anArrayOfPoints = new Graphic3d_ArrayOfPoints (1);
anArrayOfPoints->AddVertex (pt1.X(), pt1.Y(), pt1.Z());
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray (anArrayOfPoints);
if(drawFromCenter)
{
Handle(Graphic3d_ArrayOfPoints) anArrayOfPoints = new Graphic3d_ArrayOfPoints (1);
anArrayOfPoints->AddVertex (pt1.X(), pt1.Y(), pt1.Z());
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray (anArrayOfPoints);
}
// an Arrow
Prs3d_Arrow::Draw(aPresentation,
pt2,
@@ -168,134 +180,6 @@ void DsgPrs::ComputeSymbol (const Handle(Prs3d_Presentation)& aPresentation,
}
}
void DsgPrs::ComputeSymbol (const Handle(Prs3d_Presentation)& aPresentation,
const Handle(Prs3d_LengthAspect)& LA,
const gp_Pnt& pt1,
const gp_Pnt& pt2,
const gp_Dir& dir1,
const gp_Dir& dir2,
const DsgPrs_ArrowSide ArrowSide,
const Standard_Boolean drawFromCenter)
{
Quantity_Color aColor;
Aspect_TypeOfLine aType;
Standard_Real aWidth;
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
LA->LineAspect()->Aspect()->Values(aColor, aType, aWidth);
Handle(Graphic3d_AspectMarker3d) aMarkerAsp = new Graphic3d_AspectMarker3d (Aspect_TOM_O, aColor, 1.0);
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect (aMarkerAsp);
switch(ArrowSide) {
case DsgPrs_AS_NONE:
{
break;
}
case DsgPrs_AS_FIRSTAR:
{
Prs3d_Arrow::Draw(aPresentation,
pt1,
dir1,
LA->Arrow1Aspect()->Angle(),
LA->Arrow1Aspect()->Length());
break;
}
case DsgPrs_AS_LASTAR:
{
Prs3d_Arrow::Draw(aPresentation,
pt2,
dir2,
LA->Arrow1Aspect()->Angle(),
LA->Arrow1Aspect()->Length());
break;
}
case DsgPrs_AS_BOTHAR:
{
Prs3d_Arrow::Draw(aPresentation,
pt1,
dir1,
LA->Arrow1Aspect()->Angle(),
LA->Arrow1Aspect()->Length());
Prs3d_Arrow::Draw(aPresentation,
pt2,
dir2,
LA->Arrow1Aspect()->Angle(),
LA->Arrow1Aspect()->Length());
break;
}
case DsgPrs_AS_FIRSTPT:
{
if (drawFromCenter)
{
Handle(Graphic3d_ArrayOfPoints) anArrayOfPoints = new Graphic3d_ArrayOfPoints (1);
anArrayOfPoints->AddVertex (pt1.X(), pt1.Y(), pt1.Z());
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray (anArrayOfPoints);
}
break;
}
case DsgPrs_AS_LASTPT:
{
// 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);
break;
}
case DsgPrs_AS_BOTHPT:
{
if (drawFromCenter)
{
Handle(Graphic3d_ArrayOfPoints) anArrayOfPoints1 = new Graphic3d_ArrayOfPoints (1);
anArrayOfPoints1->AddVertex (pt1.X(), pt1.Y(), pt1.Z());
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray (anArrayOfPoints1);
}
Handle(Graphic3d_ArrayOfPoints) anArrayOfPoints2 = new Graphic3d_ArrayOfPoints (1);
anArrayOfPoints2->AddVertex (pt2.X(), pt2.Y(), pt2.Z());
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray (anArrayOfPoints2);
break;
}
case DsgPrs_AS_FIRSTAR_LASTPT:
{
// an Arrow
Prs3d_Arrow::Draw (aPresentation,
pt1,
dir1,
LA->Arrow1Aspect()->Angle(),
LA->Arrow1Aspect()->Length());
// a Round
Handle(Graphic3d_ArrayOfPoints) anArrayOfPoints = new Graphic3d_ArrayOfPoints (1);
anArrayOfPoints->AddVertex (pt2.X(), pt2.Y(), pt2.Z());
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray (anArrayOfPoints);
break;
}
case DsgPrs_AS_FIRSTPT_LASTAR:
{
// a Round
if (drawFromCenter)
{
Handle(Graphic3d_ArrayOfPoints) anArrayOfPoints = new Graphic3d_ArrayOfPoints (1);
anArrayOfPoints->AddVertex (pt1.X(), pt1.Y(), pt1.Z());
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray (anArrayOfPoints);
}
// an Arrow
Prs3d_Arrow::Draw (aPresentation,
pt2,
dir2,
LA->Arrow1Aspect()->Angle(),
LA->Arrow1Aspect()->Length());
break;
}
}
}
//=======================================================================
//function : ComputePlanarFacesLengthPresentation

View File

@@ -24,11 +24,10 @@
#include <Graphic3d_Group.hxx>
#include <Graphic3d_ArrayOfSegments.hxx>
#include <Graphic3d_ArrayOfPolylines.hxx>
#include <Prs3d_AngleAspect.hxx>
#include <Prs3d_DimensionAspect.hxx>
#include <Prs3d_Arrow.hxx>
#include <Prs3d_ArrowAspect.hxx>
#include <Prs3d_LineAspect.hxx>
#include <Prs3d_LengthAspect.hxx>
#include <Prs3d_Text.hxx>
#include <TCollection_AsciiString.hxx>
#include <TCollection_ExtendedString.hxx>
@@ -87,14 +86,13 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
const gp_Circ& VmaxCircle,
const Standard_Real aArrowSize)
{
Handle(Prs3d_AngleAspect) anAngleAspect = aDrawer->AngleAspect();
Handle(Prs3d_LengthAspect) aLengthAspect = aDrawer->LengthAspect();
Handle(Prs3d_DimensionAspect) aDimensionAspect = aDrawer->DimensionAspect();
TCollection_ExtendedString txt(aText);
const Standard_Real myArrowSize = ( aArrowSize == 0.0 )? (0.1 * aCircle.Radius()) : aArrowSize;
anAngleAspect->ArrowAspect()->SetLength(myArrowSize);
aDimensionAspect->ArrowAspect()->SetLength(myArrowSize);
aDrawer->ArrowAspect()->SetLength(myArrowSize);
Standard_Boolean IsConeTrimmed = Standard_False;
@@ -175,15 +173,15 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
aPrims->AddVertex(ElCLib::Value(param + angle/11 * i, aCircle2));
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
DsgPrs::ComputeSymbol(aPresentation, anAngleAspect, AttachmentPnt,
DsgPrs::ComputeSymbol(aPresentation, aDimensionAspect, AttachmentPnt,
AttachmentPnt, aDir, aDir, DsgPrs_AS_LASTAR);
DsgPrs::ComputeSymbol(aPresentation, anAngleAspect, OppositePnt,
DsgPrs::ComputeSymbol(aPresentation, aDimensionAspect, OppositePnt,
OppositePnt, aDir2, aDir2, DsgPrs_AS_LASTAR);
param = ElCLib::Parameter(aCircle2, tmpPnt);
tmpPnt = ElCLib::Value(param, aCircle2);
tmpPnt = tmpPnt.Translated(gp_Vec(0, 0, -2));
Prs3d_Text::Draw(aPresentation, aLengthAspect->TextAspect(), txt, tmpPnt); //add the TCollection_ExtendedString
Prs3d_Text::Draw(aPresentation, aDimensionAspect->TextAspect(), txt, tmpPnt); //add the TCollection_ExtendedString
angle = 2. * M_PI - param ;
if( param > OppParam )
@@ -241,7 +239,7 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
char valcar[80];
sprintf(valcar,"%5.2f",theval);
Handle(Prs3d_AngleAspect) LA = aDrawer->AngleAspect();
Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
gp_Ax2 ax(CenterPoint,axisdir,dir1);
@@ -353,7 +351,7 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
char valcar[80];
sprintf(valcar,"%5.2f",theval);
Handle( Prs3d_AngleAspect ) LA = aDrawer->AngleAspect();
Handle( Prs3d_DimensionAspect ) LA = aDrawer->DimensionAspect();
Prs3d_Root::CurrentGroup( aPresentation )->SetPrimitivesAspect( LA->LineAspect()->Aspect() );
gp_Circ AngleCirc, AttachCirc;
@@ -467,7 +465,7 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
char valcar[80];
sprintf(valcar,"%5.2f",theval);
Handle(Prs3d_AngleAspect) LA = aDrawer->AngleAspect();
Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
gp_Dir Norm;
@@ -586,7 +584,7 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
char valcar[80];
sprintf(valcar,"%5.2f",theval);
Handle(Prs3d_AngleAspect) LA = aDrawer->AngleAspect();
Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
gp_Dir Norm = dir1.Crossed(dir2);
@@ -702,7 +700,7 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
TCollection_AsciiString valas(valcar);
TCollection_ExtendedString aText(valas);
Handle(Prs3d_AngleAspect) LA = aDrawer->AngleAspect();
Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
gp_Dir Norm = dir1.Crossed(dir2);
@@ -801,7 +799,7 @@ void DsgPrs_AnglePresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
const gp_Ax1& theAxe,
const DsgPrs_ArrowSide ArrowSide)
{
Handle(Prs3d_AngleAspect) LA = aDrawer->AngleAspect();
Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
gp_Dir dir1(gp_Vec(CenterPoint, AttachmentPoint1));

View File

@@ -27,7 +27,7 @@
#include <Prs3d_Arrow.hxx>
#include <Prs3d_ArrowAspect.hxx>
#include <Prs3d_LineAspect.hxx>
#include <Prs3d_LengthAspect.hxx>
#include <Prs3d_DimensionAspect.hxx>
#include <Prs3d_Text.hxx>
#include <gp_Dir.hxx>
@@ -42,7 +42,7 @@ void DsgPrs_Chamf2dPresentation::Add(
const gp_Pnt& aPntEnd,
const TCollection_ExtendedString& aText)
{
Handle(Prs3d_LengthAspect) LA = aDrawer->LengthAspect();
Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
@@ -52,7 +52,7 @@ void DsgPrs_Chamf2dPresentation::Add(
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
gp_Dir ArrowDir(aPntAttach.XYZ()-aPntEnd.XYZ());
Prs3d_Arrow::Draw(aPresentation,aPntAttach,ArrowDir,LA->Arrow1Aspect()->Angle(),LA->Arrow1Aspect()->Length());
Prs3d_Arrow::Draw(aPresentation,aPntAttach,ArrowDir,LA->ArrowAspect()->Angle(),LA->ArrowAspect()->Length());
Prs3d_Text::Draw(aPresentation,LA->TextAspect(),aText,aPntEnd);
}
@@ -71,7 +71,7 @@ void DsgPrs_Chamf2dPresentation::Add(
const TCollection_ExtendedString& aText,
const DsgPrs_ArrowSide ArrowPrs)
{
Handle(Prs3d_LengthAspect) LA = aDrawer->LengthAspect();
Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());

View File

@@ -24,7 +24,7 @@
#include <Graphic3d_Group.hxx>
#include <Graphic3d_ArrayOfPolylines.hxx>
#include <Prs3d_LengthAspect.hxx>
#include <Prs3d_DimensionAspect.hxx>
#include <Prs3d_Root.hxx>
#include <Prs3d_LineAspect.hxx>
@@ -43,7 +43,7 @@ void DsgPrs_ConcentricPresentation::Add(
const gp_Dir& aNorm,
const gp_Pnt& aPoint)
{
Handle(Prs3d_LengthAspect) LA = aDrawer->LengthAspect();
Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
//Creation et discretisation du plus gros cercle
gp_Circ Circ(gp_Ax2(aCenter,aNorm), aRadius);

View File

@@ -25,7 +25,7 @@
#include <Prs3d_LineAspect.hxx>
#include <Prs3d_TextAspect.hxx>
#include <Prs3d_LengthAspect.hxx>
#include <Prs3d_DimensionAspect.hxx>
#include <Prs3d_Arrow.hxx>
#include <Prs3d_Text.hxx>
#include <Prs3d_ArrowAspect.hxx>
@@ -60,7 +60,7 @@ void DsgPrs_DiameterPresentation::Add (const Handle(Prs3d_Presentation)& aPresen
const DsgPrs_ArrowSide ArrowPrs,
const Standard_Boolean IsDiamSymbol )
{
Handle(Prs3d_LengthAspect) LA = aDrawer->LengthAspect();
Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
Standard_Real parat = ElCLib::Parameter(aCircle, AttachmentPoint);
@@ -156,7 +156,7 @@ void DsgPrs_DiameterPresentation::Add (const Handle(Prs3d_Presentation)& aPresen
lpara -= 2.*M_PI;
}
Handle(Prs3d_LengthAspect) LA = aDrawer->LengthAspect();
Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
Standard_Real parEndOfArrow = ElCLib::Parameter(aCircle,AttachmentPoint);
gp_Pnt EndOfArrow;

View File

@@ -27,7 +27,7 @@
#include <Graphic3d_Group.hxx>
#include <Graphic3d_ArrayOfSegments.hxx>
#include <Graphic3d_ArrayOfPolylines.hxx>
#include <Prs3d_LengthAspect.hxx>
#include <Prs3d_DimensionAspect.hxx>
#include <Prs3d_Arrow.hxx>
#include <Prs3d_ArrowAspect.hxx>
#include <Prs3d_LineAspect.hxx>
@@ -66,7 +66,7 @@ void DsgPrs_EllipseRadiusPresentation::Add (const Handle(Prs3d_Presentation)& aP
const Standard_Boolean IsMaxRadius,
const DsgPrs_ArrowSide ArrowPrs)
{
Handle(Prs3d_LengthAspect) LA = aDrawer->LengthAspect();
Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
const Standard_Real dist = aCenter.Distance( aPosition );
@@ -108,7 +108,7 @@ void DsgPrs_EllipseRadiusPresentation::Add (const Handle(Prs3d_Presentation)& aP
const Standard_Boolean IsMaxRadius,
const DsgPrs_ArrowSide ArrowPrs)
{
Handle(Prs3d_LengthAspect) LA = aDrawer->LengthAspect();
Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
if(!IsInDomain)
@@ -150,7 +150,7 @@ void DsgPrs_EllipseRadiusPresentation::Add (const Handle(Prs3d_Presentation)& aP
const Standard_Boolean IsMaxRadius,
const DsgPrs_ArrowSide ArrowPrs)
{
Handle(Prs3d_LengthAspect) LA = aDrawer->LengthAspect();
Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
if(!IsInDomain)

View File

@@ -22,7 +22,7 @@
#include <DsgPrs.hxx>
#include <Graphic3d_Group.hxx>
#include <Prs3d_LengthAspect.hxx>
#include <Prs3d_DimensionAspect.hxx>
#include <Prs3d_LineAspect.hxx>
#include <Graphic3d_ArrayOfSegments.hxx>
#include <Graphic3d_ArrayOfPolylines.hxx>
@@ -48,7 +48,7 @@ void DsgPrs_EqualDistancePresentation::Add( const Handle( Prs3d_Presentation )&
const gp_Pnt& Point4,
const Handle( Geom_Plane )& Plane )
{
Handle( Prs3d_LengthAspect ) LA = aDrawer->LengthAspect();
Handle( Prs3d_DimensionAspect ) LA = aDrawer->DimensionAspect();
Prs3d_Root::CurrentGroup( aPresentation )->SetPrimitivesAspect( LA->LineAspect()->Aspect() );
// Line between two middles
@@ -132,7 +132,7 @@ void DsgPrs_EqualDistancePresentation::Add( const Handle( Prs3d_Presentation )&
gp_Pnt& aProj1,
gp_Pnt& aProj2)
{
const Handle(Prs3d_LengthAspect) LA = aDrawer->LengthAspect();
const Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
gp_Lin L1 (aPoint1,aDirection);
@@ -170,7 +170,7 @@ void DsgPrs_EqualDistancePresentation::Add( const Handle( Prs3d_Presentation )&
const gp_Pnt& aPoint4,
const DsgPrs_ArrowSide anArrowSide)
{
const Handle(Prs3d_LengthAspect) LA = aDrawer->LengthAspect();
const Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
Standard_Real aPar11, aPar12, aPar21, aPar22;

View File

@@ -22,7 +22,7 @@
#include <DsgPrs.hxx>
#include <Graphic3d_Group.hxx>
#include <Prs3d_LengthAspect.hxx>
#include <Prs3d_DimensionAspect.hxx>
#include <Prs3d_LineAspect.hxx>
#include <Graphic3d_ArrayOfPolylines.hxx>
#include <Prs3d_Root.hxx>
@@ -42,7 +42,7 @@ void DsgPrs_EqualRadiusPresentation::Add( const Handle( Prs3d_Presentation )& aP
const gp_Pnt& SecondPoint,
const Handle( Geom_Plane )& Plane )
{
Handle( Prs3d_LengthAspect ) LA = aDrawer->LengthAspect();
Handle( Prs3d_DimensionAspect ) LA = aDrawer->DimensionAspect();
Prs3d_Root::CurrentGroup( aPresentation )->SetPrimitivesAspect( LA->LineAspect()->Aspect() );
Handle(Graphic3d_ArrayOfPolylines) aPrims = new Graphic3d_ArrayOfPolylines(4);

View File

@@ -26,7 +26,7 @@
#include <Graphic3d_Group.hxx>
#include <Graphic3d_ArrayOfSegments.hxx>
#include <Graphic3d_ArrayOfPolylines.hxx>
#include <Prs3d_LengthAspect.hxx>
#include <Prs3d_DimensionAspect.hxx>
#include <Prs3d_Arrow.hxx>
#include <Prs3d_ArrowAspect.hxx>
#include <Prs3d_LineAspect.hxx>
@@ -84,10 +84,10 @@ void DsgPrs_FilletRadiusPresentation::Add (const Handle(Prs3d_Presentation)& aPr
gp_Dir DirOfArrow;
gp_Circ FilletCirc;
// gp_Pnt NewPosition, EndOfArrow;
Handle( Prs3d_LengthAspect ) LA = aDrawer->LengthAspect();
Handle( Prs3d_DimensionAspect ) LA = aDrawer->DimensionAspect();
Prs3d_Root::CurrentGroup( aPresentation )->SetPrimitivesAspect( LA->LineAspect()->Aspect() );
Standard_Real ArrowLength = LA->Arrow1Aspect()->Length();
Standard_Real ArrowLength = LA->ArrowAspect()->Length();
DsgPrs::ComputeFilletRadiusPresentation( ArrowLength,
theval,
aPosition,

View File

@@ -27,7 +27,7 @@
#include <Graphic3d_ArrayOfPoints.hxx>
#include <Graphic3d_Vertex.hxx>
#include <Prs3d_LengthAspect.hxx>
#include <Prs3d_DimensionAspect.hxx>
#include <Prs3d_LineAspect.hxx>
#include <Prs3d_Root.hxx>
@@ -56,7 +56,7 @@ void DsgPrs_FixPresentation::Add(
const gp_Dir& aNormPln,
const Standard_Real symbsize)
{
Handle(Prs3d_LengthAspect) LA = aDrawer->LengthAspect();
Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
Handle(Graphic3d_ArrayOfSegments) aPrims = new Graphic3d_ArrayOfSegments(10);

View File

@@ -30,7 +30,7 @@
#include <Graphic3d_ArrayOfPoints.hxx>
#include <Prs3d_LineAspect.hxx>
#include <Prs3d_LengthAspect.hxx>
#include <Prs3d_DimensionAspect.hxx>
#include <Prs3d_Text.hxx>
#include <TCollection_AsciiString.hxx>
@@ -49,7 +49,7 @@ void DsgPrs_IdenticPresentation::Add( const Handle(Prs3d_Presentation)& aPresent
const gp_Pnt& aPntAttach,
const gp_Pnt& aPntOffset)
{
Handle(Prs3d_LengthAspect) LA = aDrawer->LengthAspect();
Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
Handle(Graphic3d_ArrayOfSegments) aPrims = new Graphic3d_ArrayOfSegments(2);
@@ -82,7 +82,7 @@ void DsgPrs_IdenticPresentation::Add( const Handle(Prs3d_Presentation)& aPresent
const gp_Pnt& aSAttach,
const gp_Pnt& aPntOffset)
{
Handle(Prs3d_LengthAspect) LA = aDrawer->LengthAspect();
Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
Handle(Graphic3d_ArrayOfSegments) aPrims = new Graphic3d_ArrayOfSegments(4);
@@ -120,7 +120,7 @@ void DsgPrs_IdenticPresentation::Add(const Handle(Prs3d_Presentation)& aPresenta
const gp_Pnt& aSAttach,
const gp_Pnt& aPntOffset)
{
Handle(Prs3d_LengthAspect) LA = aDrawer->LengthAspect();
Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
gp_Ax2 ax = theAxe;
@@ -169,7 +169,7 @@ void DsgPrs_IdenticPresentation::Add(const Handle(Prs3d_Presentation)& aPresenta
const gp_Pnt& aPntOffset,
const gp_Pnt& aPntOnCirc)
{
Handle(Prs3d_LengthAspect) LA = aDrawer->LengthAspect();
Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
gp_Ax2 ax = theAxe;
@@ -218,7 +218,7 @@ void DsgPrs_IdenticPresentation::Add(const Handle(Prs3d_Presentation)& aPresenta
const gp_Pnt& aPntOffset,
const gp_Pnt& aPntOnElli)
{
Handle(Prs3d_LengthAspect) LA = aDrawer->LengthAspect();
Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
Standard_Real pFAttach = ElCLib::Parameter(anEllipse, aFAttach);

View File

@@ -28,7 +28,7 @@
#include <Prs3d_Arrow.hxx>
#include <Prs3d_ArrowAspect.hxx>
#include <Prs3d_LineAspect.hxx>
#include <Prs3d_LengthAspect.hxx>
#include <Prs3d_DimensionAspect.hxx>
#include <TCollection_AsciiString.hxx>
#include <Graphic3d_AspectLine3d.hxx>
#include <Prs3d_Text.hxx>
@@ -52,7 +52,7 @@ void DsgPrs_LengthPresentation::Add (const Handle(Prs3d_Presentation)& aPresenta
const gp_Dir& aDirection,
const gp_Pnt& OffsetPoint)
{
Handle(Prs3d_LengthAspect) LA = aDrawer->LengthAspect();
Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
gp_Lin L1 (AttachmentPoint1,aDirection);
@@ -88,7 +88,7 @@ void DsgPrs_LengthPresentation::Add (const Handle(Prs3d_Presentation)& aPresenta
aPrims->AddVertex(PointMin);
aPrims->AddVertex(PointMax);
if (dist < (LA->Arrow1Aspect()->Length()+LA->Arrow2Aspect()->Length()))
if (dist < (LA->ArrowAspect()->Length()+LA->ArrowAspect()->Length()))
outside = Standard_True;
gp_Dir arrdir = L3.Direction().Reversed();
@@ -96,13 +96,13 @@ void DsgPrs_LengthPresentation::Add (const Handle(Prs3d_Presentation)& aPresenta
arrdir.Reverse();
// arrow 1 : 2nd group
Prs3d_Arrow::Draw(aPresentation,Proj1,arrdir, LA->Arrow1Aspect()->Angle(), LA->Arrow1Aspect()->Length());
Prs3d_Arrow::Draw(aPresentation,Proj1,arrdir, LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
Prs3d_Root::NewGroup(aPresentation);
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
// arrow 2 : 3rd group
Prs3d_Arrow::Draw(aPresentation,Proj2,arrdir.Reversed(), LA->Arrow2Aspect()->Angle(), LA->Arrow2Aspect()->Length());
Prs3d_Arrow::Draw(aPresentation,Proj2,arrdir.Reversed(), LA->ArrowAspect()->Angle(), LA->ArrowAspect()->Length());
Prs3d_Root::NewGroup(aPresentation);
@@ -137,14 +137,14 @@ void DsgPrs_LengthPresentation::Add( const Handle(Prs3d_Presentation)& aPresenta
const gp_Pnt& OffsetPoint,
const DsgPrs_ArrowSide ArrowPrs )
{
Handle(Prs3d_LengthAspect) LA = aDrawer->LengthAspect();
Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
gp_Pnt EndOfArrow1, EndOfArrow2;
gp_Dir DirOfArrow1;
DsgPrs::ComputePlanarFacesLengthPresentation( LA->Arrow1Aspect()->Length(),
LA->Arrow2Aspect()->Length(),
DsgPrs::ComputePlanarFacesLengthPresentation( LA->ArrowAspect()->Length(),
LA->ArrowAspect()->Length(),
AttachmentPoint1,
AttachmentPoint2,
aDirection,
@@ -208,7 +208,7 @@ void DsgPrs_LengthPresentation::Add (const Handle(Prs3d_Presentation)& aPresenta
const gp_Pnt& OffsetPoint,
const DsgPrs_ArrowSide ArrowPrs)
{
Handle(Prs3d_LengthAspect) LA = aDrawer->LengthAspect();
Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
gp_Lin L1 (AttachmentPoint1,aDirection);
@@ -245,7 +245,7 @@ void DsgPrs_LengthPresentation::Add (const Handle(Prs3d_Presentation)& aPresenta
aPrims->AddVertex(PointMin);
aPrims->AddVertex(PointMax);
if (dist < (LA->Arrow1Aspect()->Length()+LA->Arrow2Aspect()->Length()))
if (dist < (LA->ArrowAspect()->Length()+LA->ArrowAspect()->Length()))
outside = Standard_True;
gp_Dir arrdir = L3.Direction().Reversed();
@@ -285,7 +285,7 @@ void DsgPrs_LengthPresentation::Add( const Handle(Prs3d_Presentation)& aPresenta
const gp_Pnt& OffsetPoint,
const DsgPrs_ArrowSide ArrowPrs )
{
Handle(Prs3d_LengthAspect) LA = aDrawer->LengthAspect();
Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
gp_Pnt EndOfArrow2;
@@ -293,8 +293,8 @@ void DsgPrs_LengthPresentation::Add( const Handle(Prs3d_Presentation)& aPresenta
Handle( Geom_Curve ) VCurve, UCurve;
Standard_Real FirstU, deltaU = 0.0e0, FirstV, deltaV = 0.0e0;
DsgPrs::ComputeCurvilinearFacesLengthPresentation( LA->Arrow1Aspect()->Length(),
LA->Arrow2Aspect()->Length(),
DsgPrs::ComputeCurvilinearFacesLengthPresentation( LA->ArrowAspect()->Length(),
LA->ArrowAspect()->Length(),
SecondSurf,
AttachmentPoint1,
AttachmentPoint2,
@@ -381,22 +381,22 @@ void DsgPrs_LengthPresentation::Add (const Handle(Prs3d_Presentation)& aPrs,
{
case DsgPrs_AS_LASTAR:
Prs3d_Arrow::Draw(aPrs,Pt2,gp_Dir(gp_Vec(Pt1,Pt2)),
aDrawer->LengthAspect()->Arrow1Aspect()->Angle(),
aDrawer->LengthAspect()->Arrow1Aspect()->Length());
aDrawer->DimensionAspect()->ArrowAspect()->Angle(),
aDrawer->DimensionAspect()->ArrowAspect()->Length());
break;
case DsgPrs_AS_FIRSTAR:
Prs3d_Arrow::Draw(aPrs,Pt1,gp_Dir(gp_Vec(Pt2,Pt1)),
aDrawer->LengthAspect()->Arrow1Aspect()->Angle(),
aDrawer->LengthAspect()->Arrow1Aspect()->Length());
aDrawer->DimensionAspect()->ArrowAspect()->Angle(),
aDrawer->DimensionAspect()->ArrowAspect()->Length());
break;
case DsgPrs_AS_BOTHAR:
V = gp_Vec(Pt1,Pt2);
Prs3d_Arrow::Draw(aPrs,Pt2,gp_Dir(V),
aDrawer->LengthAspect()->Arrow1Aspect()->Angle(),
aDrawer->LengthAspect()->Arrow1Aspect()->Length());
aDrawer->DimensionAspect()->ArrowAspect()->Angle(),
aDrawer->DimensionAspect()->ArrowAspect()->Length());
Prs3d_Arrow::Draw(aPrs,Pt1,gp_Dir(V.Reversed()),
aDrawer->LengthAspect()->Arrow1Aspect()->Angle(),
aDrawer->LengthAspect()->Arrow1Aspect()->Length());
aDrawer->DimensionAspect()->ArrowAspect()->Angle(),
aDrawer->DimensionAspect()->ArrowAspect()->Length());
break;
default:
break;

View File

@@ -40,7 +40,7 @@
#include <Prs3d_Root.hxx>
#include <Prs3d_LineAspect.hxx>
#include <Prs3d_LengthAspect.hxx>
#include <Prs3d_DimensionAspect.hxx>
#include <Prs3d_Text.hxx>
//===================================================================
@@ -57,7 +57,7 @@ void DsgPrs_MidPointPresentation::Add (const Handle(Prs3d_Presentation)& aPresen
{
Standard_Real rad = AttachPoint.Distance(MidPoint)/20.0;
Handle(Prs3d_LengthAspect) LA = aDrawer->LengthAspect();
Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
gp_Ax2 ax = theAxe;
ax.SetLocation(MidPoint);
@@ -123,7 +123,7 @@ void DsgPrs_MidPointPresentation::Add (const Handle(Prs3d_Presentation)& aPresen
Standard_Real rad = AttachPoint.Distance(MidPoint)/20.0;
if ( rad <= Precision::Confusion() ) rad = Point1.Distance(Point2)/20.0;
Handle(Prs3d_LengthAspect) LA = aDrawer->LengthAspect();
Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
gp_Ax2 ax = theAxe;
ax.SetLocation(MidPoint);
@@ -189,7 +189,7 @@ void DsgPrs_MidPointPresentation::Add (const Handle(Prs3d_Presentation)& aPresen
Standard_Real rad = AttachPoint.Distance(MidPoint)/20.0;
if ( rad <= Precision::Confusion() ) rad = Point1.Distance(Point2)/20.0;
Handle(Prs3d_LengthAspect) LA = aDrawer->LengthAspect();
Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
gp_Ax2 ax = aCircle.Position();
ax.SetLocation(MidPoint);
@@ -263,7 +263,7 @@ void DsgPrs_MidPointPresentation::Add (const Handle(Prs3d_Presentation)& aPresen
Standard_Real rad = AttachPoint.Distance(MidPoint)/20.0;
if ( rad <= Precision::Confusion() ) rad = Point1.Distance(Point2)/20.0;
Handle(Prs3d_LengthAspect) LA = aDrawer->LengthAspect();
Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
gp_Pnt Ptmp,ptcur;

View File

@@ -34,7 +34,7 @@
#include <Prs3d_Arrow.hxx>
#include <Prs3d_ArrowAspect.hxx>
#include <Prs3d_LineAspect.hxx>
#include <Prs3d_LengthAspect.hxx>
#include <Prs3d_DimensionAspect.hxx>
#include <TCollection_AsciiString.hxx>
@@ -61,7 +61,7 @@ void DsgPrs_OffsetPresentation::Add (const Handle(Prs3d_Presentation)& aPresenta
const gp_Dir& aDirection2,
const gp_Pnt& OffsetPoint)
{
Handle(Prs3d_LengthAspect) LA = aDrawer->LengthAspect();
Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
gp_Lin L1 (AttachmentPoint1,aDirection);
@@ -114,19 +114,19 @@ void DsgPrs_OffsetPresentation::Add (const Handle(Prs3d_Presentation)& aPresenta
if (DimNulle)
{
Prs3d_Arrow::Draw(aPresentation,offp,L4.Direction(),LA->Arrow1Aspect()->Angle(),LA->Arrow1Aspect()->Length());
Prs3d_Arrow::Draw(aPresentation,offp,L4.Direction().Reversed(),LA->Arrow1Aspect()->Angle(),LA->Arrow1Aspect()->Length());
Prs3d_Arrow::Draw(aPresentation,offp,L4.Direction(),LA->ArrowAspect()->Angle(),LA->ArrowAspect()->Length());
Prs3d_Arrow::Draw(aPresentation,offp,L4.Direction().Reversed(),LA->ArrowAspect()->Angle(),LA->ArrowAspect()->Length());
}
else
{
if (dist < (LA->Arrow1Aspect()->Length()+LA->Arrow2Aspect()->Length()))
if (dist < (LA->ArrowAspect()->Length()+LA->ArrowAspect()->Length()))
outside = Standard_True;
gp_Dir arrdir = L3.Direction().Reversed();
if (outside)
arrdir.Reverse();
// fleche 1 : 2eme groupe
Prs3d_Arrow::Draw(aPresentation,Proj1,arrdir,LA->Arrow1Aspect()->Angle(),LA->Arrow1Aspect()->Length());
Prs3d_Arrow::Draw(aPresentation,Proj1,arrdir,LA->ArrowAspect()->Angle(),LA->ArrowAspect()->Length());
Prs3d_Root::NewGroup(aPresentation);
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
@@ -177,7 +177,7 @@ void DsgPrs_OffsetPresentation::AddAxes (const Handle(Prs3d_Presentation)& aPres
gp_Lin L2 (AttachmentPoint2,aDirection);
gp_Pnt Proj2 = ElCLib::Value(ElCLib::Parameter(L2,OffsetPoint),L2);
Handle(Prs3d_LengthAspect) LA = aDrawer->LengthAspect();
Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
Quantity_Color acolor;
Aspect_TypeOfLine atype;
Standard_Real awidth;

View File

@@ -28,7 +28,7 @@
#include <Prs3d_Arrow.hxx>
#include <Prs3d_ArrowAspect.hxx>
#include <Prs3d_LineAspect.hxx>
#include <Prs3d_LengthAspect.hxx>
#include <Prs3d_DimensionAspect.hxx>
#include <TCollection_AsciiString.hxx>
#include <Graphic3d_AspectLine3d.hxx>
#include <Prs3d_Text.hxx>
@@ -42,7 +42,7 @@ void DsgPrs_ParalPresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
const gp_Dir& aDirection,
const gp_Pnt& OffsetPoint)
{
Handle(Prs3d_LengthAspect) LA = aDrawer->LengthAspect();
Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
gp_Lin L1 (AttachmentPoint1,aDirection);
gp_Lin L2 (AttachmentPoint2,aDirection);
@@ -80,20 +80,20 @@ void DsgPrs_ParalPresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
Prs3d_Root::NewGroup(aPresentation);
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
if (dist < (LA->Arrow1Aspect()->Length()+LA->Arrow2Aspect()->Length()))
if (dist < (LA->ArrowAspect()->Length()+LA->ArrowAspect()->Length()))
outside = Standard_True;
gp_Dir arrdir = L3.Direction().Reversed();
if (outside)
arrdir.Reverse();
// arrow 1 : 2nd group
Prs3d_Arrow::Draw(aPresentation,Proj1,arrdir,LA->Arrow1Aspect()->Angle(),LA->Arrow1Aspect()->Length());
Prs3d_Arrow::Draw(aPresentation,Proj1,arrdir,LA->ArrowAspect()->Angle(),LA->ArrowAspect()->Length());
Prs3d_Root::NewGroup(aPresentation);
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
// arrow 2 : 3rd group
Prs3d_Arrow::Draw(aPresentation,Proj2,arrdir.Reversed(),LA->Arrow2Aspect()->Angle(),LA->Arrow2Aspect()->Length());
Prs3d_Arrow::Draw(aPresentation,Proj2,arrdir.Reversed(),LA->ArrowAspect()->Angle(),LA->ArrowAspect()->Length());
Prs3d_Root::NewGroup(aPresentation);
@@ -127,7 +127,7 @@ void DsgPrs_ParalPresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
const gp_Pnt& OffsetPoint,
const DsgPrs_ArrowSide ArrowPrs)
{
Handle(Prs3d_LengthAspect) LA = aDrawer->LengthAspect();
Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
gp_Lin L1 (AttachmentPoint1,aDirection);
@@ -163,7 +163,7 @@ void DsgPrs_ParalPresentation::Add (const Handle(Prs3d_Presentation)& aPresentat
aPrims->AddVertex(PointMin);
aPrims->AddVertex(PointMax);
if (dist < (LA->Arrow1Aspect()->Length()+LA->Arrow2Aspect()->Length()))
if (dist < (LA->ArrowAspect()->Length()+LA->ArrowAspect()->Length()))
outside = Standard_True;
gp_Dir arrdir = L3.Direction().Reversed();
if (outside)

View File

@@ -35,7 +35,7 @@
#include <Prs3d_LineAspect.hxx>
#include <Prs3d_TextAspect.hxx>
#include <Prs3d_PointAspect.hxx>
#include <Prs3d_LengthAspect.hxx>
#include <Prs3d_DimensionAspect.hxx>
#include <TCollection_AsciiString.hxx>
#include <Graphic3d_AspectLine3d.hxx>
#include <Graphic3d_ArrayOfSegments.hxx>
@@ -53,7 +53,7 @@ void DsgPrs_PerpenPresentation::Add (const Handle(Prs3d_Presentation)& aPresenta
const Standard_Boolean intOut1,
const Standard_Boolean intOut2)
{
Handle(Prs3d_LengthAspect) LA = aDrawer->LengthAspect();
Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
LA->LineAspect()->SetTypeOfLine(Aspect_TOL_SOLID); // ou DOT ou DOTDASH
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());

View File

@@ -31,7 +31,7 @@
#include <Prs3d_Arrow.hxx>
#include <Prs3d_ArrowAspect.hxx>
#include <Prs3d_LineAspect.hxx>
#include <Prs3d_LengthAspect.hxx>
#include <Prs3d_DimensionAspect.hxx>
#include <Prs3d_Text.hxx>
#include <Graphic3d_Vertex.hxx>
@@ -79,7 +79,7 @@ void DsgPrs_RadiusPresentation::Add (const Handle(Prs3d_Presentation)& aPresenta
fpara -= 2.*M_PI;
lpara -= 2.*M_PI;
}
Handle(Prs3d_LengthAspect) LA = aDrawer->LengthAspect();
Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
Standard_Real parat = ElCLib::Parameter(aCircle,AttachmentPoint);
@@ -131,7 +131,7 @@ void DsgPrs_RadiusPresentation::Add (const Handle(Prs3d_Presentation)& aPresenta
arrdir.Reverse();
// fleche
Prs3d_Arrow::Draw(aPresentation,ptoncirc,arrdir,LA->Arrow1Aspect()->Angle(),LA->Arrow1Aspect()->Length());
Prs3d_Arrow::Draw(aPresentation,ptoncirc,arrdir,LA->ArrowAspect()->Angle(),LA->ArrowAspect()->Length());
// texte
Prs3d_Text::Draw(aPresentation,LA->TextAspect(),aText,attpoint);
@@ -153,7 +153,7 @@ void DsgPrs_RadiusPresentation::Add( const Handle(Prs3d_Presentation)& aPresenta
const Standard_Boolean drawFromCenter,
const Standard_Boolean reverseArrow)
{
Handle( Prs3d_LengthAspect ) LA = aDrawer->LengthAspect();
Handle( Prs3d_DimensionAspect ) LA = aDrawer->DimensionAspect();
Prs3d_Root::CurrentGroup( aPresentation )->SetPrimitivesAspect( LA->LineAspect()->Aspect() );
gp_Pnt LineOrigin, LineEnd;

View File

@@ -23,7 +23,7 @@
#include <DsgPrs_SymbPresentation.ixx>
#include <Prs3d_LineAspect.hxx>
#include <Prs3d_LengthAspect.hxx>
#include <Prs3d_DimensionAspect.hxx>
#include <Prs3d_TextAspect.hxx>
#include <Prs3d_PointAspect.hxx>
#include <Geom_CartesianPoint.hxx>
@@ -37,7 +37,7 @@ void DsgPrs_SymbPresentation::Add (const Handle(Prs3d_Presentation)& aPresentati
const TCollection_ExtendedString& aText,
const gp_Pnt& OffsetPoint)
{
Handle(Prs3d_LengthAspect) LA = aDrawer->LengthAspect();
Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
Handle(Prs3d_TextAspect) TA = LA->TextAspect();
TA->SetColor(Quantity_NOC_GREEN);
Prs3d_Text::Draw(aPresentation,TA,aText, OffsetPoint);

View File

@@ -50,7 +50,7 @@
#include <Prs3d_Arrow.hxx>
#include <Prs3d_ArrowAspect.hxx>
#include <Prs3d_LineAspect.hxx>
#include <Prs3d_LengthAspect.hxx>
#include <Prs3d_DimensionAspect.hxx>
#include <TCollection_AsciiString.hxx>
@@ -73,7 +73,7 @@ void DsgPrs_SymmetricPresentation::Add (const Handle(Prs3d_Presentation)& aPrese
const gp_Lin& aAxis,
const gp_Pnt& OffsetPoint)
{
Handle(Prs3d_LengthAspect) LA = aDrawer->LengthAspect();
Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
gp_Pnt ProjOffsetPoint = ElCLib::Value(ElCLib::Parameter(aAxis,OffsetPoint),aAxis);
@@ -344,14 +344,14 @@ void DsgPrs_SymmetricPresentation::Add (const Handle(Prs3d_Presentation)& aPrese
Prs3d_Root::NewGroup(aPresentation);
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
if (dist < (LA->Arrow1Aspect()->Length()+LA->Arrow2Aspect()->Length())) outside = Standard_True;
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(aPresentation,P1,arrdir,LA->Arrow1Aspect()->Angle(),LA->Arrow1Aspect()->Length());
Prs3d_Arrow::Draw(aPresentation,P1,arrdir,LA->ArrowAspect()->Angle(),LA->ArrowAspect()->Length());
// arrow 2 ----
Prs3d_Arrow::Draw(aPresentation,P2,arrdir.Reversed(),LA->Arrow2Aspect()->Angle(),LA->Arrow2Aspect()->Length());
Prs3d_Arrow::Draw(aPresentation,P2,arrdir.Reversed(),LA->ArrowAspect()->Angle(),LA->ArrowAspect()->Length());
//-------------------------------------------------------------------------------------
//| SYMBOL OF SYMMETRY |
@@ -456,7 +456,7 @@ void DsgPrs_SymmetricPresentation::Add (const Handle(Prs3d_Presentation)& aPrese
const gp_Lin& aAxis,
const gp_Pnt& OffsetPoint)
{
Handle(Prs3d_LengthAspect) LA = aDrawer->LengthAspect();
Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
gp_Pnt OffsetPnt(OffsetPoint.X(),OffsetPoint.Y(),OffsetPoint.Z());
@@ -591,14 +591,14 @@ void DsgPrs_SymmetricPresentation::Add (const Handle(Prs3d_Presentation)& aPrese
Prs3d_Root::NewGroup(aPresentation);
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
if (dist < (LA->Arrow1Aspect()->Length()+LA->Arrow2Aspect()->Length())) outside = Standard_True;
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(aPresentation,P1,arrdir,LA->Arrow1Aspect()->Angle(),LA->Arrow1Aspect()->Length());
Prs3d_Arrow::Draw(aPresentation,P1,arrdir,LA->ArrowAspect()->Angle(),LA->ArrowAspect()->Length());
// arrow 2 ----
Prs3d_Arrow::Draw(aPresentation,P2,arrdir.Reversed(),LA->Arrow2Aspect()->Angle(),LA->Arrow2Aspect()->Length());
Prs3d_Arrow::Draw(aPresentation,P2,arrdir.Reversed(),LA->ArrowAspect()->Angle(),LA->ArrowAspect()->Length());
//-------------------------------------------------------------------------------------
//| SYMBOL OF SYMMETRY |
@@ -694,7 +694,7 @@ void DsgPrs_SymmetricPresentation::Add (const Handle(Prs3d_Presentation)& aPrese
const gp_Lin& aAxis,
const gp_Pnt& OffsetPoint)
{
Handle(Prs3d_LengthAspect) LA = aDrawer->LengthAspect();
Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
if (AttachmentPoint1.IsEqual(AttachmentPoint2,Precision::Confusion()))
@@ -810,14 +810,14 @@ void DsgPrs_SymmetricPresentation::Add (const Handle(Prs3d_Presentation)& aPrese
Prs3d_Root::CurrentGroup(aPresentation)->AddPrimitiveArray(aPrims);
//==== ARROWS ================
if (dist < (LA->Arrow1Aspect()->Length()+LA->Arrow2Aspect()->Length())) outside = Standard_True;
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(aPresentation,P1,arrdir,LA->Arrow1Aspect()->Angle(),LA->Arrow1Aspect()->Length());
Prs3d_Arrow::Draw(aPresentation,P1,arrdir,LA->ArrowAspect()->Angle(),LA->ArrowAspect()->Length());
// arrow 2 ----
Prs3d_Arrow::Draw(aPresentation,P2,arrdir.Reversed(),LA->Arrow2Aspect()->Angle(),LA->Arrow2Aspect()->Length());
Prs3d_Arrow::Draw(aPresentation,P2,arrdir.Reversed(),LA->ArrowAspect()->Angle(),LA->ArrowAspect()->Length());
//==== POINTS ================
//Marker of localization of attachment points:

View File

@@ -25,7 +25,7 @@
#include <Prs3d_Arrow.hxx>
#include <Prs3d_ArrowAspect.hxx>
#include <Prs3d_LineAspect.hxx>
#include <Prs3d_LengthAspect.hxx>
#include <Prs3d_DimensionAspect.hxx>
#include <Graphic3d_AspectLine3d.hxx>
#include <Prs3d_PointAspect.hxx>
#include <Geom_CartesianPoint.hxx>
@@ -46,10 +46,10 @@ void DsgPrs_TangentPresentation::Add (const Handle(Prs3d_Presentation)& aPresent
gp_Pnt p2 = OffsetPoint.Translated(vec2);
// Aspect
Handle(Prs3d_LengthAspect) LA = aDrawer->LengthAspect();
Handle(Prs3d_DimensionAspect) LA = aDrawer->DimensionAspect();
LA->LineAspect()->SetTypeOfLine(Aspect_TOL_SOLID);
Handle(Prs3d_ArrowAspect) ARR1 = LA->Arrow1Aspect();
Handle(Prs3d_ArrowAspect) ARR2 = LA->Arrow2Aspect();
Handle(Prs3d_ArrowAspect) ARR1 = LA->ArrowAspect();
Handle(Prs3d_ArrowAspect) ARR2 = LA->ArrowAspect();
ARR1->SetLength(length/5);
ARR2->SetLength(length/5);
@@ -64,10 +64,10 @@ void DsgPrs_TangentPresentation::Add (const Handle(Prs3d_Presentation)& aPresent
// fleche 1 :
Prs3d_Root::NewGroup(aPresentation);
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
Prs3d_Arrow::Draw(aPresentation,p1,aDirection,LA->Arrow1Aspect()->Angle(),LA->Arrow1Aspect()->Length());
Prs3d_Arrow::Draw(aPresentation,p1,aDirection,LA->ArrowAspect()->Angle(),LA->ArrowAspect()->Length());
// fleche 2
Prs3d_Root::NewGroup(aPresentation);
Prs3d_Root::CurrentGroup(aPresentation)->SetPrimitivesAspect(LA->LineAspect()->Aspect());
Prs3d_Arrow::Draw(aPresentation,p2,aDirection.Reversed(),LA->Arrow2Aspect()->Angle(),LA->Arrow2Aspect()->Length());
Prs3d_Arrow::Draw(aPresentation,p2,aDirection.Reversed(),LA->ArrowAspect()->Angle(),LA->ArrowAspect()->Length());
}