// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
+#include <AIS_Plane.hxx>
#include <AIS_InteractiveContext.hxx>
-#include <AIS_Plane.hxx>
#include <Aspect_TypeOfLine.hxx>
#include <DsgPrs_ShadedPlanePresentation.hxx>
#include <DsgPrs_XYZPlanePresentation.hxx>
new Prs3d_DatumAspect();
myDrawer->PlaneAspect()->SetPlaneLength(PA->PlaneXLength(),PA->PlaneYLength());
- myDrawer->DatumAspect()->SetAxisLength(DA->FirstAxisLength(),
- DA->SecondAxisLength(),
- DA->ThirdAxisLength());
+ myDrawer->DatumAspect()->SetAxisLength(DA->AxisLength(Prs3d_DP_XAxis),
+ DA->AxisLength(Prs3d_DP_YAxis),
+ DA->AxisLength(Prs3d_DP_ZAxis));
}
myHasOwnSize = Standard_False;
return Abs(X-Y)<=Precision::Confusion();
}
-
//=======================================================================
//function : SetColor
//purpose :
//=======================================================================
-
-
-void AIS_Plane::SetColor(const Quantity_NameOfColor aCol)
-{
- SetColor(Quantity_Color(aCol));
-}
-
void AIS_Plane::SetColor(const Quantity_Color &aCol)
{
// if the plane already has its proper size, there is an already created planeaspect
}
PA->EdgesAspect()->SetColor(aCol);
- DA->FirstAxisAspect()->SetColor(aCol);
- DA->SecondAxisAspect()->SetColor(aCol);
- DA->ThirdAxisAspect()->SetColor(aCol);
+ DA->LineAspect(Prs3d_DP_XAxis)->SetColor(aCol);
+ DA->LineAspect(Prs3d_DP_YAxis)->SetColor(aCol);
+ DA->LineAspect(Prs3d_DP_ZAxis)->SetColor(aCol);
if(!yenavaitPA)
myDrawer->SetPlaneAspect(PA);
else{
const Handle(Prs3d_PlaneAspect) PA = myDrawer->HasLink() ? myDrawer->Link()->PlaneAspect() :
new Prs3d_PlaneAspect();
-// const Handle(Prs3d_DatumAspect)& DA = myDrawer->Link()->DatumAspect();
- Quantity_NameOfColor Col = PA->EdgesAspect()->Aspect()->Color().Name();
+ Quantity_Color Col = PA->EdgesAspect()->Aspect()->Color();
myDrawer->PlaneAspect()->EdgesAspect()->SetColor(Col);
- myDrawer->DatumAspect()->FirstAxisAspect()->SetColor(Col);
- myDrawer->DatumAspect()->SecondAxisAspect()->SetColor(Col);
- myDrawer->DatumAspect()->ThirdAxisAspect()->SetColor(Col);
+ myDrawer->DatumAspect()->LineAspect(Prs3d_DP_XAxis)->SetColor(Col);
+ myDrawer->DatumAspect()->LineAspect(Prs3d_DP_YAxis)->SetColor(Col);
+ myDrawer->DatumAspect()->LineAspect(Prs3d_DP_ZAxis)->SetColor(Col);
}
oX.Coord(x1,y1,z1);
oY.Coord(x2,y2,z2);
oZ.Coord(x3,y3,z3);
- Standard_Real DS1 = DA->FirstAxisLength();
- Standard_Real DS2 = DA->SecondAxisLength();
- Standard_Real DS3 = DA->ThirdAxisLength();
+ Standard_Real DS1 = DA->AxisLength(Prs3d_DP_XAxis);
+ Standard_Real DS2 = DA->AxisLength(Prs3d_DP_YAxis);
+ Standard_Real DS3 = DA->AxisLength(Prs3d_DP_ZAxis);
// gp_Pnt aPt2,aPt3;
switch (myTypeOfPlane) {