Salome HOME
projects
/
modules
/
hydro.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Initial merge of branch 'BR_HYDRO_IMPS_2016' into BR_PORTING_OCCT_7
[modules/hydro.git]
/
src
/
HYDROGUI
/
HYDROGUI_VTKPrsShape.cxx
diff --git
a/src/HYDROGUI/HYDROGUI_VTKPrsShape.cxx
b/src/HYDROGUI/HYDROGUI_VTKPrsShape.cxx
index 7512b0a39276be343d805dd695e0bd1badebc342..af8b9bf89502ebdaa90f3363c142c8ef10265665 100644
(file)
--- a/
src/HYDROGUI/HYDROGUI_VTKPrsShape.cxx
+++ b/
src/HYDROGUI/HYDROGUI_VTKPrsShape.cxx
@@
-1,12
+1,8
@@
-// Copyright (C) 2007-2013 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
-//
+// Copyright (C) 2014-2015 EDF-R&D
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License
, or (at your option) any later version
.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
@@
-55,7
+51,7
@@
#include <Precision.hxx>
#include <Precision.hxx>
-#include <
GEOM
_Actor.h>
+#include <
HYDROGUI
_Actor.h>
#include <vtkScalarBarActor.h>
#include <QString>
#include <vtkScalarBarActor.h>
#include <QString>
@@
-69,7
+65,8
@@
const double VTK_MIN_DEFLECTION = 0.001;
// Purpose : Constructor
//=======================================================================
HYDROGUI_VTKPrsShape::HYDROGUI_VTKPrsShape( const Handle(HYDROData_Entity)& theObject )
// Purpose : Constructor
//=======================================================================
HYDROGUI_VTKPrsShape::HYDROGUI_VTKPrsShape( const Handle(HYDROData_Entity)& theObject )
-: HYDROGUI_VTKPrs( theObject )
+: HYDROGUI_VTKPrs( theObject ),
+myDisplayMode( GEOM_Actor::eWireframe )
{
}
{
}
@@
-87,18
+84,18
@@
HYDROGUI_VTKPrsShape::~HYDROGUI_VTKPrsShape()
//================================================================
void HYDROGUI_VTKPrsShape::compute()
{
//================================================================
void HYDROGUI_VTKPrsShape::compute()
{
+ HYDROGUI_VTKPrs::compute();
+
if ( !getObject().IsNull() )
{
buildShape();
if ( !myTopoShape.IsNull() )
{
if ( !getObject().IsNull() )
{
buildShape();
if ( !myTopoShape.IsNull() )
{
-
GEOM_Actor* anActor = GEOM_Actor::New(
);
+
HYDROGUI_Actor* anActor = getActor<HYDROGUI_Actor>(this
);
anActor->SetShape( myTopoShape, VTK_MIN_DEFLECTION );
anActor->SetShape( myTopoShape, VTK_MIN_DEFLECTION );
+ anActor->setDisplayMode( myDisplayMode );
anActor->setIO( getIO() );
anActor->setIO( getIO() );
- AddObject( anActor );
-
- anActor->Delete();
}
}
}
}
}
}
@@
-146,6
+143,7
@@
void HYDROGUI_VTKPrsShape::buildShape()
setWire( aPolylineWire, false, false );
} else {
myTopoShape = aPolylineShape;
setWire( aPolylineWire, false, false );
} else {
myTopoShape = aPolylineShape;
+ myDisplayMode = GEOM_Actor::eWireframe;
}
}
}
}
@@
-165,6
+163,7
@@
void HYDROGUI_VTKPrsShape::buildShape()
setWire( aPolylineWire, false, false );
} else {
myTopoShape = aPolylineShape;
setWire( aPolylineWire, false, false );
} else {
myTopoShape = aPolylineShape;
+ myDisplayMode = GEOM_Actor::eWireframe;
}
}
}
}
@@
-187,14
+186,13
@@
void HYDROGUI_VTKPrsShape::buildShape()
else
{
// Generate the filling color for zone
else
{
// Generate the filling color for zone
- QStringList a
Geom
ObjectsNames;
+ QStringList a
n
ObjectsNames;
- HYDROData_SequenceOfObjects aRefObjects = aZone->Get
Geometry
Objects();
+ HYDROData_SequenceOfObjects aRefObjects = aZone->GetObjects();
HYDROData_SequenceOfObjects::Iterator anIter( aRefObjects );
for ( ; anIter.More(); anIter.Next() )
{
HYDROData_SequenceOfObjects::Iterator anIter( aRefObjects );
for ( ; anIter.More(); anIter.Next() )
{
- Handle(HYDROData_Object) aRefbject =
- Handle(HYDROData_Object)::DownCast( anIter.Value() );
+ Handle(HYDROData_Entity) aRefbject = anIter.Value();
if ( aRefbject.IsNull() )
continue;
if ( aRefbject.IsNull() )
continue;
@@
-202,7
+200,7
@@
void HYDROGUI_VTKPrsShape::buildShape()
if ( aRefObjectName.isEmpty() )
continue;
if ( aRefObjectName.isEmpty() )
continue;
- a
Geom
ObjectsNames.append( aRefObjectName );
+ a
n
ObjectsNames.append( aRefObjectName );
}
//setFillingColor( HYDROGUI_Tool::GenerateFillingColor( aDocument, aGeomObjectsNames ) );
}
//setFillingColor( HYDROGUI_Tool::GenerateFillingColor( aDocument, aGeomObjectsNames ) );
@@
-267,15
+265,16
@@
void HYDROGUI_VTKPrsShape::buildShape()
}
void HYDROGUI_VTKPrsShape::setWire( const TopoDS_Wire& theWire,
}
void HYDROGUI_VTKPrsShape::setWire( const TopoDS_Wire& theWire,
- const bool theToDisplay,
- const bool theIsUpdateViewer )
+
const bool theToDisplay,
+
const bool theIsUpdateViewer )
{
myTopoShape = theWire;
{
myTopoShape = theWire;
+ myDisplayMode = GEOM_Actor::eWireframe;
}
void HYDROGUI_VTKPrsShape::setFaces( const TopoDS_Compound& theWires,
}
void HYDROGUI_VTKPrsShape::setFaces( const TopoDS_Compound& theWires,
- const bool theToDisplay,
- const bool theIsUpdateViewer )
+
const bool theToDisplay,
+
const bool theIsUpdateViewer )
{
TopExp_Explorer anExp( theWires, TopAbs_WIRE );
TopoDS_Compound aCompound;
{
TopExp_Explorer anExp( theWires, TopAbs_WIRE );
TopoDS_Compound aCompound;
@@
-296,11
+295,12
@@
void HYDROGUI_VTKPrsShape::setFaces( const TopoDS_Compound& theWires,
}
myTopoShape = aCompound;
}
myTopoShape = aCompound;
+ //myDisplayMode = GEOM_Actor::eShading;
}
void HYDROGUI_VTKPrsShape::setFace( const TopoDS_Wire& theWire,
}
void HYDROGUI_VTKPrsShape::setFace( const TopoDS_Wire& theWire,
- const bool theToDisplay,
- const bool theIsUpdateViewer )
+
const bool theToDisplay,
+
const bool theIsUpdateViewer )
{
BRepBuilderAPI_MakeFace aFaceBuilder( theWire, Standard_True );
aFaceBuilder.Build();
{
BRepBuilderAPI_MakeFace aFaceBuilder( theWire, Standard_True );
aFaceBuilder.Build();
@@
-312,15
+312,17
@@
void HYDROGUI_VTKPrsShape::setFace( const TopoDS_Wire& theWire,
}
void HYDROGUI_VTKPrsShape::setFace( const TopoDS_Face& theFace,
}
void HYDROGUI_VTKPrsShape::setFace( const TopoDS_Face& theFace,
- const bool theToDisplay,
- const bool theIsUpdateViewer )
+
const bool theToDisplay,
+
const bool theIsUpdateViewer )
{
myTopoShape = theFace;
{
myTopoShape = theFace;
+ //myDisplayMode = GEOM_Actor::eShading;
}
void HYDROGUI_VTKPrsShape::setShape( const TopoDS_Shape& theShape,
}
void HYDROGUI_VTKPrsShape::setShape( const TopoDS_Shape& theShape,
- const bool theToDisplay,
- const bool theIsUpdateViewer )
+
const bool theToDisplay,
+
const bool theIsUpdateViewer )
{
myTopoShape = theShape;
{
myTopoShape = theShape;
+ //myDisplayMode = GEOM_Actor::eShading;
}
}