mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-11-11 16:19:17 +05:00
Porting to OCCT 7.4.1dev
This commit is contained in:
parent
2a3778cbc2
commit
08f4a1d3d5
@ -41,10 +41,6 @@
|
||||
#include <AIS_Line.hxx>
|
||||
#include <AIS_Trihedron.hxx>
|
||||
|
||||
#if OCC_VERSION_LARGE <= 0x07030000
|
||||
#include <AIS_LocalContext.hxx>
|
||||
#endif
|
||||
|
||||
#include <Geom_Point.hxx>
|
||||
#include <Geom_BSplineCurve.hxx>
|
||||
#include <Geom_Line.hxx>
|
||||
@ -653,9 +649,6 @@ void CurveCreator_Utils::setSelectedPoints( Handle(AIS_InteractiveContext) theCo
|
||||
//ASL: we switch on again automatic highlight (otherwise selection will not be shown)
|
||||
// and call HilightPicked to draw selected owners
|
||||
theContext->SetAutomaticHilight( Standard_True );
|
||||
#if OCC_VERSION_LARGE <= 0x07030000
|
||||
theContext->LocalContext()->HilightPicked( Standard_True );
|
||||
#endif
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@ -670,15 +663,7 @@ void CurveCreator_Utils::setLocalPointContext( const CurveCreator_ICurve* theCur
|
||||
return;
|
||||
|
||||
if ( theOpen ) {
|
||||
#if OCC_VERSION_LARGE <= 0x07030000
|
||||
// Open local context if there is no one
|
||||
if ( !theContext->HasOpenedContext() ) {
|
||||
#endif
|
||||
theContext->ClearCurrents( false );
|
||||
#if OCC_VERSION_LARGE <= 0x07030000
|
||||
theContext->OpenLocalContext( false/*use displayed objects*/, true/*allow shape decomposition*/ );
|
||||
}
|
||||
#endif
|
||||
// load the curve AIS object to the local context with the point selection
|
||||
Handle(AIS_InteractiveObject) anAIS = theCurve->getAISObject();
|
||||
if ( !anAIS.IsNull() )
|
||||
@ -691,13 +676,8 @@ void CurveCreator_Utils::setLocalPointContext( const CurveCreator_ICurve* theCur
|
||||
}
|
||||
}
|
||||
else {
|
||||
#if OCC_VERSION_LARGE <= 0x07030000
|
||||
if ( theContext->HasOpenedContext() )
|
||||
theContext->CloseAllContexts( Standard_True );
|
||||
#else
|
||||
theContext->Deactivate();
|
||||
theContext->Activate(0);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1522,11 +1522,7 @@ void CurveCreator_Widget::setSelectedPoints( const CurveCreator_ICurve::SectionT
|
||||
if ( myDragStarted )
|
||||
return;
|
||||
Handle(AIS_InteractiveContext) aContext = getAISContext();
|
||||
if ( aContext.IsNull()
|
||||
#if OCC_VERSION_LARGE <= 0x07030000
|
||||
|| !aContext->HasOpenedContext()
|
||||
#endif
|
||||
)
|
||||
if ( aContext.IsNull() )
|
||||
return;
|
||||
|
||||
CurveCreator_Utils::setSelectedPoints( aContext, myCurve, thePoints );
|
||||
|
@ -510,12 +510,8 @@ void GEOMAlgo_Gluer::MakeSolids()
|
||||
myResult=aCmp;
|
||||
//
|
||||
if (aMS.Extent()) {
|
||||
#if OCC_VERSION_LARGE > 0x07020001
|
||||
TopTools_IndexedMapOfShape aMapToAvoid;
|
||||
BOPTools_AlgoTools::CorrectCurveOnSurface(myResult, aMapToAvoid, 0.0001);
|
||||
#else
|
||||
BOPTools_AlgoTools::CorrectCurveOnSurface(myResult, 0.0001);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
//=======================================================================
|
||||
|
@ -74,7 +74,7 @@ namespace
|
||||
// function : Length::Init
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
#if OCC_VERSION_LARGE > 0x07040000
|
||||
#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 )
|
||||
@ -96,7 +96,7 @@ void GEOMGUI_DimensionProperty::Length::Init( const Handle(AIS_LengthDimension)&
|
||||
// function : Length::Update
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
#if OCC_VERSION_LARGE > 0x07040000
|
||||
#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 )
|
||||
@ -850,7 +850,7 @@ void GEOMGUI_DimensionProperty::AddRecord( const Handle(AIS_Dimension)& theIO, c
|
||||
{
|
||||
case DimensionType_Length :
|
||||
{
|
||||
#if OCC_VERSION_LARGE > 0x07040000
|
||||
#if OCC_VERSION_LARGE >= 0x070400ff
|
||||
Handle(PrsDim_LengthDimension) aLength =
|
||||
Handle(PrsDim_LengthDimension)::DownCast( theIO );
|
||||
#else
|
||||
@ -937,7 +937,7 @@ void GEOMGUI_DimensionProperty::SetRecord( const int theIndex,
|
||||
{
|
||||
case DimensionType_Length :
|
||||
{
|
||||
#if OCC_VERSION_LARGE > 0x07040000
|
||||
#if OCC_VERSION_LARGE >= 0x070400ff
|
||||
Handle(PrsDim_LengthDimension) aLength =
|
||||
Handle(PrsDim_LengthDimension)::DownCast( theIO );
|
||||
#else
|
||||
@ -1138,7 +1138,7 @@ void GEOMGUI_DimensionProperty::SaveToAttribute( const std::string &theEntry )
|
||||
//=================================================================================
|
||||
int GEOMGUI_DimensionProperty::TypeFromIO( const Handle(AIS_Dimension)& theIO ) const
|
||||
{
|
||||
#if OCC_VERSION_LARGE > 0x07040000
|
||||
#if OCC_VERSION_LARGE >= 0x070400ff
|
||||
if ( theIO->IsKind( STANDARD_TYPE( PrsDim_LengthDimension ) ) )
|
||||
#else
|
||||
if ( theIO->IsKind( STANDARD_TYPE( AIS_LengthDimension ) ) )
|
||||
|
@ -32,7 +32,7 @@
|
||||
// OCCT includes
|
||||
#include <AIS_Dimension.hxx>
|
||||
#include <AIS_DiameterDimension.hxx>
|
||||
#if OCC_VERSION_LARGE > 0x07040000
|
||||
#if OCC_VERSION_LARGE >= 0x070400ff
|
||||
#include <PrsDim_LengthDimension.hxx>
|
||||
#else
|
||||
#include <AIS_LengthDimension.hxx>
|
||||
@ -144,7 +144,7 @@ public:
|
||||
* \param theIO [in] the interactive presentation.
|
||||
* \param theLCS [in] the local coordinate system of parent object.
|
||||
*/
|
||||
#if OCC_VERSION_LARGE > 0x07040000
|
||||
#if OCC_VERSION_LARGE >= 0x070400ff
|
||||
void Init( const Handle(PrsDim_LengthDimension)& theIO, const gp_Ax3& theLCS );
|
||||
#else
|
||||
void Init( const Handle(AIS_LengthDimension)& theIO, const gp_Ax3& theLCS );
|
||||
@ -155,7 +155,7 @@ public:
|
||||
* \param theIO [in/out] the interactive presentation.
|
||||
* \param theLCS [in] the local coordinate system of parent object.
|
||||
*/
|
||||
#if OCC_VERSION_LARGE > 0x07040000
|
||||
#if OCC_VERSION_LARGE >= 0x070400ff
|
||||
void Update( Handle(PrsDim_LengthDimension)& theIO, const gp_Ax3& theLCS );
|
||||
#else
|
||||
void Update( Handle(AIS_LengthDimension)& theIO, const gp_Ax3& theLCS );
|
||||
|
@ -80,10 +80,6 @@ void GEOMGUI_OCCSelector::getSelection( SUIT_DataOwnerPtrList& aList ) const
|
||||
return;
|
||||
|
||||
Handle(AIS_InteractiveContext) ic = vw->getAISContext();
|
||||
#if OCC_VERSION_LARGE <= 0x07030000
|
||||
if (ic->HasOpenedContext())
|
||||
{
|
||||
#endif
|
||||
TopoDS_Shape curBigShape;
|
||||
TopTools_IndexedMapOfShape subShapes;
|
||||
|
||||
@ -127,27 +123,6 @@ void GEOMGUI_OCCSelector::getSelection( SUIT_DataOwnerPtrList& aList ) const
|
||||
aList.append(SUIT_DataOwnerPtr(owner));
|
||||
}
|
||||
}
|
||||
#if OCC_VERSION_LARGE <= 0x07030000
|
||||
}
|
||||
else
|
||||
{
|
||||
for (ic->InitCurrent(); ic->MoreCurrent(); ic->NextCurrent())
|
||||
{
|
||||
Handle(AIS_InteractiveObject) io = ic->Current();
|
||||
|
||||
QString entryStr = entry( io );
|
||||
|
||||
if ( !entryStr.isEmpty() )
|
||||
{
|
||||
Handle(SALOME_InteractiveObject) anIO = Handle(SALOME_InteractiveObject)::DownCast(io->GetOwner());
|
||||
if ( !anIO.IsNull() ) {
|
||||
LightApp_DataOwner* owner = new LightApp_DataOwner( anIO );
|
||||
aList.append( SUIT_DataOwnerPtr( owner ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// add externally selected objects
|
||||
SUIT_DataOwnerPtrList::const_iterator anExtIter;
|
||||
|
@ -126,7 +126,7 @@
|
||||
|
||||
#include <TColStd_HArray1OfByte.hxx>
|
||||
|
||||
#if OCC_VERSION_LARGE > 0x07040000
|
||||
#if OCC_VERSION_LARGE >= 0x070400ff
|
||||
#include <Image_SupportedFormats.hxx>
|
||||
#endif
|
||||
|
||||
@ -246,7 +246,7 @@ namespace
|
||||
const Handle(Graphic3d_TextureMap)& aTexture = aAISShape->Attributes()->ShadingAspect()->Aspect()->TextureMap();
|
||||
if ( aTexture.IsNull() )
|
||||
continue;
|
||||
#if OCC_VERSION_LARGE > 0x07040000
|
||||
#if OCC_VERSION_LARGE >= 0x070400ff
|
||||
Handle(Image_SupportedFormats) aFormats = new Image_SupportedFormats();
|
||||
const Handle(Image_PixMap)& aPixmap = aTexture->GetImage(aFormats);
|
||||
#else
|
||||
@ -1356,7 +1356,7 @@ void GEOM_Displayer::updateDimensions( const Handle(SALOME_InteractiveObject)& t
|
||||
if ( aUnitsAngle == "deg" )
|
||||
{
|
||||
aPrs->SetSpecialSymbol(0xB0);
|
||||
#if OCC_VERSION_LARGE > 0x07040000
|
||||
#if OCC_VERSION_LARGE >= 0x070400ff
|
||||
aPrs->SetDisplaySpecialSymbol( isUnitsShown ? PrsDim_DisplaySpecialSymbol_After :
|
||||
PrsDim_DisplaySpecialSymbol_No );
|
||||
#else
|
||||
@ -1366,7 +1366,7 @@ void GEOM_Displayer::updateDimensions( const Handle(SALOME_InteractiveObject)& t
|
||||
}
|
||||
else
|
||||
{
|
||||
#if OCC_VERSION_LARGE > 0x07040000
|
||||
#if OCC_VERSION_LARGE >= 0x070400ff
|
||||
aPrs->SetDisplaySpecialSymbol(PrsDim_DisplaySpecialSymbol_No);
|
||||
#else
|
||||
aPrs->SetDisplaySpecialSymbol(AIS_DSS_No);
|
||||
@ -2070,13 +2070,8 @@ void GEOM_Displayer::BeforeDisplay( SALOME_View* v, const SALOME_OCCPrs* )
|
||||
Handle(AIS_InteractiveContext) ic = vf->getAISContext();
|
||||
if ( !ic.IsNull() )
|
||||
{
|
||||
#if OCC_VERSION_LARGE <= 0x07030000
|
||||
if ( ic->HasOpenedContext() )
|
||||
ic->CloseAllContexts(Standard_True);
|
||||
#else
|
||||
ic->Deactivate();
|
||||
ic->Activate( 0 );
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2441,16 +2441,9 @@ void GeometryGUI::createPreferences()
|
||||
aFontFile = aFontFile + QDir::separator() + "Y14.5M-2009.ttf";
|
||||
// add enginier font into combobox
|
||||
/*int fontID =*/ QFontDatabase::addApplicationFont( aFontFile );
|
||||
#if OCC_VERSION_LARGE <= 0x07030000
|
||||
Handle(Font_SystemFont) sf = new Font_SystemFont(
|
||||
new TCollection_HAsciiString("Y14.5M-2009"),
|
||||
Font_FA_Regular,
|
||||
new TCollection_HAsciiString(aFontFile.toLatin1().data()) );
|
||||
# else
|
||||
Handle(Font_SystemFont) sf = new Font_SystemFont( TCollection_AsciiString("Y14.5M-2009") );
|
||||
sf->SetFontPath( Font_FA_Regular,
|
||||
TCollection_AsciiString( aFontFile.toLatin1().data() ) );
|
||||
#endif
|
||||
// register font in OCC font manager
|
||||
fmgr->RegisterFont( sf, Standard_False );
|
||||
|
||||
|
@ -130,11 +130,7 @@ Standard_Integer GEOMImpl_ChamferDriver::Execute(Handle(TFunction_Logbook)& log)
|
||||
if (!BRepTools::IsReallyClosed(E, F) &&
|
||||
!BRep_Tool::Degenerated(E) &&
|
||||
M.FindFromIndex(i).Extent() == 2)
|
||||
#if OCC_VERSION_LARGE <= 0x07030000
|
||||
fill.Add(aD, E, F);
|
||||
#else
|
||||
fill.Add(aD, aD, E, F);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else if (aType == CHAMFER_SHAPE_EDGE || aType == CHAMFER_SHAPE_EDGE_AD) {
|
||||
|
@ -55,7 +55,7 @@
|
||||
#include <gce_MakePln.hxx>
|
||||
#include <Precision.hxx>
|
||||
|
||||
#if OCC_VERSION_LARGE > 0x07040000
|
||||
#if OCC_VERSION_LARGE >= 0x070400ff
|
||||
#include <PrsDim.hxx>
|
||||
#else
|
||||
#include <AIS.hxx>
|
||||
@ -331,7 +331,7 @@ SALOME_Prs* MeasureGUI_AngleDlg::buildPrs()
|
||||
Handle(Geom_Curve) extCurv;
|
||||
Standard_Integer extShape;
|
||||
Handle(Geom_Plane) aPlane;
|
||||
#if OCC_VERSION_LARGE > 0x07040000
|
||||
#if OCC_VERSION_LARGE >= 0x070400ff
|
||||
if (PrsDim::ComputeGeometry (anEdge1, anEdge2,
|
||||
#else
|
||||
if (AIS::ComputeGeometry (anEdge1, anEdge2,
|
||||
@ -362,7 +362,7 @@ SALOME_Prs* MeasureGUI_AngleDlg::buildPrs()
|
||||
anIO->SetDimensionAspect( aDimensionStyle );
|
||||
anIO->SetDisplayUnits( aUnitsAngle.toUtf8().data() );
|
||||
if (aUnitsAngle == "rad")
|
||||
#if OCC_VERSION_LARGE > 0x07040000
|
||||
#if OCC_VERSION_LARGE >= 0x070400ff
|
||||
anIO->SetDisplaySpecialSymbol(PrsDim_DisplaySpecialSymbol_No);
|
||||
#else
|
||||
anIO->SetDisplaySpecialSymbol(AIS_DSS_No);
|
||||
|
@ -907,11 +907,6 @@ bool MeasureGUI_AnnotationDlg::getPickedPoint( gp_Pnt& thePnt, const TopoDS_Shap
|
||||
|
||||
Handle(AIS_InteractiveContext) anAISContext = aViewer->getAISContext();
|
||||
Handle(SelectMgr_ViewerSelector) aSelector;
|
||||
#if OCC_VERSION_LARGE <= 0x07030000
|
||||
if ( anAISContext->HasOpenedContext() )
|
||||
aSelector = anAISContext->LocalSelector();
|
||||
else
|
||||
#endif
|
||||
aSelector = anAISContext->MainSelector();
|
||||
|
||||
if ( aSelector->NbPicked() < 1 )
|
||||
|
@ -438,11 +438,8 @@ void MeasureGUI_CreateDimensionDlg::StartLocalEditing()
|
||||
Handle(V3d_Viewer) aViewer3d = myEditingViewer->getViewer3d();
|
||||
|
||||
aViewer3d->AddZLayer( myEditingLayer );
|
||||
#if OCC_VERSION_LARGE <= 0x07030000
|
||||
anAISContext->OpenLocalContext( Standard_False, Standard_False );
|
||||
#endif
|
||||
|
||||
#if OCC_VERSION_LARGE > 0x07040000
|
||||
#if OCC_VERSION_LARGE >= 0x070400ff
|
||||
anAISContext->Load( myDimension, PrsDim_DimensionSelectionMode_All );
|
||||
anAISContext->SetZLayer( myDimension, myEditingLayer );
|
||||
anAISContext->Activate( myDimension, PrsDim_DimensionSelectionMode_Line );
|
||||
@ -473,12 +470,8 @@ void MeasureGUI_CreateDimensionDlg::StopLocalEditing()
|
||||
Handle(V3d_Viewer) aViewer3d = myEditingViewer->getViewer3d();
|
||||
|
||||
aViewer3d->RemoveZLayer( myEditingLayer );
|
||||
#if OCC_VERSION_LARGE <= 0x07030000
|
||||
anAISContext->CloseLocalContext( Standard_True );
|
||||
#else
|
||||
anAISContext->Deactivate();
|
||||
anAISContext->Activate(0);
|
||||
#endif
|
||||
|
||||
myEditingViewer = NULL;
|
||||
}
|
||||
@ -644,7 +637,7 @@ Handle(AIS_Dimension) MeasureGUI_CreateDimensionDlg::CreateDimension()
|
||||
if ( aUnitsAngle == "deg" )
|
||||
{
|
||||
aDimensionIO->SetSpecialSymbol(0xB0);
|
||||
#if OCC_VERSION_LARGE > 0x07040000
|
||||
#if OCC_VERSION_LARGE >= 0x070400ff
|
||||
aDimensionIO->SetDisplaySpecialSymbol( isUnitsShown ? PrsDim_DisplaySpecialSymbol_After :
|
||||
PrsDim_DisplaySpecialSymbol_No );
|
||||
#else
|
||||
@ -654,7 +647,7 @@ Handle(AIS_Dimension) MeasureGUI_CreateDimensionDlg::CreateDimension()
|
||||
}
|
||||
else
|
||||
{
|
||||
#if OCC_VERSION_LARGE > 0x07040000
|
||||
#if OCC_VERSION_LARGE >= 0x070400ff
|
||||
aDimensionIO->SetDisplaySpecialSymbol(PrsDim_DisplaySpecialSymbol_No);
|
||||
#else
|
||||
aDimensionIO->SetDisplaySpecialSymbol(AIS_DSS_No);
|
||||
|
@ -159,7 +159,7 @@ MeasureGUI_DimensionInteractor::Operation
|
||||
return Operation_None;
|
||||
}
|
||||
|
||||
#if OCC_VERSION_LARGE > 0x07040000
|
||||
#if OCC_VERSION_LARGE >= 0x070400ff
|
||||
Handle(PrsDim_DimensionOwner) anOwner = Handle(PrsDim_DimensionOwner)::DownCast( theEntity );
|
||||
#else
|
||||
Handle(AIS_DimensionOwner) anOwner = Handle(AIS_DimensionOwner)::DownCast( theEntity );
|
||||
@ -173,7 +173,7 @@ MeasureGUI_DimensionInteractor::Operation
|
||||
|
||||
switch ( anOwner->SelectionMode() )
|
||||
{
|
||||
#if OCC_VERSION_LARGE > 0x07040000
|
||||
#if OCC_VERSION_LARGE >= 0x070400ff
|
||||
case PrsDim_DimensionSelectionMode_Line :
|
||||
#else
|
||||
case AIS_DSM_Line :
|
||||
@ -194,7 +194,7 @@ MeasureGUI_DimensionInteractor::Operation
|
||||
return Operation_MoveFlyoutFree;
|
||||
}
|
||||
|
||||
#if OCC_VERSION_LARGE > 0x07040000
|
||||
#if OCC_VERSION_LARGE >= 0x070400ff
|
||||
case PrsDim_DimensionSelectionMode_Text : return Operation_MoveText;
|
||||
#else
|
||||
case AIS_DSM_Text : return Operation_MoveText;
|
||||
|
@ -198,9 +198,6 @@ void MeasureGUI_ManageDimensionsDlg::StartSelection( const Selection theSelectio
|
||||
|
||||
anAISContext->ClearCurrents( Standard_False );
|
||||
anAISContext->ClearSelected( Standard_False );
|
||||
#if OCC_VERSION_LARGE <= 0x07030000
|
||||
anAISContext->OpenLocalContext( Standard_True, Standard_False );
|
||||
#endif
|
||||
Handle(MeasureGUI_DimensionFilter) aFilter = new MeasureGUI_DimensionFilter( myEditObject->GetStudyEntry() );
|
||||
|
||||
anAISContext->AddFilter( aFilter );
|
||||
@ -267,12 +264,8 @@ void MeasureGUI_ManageDimensionsDlg::StopSelection()
|
||||
* ------------------------------------------------ */
|
||||
|
||||
Handle(AIS_InteractiveContext) anAISContext = myOperatedViewer->getAISContext();
|
||||
#if OCC_VERSION_LARGE <= 0x07030000
|
||||
anAISContext->CloseLocalContext();
|
||||
#else
|
||||
anAISContext->Deactivate();
|
||||
anAISContext->Activate(0);
|
||||
#endif
|
||||
|
||||
LightApp_SelectionMgr* aSelectionMgr = myGeomGUI->getApp()->selectionMgr();
|
||||
|
||||
@ -365,19 +358,7 @@ void MeasureGUI_ManageDimensionsDlg::SelectionIntoArgument( const Selection theS
|
||||
anAISContext->InitSelected();
|
||||
|
||||
Handle(AIS_InteractiveObject) anAIS;
|
||||
#if OCC_VERSION_LARGE <= 0x07030000
|
||||
if ( anAISContext->HasOpenedContext() )
|
||||
{
|
||||
Handle(SelectMgr_EntityOwner) anAISOwner = anAISContext->SelectedOwner();
|
||||
anAIS = Handle(AIS_InteractiveObject)::DownCast( anAISOwner->Selectable() );
|
||||
}
|
||||
else
|
||||
{
|
||||
#endif
|
||||
anAIS = anAISContext->Current();
|
||||
#if OCC_VERSION_LARGE <= 0x07030000
|
||||
}
|
||||
#endif
|
||||
|
||||
int aDimensionId = IdFromPrs( anAIS );
|
||||
|
||||
@ -1252,19 +1233,7 @@ void MeasureGUI_ManageDimensionsDlg::SelectInViewer( SOCC_Viewer* theViewer, con
|
||||
{
|
||||
return;
|
||||
}
|
||||
#if OCC_VERSION_LARGE <= 0x07030000
|
||||
Standard_Boolean isLocal = anAISContext->HasOpenedContext();
|
||||
if ( isLocal )
|
||||
{
|
||||
anAISContext->ClearSelected( Standard_False );
|
||||
}
|
||||
else
|
||||
{
|
||||
#endif
|
||||
anAISContext->ClearCurrents( Standard_False );
|
||||
#if OCC_VERSION_LARGE <= 0x07030000
|
||||
}
|
||||
#endif
|
||||
SOCC_Prs* aPrs = dynamic_cast<SOCC_Prs*>( theViewer->CreatePrs( myEditObject->GetStudyEntry() ) );
|
||||
|
||||
AIS_ListOfInteractive aListOfIO;
|
||||
@ -1276,29 +1245,18 @@ void MeasureGUI_ManageDimensionsDlg::SelectInViewer( SOCC_Viewer* theViewer, con
|
||||
const Handle(AIS_InteractiveObject)& anIO = anIt.Value();
|
||||
if ( IdFromPrs( anIO ) != theId )
|
||||
{
|
||||
#if OCC_VERSION_LARGE <= 0x07030000
|
||||
if ( isLocal )
|
||||
{
|
||||
#endif
|
||||
|
||||
#if OCC_VERSION_LARGE > 0x07040000
|
||||
#if OCC_VERSION_LARGE >= 0x070400ff
|
||||
anAISContext->Deactivate( anIO, PrsDim_DimensionSelectionMode_Line );
|
||||
anAISContext->Deactivate( anIO, PrsDim_DimensionSelectionMode_Text );
|
||||
#else
|
||||
anAISContext->Deactivate( anIO, AIS_DSM_Line );
|
||||
anAISContext->Deactivate( anIO, AIS_DSM_Text );
|
||||
#endif
|
||||
}
|
||||
continue;
|
||||
#if OCC_VERSION_LARGE <= 0x07030000
|
||||
}
|
||||
|
||||
if ( isLocal )
|
||||
{
|
||||
#endif
|
||||
anAISContext->AddOrRemoveSelected( anIO, Standard_False );
|
||||
|
||||
#if OCC_VERSION_LARGE > 0x07040000
|
||||
#if OCC_VERSION_LARGE >= 0x070400ff
|
||||
anAISContext->Activate( anIO, PrsDim_DimensionSelectionMode_Line );
|
||||
anAISContext->Activate( anIO, PrsDim_DimensionSelectionMode_Text );
|
||||
#else
|
||||
@ -1306,16 +1264,7 @@ void MeasureGUI_ManageDimensionsDlg::SelectInViewer( SOCC_Viewer* theViewer, con
|
||||
anAISContext->Activate( anIO, AIS_DSM_Text );
|
||||
#endif
|
||||
|
||||
#if OCC_VERSION_LARGE <= 0x07030000
|
||||
}
|
||||
else
|
||||
{
|
||||
#endif
|
||||
anAISContext->AddOrRemoveCurrentObject( anIO, Standard_False );
|
||||
#if OCC_VERSION_LARGE <= 0x07030000
|
||||
}
|
||||
#endif
|
||||
|
||||
anAISContext->UpdateCurrentViewer();
|
||||
}
|
||||
}
|
||||
|
@ -70,7 +70,7 @@
|
||||
#include <V3d_View.hxx>
|
||||
|
||||
#include <Basics_OCCTVersion.hxx>
|
||||
#if OCC_VERSION_LARGE > 0x07040000
|
||||
#if OCC_VERSION_LARGE >= 0x070400ff
|
||||
#include <Graphic3d_Text.hxx>
|
||||
#else
|
||||
#include <StdSelect_DisplayMode.hxx>
|
||||
@ -372,11 +372,7 @@ void GEOM_AISShape::highlightSubShapes(const TColStd_IndexedMapOfInteger& aIndex
|
||||
{
|
||||
Handle(AIS_InteractiveObject) anObj = this;
|
||||
Handle(AIS_InteractiveContext) anIC = GetContext();
|
||||
if ( anIC.IsNull()
|
||||
#if OCC_VERSION_LARGE <= 0x07030000
|
||||
|| !anIC->HasOpenedContext()
|
||||
#endif
|
||||
)
|
||||
if ( anIC.IsNull() )
|
||||
return;
|
||||
|
||||
Standard_Boolean isAutoHilight = anIC->AutomaticHilight();
|
||||
@ -603,7 +599,7 @@ void GEOM_AISShape::drawField( const Handle(Prs3d_Presentation)& thePrs,
|
||||
anAspectText3d->SetColor( myLabelColor );
|
||||
aGroup->SetPrimitivesAspect( anAspectText3d );
|
||||
|
||||
#if OCC_VERSION_LARGE > 0x07040000
|
||||
#if OCC_VERSION_LARGE >= 0x070400ff
|
||||
Handle(Graphic3d_Text) aText = new Graphic3d_Text (14.);
|
||||
aText->SetText (aString.toUtf8().constData());
|
||||
aText->SetPosition (aCenter);
|
||||
@ -678,7 +674,7 @@ void GEOM_AISShape::drawName( const Handle(Prs3d_Presentation)& thePrs )
|
||||
aGroup->SetPrimitivesAspect( anAspectText3d );
|
||||
|
||||
const char* aName = getIO()->getName();
|
||||
#if OCC_VERSION_LARGE > 0x07040000
|
||||
#if OCC_VERSION_LARGE >= 0x070400ff
|
||||
Handle(Graphic3d_Text) aText = new Graphic3d_Text (16.);
|
||||
aText->SetText (aName);
|
||||
aText->SetPosition (aCenter);
|
||||
|
@ -538,7 +538,7 @@ Bnd_Box GEOM_Annotation::TextBoundingBox() const
|
||||
{
|
||||
Handle(Prs3d_TextAspect) anAsp = myDrawer->TextAspect();
|
||||
Font_FTFont aFont;
|
||||
#if OCC_VERSION_LARGE > 0x07040000
|
||||
#if OCC_VERSION_LARGE >= 0x070400FF
|
||||
Font_FTFontParams aFontParams;
|
||||
aFontParams.PointSize = (unsigned int)anAsp->Height();
|
||||
aFontParams.Resolution = GetContext()->CurrentViewer()->DefaultRenderingParams().Resolution;
|
||||
@ -708,11 +708,7 @@ void GEOM_Annotation::OpenGl_Annotation::Render( const Handle(OpenGl_Workspace)&
|
||||
const unsigned int aDPI = theWorkspace->View()->RenderingParams().Resolution;
|
||||
if (myTextDPI != aDPI)
|
||||
{
|
||||
#if OCC_VERSION_LARGE <= 0x07030000
|
||||
const OpenGl_AspectText* anAspect = theWorkspace->AspectText();
|
||||
#else
|
||||
const OpenGl_Aspects* anAspect = theWorkspace->Aspects();
|
||||
#endif
|
||||
|
||||
// getting string size will also initialize font library
|
||||
#if OCC_VERSION_LARGE >= 0x07040000
|
||||
@ -790,11 +786,7 @@ void GEOM_Annotation::OpenGl_Annotation::Render( const Handle(OpenGl_Workspace)&
|
||||
{
|
||||
Handle(Graphic3d_PresentationAttributes) empty;
|
||||
theWorkspace->SetHighlightStyle(empty);
|
||||
#if OCC_VERSION_LARGE <= 0x07030000
|
||||
theWorkspace->ApplyAspectLine();
|
||||
#else
|
||||
theWorkspace->ApplyAspects();
|
||||
#endif
|
||||
}
|
||||
|
||||
GLint myOldDepthMode = 0;
|
||||
|
@ -274,7 +274,7 @@ private:
|
||||
virtual void ComputeSelection( const Handle(SelectMgr_Selection)& theSelection,
|
||||
const Standard_Integer theMode ) Standard_OVERRIDE;
|
||||
|
||||
#if OCC_VERSION_LARGE > 0x07040000
|
||||
#if OCC_VERSION_LARGE >= 0x070400ff
|
||||
virtual void setLocalTransformation( const Handle(TopLoc_Datum3D)& /*theTransformation*/ ) Standard_OVERRIDE {}
|
||||
#else
|
||||
virtual void setLocalTransformation( const Handle(Geom_Transformation)& /*theTransformation*/ ) Standard_OVERRIDE {}
|
||||
@ -415,11 +415,7 @@ public:
|
||||
const Standard_Boolean isMatches = Select3D_SensitiveBox::Matches( theMgr, thePickResult );
|
||||
if ( !myIsDepthCulling )
|
||||
{
|
||||
#if OCC_VERSION_LARGE <= 0x07030000
|
||||
thePickResult = SelectBasics_PickResult( -DBL_MAX, thePickResult.DistToGeomCenter() );
|
||||
#else
|
||||
thePickResult = SelectBasics_PickResult( -DBL_MAX, thePickResult.DistToGeomCenter(), thePickResult.PickedPoint() );
|
||||
#endif
|
||||
}
|
||||
return isMatches;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user