-// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2021 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
#include "GEOMGUI_DimensionProperty.h"
+#include <Basics_OCCTVersion.hxx>
+
// OCCT includes
#include <Standard_ProgramError.hxx>
#include <gp_Trsf.hxx>
PATTERN_XYZ.arg( "Point1" ) + ":" +
PATTERN_XYZ.arg( "Point2" ) + ":" +
PATTERN_XYZ.arg( "Point3" );
-};
+}
//=================================================================================
// function : Length::Init
// purpose :
//=================================================================================
+#if OCC_VERSION_LARGE >= 0x070400ff
+void GEOMGUI_DimensionProperty::Length::Init( const Handle(PrsDim_LengthDimension)& theIO, const gp_Ax3& theLCS )
+#else
void GEOMGUI_DimensionProperty::Length::Init( const Handle(AIS_LengthDimension)& theIO, const gp_Ax3& theLCS )
+#endif
{
gp_Trsf aFromLCS;
aFromLCS.SetTransformation( gp_Ax3(), theLCS );
// function : Length::Update
// purpose :
//=================================================================================
+#if OCC_VERSION_LARGE >= 0x070400ff
+void GEOMGUI_DimensionProperty::Length::Update( Handle(PrsDim_LengthDimension)& theIO, const gp_Ax3& theLCS )
+#else
void GEOMGUI_DimensionProperty::Length::Update( Handle(AIS_LengthDimension)& theIO, const gp_Ax3& theLCS )
+#endif
{
gp_Trsf aToLCS;
aToLCS.SetTransformation( theLCS, gp_Ax3() );
aStringValues.remove("\\");
- int it = 0;
+ size_t it = 0;
for ( ; it < aPacked.size(); ++it )
{
int aNextPos = aStringValues.indexOf("(.*)");
{
case DimensionType_Length :
{
+#if OCC_VERSION_LARGE >= 0x070400ff
+ Handle(PrsDim_LengthDimension) aLength =
+ Handle(PrsDim_LengthDimension)::DownCast( theIO );
+#else
Handle(AIS_LengthDimension) aLength =
Handle(AIS_LengthDimension)::DownCast( theIO );
+#endif
aNewRecord = RecordPtr( new Length() );
aNewRecord->AsLength()->Init( aLength, theLCS );
{
case DimensionType_Length :
{
+#if OCC_VERSION_LARGE >= 0x070400ff
+ Handle(PrsDim_LengthDimension) aLength =
+ Handle(PrsDim_LengthDimension)::DownCast( theIO );
+#else
Handle(AIS_LengthDimension) aLength =
Handle(AIS_LengthDimension)::DownCast( theIO );
+#endif
aChangeRecord = RecordPtr( new Length() );
aChangeRecord->AsLength()->Init( aLength, theLCS );
//=================================================================================
int GEOMGUI_DimensionProperty::TypeFromIO( const Handle(AIS_Dimension)& theIO ) const
{
+#if OCC_VERSION_LARGE >= 0x070400ff
+ if ( theIO->IsKind( STANDARD_TYPE( PrsDim_LengthDimension ) ) )
+#else
if ( theIO->IsKind( STANDARD_TYPE( AIS_LengthDimension ) ) )
+#endif
{
return DimensionType_Length;
}