1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-10 18:51:21 +03:00

Code correction: returning for dimension - custom text value, for angle dimension - reversed state and arrows visibility.

This commit is contained in:
nds 2016-06-20 14:09:38 +03:00
parent d5e71d630e
commit fbb0703ef9
4 changed files with 43 additions and 0 deletions

View File

@ -1259,6 +1259,15 @@ void AIS_AngleDimension::SetAngleReversed(const Standard_Boolean& theUseReverse)
myUseReverse = theUseReverse; myUseReverse = theUseReverse;
} }
//=======================================================================
//function : SetAngleReversed
//purpose :
//=======================================================================
Standard_Boolean AIS_AngleDimension::GetAngleReversed() const
{
return myUseReverse;
}
//======================================================================= //=======================================================================
//function : SetArrowVisible //function : SetArrowVisible
//purpose : //purpose :
@ -1270,6 +1279,17 @@ void AIS_AngleDimension::SetArrowVisible(const Standard_Boolean& theFirstArrowVi
mySecondArrowVisible = theSecondArrowVisible; mySecondArrowVisible = theSecondArrowVisible;
} }
//=======================================================================
//function : GetArrowVisible
//purpose :
//=======================================================================
void AIS_AngleDimension::GetArrowVisible(Standard_Boolean& theFirstArrowVisible,
Standard_Boolean& theSecondArrowVisible)
{
theFirstArrowVisible = myFirstArrowVisible;
theSecondArrowVisible = mySecondArrowVisible;
}
//======================================================================= //=======================================================================
//function : AdjustParameters //function : AdjustParameters
//purpose : //purpose :

View File

@ -212,12 +212,22 @@ public:
//! @param theUseReverse [in] the boolean state. //! @param theUseReverse [in] the boolean state.
Standard_EXPORT void SetAngleReversed(const Standard_Boolean& theUseReverse); Standard_EXPORT void SetAngleReversed(const Standard_Boolean& theUseReverse);
//! Returns state if the angle arc is reversed to the presentation plane.
//! @return TRUE if the anble is build to be reversed
Standard_EXPORT Standard_Boolean GetAngleReversed() const;
//! Sets visible state of angle arrows. Default value is true for both //! Sets visible state of angle arrows. Default value is true for both
//! @param theFirstArrowVisible [in] the visibility of the first arrow. //! @param theFirstArrowVisible [in] the visibility of the first arrow.
//! @param theSecondArrowVisible [in] the visibility of the second arrow. //! @param theSecondArrowVisible [in] the visibility of the second arrow.
Standard_EXPORT void SetArrowVisible(const Standard_Boolean& theFirstArrowVisible, Standard_EXPORT void SetArrowVisible(const Standard_Boolean& theFirstArrowVisible,
const Standard_Boolean& theSecondArrowVisible); const Standard_Boolean& theSecondArrowVisible);
//! Gets visible state of angle arrows.
//! @param theFirstArrowVisible [out] the visibility of the first arrow.
//! @param theSecondArrowVisible [out] the visibility of the second arrow.
Standard_EXPORT void GetArrowVisible(Standard_Boolean& theFirstArrowVisible,
Standard_Boolean& theSecondArrowVisible);
public: public:
DEFINE_STANDARD_RTTI (AIS_AngleDimension) DEFINE_STANDARD_RTTI (AIS_AngleDimension)

View File

@ -149,6 +149,15 @@ void AIS_Dimension::SetCustomValue (const TCollection_ExtendedString& theValue)
SetToUpdate(); SetToUpdate();
} }
//=======================================================================
//function : GetCustomValue
//purpose :
//=======================================================================
const TCollection_ExtendedString& AIS_Dimension::GetCustomValue () const
{
return myCustomStringValue;
}
//======================================================================= //=======================================================================
//function : GetPlane //function : GetPlane
//purpose : //purpose :

View File

@ -240,6 +240,10 @@ public:
//! @param theValue [in] the user-defined value to display. //! @param theValue [in] the user-defined value to display.
Standard_EXPORT void SetCustomValue (const TCollection_ExtendedString& theValue); Standard_EXPORT void SetCustomValue (const TCollection_ExtendedString& theValue);
//! Gets user-defined dimension value.
//! @return dimension value string.
Standard_EXPORT const TCollection_ExtendedString& GetCustomValue () const;
//! Get the dimension plane in which the 2D dimension presentation is computed. //! Get the dimension plane in which the 2D dimension presentation is computed.
//! By default, if plane is not defined by user, it is computed automatically //! By default, if plane is not defined by user, it is computed automatically
//! after dimension geometry is computed. //! after dimension geometry is computed.