1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +03:00

0031424: Visualization - stop using Prs3d_Drawer::HLRAngle() parameter

Prs3d_Drawer, AIS_Shape, AIS_InteractiveContext - removed properties HLRDeviationCoefficient() and HLRAngle().
Prs3d_Drawer::HLRAngle() is kept as alias to Prs3d_Drawer::DeviationAngle() with deprecated flag.
Prs3d_Drawer::DeviationAngle() default value is changed from 12 to 20 degrees
to match Prs3d_Drawer::HLRAngle() which has been previously used in majority of cases.
Removed unused property HLRBRep_PolyAlgo::Angle().
This commit is contained in:
kgv
2020-03-13 00:35:06 +03:00
parent b5163d2f8d
commit 67441d0ca3
21 changed files with 90 additions and 767 deletions

View File

@@ -1173,57 +1173,6 @@ Standard_Real AIS_InteractiveContext::DeviationCoefficient() const
return myDefaultDrawer->DeviationCoefficient();
}
//=======================================================================
//function : SetHLRDeviationCoefficient
//purpose :
//=======================================================================
void AIS_InteractiveContext::SetHLRDeviationCoefficient (const Standard_Real theCoefficient)
{
myDefaultDrawer->SetHLRDeviationCoefficient (theCoefficient);
}
//=======================================================================
//function : HLRDeviationCoefficient
//purpose :
//=======================================================================
Standard_Real AIS_InteractiveContext::HLRDeviationCoefficient() const
{
return myDefaultDrawer->HLRDeviationCoefficient();
}
//=======================================================================
//function : SetHLRAngle
//purpose :
//=======================================================================
void AIS_InteractiveContext::SetHLRAngle (const Standard_Real theAngle)
{
myDefaultDrawer->SetHLRAngle (theAngle);
}
//=======================================================================
//function : SetHLRAngleAndDeviation
//purpose : compute with anangle a HLRAngle and a HLRDeviationCoefficient
// and set them in myHLRAngle and in myHLRDeviationCoefficient
// of myDefaultDrawer
//=======================================================================
void AIS_InteractiveContext::SetHLRAngleAndDeviation (const Standard_Real theAngle)
{
Standard_Real anOutAngl, anOutDefl;
HLRBRep::PolyHLRAngleAndDeflection (theAngle, anOutAngl, anOutDefl);
myDefaultDrawer->SetHLRAngle (anOutAngl);
myDefaultDrawer->SetHLRDeviationCoefficient (anOutDefl);
}
//=======================================================================
//function : HLRAngle
//purpose :
//=======================================================================
Standard_Real AIS_InteractiveContext::HLRAngle() const
{
return myDefaultDrawer->HLRAngle();
}
//=======================================================================
//function : SetDisplayMode
//purpose :
@@ -1472,40 +1421,6 @@ void AIS_InteractiveContext::SetDeviationCoefficient (const Handle(AIS_Interacti
}
}
//=======================================================================
//function : SetHLRDeviationCoefficient
//purpose :
//=======================================================================
void AIS_InteractiveContext::SetHLRDeviationCoefficient (const Handle(AIS_InteractiveObject)& theIObj,
const Standard_Real theCoefficient,
const Standard_Boolean theToUpdateViewer)
{
if (theIObj.IsNull())
{
return;
}
// To be modified after the related methods of AIS_Shape are passed to InteractiveObject
setContextToObject (theIObj);
if (theIObj->Type() != AIS_KOI_Object
&& theIObj->Type() != AIS_KOI_Shape)
{
return;
}
else if (theIObj->Signature() != 0)
{
return;
}
Handle(AIS_Shape) aShape = Handle(AIS_Shape)::DownCast (theIObj);
aShape->SetOwnHLRDeviationCoefficient (theCoefficient);
aShape->UpdatePresentations();
if (theToUpdateViewer)
{
UpdateCurrentViewer();
}
}
//=======================================================================
//function : SetDeviationAngle
//purpose :
@@ -1572,70 +1487,6 @@ void AIS_InteractiveContext::SetAngleAndDeviation (const Handle(AIS_InteractiveO
}
}
//=======================================================================
//function : SetHLRAngleAndDeviation
//purpose :
//=======================================================================
void AIS_InteractiveContext::SetHLRAngleAndDeviation (const Handle(AIS_InteractiveObject)& theIObj,
const Standard_Real theAngle,
const Standard_Boolean theToUpdateViewer)
{
if (theIObj.IsNull())
{
return;
}
// To be modified after the related methods of AIS_Shape are passed to InteractiveObject
setContextToObject (theIObj);
if (theIObj->Type() != AIS_KOI_Shape)
{
return;
}
if (theIObj->Signature() != 0)
{
return;
}
Handle(AIS_Shape) aShape = Handle(AIS_Shape)::DownCast (theIObj);
aShape->SetHLRAngleAndDeviation (theAngle);
aShape->UpdatePresentations();
if (theToUpdateViewer)
{
UpdateCurrentViewer();
}
}
//=======================================================================
//function : SetHLRDeviationAngle
//purpose :
//=======================================================================
void AIS_InteractiveContext::SetHLRDeviationAngle (const Handle(AIS_InteractiveObject)& theIObj,
const Standard_Real theAngle,
const Standard_Boolean theToUpdateViewer)
{
if (theIObj.IsNull())
{
return;
}
// To be modified after the related methods of AIS_Shape are passed to InteractiveObject
setContextToObject (theIObj);
if (theIObj->Type() != AIS_KOI_Shape)
{
return;
}
if (theIObj->Signature() != 0)
{
return;
}
Handle(AIS_Shape) aShape = Handle(AIS_Shape)::DownCast (theIObj);
aShape->SetOwnHLRDeviationAngle (theAngle);
aShape->UpdatePresentations();
if (theToUpdateViewer)
{
UpdateCurrentViewer();
}
}
//=======================================================================
//function : UnsetColor
//purpose :